use of com.emc.storageos.model.RelatedResourceRep in project coprhd-controller by CoprHD.
the class DiscoverUnmanagedVolumesService method countUnmanagedVolumes.
private int countUnmanagedVolumes(String storageSystem) {
int total = 0;
List<RelatedResourceRep> unmanaged = execute(new GetUnmanagedVolumesForStorageSystem(storageSystem));
if (unmanaged != null) {
total = unmanaged.size();
}
return total;
}
use of com.emc.storageos.model.RelatedResourceRep in project coprhd-controller by CoprHD.
the class DiscoverUnmanagedCGsService method countUnmanagedCGs.
private int countUnmanagedCGs(String protectionSystem) {
int total = 0;
List<RelatedResourceRep> unmanaged = execute(new GetUnmanagedCGsForProtectionSystem(protectionSystem));
if (unmanaged != null) {
total = unmanaged.size();
}
return total;
}
use of com.emc.storageos.model.RelatedResourceRep in project coprhd-controller by CoprHD.
the class DiscoverUnmanagedFilesystemsService method countUnmanagedFileSystems.
private int countUnmanagedFileSystems(String storageSystem) {
int total = 0;
List<RelatedResourceRep> unmanaged = execute(new GetUnmanagedFilesystemsForStorageSystem(storageSystem));
if (unmanaged != null) {
total = unmanaged.size();
}
return total;
}
use of com.emc.storageos.model.RelatedResourceRep in project coprhd-controller by CoprHD.
the class FileProtectionPolicies method getVarraysAssociatedWithPools.
public static void getVarraysAssociatedWithPools(String id) {
List<VirtualArrayRestRep> varrayList = Lists.newArrayList();
Set<String> varraySet = Sets.newHashSet();
FileVirtualPoolRestRep vpool = getViprClient().fileVpools().get(uri(id));
List<RelatedResourceRep> varrays = vpool.getVirtualArrays();
for (RelatedResourceRep varray : varrays) {
varraySet.add(varray.getId().toString());
}
for (String varrayId : varraySet) {
VirtualArrayRestRep varray = getViprClient().varrays().get(uri(varrayId));
varrayList.add(varray);
}
renderJSON(varrayList);
}
use of com.emc.storageos.model.RelatedResourceRep in project coprhd-controller by CoprHD.
the class BlockVirtualPools method checkDisconnectedStoragePools.
public static void checkDisconnectedStoragePools(@As(",") String[] ids) {
List<BlockVirtualPoolRestRep> virtualpools = VirtualPoolUtils.getBlockVirtualPools();
Set<String> connectedstoragepools = new HashSet<String>();
List<String> failedArrays = new ArrayList<String>();
for (BlockVirtualPoolRestRep virtualpool : virtualpools) {
if (virtualpool.getUseMatchedPools()) {
for (RelatedResourceRep pool : virtualpool.getMatchedStoragePools()) {
connectedstoragepools.add(pool.getId().toString());
}
} else {
for (RelatedResourceRep pool : virtualpool.getAssignedStoragePools()) {
connectedstoragepools.add(pool.getId().toString());
}
}
}
for (String id : ids) {
StorageSystemRestRep storageSystem = StorageSystemUtils.getStorageSystem(id);
if (storageSystem != null && !storageSystem.getRegistrationStatus().equals("UNREGISTERED")) {
boolean found = false;
List<StoragePoolRestRep> storagepools = StoragePoolUtils.getStoragePools(id);
for (StoragePoolRestRep storagepool : storagepools) {
if (connectedstoragepools.contains(storagepool.getId().toString())) {
found = true;
break;
}
}
if (!found) {
failedArrays.add(storageSystem.getName());
}
}
}
renderJSON(failedArrays);
}
Aggregations