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");
}
}
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);
}
Aggregations