use of com.emc.vipr.model.catalog.AssetOption in project coprhd-controller by CoprHD.
the class VirtualArrayProvider method getTargetVirtualArrays.
@Asset("fileTargetVirtualArray")
@AssetDependencies({ "fileFilePolicy", "unprotectedFilesystem" })
public List<AssetOption> getTargetVirtualArrays(AssetOptionsContext context, URI filePolicy, URI fsId) {
ViPRCoreClient client = api(context);
FilePolicyRestRep policyRest = client.fileProtectionPolicies().getFilePolicy(filePolicy);
if (policyRest.getType().equals("file_snapshot")) {
VirtualArrayRestRep vArray = null;
List<AssetOption> options = Lists.newArrayList();
FileShareRestRep fsObj = client.fileSystems().get(fsId);
if (fsObj != null) {
vArray = client.varrays().get(fsObj.getVirtualArray().getId());
options.add(createBaseResourceOption(vArray));
}
return options;
} else {
return getFileVirtualArrays(context);
}
}
use of com.emc.vipr.model.catalog.AssetOption in project coprhd-controller by CoprHD.
the class VirtualDataCenterProvider method getUnexportedIngestionMethod.
@Asset("unexportedIngestionMethod")
@AssetDependencies({ "unmanagedBlockStorageSystem" })
public List<AssetOption> getUnexportedIngestionMethod(AssetOptionsContext ctx, URI storageSystemId) {
ViPRCoreClient client = api(ctx);
StorageSystemRestRep storageSystemRestRep = client.storageSystems().get(storageSystemId);
List<AssetOption> options = Lists.newArrayList();
options.add(newAssetOption(IngestionMethodEnum.FULL.toString(), "unmanagedVolume.ingestMethod.full"));
if (BlockProviderUtils.isVplex(storageSystemRestRep)) {
options.add(newAssetOption(IngestionMethodEnum.VIRTUAL_VOLUMES_ONLY.toString(), "unmanagedVolume.ingestMethod.virtualVolumesOnly"));
}
return options;
}
use of com.emc.vipr.model.catalog.AssetOption in project coprhd-controller by CoprHD.
the class VirtualDataCenterProvider method getUnmanagedVolumeVirtualPoolsForHost.
@Asset("unmanagedBlockVirtualPool")
@AssetDependencies({ "host", "virtualArray" })
public List<AssetOption> getUnmanagedVolumeVirtualPoolsForHost(AssetOptionsContext ctx, URI host, URI virtualArray) {
Map<URI, Integer> vpools = getBlockVirtualPools(listUnmanagedVolumesByHost(ctx, host));
Map<URI, BlockVirtualPoolRestRep> virtualPoolMap = BlockProvider.getBlockVirtualPools(api(ctx), vpools.keySet());
List<AssetOption> options = Lists.newArrayList();
for (Map.Entry<URI, Integer> entry : vpools.entrySet()) {
BlockVirtualPoolRestRep vpool = virtualPoolMap.get(entry.getKey());
if (isVirtualPoolInVirtualArray(vpool, virtualArray)) {
options.add(newAssetOption(vpool.getId().toString(), "block.virtualPool.unmanaged", vpool.getName(), entry.getValue()));
}
}
AssetOptionsUtils.sortOptionsByLabel(options);
return options;
}
use of com.emc.vipr.model.catalog.AssetOption in project coprhd-controller by CoprHD.
the class VirtualDataCenterProvider method getUnmanagedVolumeByStorageSystem.
@Asset("unmanagedVolumeByStorageSystem")
@AssetDependencies({ "unmanagedBlockStorageSystem", "unmanagedBlockVirtualPool" })
public List<AssetOption> getUnmanagedVolumeByStorageSystem(AssetOptionsContext ctx, URI storageSystemId, URI vpool) {
List<AssetOption> options = Lists.newArrayList();
for (UnManagedVolumeRestRep volume : listUnmanagedVolumes(ctx, storageSystemId)) {
if (matchesVpool(volume, vpool) && !isNonRPExported(volume.getVolumeCharacteristics())) {
options.add(toAssetOption(volume));
}
}
AssetOptionsUtils.sortOptionsByLabel(options);
return options;
}
use of com.emc.vipr.model.catalog.AssetOption in project coprhd-controller by CoprHD.
the class VirtualDataCenterProvider method getUnmanagedFileSystemVirtualPools.
@Asset("unmanagedFileVirtualPool")
@AssetDependencies({ "fileStorageSystem", "virtualArray" })
public List<AssetOption> getUnmanagedFileSystemVirtualPools(AssetOptionsContext ctx, URI storageSystem, URI virtualArray) {
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 (isVirtualPoolInVirtualArray(vpool, virtualArray)) {
options.add(newAssetOption(vpool.getId().toString(), "file.virtualPool.unmanaged", vpool.getName(), entry.getValue()));
}
}
AssetOptionsUtils.sortOptionsByLabel(options);
return options;
}
Aggregations