Search in sources :

Example 11 with RecoveryStatus

use of com.emc.vipr.model.sys.recovery.RecoveryStatus in project coprhd-controller by CoprHD.

the class SystemHealth method minorityNodeRecovery.

@Restrictions({ @Restrict("SYSTEM_ADMIN"), @Restrict("SECURITY_ADMIN"), @Restrict("RESTRICTED_SECURITY_ADMIN") })
public static void minorityNodeRecovery() {
    new MinorityNodeRecoveryJob(getSysClient()).in(3);
    ViPRSystemClient client = BourneUtil.getSysClient();
    List<NodeHealth> nodeHealthList = MonitorUtils.getNodeHealth();
    ClusterInfo clusterInfo = AdminDashboardUtils.getClusterInfo();
    if (PlatformUtils.isVMwareVapp()) {
        RecoveryPrecheckStatus recoveryPrecheckStatus = client.control().getRecoveryPrecheckStatus();
        String recoveringMsg = Messages.get("nodeRecovery.recovering.status", recoveryPrecheckStatus.getRecoverables().toString());
        renderArgs.put("recoveringMsg", recoveringMsg);
    }
    RecoveryStatus recoveryStatus = client.control().getRecoveryStatus();
    renderArgs.put("nodeHealthList", nodeHealthList);
    renderArgs.put("clusterInfo", clusterInfo);
    renderArgs.put("recoveryStatus", recoveryStatus);
    if (PlatformUtils.isVMwareVapp()) {
        render("@nodeRecoveryVapp");
    } else {
        render("@nodeRecovery");
    }
}
Also used : MinorityNodeRecoveryJob(jobs.MinorityNodeRecoveryJob) ViPRSystemClient(com.emc.vipr.client.ViPRSystemClient) ClusterInfo(com.emc.vipr.model.sys.ClusterInfo) RecoveryPrecheckStatus(com.emc.vipr.model.sys.recovery.RecoveryPrecheckStatus) RecoveryStatus(com.emc.vipr.model.sys.recovery.RecoveryStatus) NodeHealth(com.emc.vipr.model.sys.healthmonitor.NodeHealth) Restrictions(controllers.deadbolt.Restrictions)

Aggregations

RecoveryStatus (com.emc.vipr.model.sys.recovery.RecoveryStatus)11 ViPRSystemClient (com.emc.vipr.client.ViPRSystemClient)4 Date (java.util.Date)4 ClusterInfo (com.emc.vipr.model.sys.ClusterInfo)3 DateTime (org.joda.time.DateTime)3 RecoveryPrecheckStatus (com.emc.vipr.model.sys.recovery.RecoveryPrecheckStatus)2 Restrictions (controllers.deadbolt.Restrictions)2 InterProcessLock (org.apache.curator.framework.recipes.locks.InterProcessLock)2 Configuration (com.emc.storageos.coordinator.common.Configuration)1 APIException (com.emc.storageos.svcs.errorhandling.resources.APIException)1 SysClientException (com.emc.storageos.systemservices.exceptions.SysClientException)1 NodeHealth (com.emc.vipr.model.sys.healthmonitor.NodeHealth)1 Gson (com.google.gson.Gson)1 JsonElement (com.google.gson.JsonElement)1 JsonObject (com.google.gson.JsonObject)1 UniformInterfaceException (com.sun.jersey.api.client.UniformInterfaceException)1 UriBuilder (javax.ws.rs.core.UriBuilder)1 MinorityNodeRecoveryJob (jobs.MinorityNodeRecoveryJob)1