cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [06/50] [abbrv] git commit: updated refs/heads/vmsync to d403974
Date Tue, 14 May 2013 00:42:29 GMT
CLOUDSTACK-1907: Debian Squeeze 6.0 (64-bit) is not experimental any more


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/738d35a6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/738d35a6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/738d35a6

Branch: refs/heads/vmsync
Commit: 738d35a61d12aa4ff11114aef89f546a077e8629
Parents: 99d0936
Author: Edison Su <sudison@gmail.com>
Authored: Wed May 8 11:40:37 2013 -0700
Committer: Chip Childers <chip.childers@gmail.com>
Committed: Wed May 8 19:54:54 2013 +0100

----------------------------------------------------------------------
 .../xen/discoverer/XcpServerDiscoverer.java        |    7 +-
 .../hypervisor/xen/resource/CitrixHelper.java      |   87 +++++++++++++++
 .../hypervisor/xen/resource/XcpServerResource.java |   11 ++-
 3 files changed, 100 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/738d35a6/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
index 89bc1cf..562a7fe 100755
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
@@ -427,8 +427,11 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer,
L
     		prodVersion = prodVersion.trim();
     	}
 
-        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();
+        if(prodBrand.equals("XCP") && (prodVersion.equals("1.0.0") ||  prodVersion.equals("1.1.0")
|| prodVersion.equals("5.6.100") || prodVersion.startsWith("1.4"))) {
+            return new XcpServerResource("1.1");
+        } else if (prodBrand.equals("XCP") && prodVersion.startsWith("1.6")) {
+        	return new XcpServerResource("1.6");
+        }
 
     	if(prodBrand.equals("XenServer") && prodVersion.equals("5.6.0")) 
     		return new XenServer56Resource();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/738d35a6/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixHelper.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixHelper.java
b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixHelper.java
index 5bcec13..34b8f29 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixHelper.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixHelper.java
@@ -28,6 +28,7 @@ import org.apache.log4j.Logger;
 public class CitrixHelper {
     private static final Logger s_logger = Logger.getLogger(CitrixHelper.class);
     private static final HashMap<String, String> _xcp100GuestOsMap = new HashMap<String,
String>(70);
+    private static final HashMap<String, String> _xcp160GuestOsMap = new HashMap<String,
String>(70);
     private static final HashMap<String, String> _xenServerGuestOsMap = new HashMap<String,
String>(70);
     private static final HashMap<String, String> _xenServer56FP1GuestOsMap = new HashMap<String,
String>(70);
     private static final HashMap<String, String> _xenServer56FP2GuestOsMap = new HashMap<String,
String>(70);
@@ -114,6 +115,83 @@ public class CitrixHelper {
         _xcp100GuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)");
     }
     
