Search in sources :

Example 6 with UnManagedVolumeRestRep

use of com.emc.storageos.model.block.UnManagedVolumeRestRep 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;
}
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 7 with UnManagedVolumeRestRep

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

the class VirtualDataCenterProvider method getUnmanagedVolume.

@Asset("unmanagedVolume")
@AssetDependencies({ "host", "unmanagedBlockVirtualPool", "volumeFilter" })
public List<AssetOption> getUnmanagedVolume(AssetOptionsContext ctx, URI host, URI vpool, int volumePage) {
    List<AssetOption> options = Lists.newArrayList();
    for (UnManagedVolumeRestRep volume : listUnmanagedVolumesByHost(ctx, host)) {
        if (matchesVpool(volume, vpool)) {
            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 8 with UnManagedVolumeRestRep

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

the class VirtualDataCenterProvider method getUnmanagedVolumeFilter.

@Asset("volumeFilter")
@AssetDependencies({ "host", "unmanagedBlockVirtualPool" })
public List<AssetOption> getUnmanagedVolumeFilter(AssetOptionsContext ctx, URI host, URI vpool) {
    List<String> volumeNames = Lists.newArrayList();
    for (UnManagedVolumeRestRep volume : listUnmanagedVolumesByHost(ctx, host)) {
        if (matchesVpool(volume, vpool)) {
            volumeNames.add(getLabel(volume));
        }
    }
    Collections.sort(volumeNames, new StringComparator(false));
    return getVolumeFilterOptions(volumeNames);
}
Also used : UnManagedVolumeRestRep(com.emc.storageos.model.block.UnManagedVolumeRestRep) StringComparator(com.emc.sa.util.StringComparator) AssetDependencies(com.emc.sa.asset.annotation.AssetDependencies) Asset(com.emc.sa.asset.annotation.Asset)

Example 9 with UnManagedVolumeRestRep

use of com.emc.storageos.model.block.UnManagedVolumeRestRep 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 10 with UnManagedVolumeRestRep

use of com.emc.storageos.model.block.UnManagedVolumeRestRep 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

UnManagedVolumeRestRep (com.emc.storageos.model.block.UnManagedVolumeRestRep)18 URI (java.net.URI)9 ArrayList (java.util.ArrayList)8 Asset (com.emc.sa.asset.annotation.Asset)6 AssetDependencies (com.emc.sa.asset.annotation.AssetDependencies)6 Volume (com.emc.storageos.db.client.model.Volume)6 Test (org.junit.Test)6 Ignore (org.junit.Ignore)5 AssetOption (com.emc.vipr.model.catalog.AssetOption)4 StringComparator (com.emc.sa.util.StringComparator)2 GetMobilityGroupClusters (com.emc.sa.service.vipr.block.tasks.GetMobilityGroupClusters)1 GetMobilityGroupHosts (com.emc.sa.service.vipr.block.tasks.GetMobilityGroupHosts)1 GetUnmanagedVolumes (com.emc.sa.service.vipr.block.tasks.GetUnmanagedVolumes)1 GetUnmanagedVolumesByHostOrCluster (com.emc.sa.service.vipr.block.tasks.GetUnmanagedVolumesByHostOrCluster)1 IngestExportedUnmanagedVolumes (com.emc.sa.service.vipr.block.tasks.IngestExportedUnmanagedVolumes)1 IngestUnexportedUnmanagedVolumes (com.emc.sa.service.vipr.block.tasks.IngestUnexportedUnmanagedVolumes)1 WaitForTasks (com.emc.sa.service.vipr.tasks.WaitForTasks)1 NamedRelatedResourceRep (com.emc.storageos.model.NamedRelatedResourceRep)1 StringMapAdapter (com.emc.storageos.model.adapters.StringMapAdapter)1 StringSetMapAdapter (com.emc.storageos.model.adapters.StringSetMapAdapter)1