cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject [16/40] git commit: refs/heads/master - Fix ClassCastException.
Date Tue, 05 Mar 2013 02:09:46 GMT
Fix ClassCastException.

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

Branch: refs/heads/master
Commit: 14ef9151a54201e2c12f68a353df0da4eac1df1d
Parents: 640fa6b
Author: Min Chen <min.chen@citrix.com>
Authored: Thu Feb 7 16:23:56 2013 -0800
Committer: Min Chen <min.chen@citrix.com>
Committed: Thu Feb 7 16:23:56 2013 -0800

----------------------------------------------------------------------
 server/src/com/cloud/configuration/Config.java     |    6 +-
 .../hypervisor/vmware/mo/VirtualMachineMO.java     |   30 +++++++-------
 2 files changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/14ef9151/server/src/com/cloud/configuration/Config.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/Config.java b/server/src/com/cloud/configuration/Config.java
index 7592b6b..5002ca1 100755
--- a/server/src/com/cloud/configuration/Config.java
+++ b/server/src/com/cloud/configuration/Config.java
@@ -258,8 +258,8 @@ public enum Config {
     VmwareAdditionalVncPortRangeSize("Advanced", ManagementServer.class, Integer.class, "vmware.additional.vnc.portrange.size",
"1000", "Start port number of additional VNC port range", null),
     //VmwareGuestNicDeviceType("Advanced", ManagementServer.class, String.class, "vmware.guest.nic.device.type",
"E1000", "Ethernet card type used in guest VM, valid values are E1000, PCNet32, Vmxnet2, Vmxnet3",
null),
     VmwarePerClusterHostMax("Advanced", ManagementServer.class, Integer.class, "vmware.percluster.host.max",
"8", "maxmium hosts per vCenter cluster(do not let it grow over 8)", "1-8"),
-    VmwareReserveCpu("Advanced", ManagementServer.class, Boolean.class, "vmware.reserve.cpu",
"false", "Specify whether or not to reserve CPU based on CPU overprovisioning factor", null),
-    VmwareReserveMem("Advanced", ManagementServer.class, Boolean.class, "vmware.reserve.mem",
"false", "Specify whether or not to reserve memory based on memory overprovisioning factor",
null),
+    VmwareReserveCpu("Advanced", ManagementServer.class, Boolean.class, "vmware.reserve.cpu",
"true", "Specify whether or not to reserve CPU based on CPU overprovisioning factor", null),
+    VmwareReserveMem("Advanced", ManagementServer.class, Boolean.class, "vmware.reserve.mem",
"true", "Specify whether or not to reserve memory based on memory overprovisioning factor",
null),
     VmwareRootDiskControllerType("Advanced", ManagementServer.class, String.class, "vmware.root.disk.controller",
"ide", "Specify the default disk controller for root volumes, valid values are scsi, ide",
null),
     VmwareSystemVmNicDeviceType("Advanced", ManagementServer.class, String.class, "vmware.systemvm.nic.device.type",
"E1000", "Specify the default network device type for system VMs, valid values are E1000,
PCNet32, Vmxnet2, Vmxnet3", null),
     VmwareRecycleHungWorker("Advanced", ManagementServer.class, Boolean.class, "vmware.recycle.hung.wokervm",
"false", "Specify whether or not to recycle hung worker VMs", null),
@@ -358,7 +358,7 @@ public enum Config {
 	ConcurrentSnapshotsThresholdPerHost("Advanced", ManagementServer.class, Long.class, "concurrent.snapshots.threshold.perhost",
 	                null, "Limits number of snapshots that can be handled by the host concurrently;
default is NULL - unlimited", null),
 	NetworkIPv6SearchRetryMax("Network", ManagementServer.class, Integer.class, "network.ipv6.search.retry.max",
"10000", "The maximum number of retrying times to search for an available IPv6 address in
the table", null),
-	
+
 	ExternalBaremetalSystemUrl("Advanced", ManagementServer.class, String.class, "external.baremetal.system.url",
null, "url of external baremetal system that CloudStack will talk to", null),
 	ExternalBaremetalResourceClassName("Advanced", ManagementServer.class, String.class, "external,baremetal.resource.classname",
null, "class name for handling external baremetal resource", null),
 	EnableBaremetalSecurityGroupAgentEcho("Advanced", ManagementServer.class, Boolean.class,
"enable.baremetal.securitygroup.agent.echo", "false", "After starting provision process, periodcially
echo security agent installed in the template. Treat provisioning as success only if echo
successfully", null),

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/14ef9151/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
----------------------------------------------------------------------
diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java b/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
index 2b07f9a..0dfb234 100644
--- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
+++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
@@ -1663,10 +1663,10 @@ public class VirtualMachineMO extends BaseMO {
 	}
 
 	public int getScsiDeviceControllerKey() throws Exception {
-	    VirtualDevice[] devices = (VirtualDevice [])_context.getVimClient().
+	    List<VirtualDevice> devices = (List<VirtualDevice>)_context.getVimClient().
 	    	getDynamicProperty(_mor, "config.hardware.device");
 
-	    if(devices != null && devices.length > 0) {
+	    if(devices != null && devices.size() > 0) {
 	    	for(VirtualDevice device : devices) {
                 if(device instanceof VirtualLsiLogicController) {
                     return device.getKey();
@@ -1679,10 +1679,10 @@ public class VirtualMachineMO extends BaseMO {
 	}
 
 	public int getScsiDeviceControllerKeyNoException() throws Exception {
-	    VirtualDevice[] devices = (VirtualDevice [])_context.getVimClient().
+	    List<VirtualDevice> devices = (List<VirtualDevice>)_context.getVimClient().
 	    	getDynamicProperty(_mor, "config.hardware.device");
 
-	    if(devices != null && devices.length > 0) {
+	    if(devices != null && devices.size() > 0) {
 	    	for(VirtualDevice device : devices) {
                 if(device instanceof VirtualLsiLogicController) {
                     return device.getKey();
@@ -1909,10 +1909,10 @@ public class VirtualMachineMO extends BaseMO {
 	}
 
 	public int getIDEDeviceControllerKey() throws Exception {
-	    VirtualDevice[] devices = (VirtualDevice [])_context.getVimClient().
+	    List<VirtualDevice> devices = (List<VirtualDevice>)_context.getVimClient().
 	    	getDynamicProperty(_mor, "config.hardware.device");
 
-	    if(devices != null && devices.length > 0) {
+	    if(devices != null && devices.size() > 0) {
 	    	for(VirtualDevice device : devices) {
 	    		if(device instanceof VirtualIDEController) {
 	    			return ((VirtualIDEController)device).getKey();
@@ -1930,9 +1930,9 @@ public class VirtualMachineMO extends BaseMO {
 	}
 
 	public VirtualDevice getIsoDevice() throws Exception {
-		VirtualDevice[] devices = (VirtualDevice[])_context.getVimClient().
+		List<VirtualDevice> devices = (List<VirtualDevice>)_context.getVimClient().
 			getDynamicProperty(_mor, "config.hardware.device");
-		if(devices != null && devices.length > 0) {
+		if(devices != null && devices.size() > 0) {
 			for(VirtualDevice device : devices) {
 				if(device instanceof VirtualCdrom) {
 					return device;
@@ -1943,10 +1943,10 @@ public class VirtualMachineMO extends BaseMO {
 	}
 
 	public int getPCIDeviceControllerKey() throws Exception {
-	    VirtualDevice[] devices = (VirtualDevice [])_context.getVimClient().
+	    List<VirtualDevice> devices = (List<VirtualDevice>)_context.getVimClient().
 	        getDynamicProperty(_mor, "config.hardware.device");
 
-	    if(devices != null && devices.length > 0) {
+	    if(devices != null && devices.size() > 0) {
 	    	for(VirtualDevice device : devices) {
 	    		if(device instanceof VirtualPCIController) {
 	    			return ((VirtualPCIController)device).getKey();
@@ -1964,11 +1964,11 @@ public class VirtualMachineMO extends BaseMO {
 	}
 
 	public int getNextDeviceNumber(int controllerKey) throws Exception {
-		VirtualDevice[] devices = (VirtualDevice[])_context.getVimClient().
+		List<VirtualDevice> devices = (List<VirtualDevice>)_context.getVimClient().
 			getDynamicProperty(_mor, "config.hardware.device");
 
 		int deviceNumber = -1;
-		if(devices != null && devices.length > 0) {
+		if(devices != null && devices.size() > 0) {
 			for(VirtualDevice device : devices) {
 				if(device.getControllerKey() != null && device.getControllerKey().intValue()
== controllerKey) {
 					if(device.getUnitNumber() != null && device.getUnitNumber().intValue() >
deviceNumber) {
@@ -1981,7 +1981,7 @@ public class VirtualMachineMO extends BaseMO {
 	}
 
 	public VirtualDevice[] getNicDevices() throws Exception {
-		VirtualDevice[] devices = (VirtualDevice[])_context.getVimClient().
+		List<VirtualDevice> devices = (List<VirtualDevice>)_context.getVimClient().
 			getDynamicProperty(_mor, "config.hardware.device");
 
 		List<VirtualDevice> nics = new ArrayList<VirtualDevice>();
@@ -1997,7 +1997,7 @@ public class VirtualMachineMO extends BaseMO {
 	}
 
 	public Pair<Integer, VirtualDevice> getNicDeviceIndex(String networkNamePrefix) throws
Exception {
-        VirtualDevice[] devices = (VirtualDevice[])_context.getVimClient().
+        List<VirtualDevice> devices = (List<VirtualDevice>)_context.getVimClient().
         getDynamicProperty(_mor, "config.hardware.device");
 
         List<VirtualDevice> nics = new ArrayList<VirtualDevice>();
@@ -2057,7 +2057,7 @@ public class VirtualMachineMO extends BaseMO {
 
 		List<VirtualDevice> returnList = new ArrayList<VirtualDevice>();
 
-		VirtualDevice[] devices = (VirtualDevice[])_context.getVimClient().
+		List<VirtualDevice> devices = (List<VirtualDevice>)_context.getVimClient().
 			getDynamicProperty(_mor, "config.hardware.device");
 
 		if(devices != null) {


Mime
View raw message