use of com.cloud.hypervisor.xenserver.resource.XenServer620Resource in project cloudstack by apache.
the class XenServer620WrapperTest method testCheckNetworkCommandFailure.
@Test
public void testCheckNetworkCommandFailure() {
final XenServer620Resource xenServer620Resource = new XenServer620Resource();
final PhysicalNetworkSetupInfo info = new PhysicalNetworkSetupInfo();
final List<PhysicalNetworkSetupInfo> setupInfos = new ArrayList<PhysicalNetworkSetupInfo>();
setupInfos.add(info);
final CheckNetworkCommand checkNet = new CheckNetworkCommand(setupInfos);
final Answer answer = xenServer620Resource.executeRequest(checkNet);
assertTrue(answer.getResult());
}
use of com.cloud.hypervisor.xenserver.resource.XenServer620Resource in project cosmic by MissionCriticalCloud.
the class XcpServerDiscoverer method createServerResource.
protected CitrixResourceBase createServerResource(final String prodBrand, final String prodVersion, final String prodVersionTextShort, final String hotfix) {
// Xen Cloud Platform group of hypervisors
if (prodBrand.equals("XCP") && (prodVersion.equals("1.0.0") || prodVersion.equals("1.1.0") || prodVersion.equals("5.6.100") || prodVersion.startsWith("1.4") || prodVersion.startsWith("1.6"))) {
return new XcpServerResource();
} else // Citrix Xenserver group of hypervisors
if (prodBrand.equals("XenServer") && prodVersion.equals("5.6.0")) {
return new XenServer56Resource();
} else if (prodBrand.equals("XenServer") && prodVersion.equals("6.0.0")) {
return new XenServer600Resource();
} else if (prodBrand.equals("XenServer") && prodVersion.equals("6.0.2")) {
return new XenServer600Resource();
} else if (prodBrand.equals("XenServer") && prodVersion.equals("6.1.0")) {
return new XenServer610Resource();
} else if (prodBrand.equals("XenServer") && prodVersion.equals("6.5.0")) {
return new XenServer650Resource();
} else if (prodBrand.equals("XenServer") && prodVersion.equals("6.2.0")) {
if (hotfix != null && hotfix.equals(XenserverConfigs.XSHotFix62ESP1004)) {
return new Xenserver625Resource();
} else if (hotfix != null && hotfix.equals(XenserverConfigs.XSHotFix62ESP1)) {
return new XenServer620SP1Resource();
} else {
return new XenServer620Resource();
}
} else if (prodBrand.equals("XenServer") && prodVersion.equals("5.6.100")) {
if ("5.6 SP2".equals(prodVersionTextShort.trim())) {
return new XenServer56SP2Resource();
} else if ("5.6 FP1".equals(prodVersionTextShort.trim())) {
return new XenServer56FP1Resource();
}
} else if (prodBrand.equals("XCP_Kronos")) {
return new XcpOssResource();
}
final String msg = "Only support XCP 1.0.0, 1.1.0, 1.4.x, 1.5 beta, 1.6.x; XenServer 5.6, XenServer 5.6 FP1, XenServer 5.6 SP2, Xenserver 6.0, 6.0.2, 6.1.0, 6.2.0, 6.5.0 but this " + "one is " + prodBrand + " " + prodVersion;
s_logger.warn(msg);
throw new RuntimeException(msg);
}
use of com.cloud.hypervisor.xenserver.resource.XenServer620Resource in project cosmic by MissionCriticalCloud.
the class XenServer620WrapperTest method testCheckNetworkCommandFailure.
@Test
public void testCheckNetworkCommandFailure() {
final XenServer620Resource xenServer620Resource = new XenServer620Resource();
final PhysicalNetworkSetupInfo info = new PhysicalNetworkSetupInfo();
final List<PhysicalNetworkSetupInfo> setupInfos = new ArrayList<>();
setupInfos.add(info);
final CheckNetworkCommand checkNet = new CheckNetworkCommand(setupInfos);
final Answer answer = xenServer620Resource.executeRequest(checkNet);
assertTrue(answer.getResult());
}
use of com.cloud.hypervisor.xenserver.resource.XenServer620Resource in project cloudstack by apache.
the class XcpServerDiscoverer method createServerResource.
protected CitrixResourceBase createServerResource(String prodBrand, String prodVersion, String prodVersionTextShort, String hotfix) {
// Xen Cloud Platform group of hypervisors
if (prodBrand.equals("XCP") && (prodVersion.equals("1.0.0") || prodVersion.equals("1.1.0") || prodVersion.equals("5.6.100") || prodVersion.startsWith("1.4") || prodVersion.startsWith("1.6"))) {
return new XcpServerResource();
} else // Citrix Xenserver group of hypervisors
if (prodBrand.equals("XenServer") && prodVersion.equals("5.6.0")) {
return new XenServer56Resource();
} else if (prodBrand.equals("XenServer") && prodVersion.equals("6.0.0")) {
return new XenServer600Resource();
} else if (prodBrand.equals("XenServer") && prodVersion.equals("6.0.2")) {
return new XenServer600Resource();
} else if (prodBrand.equals("XenServer") && prodVersion.equals("6.1.0")) {
return new XenServer610Resource();
} else if (prodBrand.equals("XenServer") && prodVersion.equals("6.2.0")) {
if (hotfix != null && hotfix.equals(XenserverConfigs.XSHotFix62ESP1004)) {
return new Xenserver625Resource();
} else if (hotfix != null && hotfix.equals(XenserverConfigs.XSHotFix62ESP1)) {
return new XenServer620SP1Resource();
} else {
return new XenServer620Resource();
}
} else if (prodBrand.equals("XenServer") && prodVersion.equals("5.6.100")) {
if ("5.6 SP2".equals(prodVersionTextShort.trim())) {
return new XenServer56SP2Resource();
} else if ("5.6 FP1".equals(prodVersionTextShort.trim())) {
return new XenServer56FP1Resource();
}
} else if (prodBrand.equals("XCP_Kronos")) {
return new XcpOssResource();
} else if (prodBrand.equals("XenServer") || prodBrand.equals("XCP-ng") || prodBrand.equals("Citrix Hypervisor")) {
final String[] items = prodVersion.split("\\.");
if ((Integer.parseInt(items[0]) > 6) || (Integer.parseInt(items[0]) == 6 && Integer.parseInt(items[1]) >= 4)) {
s_logger.warn("defaulting to xenserver650 resource for product brand: " + prodBrand + " with product " + "version: " + prodVersion);
// default to xenserver650 resource.
return new XenServer650Resource();
}
}
String msg = "Only support XCP 1.0.0, 1.1.0, 1.4.x, 1.5 beta, 1.6.x; XenServer 5.6, XenServer 5.6 FP1, XenServer 5.6 SP2, Xenserver 6.0, 6.0.2, 6.1.0, 6.2.0, >6.4.0, Citrix Hypervisor > 8.0.0 but this one is " + prodBrand + " " + prodVersion;
s_logger.warn(msg);
throw new RuntimeException(msg);
}
Aggregations