use of com.emc.storageos.model.vdc.VirtualDataCenterRestRep in project coprhd-controller by CoprHD.
the class VirtualDataCenters method reconnect.
private static void reconnect(List<URI> ids) {
if (!ids.isEmpty()) {
// UI only support single selection, ignore any additional IDs
URI id = ids.get(0);
Task<VirtualDataCenterRestRep> task = VirtualDataCenterUtils.reconnect(id);
flash.put("inProgressTask", task.getTaskResource().getId());
}
}
use of com.emc.storageos.model.vdc.VirtualDataCenterRestRep in project coprhd-controller by CoprHD.
the class VirtualDataCenters method disconnect.
private static void disconnect(List<URI> ids) {
if (!ids.isEmpty()) {
// UI only support single selection, ignore any additional IDs
URI id = ids.get(0);
Task<VirtualDataCenterRestRep> task = VirtualDataCenterUtils.disconnect(id);
flash.put("inProgressTask", task.getTaskResource().getId());
}
}
use of com.emc.storageos.model.vdc.VirtualDataCenterRestRep in project coprhd-controller by CoprHD.
the class VirtualDataCenters method listJson.
@FlashException(value = "list", keep = true)
public static void listJson() {
List<VirtualDataCenterRestRep> viprVDCs = VirtualDataCenterUtils.listByIds(refIds(VirtualDataCenterUtils.list()));
List<VirtualDataCentersDataTable.VirtualDataCenter> vdcs = Lists.newArrayList();
for (VirtualDataCenterRestRep vdc : viprVDCs) {
if (Security.isSystemAdminOrRestrictedSystemAdmin() || Security.isSecurityAdminOrRestrictedSecurityAdmin() || Security.isSystemMonitor()) {
vdcs.add(new VirtualDataCentersDataTable.VirtualDataCenter(vdc));
}
}
renderJSON(DataTablesSupport.createJSON(vdcs, params));
}
use of com.emc.storageos.model.vdc.VirtualDataCenterRestRep in project coprhd-controller by CoprHD.
the class VirtualDataCenters method edit.
@FlashException(value = "list", keep = true)
@Restrictions({ @Restrict("SYSTEM_ADMIN"), @Restrict("SECURITY_ADMIN"), @Restrict("RESTRICTED_SECURITY_ADMIN") })
public static void edit(String id) {
VirtualDataCenterRestRep viprVDC = VirtualDataCenterUtils.get(id);
if (viprVDC != null) {
VirtualDataCenterForm vdc = new VirtualDataCenterForm().from(viprVDC);
addRenderArgs();
render(vdc);
} else {
flash.error(MessagesUtils.get("vdcs.unknown", id));
list();
}
}
use of com.emc.storageos.model.vdc.VirtualDataCenterRestRep in project coprhd-controller by CoprHD.
the class VirtualDataCenterRestRepTest method testCanDisconnect.
@Test
public void testCanDisconnect() {
VirtualDataCenterRestRep vdc = new VirtualDataCenterRestRep();
vdc.setLocal(false);
vdc.setConnectionStatus("CONNECTED");
Assert.assertTrue("disconnect should work on a CONNECTED non-local vdc", vdc.canDisconnect());
}
Aggregations