Search in sources :

Example 56 with VirtualArrayRestRep

use of com.emc.storageos.model.varray.VirtualArrayRestRep in project coprhd-controller by CoprHD.

the class VirtualArrayMapper method map.

public static VirtualArrayRestRep map(VirtualArray from) {
    if (from == null) {
        return null;
    }
    VirtualArrayRestRep to = new VirtualArrayRestRep();
    mapDataObjectFields(from, to);
    if (from.getAutoSanZoning() != null) {
        BlockSettings blockSettings = new BlockSettings();
        if (from.getAutoSanZoning() != null) {
            blockSettings.setAutoSanZoning(from.getAutoSanZoning());
        }
        to.setBlockSettings(blockSettings);
    }
    ObjectSettings objectSettings = null;
    if (from.getProtectionType() != null || from.getDeviceRegistered() != null) {
        objectSettings = new ObjectSettings();
        if (from.getDeviceRegistered() != null) {
            objectSettings.setDeviceRegistered(from.getDeviceRegistered());
        }
        if (from.getProtectionType() != null) {
            objectSettings.setProtectionType(from.getProtectionType());
        }
    }
    if (objectSettings != null) {
        to.setObjectSettings(objectSettings);
    }
    return to;
}
Also used : BlockSettings(com.emc.storageos.model.varray.BlockSettings) VirtualArrayRestRep(com.emc.storageos.model.varray.VirtualArrayRestRep) ObjectSettings(com.emc.storageos.model.varray.ObjectSettings)

Aggregations

VirtualArrayRestRep (com.emc.storageos.model.varray.VirtualArrayRestRep)56 ViPRCoreClient (com.emc.vipr.client.ViPRCoreClient)15 URI (java.net.URI)15 AssetOption (com.emc.vipr.model.catalog.AssetOption)14 Asset (com.emc.sa.asset.annotation.Asset)11 AssetDependencies (com.emc.sa.asset.annotation.AssetDependencies)11 ArrayList (java.util.ArrayList)10 FlashException (controllers.util.FlashException)9 HashSet (java.util.HashSet)8 NamedRelatedResourceRep (com.emc.storageos.model.NamedRelatedResourceRep)7 VolumeRestRep (com.emc.storageos.model.block.VolumeRestRep)6 StorageSystemRestRep (com.emc.storageos.model.systems.StorageSystemRestRep)6 RelatedResourceRep (com.emc.storageos.model.RelatedResourceRep)5 StoragePortRestRep (com.emc.storageos.model.ports.StoragePortRestRep)5 VirtualArrayRelatedResourceRep (com.emc.storageos.model.VirtualArrayRelatedResourceRep)4 ExportGroupRestRep (com.emc.storageos.model.block.export.ExportGroupRestRep)4 FileShareRestRep (com.emc.storageos.model.file.FileShareRestRep)4 BlockVirtualPoolRestRep (com.emc.storageos.model.vpool.BlockVirtualPoolRestRep)4 HashMap (java.util.HashMap)4 BlockConsistencyGroupRestRep (com.emc.storageos.model.block.BlockConsistencyGroupRestRep)3