Search in sources :

Example 96 with AssetDependencies

use of com.emc.sa.asset.annotation.AssetDependencies in project coprhd-controller by CoprHD.

the class VirtualDataCenterProvider method getExportedIngestionMethod.

@Asset("exportedIngestionMethod")
@AssetDependencies({ "unmanagedBlockVirtualPool" })
public List<AssetOption> getExportedIngestionMethod(AssetOptionsContext ctx, URI virtualPoolId) {
    ViPRCoreClient client = api(ctx);
    BlockVirtualPoolRestRep virtualPoolRestRep = client.blockVpools().get(virtualPoolId);
    List<AssetOption> options = Lists.newArrayList();
    options.add(newAssetOption(IngestionMethodEnum.FULL.toString(), "unmanagedVolume.ingestMethod.full"));
    if (virtualPoolRestRep.getHighAvailability() != null) {
        options.add(newAssetOption(IngestionMethodEnum.VIRTUAL_VOLUMES_ONLY.toString(), "unmanagedVolume.ingestMethod.virtualVolumesOnly"));
    }
    return options;
}
Also used : ViPRCoreClient(com.emc.vipr.client.ViPRCoreClient) AssetOption(com.emc.vipr.model.catalog.AssetOption) BlockVirtualPoolRestRep(com.emc.storageos.model.vpool.BlockVirtualPoolRestRep) AssetDependencies(com.emc.sa.asset.annotation.AssetDependencies) Asset(com.emc.sa.asset.annotation.Asset)

Example 97 with AssetDependencies

use of com.emc.sa.asset.annotation.AssetDependencies in project coprhd-controller by CoprHD.

the class VirtualDataCenterProvider method getUnmanagedFileSystemVirtualPools.

@Asset("unmanagedFileVirtualPool")
@AssetDependencies({ "fileStorageSystem", "virtualArray", "fileIngestExportType" })
public List<AssetOption> getUnmanagedFileSystemVirtualPools(AssetOptionsContext ctx, URI storageSystem, URI virtualArray, String ingestExportType) {
    Map<URI, Integer> vpools = getFileVirtualPools(listUnmanagedFilesystems(ctx, storageSystem), ingestExportType);
    Map<URI, FileVirtualPoolRestRep> virtualPoolMap = FileProvider.getFileVirtualPools(api(ctx), vpools.keySet());
    List<AssetOption> options = Lists.newArrayList();
    for (Map.Entry<URI, Integer> entry : vpools.entrySet()) {
        FileVirtualPoolRestRep vpool = virtualPoolMap.get(entry.getKey());
        if (isVirtualPoolInVirtualArray(vpool, virtualArray)) {
            options.add(newAssetOption(vpool.getId().toString(), "file.virtualPool.unmanaged", vpool.getName(), entry.getValue()));
        }
    }
    AssetOptionsUtils.sortOptionsByLabel(options);
    return options;
}
Also used : FileVirtualPoolRestRep(com.emc.storageos.model.vpool.FileVirtualPoolRestRep) AssetOption(com.emc.vipr.model.catalog.AssetOption) URI(java.net.URI) Map(java.util.Map) AssetDependencies(com.emc.sa.asset.annotation.AssetDependencies) Asset(com.emc.sa.asset.annotation.Asset)

Example 98 with AssetDependencies

use of com.emc.sa.asset.annotation.AssetDependencies in project coprhd-controller by CoprHD.

the class VirtualDataCenterProvider method getUnmanagedVolumeByStorageSystemVirtualPool.

@Asset("unmanagedVolumeByStorageSystemVirtualPool")
@AssetDependencies({ "unmanagedBlockStorageSystem", "blockVirtualPool", "volumeFilter" })
public List<AssetOption> getUnmanagedVolumeByStorageSystemVirtualPool(AssetOptionsContext ctx, URI storageSystemId, URI vpool, int volumePage) {
    List<AssetOption> options = Lists.newArrayList();
    for (UnManagedVolumeRestRep volume : listUnmanagedVolumes(ctx, storageSystemId, vpool)) {
        if (!isNonRPExported(volume.getVolumeCharacteristics())) {
            options.add(toAssetOption(volume));
        }
    }
    AssetOptionsUtils.sortOptionsByLabel(options);
    return getVolumeSublist(volumePage, options);
}
Also used : AssetOption(com.emc.vipr.model.catalog.AssetOption) UnManagedVolumeRestRep(com.emc.storageos.model.block.UnManagedVolumeRestRep) AssetDependencies(com.emc.sa.asset.annotation.AssetDependencies) Asset(com.emc.sa.asset.annotation.Asset)

