Search in sources :

Example 1 with VplexMirrorRestRep

use of com.emc.storageos.model.block.VplexMirrorRestRep in project coprhd-controller by CoprHD.

the class BlockMapper method map.

public static VplexMirrorRestRep map(VplexMirror from) {
    if (from == null) {
        return null;
    }
    VplexMirrorRestRep to = new VplexMirrorRestRep();
    mapDataObjectFields(from, to);
    if (from.getSource() != null) {
        to.setSource(toNamedRelatedResource(ResourceTypeEnum.VOLUME, from.getSource().getURI(), from.getSource().getName()));
    }
    to.setStorageController(from.getStorageController());
    to.setVirtualArray(toRelatedResource(ResourceTypeEnum.VARRAY, from.getVirtualArray()));
    to.setDeviceLabel(from.getDeviceLabel() != null ? from.getDeviceLabel() : "");
    to.setNativeId(from.getNativeId() != null ? from.getNativeId() : "");
    to.setVirtualPool(toRelatedResource(ResourceTypeEnum.BLOCK_VPOOL, from.getVirtualPool()));
    return to;
}
Also used : VplexMirrorRestRep(com.emc.storageos.model.block.VplexMirrorRestRep)

Aggregations

VplexMirrorRestRep (com.emc.storageos.model.block.VplexMirrorRestRep)1