use of com.emc.storageos.model.systems.StorageSystemRestRep in project coprhd-controller by CoprHD.
the class Networks method getDisconnectedStorage.
public static void getDisconnectedStorage(@As(",") String[] ids) {
List<NetworkRestRep> networks = NetworkUtils.getNetworks();
Set<String> connectedstoragesystems = new HashSet<String>();
Set<String> disConnectedstoragesystems = new HashSet<String>();
for (NetworkRestRep network : networks) {
for (StoragePortRestRep port : StoragePortUtils.getStoragePortsByNetwork(network.getId())) {
connectedstoragesystems.add(port.getStorageDevice().getId().toString());
}
}
for (String id : ids) {
StorageSystemRestRep storageSystem = StorageSystemUtils.getStorageSystem(id);
if (storageSystem == null || storageSystem.getRegistrationStatus().equals("UNREGISTERED")) {
// ignore for now
continue;
}
if (!connectedstoragesystems.contains(id)) {
disConnectedstoragesystems.add(storageSystem.getName());
}
}
renderJSON(disConnectedstoragesystems);
}
use of com.emc.storageos.model.systems.StorageSystemRestRep in project coprhd-controller by CoprHD.
the class StorageSystems method editPort.
public static void editPort(String id, String portId) {
StoragePortRestRep storagePort = StoragePortUtils.getStoragePort(portId);
if (storagePort == null) {
flash.error(MessagesUtils.get(UNKNOWN_PORT, portId));
ports(id);
}
URI storageSystemId = id(storagePort.getStorageDevice());
StorageSystemRestRep storageSystem = StorageSystemUtils.getStorageSystem(storageSystemId);
if (storageSystem == null) {
flash.error(MessagesUtils.get(UNKNOWN, storageSystemId));
list();
}
if (RegistrationStatus.isUnregistered(storageSystem.getRegistrationStatus())) {
flash.put("warning", MessagesUtils.get(NOT_REGISTERED, storageSystem.getName()));
}
StorageArrayPortForm storageArrayPort = new StorageArrayPortForm();
storageArrayPort.readFrom(storagePort);
render(storageArrayPort, storagePort, storageSystem);
}
use of com.emc.storageos.model.systems.StorageSystemRestRep in project coprhd-controller by CoprHD.
the class StorageSystems method discoveryCheckJson.
public static void discoveryCheckJson(@As(",") String[] ids) {
List<String> failedDiscovery = new ArrayList<String>();
for (String id : ids) {
StorageSystemRestRep storageSystem = StorageSystemUtils.getStorageSystem(id);
if (storageSystem == null || storageSystem.getRegistrationStatus().equals("UNREGISTERED")) {
// ignore for now
continue;
}
if (!storageSystem.getDiscoveryJobStatus().equals("COMPLETE")) {
failedDiscovery.add(storageSystem.getName());
continue;
}
}
renderJSON(failedDiscovery);
}
use of com.emc.storageos.model.systems.StorageSystemRestRep in project coprhd-controller by CoprHD.
the class StorageSystems method createPort.
public static void createPort(String id) {
StorageSystemRestRep storageSystem = StorageSystemUtils.getStorageSystem(id);
StringOption[] portTypeOptions = { new StringOption("", ""), new StringOption("IP", StringOption.getDisplayValue("IP", "storageArrayPort.portTypes")), new StringOption("FC", StringOption.getDisplayValue("FC", "storageArrayPort.portTypes")) };
renderArgs.put("portTypeOptions", Arrays.asList(portTypeOptions));
render(storageSystem);
}
use of com.emc.storageos.model.systems.StorageSystemRestRep in project coprhd-controller by CoprHD.
the class StorageSystems method ports.
public static void ports(String id) {
addReferenceData();
StorageSystemRestRep storageSystem = StorageSystemUtils.getStorageSystem(id);
if (storageSystem == null) {
flash.error(MessagesUtils.get(UNKNOWN, id));
list();
}
StorageArrayPortDataTable dataTable = new StorageArrayPortDataTable(storageSystem);
render("@listPorts", storageSystem, dataTable);
}
Aggregations