use of com.emc.storageos.model.protection.ProtectionSystemRestRep in project coprhd-controller by CoprHD.
the class ProtectionMapper method map.
public static ProtectionSystemRestRep map(ProtectionSystem from) {
if (from == null) {
return null;
}
ProtectionSystemRestRep to = new ProtectionSystemRestRep();
mapDiscoveredSystemObjectFields(from, to);
to.setInstallationId(from.getInstallationId());
to.setMajorVersion(from.getMajorVersion());
to.setMinorVersion(from.getMinorVersion());
to.setIpAddress(from.getIpAddress());
to.setPortNumber(from.getPortNumber());
to.setReachableStatus(from.getReachableStatus());
to.setUsername(from.getUsername());
to.setNativeGuid(from.getNativeGuid());
if (from.getRpSiteNames() != null) {
List<ProtectionSystemRPClusterRestRep> clusterReps = new ArrayList<>();
for (Map.Entry<String, String> clusterEntry : from.getRpSiteNames().entrySet()) {
ProtectionSystemRPClusterRestRep clusterRep = new ProtectionSystemRPClusterRestRep();
clusterRep.setClusterId(clusterEntry.getKey());
clusterRep.setClusterName(clusterEntry.getValue());
// See if there are assigned virtual arrays for clusters
if (from.getSiteAssignedVirtualArrays() != null && from.getSiteAssignedVirtualArrays().get(clusterEntry.getKey()) != null) {
List<String> assignedVarrays = new ArrayList<>();
assignedVarrays.addAll(from.getSiteAssignedVirtualArrays().get(clusterEntry.getKey()));
clusterRep.setAssignedVarrays(assignedVarrays);
}
clusterReps.add(clusterRep);
}
to.setRpClusters(clusterReps);
}
return to;
}
use of com.emc.storageos.model.protection.ProtectionSystemRestRep in project coprhd-controller by CoprHD.
the class DataProtectionSystems method edit.
@FlashException("list")
public static void edit(String id) {
addReferenceData();
ProtectionSystemRestRep protectionSystem = ProtectionSystemUtils.getProtectionSystem(id);
if (protectionSystem != null) {
DataProtectionSystemForm dataProtectionSystem = new DataProtectionSystemForm(protectionSystem);
render(dataProtectionSystem);
} else {
flash.error(MessagesUtils.get(UNKNOWN, id));
list();
}
}
use of com.emc.storageos.model.protection.ProtectionSystemRestRep in project coprhd-controller by CoprHD.
the class DataProtectionSystems method itemDetails.
public static void itemDetails(String id) {
ProtectionSystemRestRep protectionSystem = ProtectionSystemUtils.getProtectionSystem(id);
if (protectionSystem == null) {
error(MessagesUtils.get(UNKNOWN, id));
}
ProtectionSystemConnectivityRestRep connectivity = ProtectionSystemUtils.getConnectivity(protectionSystem);
Map<URI, StorageSystemRestRep> storageSystemMap = ProtectionSystemUtils.getStorageSystemMap(connectivity);
render(protectionSystem, connectivity, storageSystemMap);
}
use of com.emc.storageos.model.protection.ProtectionSystemRestRep in project coprhd-controller by CoprHD.
the class DiscoverUnmanagedCGsService method execute.
@Override
public void execute() throws Exception {
List<URI> uris = uris(protectionSystems);
List<ProtectionSystemRestRep> systemRestReps = execute(new GetProtectionSystems(uris));
for (ProtectionSystemRestRep protectionSystem : systemRestReps) {
logInfo("discover.unmanaged.cg.service.discovering", protectionSystem.getName());
execute(new DiscoverUnmanagedCGs(protectionSystem.getId().toString(), DiscoverUnmanagedCGs.UnmanagedNamespace.UNMANAGED_CGS));
int postCount = countUnmanagedCGs(protectionSystem.getId().toString());
logInfo("discover.unmanaged.cg.service.discovered", postCount, protectionSystem.getName());
}
}
use of com.emc.storageos.model.protection.ProtectionSystemRestRep in project coprhd-controller by CoprHD.
the class DiscoverUnmanagedVolumesService method execute.
@Override
public void execute() throws Exception {
List<URI> uris = uris(storageSystems);
List<StorageSystemRestRep> systemRestReps = execute(new GetStorageSystems(uris));
// remove any VPLEX systems and add them back at the end of the systems list
List<StorageSystemRestRep> vplexSystems = new ArrayList<StorageSystemRestRep>();
Iterator<StorageSystemRestRep> it = systemRestReps.iterator();
while (it.hasNext()) {
StorageSystemRestRep system = it.next();
if (BlockProviderUtils.isVplex(system)) {
vplexSystems.add(system);
it.remove();
}
}
systemRestReps.addAll(vplexSystems);
for (StorageSystemRestRep storageSystem : systemRestReps) {
logInfo("discover.unmanaged.volume.service.discovering", storageSystem.getName());
execute(new DiscoverUnmanagedVolumes(storageSystem.getId().toString()));
int postCount = countUnmanagedVolumes(storageSystem.getId().toString());
logInfo("discover.unmanaged.volume.service.discovered", postCount, storageSystem.getName());
}
List<ProtectionSystemRestRep> protectionSystemRestReps = execute(new GetProtectionSystems());
for (ProtectionSystemRestRep protectionSystem : protectionSystemRestReps) {
logInfo("discover.unmanaged.volume.service.discoveringcgs", protectionSystem.getName());
execute(new DiscoverUnmanagedCGs(protectionSystem.getId().toString(), DiscoverUnmanagedCGs.UnmanagedNamespace.UNMANAGED_CGS));
logInfo("discover.unmanaged.volume.service.discoveredcgs", protectionSystem.getName());
}
}
Aggregations