Search in sources :

Example 46 with HostRestRep

use of com.emc.storageos.model.host.HostRestRep in project coprhd-controller by CoprHD.

the class HostMapper method map.

public static HostRestRep map(Host host, ComputeElement computeElement, UCSServiceProfile serviceProfile, ComputeSystem computeSystem) {
    HostRestRep to = map(host);
    if (computeElement != null) {
        StringBuffer buffer = new StringBuffer();
        if (computeSystem != null) {
            buffer.append(computeSystem.getLabel() + " : ");
        }
        buffer.append(computeElement.getLabel());
        to.setComputeElementName(buffer.toString());
    }
    if (serviceProfile != null) {
        StringBuffer buffer = new StringBuffer();
        if (computeSystem != null) {
            buffer.append(computeSystem.getLabel() + " : ");
        }
        buffer.append(serviceProfile.getLabel());
        to.setServiceProfileName(buffer.toString());
    }
    return to;
}
Also used : HostRestRep(com.emc.storageos.model.host.HostRestRep)

Aggregations

HostRestRep (com.emc.storageos.model.host.HostRestRep)46 URI (java.net.URI)17 ArrayList (java.util.ArrayList)10 ExecutionException (com.emc.sa.engine.ExecutionException)7 Host (com.emc.storageos.db.client.model.Host)6 ClusterRestRep (com.emc.storageos.model.host.cluster.ClusterRestRep)6 DeactivateHost (com.emc.sa.service.vipr.compute.tasks.DeactivateHost)5 DiscoverHost (com.emc.sa.service.vipr.compute.tasks.DiscoverHost)5 GetHost (com.emc.sa.service.vipr.tasks.GetHost)5 ExportGroupRestRep (com.emc.storageos.model.block.export.ExportGroupRestRep)5 TimeoutException (com.emc.vipr.client.exceptions.TimeoutException)5 ViPRException (com.emc.vipr.client.exceptions.ViPRException)5 HashMap (java.util.HashMap)5 HostUpdateParam (com.emc.storageos.model.host.HostUpdateParam)4 InitiatorRestRep (com.emc.storageos.model.host.InitiatorRestRep)4 Asset (com.emc.sa.asset.annotation.Asset)3 RelatedResourceRep (com.emc.storageos.model.RelatedResourceRep)3 BlockObjectRestRep (com.emc.storageos.model.block.BlockObjectRestRep)3 VcenterDataCenterRestRep (com.emc.storageos.model.host.vcenter.VcenterDataCenterRestRep)3 Task (com.emc.vipr.client.Task)3