use of jobs.RebootNodeJob in project coprhd-controller by CoprHD.
the class SystemHealth method nodeReboot.
@Restrictions({ @Restrict("SYSTEM_ADMIN"), @Restrict("SECURITY_ADMIN"), @Restrict("RESTRICTED_SECURITY_ADMIN") })
public static void nodeReboot(@Required String nodeId) {
NodeHealth nodeHealth = MonitorUtils.getNodeHealth(nodeId);
String node = nodeId;
try {
node = MonitorUtils.getNodeHealth(nodeId).getNodeName();
} catch (NullPointerException e) {
Logger.warn("Could not determine node name.");
}
if (nodeHealth != null && nodeHealth.getStatus().equals("Good")) {
new RebootNodeJob(getSysClient(), nodeId).in(3);
flash.success(Messages.get("adminDashboard.nodeRebooting", node));
Maintenance.maintenance(Common.reverseRoute(SystemHealth.class, "systemHealth"));
} else {
flash.error(Messages.get("systemHealth.message.reboot.unavailable", node));
systemHealth();
}
}
use of jobs.RebootNodeJob in project coprhd-controller by CoprHD.
the class AdminDashboard method nodeReboot.
@Restrictions({ @Restrict("SYSTEM_ADMIN"), @Restrict("SECURITY_ADMIN"), @Restrict("RESTRICTED_SECURITY_ADMIN") })
public static void nodeReboot(@Required String nodeId) {
new RebootNodeJob(getSysClient(), nodeId).in(3);
flash.success(Messages.get("adminDashboard.nodeRebooting", nodeId));
Maintenance.maintenance(Common.reverseRoute(AdminDashboard.class, "dashboard"));
}
Aggregations