use of com.emc.vipr.model.sys.ipreconfig.ClusterNetworkReconfigStatus in project coprhd-controller by CoprHD.
the class ClusterInfo method clusterIpInfo.
/**
* loads cluster ip configuration details
*/
public static void clusterIpInfo(ClusterIpInfoForm ipReconfigForm) {
if (ipReconfigForm == null) {
ViPRSystemClient client = BourneUtil.getSysClient();
ClusterIpInfo clusterIpInfo = client.control().getClusterIpinfo();
ipReconfigForm = new ClusterIpInfoForm();
ipReconfigForm.load(clusterIpInfo);
ClusterNetworkReconfigStatus ipReconfigStatus = client.control().getClusterIpReconfigStatus();
if (ipReconfigStatus != null && ipReconfigStatus.getStatus() != null) {
if (ipReconfigStatus.getStatus().equals(ClusterNetworkReconfigStatus.Status.FAILED)) {
flash.error(MessagesUtils.get(RECONFIGURATION_STATUS_ERROR, ipReconfigStatus.getMessage()));
} else if (ipReconfigStatus.getStatus().equals(ClusterNetworkReconfigStatus.Status.SUCCEED)) {
if (ipReconfigStatus.isRecentlyReconfigured()) {
flash.put("info", MessagesUtils.get(RECONFIGURATION_STATUS_SUCCESS));
}
}
}
}
// NOSONAR
vip = ipReconfigForm.selectVipforStatusQuery();
// ("Suppressing Sonar violation of Lazy initialization of static fields should be synchronized for vip. vip only fetches network info. Sync not needed.")
loadRenderArgs();
render(ipReconfigForm);
}
use of com.emc.vipr.model.sys.ipreconfig.ClusterNetworkReconfigStatus in project coprhd-controller by CoprHD.
the class ClusterInfo method ipReconfigStatusJson.
/**
* gets ip reconfigurations status in json format
*/
@FlashException()
public static void ipReconfigStatusJson() {
ViPRSystemClient client = BourneUtil.getSysClient();
ClusterNetworkReconfigStatus ipReconfigStatus = client.control().getClusterIpReconfigStatus();
Gson gson = new Gson();
String ipReconfigStatusJSON = gson.toJson(ipReconfigStatus);
renderJSON(ipReconfigStatusJSON);
}
Aggregations