Search in sources :

Example 16 with ViPRSystemClient

use of com.emc.vipr.client.ViPRSystemClient 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)

Example 17 with ViPRSystemClient

use of com.emc.vipr.client.ViPRSystemClient in project coprhd-controller by CoprHD.

the class SystemHealth method downloadConfigParameters.

public static void downloadConfigParameters() throws UnsupportedEncodingException {
    ViPRSystemClient client = BourneUtil.getSysClient();
    PropertyInfoRestRep propertyInfo = client.config().getProperties(PARAM_CONFIG_PROP);
    Map<String, String> props = propertyInfo.getAllProperties();
    StringBuffer output = new StringBuffer();
    for (Map.Entry<String, String> entry : props.entrySet()) {
        output.append(entry.getKey());
        output.append("=");
        output.append(entry.getValue());
        output.append("\n");
    }
    ByteArrayInputStream is = new ByteArrayInputStream(output.toString().getBytes("UTF-8"));
    renderBinary(is, "configProperties", "text/plain", false);
}
Also used : PropertyInfoRestRep(com.emc.storageos.model.property.PropertyInfoRestRep) ViPRSystemClient(com.emc.vipr.client.ViPRSystemClient) ByteArrayInputStream(java.io.ByteArrayInputStream) Map(java.util.Map)

Aggregations

ViPRSystemClient (com.emc.vipr.client.ViPRSystemClient)17 RecoveryStatus (com.emc.vipr.model.sys.recovery.RecoveryStatus)4 ClusterInfo (com.emc.vipr.model.sys.ClusterInfo)3 NodeHealth (com.emc.vipr.model.sys.healthmonitor.NodeHealth)3 DateTime (org.joda.time.DateTime)3 PropertyInfoRestRep (com.emc.storageos.model.property.PropertyInfoRestRep)2 ServiceErrorException (com.emc.vipr.client.exceptions.ServiceErrorException)2 ClusterIpInfo (com.emc.vipr.model.sys.ipreconfig.ClusterIpInfo)2 ClusterNetworkReconfigStatus (com.emc.vipr.model.sys.ipreconfig.ClusterNetworkReconfigStatus)2 RecoveryPrecheckStatus (com.emc.vipr.model.sys.recovery.RecoveryPrecheckStatus)2 Gson (com.google.gson.Gson)2 Restrictions (controllers.deadbolt.Restrictions)2 FlashException (controllers.util.FlashException)2 SoftwareVersion (com.emc.storageos.coordinator.client.model.SoftwareVersion)1 CoordinatorException (com.emc.storageos.coordinator.exceptions.CoordinatorException)1 RetryableCoordinatorException (com.emc.storageos.coordinator.exceptions.RetryableCoordinatorException)1 APIException (com.emc.storageos.svcs.errorhandling.resources.APIException)1 InternalServerErrorException (com.emc.storageos.svcs.errorhandling.resources.InternalServerErrorException)1 ViPRCoreClient (com.emc.vipr.client.ViPRCoreClient)1 LogMessageProcessor (com.emc.vipr.client.system.LogMessageProcessor)1