bug 11675: fixed error messages

This commit is contained in:
Abhinandan Prateek 2011-10-11 17:23:12 +05:30
parent b5cec5c957
commit c6c5e8f557

View File

@ -406,7 +406,7 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
} }
} }
String msg = "Only support XCP 1.0.0, XenServer 5.6, XenServer 5.6 FP1 and XenServer 5.6 SP2, but this one is " + prodBrand + " " + prodVersion; String msg = "Only support XCP 1.0.0, XCP 1.1.0,, XenServer 5.6, XenServer 5.6 FP1 and XenServer 5.6 SP2, but this one is " + prodBrand + " " + prodVersion;
_alertMgr.sendAlert(AlertManager.ALERT_TYPE_HOST, dcId, podId, msg, msg); _alertMgr.sendAlert(AlertManager.ALERT_TYPE_HOST, dcId, podId, msg, msg);
s_logger.debug(msg); s_logger.debug(msg);
throw new RuntimeException(msg); throw new RuntimeException(msg);
@ -533,7 +533,7 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
String prodBrand = details.get("product_brand").trim(); String prodBrand = details.get("product_brand").trim();
String prodVersion = details.get("product_version").trim(); String prodVersion = details.get("product_version").trim();
if(prodBrand.equals("XCP") && prodVersion.equals("1.0.0")) { if(prodBrand.equals("XCP") && (prodVersion.equals("1.0.0") || prodVersion.equals("1.1.0"))) {
resource = XcpServerResource.class.getName(); resource = XcpServerResource.class.getName();
} else if(prodBrand.equals("XenServer") && prodVersion.equals("5.6.0")) { } else if(prodBrand.equals("XenServer") && prodVersion.equals("5.6.0")) {
resource = XenServer56Resource.class.getName(); resource = XenServer56Resource.class.getName();
@ -548,7 +548,7 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
} }
} }
if( resource == null ){ if( resource == null ){
String msg = "Only support XCP 1.0.0, XenServer 5.6, XenServer 5.6 FP1 and XenServer 5.6 SP2, but this one is " + prodBrand + " " + prodVersion; String msg = "Only support XCP 1.0.0, XCP 1.1.0, XenServer 5.6, XenServer 5.6 FP1 and XenServer 5.6 SP2, but this one is " + prodBrand + " " + prodVersion;
s_logger.debug(msg); s_logger.debug(msg);
throw new RuntimeException(msg); throw new RuntimeException(msg);
} }