Search in sources :

Example 21 with FileVirtualPoolRestRep

use of com.emc.storageos.model.vpool.FileVirtualPoolRestRep in project coprhd-controller by CoprHD.

the class FileVirtualPools method duplicate.

public static void duplicate(String ids) {
    FileVirtualPoolRestRep targetVpool = VirtualPoolUtils.getFileVirtualPool(ids);
    if (targetVpool == null) {
        flash.error(MessagesUtils.get(UNKNOWN, ids));
        backToReferrer();
    }
    FileVirtualPoolForm copy = new FileVirtualPoolForm();
    copy.load(targetVpool);
    copy.id = null;
    copy.name = Messages.get("virtualPools.duplicate.name", copy.name);
    // Target VPool could have resources, set resources to 0 on the new Copy VPool so user can modify form
    copy.numResources = 0;
    edit(copy);
}
Also used : FileVirtualPoolRestRep(com.emc.storageos.model.vpool.FileVirtualPoolRestRep) FileVirtualPoolForm(models.virtualpool.FileVirtualPoolForm)

Aggregations

FileVirtualPoolRestRep (com.emc.storageos.model.vpool.FileVirtualPoolRestRep)21 Asset (com.emc.sa.asset.annotation.Asset)8 AssetDependencies (com.emc.sa.asset.annotation.AssetDependencies)7 URI (java.net.URI)7 ViPRCoreClient (com.emc.vipr.client.ViPRCoreClient)6 AssetOption (com.emc.vipr.model.catalog.AssetOption)5 NamedRelatedResourceRep (com.emc.storageos.model.NamedRelatedResourceRep)3 FileShareRestRep (com.emc.storageos.model.file.FileShareRestRep)3 FilePolicyRestRep (com.emc.storageos.model.file.policy.FilePolicyRestRep)3 FileVirtualPoolProtectionParam (com.emc.storageos.model.vpool.FileVirtualPoolProtectionParam)3 Map (java.util.Map)3 VirtualArrayRestRep (com.emc.storageos.model.varray.VirtualArrayRestRep)2 FileVirtualPoolForm (models.virtualpool.FileVirtualPoolForm)2 VirtualPoolMapper.toFileVirtualPool (com.emc.storageos.api.mapper.VirtualPoolMapper.toFileVirtualPool)1 MapFileVirtualPool (com.emc.storageos.api.mapper.functions.MapFileVirtualPool)1 VirtualPool (com.emc.storageos.db.client.model.VirtualPool)1 RelatedResourceRep (com.emc.storageos.model.RelatedResourceRep)1 StoragePoolRestRep (com.emc.storageos.model.pools.StoragePoolRestRep)1 StoragePortRestRep (com.emc.storageos.model.ports.StoragePortRestRep)1 ProjectRestRep (com.emc.storageos.model.project.ProjectRestRep)1