+    static {
+        _xcp160GuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)");
+        _xcp160GuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)");
+        _xcp160GuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)");
+        _xcp160GuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)");
+        _xcp160GuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5 (32-bit)");
+        _xcp160GuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5 (64-bit)");
+        _xcp160GuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5 (32-bit)");
+        _xcp160GuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5 (64-bit)");
+        _xcp160GuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5 (32-bit)");
+        _xcp160GuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5 (64-bit)");
+        _xcp160GuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5 (32-bit)");
+        _xcp160GuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5 (64-bit)");
+        _xcp160GuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5 (32-bit)");
+        _xcp160GuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5 (64-bit)");
+        _xcp160GuestOsMap.put("CentOS 5.5 (32-bit)", "CentOS 5 (32-bit)");
+        _xcp160GuestOsMap.put("CentOS 5.5 (64-bit)", "CentOS 5 (64-bit)");
+        _xcp160GuestOsMap.put("Debian GNU/Linux 5.0 (32-bit)", "Debian Lenny 5.0 (32-bit)");
+        _xcp160GuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Squeeze 6.0 (32-bit)");
+        _xcp160GuestOsMap.put("Debian GNU/Linux 6(64-bit)", "Debian Squeeze 6.0 (64-bit)");
+        _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise
Linux 5 (32-bit)");
+        _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise
Linux 5 (64-bit)");
+        _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise
Linux 5 (32-bit)");
+        _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise
Linux 5 (64-bit)");
+        _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise
Linux 5 (32-bit)");
+        _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise
Linux 5 (64-bit)");
+        _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise
Linux 5 (32-bit)");
+        _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise
Linux 5 (64-bit)");
+        _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise
Linux 5 (32-bit)");
+        _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise
Linux 5 (64-bit)");
+        _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.5 (32-bit)", "Oracle Enterprise
Linux 5 (32-bit)");
+        _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.5 (64-bit)", "Oracle Enterprise
Linux 5 (64-bit)");
+        _xcp160GuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise
Linux 4.5 (32-bit)");
+        _xcp160GuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise
Linux 4.6 (32-bit)");
+        _xcp160GuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise
Linux 4.7 (32-bit)");
+        _xcp160GuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise
Linux 4.8 (32-bit)");
+        _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise
Linux 5 (32-bit)");
+        _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise
Linux 5 (64-bit)");
+        _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise
Linux 5 (32-bit)");
+        _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise
Linux 5 (64-bit)");
+        _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise
Linux 5 (32-bit)");
+        _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise
Linux 5 (64-bit)");
+        _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise
Linux 5 (32-bit)");
+        _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise
Linux 5 (64-bit)");
+        _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise
Linux 5 (32-bit)");
+        _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise
Linux 5 (64-bit)");
+        _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", "Red Hat Enterprise
Linux 5 (32-bit)");
+        _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", "Red Hat Enterprise
Linux 5 (64-bit)");
+        _xcp160GuestOsMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", "Red Hat Enterprise
Linux 6 (32-bit)");
+        _xcp160GuestOsMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", "Red Hat Enterprise
Linux 6 (64-bit)");
+        _xcp160GuestOsMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", "SUSE Linux
Enterprise Server 9 SP4");
+        _xcp160GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux
Enterprise Server 10 SP1");
+        _xcp160GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux
Enterprise Server 10 SP1 x64");
+        _xcp160GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux
Enterprise Server 10 SP2");
+        _xcp160GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux
Enterprise Server 10 SP2 x64");
+        _xcp160GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "Other install
media");
+        _xcp160GuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise
Server 11");
+        _xcp160GuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise
Server 11 x64");
+        _xcp160GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", "SUSE Linux
Enterprise Server 11 SP1 (32-bit)");
+        _xcp160GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", "SUSE Linux
Enterprise Server 11 SP1 (64-bit)");
+        _xcp160GuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)");
+        _xcp160GuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)");
+        _xcp160GuestOsMap.put("Windows Server 2003 (32-bit)", "Windows Server 2003 (32-bit)");
+        _xcp160GuestOsMap.put("Windows Server 2003 (64-bit)", "Windows Server 2003 (64-bit)");
+        _xcp160GuestOsMap.put("Windows Server 2008 (32-bit)", "Windows Server 2008 (32-bit)");
+        _xcp160GuestOsMap.put("Windows Server 2008 (64-bit)", "Windows Server 2008 (64-bit)");
+        _xcp160GuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2
(64-bit)");
+        _xcp160GuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)");
+        _xcp160GuestOsMap.put("Windows Vista (32-bit)", "Windows Vista (32-bit)");
+        _xcp160GuestOsMap.put("Ubuntu 10.04 (32-bit)", "Ubuntu Lucid Lynx 10.04 (32-bit)
(experimental)");
+        _xcp160GuestOsMap.put("Ubuntu 10.04 (64-bit)", "Ubuntu Lucid Lynx 10.04 (64-bit)
(experimental)");
+        _xcp160GuestOsMap.put("Other Linux (32-bit)", "Other install media");
+        _xcp160GuestOsMap.put("Other Linux (64-bit)", "Other install media");
+        _xcp160GuestOsMap.put("Other PV (32-bit)", "CentOS 5 (32-bit)");
+        _xcp160GuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)");
+    }
+    
 
     static {
     	_xenServerGuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)");
@@ -694,6 +772,15 @@ public class CitrixHelper {
         return guestOS;
     }
     
+    public static String getXcp160GuestOsType(String stdType) {
+        String guestOS =  _xcp160GuestOsMap.get(stdType);
+        if (guestOS == null) {
+        	s_logger.debug("Can't find the guest os: " + stdType + " mapping into XCP's guestOS
type, start it as HVM guest");
+        	guestOS = "Other install media";
+        }
+        return guestOS;
+    }
+    
     
     public static String getXenServerGuestOsType(String stdType, boolean bootFromCD) {
         String guestOS =  _xenServerGuestOsMap.get(stdType);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/738d35a6/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XcpServerResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XcpServerResource.java
b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XcpServerResource.java
index 7a95870..6baf6a0 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XcpServerResource.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XcpServerResource.java
@@ -39,9 +39,10 @@ import com.xensource.xenapi.Types.XenAPIException;
 @Local(value=ServerResource.class)
 public class XcpServerResource extends CitrixResourceBase {
 	  private final static Logger s_logger = Logger.getLogger(XcpServerResource.class);
-	  
-    public XcpServerResource() {
+	  private String version;
+    public XcpServerResource(String version) {
         super();
+        this.version = version;
     }
     
     @Override
@@ -55,7 +56,11 @@ public class XcpServerResource extends CitrixResourceBase {
     
     @Override
     protected String getGuestOsType(String stdType, boolean bootFromCD) {
-        return CitrixHelper.getXcpGuestOsType(stdType);
+    	if (version.equalsIgnoreCase("1.6")) {
+    		return CitrixHelper.getXcp160GuestOsType(stdType);
+    	} else {
+    		return CitrixHelper.getXcpGuestOsType(stdType);
+    	}
     }
 
     @Override


Mime
View raw message