Example 99 with AssetDependencies

use of com.emc.sa.asset.annotation.AssetDependencies in project coprhd-controller by CoprHD.

the class VirtualDataCenterProvider method getUnmanagedFileVirtualPools.

@Asset("unmanagedFileVirtualPool")
@AssetDependencies({ "fileStorageSystem" })
public List<AssetOption> getUnmanagedFileVirtualPools(AssetOptionsContext ctx, URI storageSystem) {
    Map<URI, Integer> vpools = getFileVirtualPools(listUnmanagedFilesystems(ctx, storageSystem));
    Map<URI, FileVirtualPoolRestRep> virtualPoolMap = FileProvider.getFileVirtualPools(api(ctx), vpools.keySet());
    List<AssetOption> options = Lists.newArrayList();
    for (Map.Entry<URI, Integer> entry : vpools.entrySet()) {
        FileVirtualPoolRestRep vpool = virtualPoolMap.get(entry.getKey());
        if (vpool != null) {
            options.add(newAssetOption(vpool.getId().toString(), "file.virtualPool.unmanaged", vpool.getName(), entry.getValue()));
        }
    }
    AssetOptionsUtils.sortOptionsByLabel(options);
    return options;
}
Also used : FileVirtualPoolRestRep(com.emc.storageos.model.vpool.FileVirtualPoolRestRep) AssetOption(com.emc.vipr.model.catalog.AssetOption) URI(java.net.URI) Map(java.util.Map) AssetDependencies(com.emc.sa.asset.annotation.AssetDependencies) Asset(com.emc.sa.asset.annotation.Asset)

Example 100 with AssetDependencies

use of com.emc.sa.asset.annotation.AssetDependencies in project coprhd-controller by CoprHD.

the class VirtualDataCenterProvider method getUnmanagedVolumeByStorageSystemVirtualPool.

@Asset("unmanagedVolumeByStorageSystemVirtualPool")
@AssetDependencies({ "unmanagedBlockStorageSystem", "blockVirtualPool" })
public List<AssetOption> getUnmanagedVolumeByStorageSystemVirtualPool(AssetOptionsContext ctx, URI storageSystemId, URI vpool) {
    List<AssetOption> options = Lists.newArrayList();
    for (UnManagedVolumeRestRep volume : listUnmanagedVolumes(ctx, storageSystemId, vpool)) {
        if (!isNonRPExported(volume.getVolumeCharacteristics())) {
            options.add(toAssetOption(volume));
        }
    }
    AssetOptionsUtils.sortOptionsByLabel(options);
    return options;
}
Also used : AssetOption(com.emc.vipr.model.catalog.AssetOption) UnManagedVolumeRestRep(com.emc.storageos.model.block.UnManagedVolumeRestRep) AssetDependencies(com.emc.sa.asset.annotation.AssetDependencies) Asset(com.emc.sa.asset.annotation.Asset)

Aggregations

Asset (com.emc.sa.asset.annotation.Asset)102 AssetDependencies (com.emc.sa.asset.annotation.AssetDependencies)102 ViPRCoreClient (com.emc.vipr.client.ViPRCoreClient)66 AssetOption (com.emc.vipr.model.catalog.AssetOption)63 URI (java.net.URI)43 VolumeRestRep (com.emc.storageos.model.block.VolumeRestRep)35 ArrayList (java.util.ArrayList)22 NamedRelatedResourceRep (com.emc.storageos.model.NamedRelatedResourceRep)17 FileShareRestRep (com.emc.storageos.model.file.FileShareRestRep)13 HashSet (java.util.HashSet)12 StoragePortGroupRestRepList (com.emc.storageos.model.portgroup.StoragePortGroupRestRepList)11 VirtualArrayRestRep (com.emc.storageos.model.varray.VirtualArrayRestRep)11 VirtualArrayRelatedResourceRep (com.emc.storageos.model.VirtualArrayRelatedResourceRep)10 BlockConsistencyGroupRestRep (com.emc.storageos.model.block.BlockConsistencyGroupRestRep)10 ExportGroupRestRep (com.emc.storageos.model.block.export.ExportGroupRestRep)10 BlockSnapshotRestRep (com.emc.storageos.model.block.BlockSnapshotRestRep)8 RelatedResourceRep (com.emc.storageos.model.RelatedResourceRep)7 SimpleValueRep (com.emc.storageos.model.customconfig.SimpleValueRep)7 FileVirtualPoolRestRep (com.emc.storageos.model.vpool.FileVirtualPoolRestRep)7 FilePolicyRestRep (com.emc.storageos.model.file.policy.FilePolicyRestRep)6