cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelv...@apache.org
Subject git commit: updated refs/heads/vmsync to 4254cb8
Date Sun, 23 Jun 2013 23:56:51 GMT
Updated Branches:
  refs/heads/vmsync 167a6dc0a -> 4254cb85c


Fix errors caused by branch-merge in vmware-base module


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

Branch: refs/heads/vmsync
Commit: 4254cb85ced20c9e71295af98762ffd0905ab60c
Parents: 167a6dc
Author: Kelven Yang <kelveny@gmail.com>
Authored: Sun Jun 23 16:56:27 2013 -0700
Committer: Kelven Yang <kelveny@gmail.com>
Committed: Sun Jun 23 16:56:27 2013 -0700

----------------------------------------------------------------------
 .../vmware/manager/VmwareManagerImpl.java       |  2 +-
 .../network/element/MidoNetElementTest.java     |  9 +----
 .../com/cloud/hypervisor/vmware/mo/BaseMO.java  |  2 +-
 .../cloud/hypervisor/vmware/mo/ClusterMO.java   | 40 ++++++++++----------
 .../hypervisor/vmware/mo/DatacenterMO.java      |  6 +--
 .../vmware/mo/HostDatastoreBrowserMO.java       |  6 +--
 .../vmware/mo/HostDatastoreSystemMO.java        |  2 +-
 .../com/cloud/hypervisor/vmware/mo/HostMO.java  | 28 +++++++-------
 .../vmware/mo/HypervisorHostHelper.java         |  8 ++--
 .../hypervisor/vmware/mo/VirtualMachineMO.java  | 26 ++++++-------
 .../hypervisor/vmware/util/VmwareHelper.java    |  2 +-
 11 files changed, 63 insertions(+), 68 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4254cb85/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
index c7480ed..d0a3591 100755
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
@@ -396,7 +396,7 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager,
Vmw
                 returnedHostList.add(mor);
                 return returnedHostList;
             } else {
-                s_logger.error("Unsupport host type " + mor.getType() + ":" + mor.getPresetParams()
+ " from inventory path: " + hostInventoryPath);
+                s_logger.error("Unsupport host type " + mor.getType() + ":" + mor.getValue()
+ " from inventory path: " + hostInventoryPath);
                 return null;
             }
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4254cb85/plugins/network-elements/midonet/test/com/cloud/network/element/MidoNetElementTest.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/midonet/test/com/cloud/network/element/MidoNetElementTest.java
b/plugins/network-elements/midonet/test/com/cloud/network/element/MidoNetElementTest.java
index 62f050e..a35b279 100644
--- a/plugins/network-elements/midonet/test/com/cloud/network/element/MidoNetElementTest.java
+++ b/plugins/network-elements/midonet/test/com/cloud/network/element/MidoNetElementTest.java
@@ -29,8 +29,6 @@ import static org.mockito.Mockito.when;
 import java.util.ArrayList;
 import java.util.UUID;
 
-import org.junit.Ignore;
-
 import junit.framework.TestCase;
 
 import com.midokura.midonet.client.MidonetApi;
@@ -60,7 +58,6 @@ public class MidoNetElementTest extends TestCase {
     /*
      * Test the standard case of addDhcpEntry with no errors.
      */
-	@Ignore
     public void testAddDhcpEntry() {
 
         //mockMgmt
@@ -82,9 +79,8 @@ public class MidoNetElementTest extends TestCase {
         ResourceCollection mockSubnetCollection = mock(ResourceCollection.class);
         when(mockSubnetCollection.get(anyInt())).thenReturn(mockSub);
 
-        //mockBridge
-        Bridge mockBridge = mock(Bridge.class);	// FIXME! the mocked object can't be casted
for some reason
-        										// I have to disable the whole test case for now
+        
+        Bridge mockBridge = mock(Bridge.class);
         
         when(api.addBridge().tenantId(anyString()).name(anyString()).create()).thenReturn(mockBridge);
         when(mockBridge.getDhcpSubnets()).thenReturn(mockSubnetCollection);
@@ -141,7 +137,6 @@ public class MidoNetElementTest extends TestCase {
     /*
      * Test the standard case of implement with no errors.
      */
-	@Ignore
     public void testImplement() {
         //mock
         MidonetApi api = mock(MidonetApi.class, RETURNS_DEEP_STUBS);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4254cb85/vmware-base/src/com/cloud/hypervisor/vmware/mo/BaseMO.java
----------------------------------------------------------------------
diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/mo/BaseMO.java b/vmware-base/src/com/cloud/hypervisor/vmware/mo/BaseMO.java
index c039d80..0ac93e4 100644
--- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/BaseMO.java
+++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/BaseMO.java
@@ -129,7 +129,7 @@ public class BaseMO {
 		CustomFieldStringValue cfValue = (CustomFieldStringValue)_context.getVimClient().getDynamicProperty(getMor(),
 			String.format("value[%d]", key));
 		if(cfValue != null)
-			return cfValue.getPresetParams();
+			return cfValue.getValue();
 
 		return null;
 	}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4254cb85/vmware-base/src/com/cloud/hypervisor/vmware/mo/ClusterMO.java
----------------------------------------------------------------------
diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/mo/ClusterMO.java b/vmware-base/src/com/cloud/hypervisor/vmware/mo/ClusterMO.java
index 58afc93..d112c34 100755
--- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/ClusterMO.java
+++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/ClusterMO.java
@@ -120,7 +120,7 @@ public class ClusterMO extends BaseMO implements VmwareHypervisorHost
{
 	@Override
 	public ObjectContent[] getVmPropertiesOnHyperHost(String[] propertyPaths) throws Exception
{
 		if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - retrieveProperties() for VM properties. target MOR:
" + _mor.getPresetParams() + ", properties: " + new Gson().toJson(propertyPaths));
+			s_logger.trace("vCenter API trace - retrieveProperties() for VM properties. target MOR:
" + _mor.getValue() + ", properties: " + new Gson().toJson(propertyPaths));
 
 		PropertySpec pSpec = new PropertySpec();
 		pSpec.setType("VirtualMachine");
@@ -158,7 +158,7 @@ public class ClusterMO extends BaseMO implements VmwareHypervisorHost
{
 	@Override
 	public ObjectContent[] getDatastorePropertiesOnHyperHost(String[] propertyPaths) throws
Exception {
 		if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - retrieveProperties() on Datastore properties. target
MOR: " + _mor.getPresetParams() + ", properties: " + new Gson().toJson(propertyPaths));
+			s_logger.trace("vCenter API trace - retrieveProperties() on Datastore properties. target
MOR: " + _mor.getValue() + ", properties: " + new Gson().toJson(propertyPaths));
 
 		PropertySpec pSpec = new PropertySpec();
 		pSpec.setType("Datastore");
@@ -190,7 +190,7 @@ public class ClusterMO extends BaseMO implements VmwareHypervisorHost
{
 
 	private ObjectContent[] getHostPropertiesOnCluster(String[] propertyPaths) throws Exception
{
 		if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - retrieveProperties() on Host properties. target MOR:
" + _mor.getPresetParams() + ", properties: " + new Gson().toJson(propertyPaths));
+			s_logger.trace("vCenter API trace - retrieveProperties() on Host properties. target MOR:
" + _mor.getValue() + ", properties: " + new Gson().toJson(propertyPaths));
 
 		PropertySpec pSpec = new PropertySpec();
 		pSpec.setType("HostSystem");
@@ -224,7 +224,7 @@ public class ClusterMO extends BaseMO implements VmwareHypervisorHost
{
 	@Override
 	public boolean createVm(VirtualMachineConfigSpec vmSpec) throws Exception {
 	    if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - createVM_Task(). target MOR: " + _mor.getPresetParams()
+ ", VirtualMachineConfigSpec: " + new Gson().toJson(vmSpec));
+			s_logger.trace("vCenter API trace - createVM_Task(). target MOR: " + _mor.getValue() +
", VirtualMachineConfigSpec: " + new Gson().toJson(vmSpec));
 
 		assert(vmSpec != null);
 		DatacenterMO dcMo = new DatacenterMO(_context, getHyperHostDatacenter());
@@ -252,14 +252,14 @@ public class ClusterMO extends BaseMO implements VmwareHypervisorHost
{
 	@Override
 	public void importVmFromOVF(String ovfFilePath, String vmName, DatastoreMO dsMo, String
diskOption) throws Exception {
 	    if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - importVmFromOVF(). target MOR: " + _mor.getPresetParams()
+ ", ovfFilePath: " + ovfFilePath + ", vmName: " + vmName
-				+ ", datastore: " + dsMo.getMor().getPresetParams() + ", diskOption: " + diskOption);
+			s_logger.trace("vCenter API trace - importVmFromOVF(). target MOR: " + _mor.getValue()
+ ", ovfFilePath: " + ovfFilePath + ", vmName: " + vmName
+				+ ", datastore: " + dsMo.getMor().getValue() + ", diskOption: " + diskOption);
 
 		ManagedObjectReference morRp = getHyperHostOwnerResourcePool();
 		assert(morRp != null);
 
 		if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - importVmFromOVF(). resource pool: " + morRp.getPresetParams());
+			s_logger.trace("vCenter API trace - importVmFromOVF(). resource pool: " + morRp.getValue());
 
 		HypervisorHostHelper.importVmFromOVF(this, ovfFilePath, vmName, dsMo, diskOption, morRp,
null);
 
@@ -272,9 +272,9 @@ public class ClusterMO extends BaseMO implements VmwareHypervisorHost
{
 		String guestOsIdentifier, ManagedObjectReference morDs, boolean snapshotDirToParent) throws
Exception {
 
 	    if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - createBlankVm(). target MOR: " + _mor.getPresetParams()
+ ", vmName: " + vmName + ", cpuCount: " + cpuCount
+			s_logger.trace("vCenter API trace - createBlankVm(). target MOR: " + _mor.getValue() +
", vmName: " + vmName + ", cpuCount: " + cpuCount
 				+ ", cpuSpeedMhz: " + cpuSpeedMHz + ", cpuReservedMHz: " + cpuReservedMHz + ", limitCpu:
" + limitCpuUse + ", memoryMB: " + memoryMB
-				+ ", guestOS: " + guestOsIdentifier + ", datastore: " + morDs.getPresetParams() + ",
snapshotDirToParent: " + snapshotDirToParent);
+				+ ", guestOS: " + guestOsIdentifier + ", datastore: " + morDs.getValue() + ", snapshotDirToParent:
" + snapshotDirToParent);
 
 		boolean result = HypervisorHostHelper.createBlankVm(this, vmName, cpuCount, cpuSpeedMHz,
cpuReservedMHz, limitCpuUse,
 			memoryMB, memoryReserveMB, guestOsIdentifier, morDs, snapshotDirToParent);
@@ -290,7 +290,7 @@ public class ClusterMO extends BaseMO implements VmwareHypervisorHost
{
 		int poolHostPort, String poolPath, String poolUuid) throws Exception {
 
 	    if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - mountDatastore(). target MOR: " + _mor.getPresetParams()
+ ", vmfs: " + vmfsDatastore + ", poolHost: " + poolHostAddress
+			s_logger.trace("vCenter API trace - mountDatastore(). target MOR: " + _mor.getValue()
+ ", vmfs: " + vmfsDatastore + ", poolHost: " + poolHostAddress
 				+ ", poolHostPort: " + poolHostPort + ", poolPath: " + poolPath + ", poolUuid: " + poolUuid);
 
 		ManagedObjectReference morDs = null;
@@ -304,7 +304,7 @@ public class ClusterMO extends BaseMO implements VmwareHypervisorHost
{
 					morDsFirst = morDs;
 
 				// assume datastore is in scope of datacenter
-				assert(morDsFirst.getPresetParams().equals(morDs.getPresetParams()));
+				assert(morDsFirst.getValue().equals(morDs.getValue()));
 			}
 		}
 
@@ -326,7 +326,7 @@ public class ClusterMO extends BaseMO implements VmwareHypervisorHost
{
 	@Override
 	public void unmountDatastore(String poolUuid) throws Exception {
 	    if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - unmountDatastore(). target MOR: " + _mor.getPresetParams()
+ ", poolUuid: " + poolUuid);
+			s_logger.trace("vCenter API trace - unmountDatastore(). target MOR: " + _mor.getValue()
+ ", poolUuid: " + poolUuid);
 
 		List<ManagedObjectReference> hosts = (List<ManagedObjectReference>)_context.getVimClient().getDynamicProperty(_mor,
"host");
 		if(hosts != null && hosts.size() > 0) {
@@ -344,7 +344,7 @@ public class ClusterMO extends BaseMO implements VmwareHypervisorHost
{
 	public ManagedObjectReference findDatastore(String poolUuid) throws Exception {
 
 	    if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - findDatastore(). target MOR: " + _mor.getPresetParams()
+ ", poolUuid: " + poolUuid);
+			s_logger.trace("vCenter API trace - findDatastore(). target MOR: " + _mor.getValue() +
", poolUuid: " + poolUuid);
 
 		CustomFieldsManagerMO cfmMo = new CustomFieldsManagerMO(_context,
 				_context.getServiceContent().getCustomFieldsManager());
@@ -361,7 +361,7 @@ public class ClusterMO extends BaseMO implements VmwareHypervisorHost
{
 					DynamicProperty prop = oc.getPropSet().get(1);
 					if(prop != null && prop.getVal() != null) {
 						if(prop.getVal() instanceof CustomFieldStringValue) {
-							String val = ((CustomFieldStringValue)prop.getVal()).getPresetParams();
+							String val = ((CustomFieldStringValue)prop.getVal()).getValue();
 							if(val.equalsIgnoreCase(poolUuid)) {
 
 							    if(s_logger.isTraceEnabled())
@@ -382,7 +382,7 @@ public class ClusterMO extends BaseMO implements VmwareHypervisorHost
{
 	@Override
 	public ManagedObjectReference findDatastoreByExportPath(String exportPath) throws Exception
{
 	    if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - findDatastoreByExportPath(). target MOR: " + _mor.getPresetParams()
+ ", exportPath: " + exportPath);
+			s_logger.trace("vCenter API trace - findDatastoreByExportPath(). target MOR: " + _mor.getValue()
+ ", exportPath: " + exportPath);
 
 		ObjectContent[] ocs = getDatastorePropertiesOnHyperHost(new String[] {"info"});
 		if(ocs != null && ocs.length > 0) {
@@ -415,7 +415,7 @@ public class ClusterMO extends BaseMO implements VmwareHypervisorHost
{
 	@Override
 	public ManagedObjectReference findMigrationTarget(VirtualMachineMO vmMo) throws Exception
{
 	    if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - findMigrationTarget(). target MOR: " + _mor.getPresetParams()
+ ", vm: " + vmMo.getName());
+			s_logger.trace("vCenter API trace - findMigrationTarget(). target MOR: " + _mor.getValue()
+ ", vm: " + vmMo.getName());
 
 		List<ClusterHostRecommendation> candidates = recommendHostsForVm(vmMo);
 		if(candidates != null && candidates.size() > 0) {
@@ -464,7 +464,7 @@ public class ClusterMO extends BaseMO implements VmwareHypervisorHost
{
 	@Override
 	public VmwareHypervisorHostResourceSummary getHyperHostResourceSummary() throws Exception
{
 	    if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - getHyperHostResourceSummary(). target MOR: " + _mor.getPresetParams());
+			s_logger.trace("vCenter API trace - getHyperHostResourceSummary(). target MOR: " + _mor.getValue());
 
 		VmwareHypervisorHostResourceSummary summary = new VmwareHypervisorHostResourceSummary();
 
@@ -496,7 +496,7 @@ public class ClusterMO extends BaseMO implements VmwareHypervisorHost
{
 	public VmwareHypervisorHostNetworkSummary getHyperHostNetworkSummary(String esxServiceConsolePort)
throws Exception {
 
 	    if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - getHyperHostNetworkSummary(). target MOR: " + _mor.getPresetParams()
+ ", mgmtPortgroup: " + esxServiceConsolePort);
+			s_logger.trace("vCenter API trace - getHyperHostNetworkSummary(). target MOR: " + _mor.getValue()
+ ", mgmtPortgroup: " + esxServiceConsolePort);
 
 		List<ManagedObjectReference> hosts = (List<ManagedObjectReference>)_context.getVimClient().getDynamicProperty(_mor,
"host");
 		if(hosts != null && hosts.size() > 0) {
@@ -515,7 +515,7 @@ public class ClusterMO extends BaseMO implements VmwareHypervisorHost
{
 	@Override
 	public ComputeResourceSummary getHyperHostHardwareSummary() throws Exception {
 	    if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - getHyperHostHardwareSummary(). target MOR: " + _mor.getPresetParams());
+			s_logger.trace("vCenter API trace - getHyperHostHardwareSummary(). target MOR: " + _mor.getValue());
 
 		ClusterComputeResourceSummary hardwareSummary = (ClusterComputeResourceSummary)
 			_context.getVimClient().getDynamicProperty(_mor, "summary");
@@ -562,7 +562,7 @@ public class ClusterMO extends BaseMO implements VmwareHypervisorHost
{
 		        			name = (String)objProp.getVal();
 		        		} else {
 		        			OptionValue optValue = (OptionValue)objProp.getVal();
-		        			value = (String)optValue.getPresetParams();
+		        			value = (String)optValue.getValue();
 		        		}
 		        	}
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4254cb85/vmware-base/src/com/cloud/hypervisor/vmware/mo/DatacenterMO.java
----------------------------------------------------------------------
diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/mo/DatacenterMO.java b/vmware-base/src/com/cloud/hypervisor/vmware/mo/DatacenterMO.java
index aa8393a..cabb60a 100755
--- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/DatacenterMO.java
+++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/DatacenterMO.java
@@ -117,7 +117,7 @@ public class DatacenterMO extends BaseMO {
 									break;		// break out inner loop
 								}
 							} else if(prop.getVal() instanceof CustomFieldStringValue) {
-								String val = ((CustomFieldStringValue)prop.getVal()).getPresetParams();
+								String val = ((CustomFieldStringValue)prop.getVal()).getValue();
 								if(val.equals(vmLabel)) {
 									list.add(new VirtualMachineMO(_context, oc.getObj()));
 									break;		// break out inner loop
@@ -451,7 +451,7 @@ public class DatacenterMO extends BaseMO {
                             dvSwitchMor = (ManagedObjectReference) prop.getVal();
                         }
                     }
-                    if ((dvPortGroupKey != null) && dvPortGroupKey.equals(dvPortGroupMor.getPresetParams()))
{
+                    if ((dvPortGroupKey != null) && dvPortGroupKey.equals(dvPortGroupMor.getValue()))
{
                         return dvSwitchMor;
                     }
                 }
@@ -474,7 +474,7 @@ public class DatacenterMO extends BaseMO {
         ManagedObjectReference dvsMor = getDvSwitchMor(networkInfo.first());
         String dvSwitchUuid = getDvSwitchUuid(dvsMor);
         dvPortConnection.setSwitchUuid(dvSwitchUuid);
-        dvPortConnection.setPortgroupKey(networkInfo.first().getPresetParams());
+        dvPortConnection.setPortgroupKey(networkInfo.first().getValue());
         dvPortBacking.setPort(dvPortConnection);
         System.out.println("Plugging NIC device into network " + networkInfo.second() + "
backed by dvSwitch: "
                 + dvSwitchUuid);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4254cb85/vmware-base/src/com/cloud/hypervisor/vmware/mo/HostDatastoreBrowserMO.java
----------------------------------------------------------------------
diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/mo/HostDatastoreBrowserMO.java b/vmware-base/src/com/cloud/hypervisor/vmware/mo/HostDatastoreBrowserMO.java
index 209e68c..63dcfae 100644
--- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/HostDatastoreBrowserMO.java
+++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/HostDatastoreBrowserMO.java
@@ -39,7 +39,7 @@ public class HostDatastoreBrowserMO extends BaseMO {
 
 	public void DeleteFile(String datastoreFullPath) throws Exception {
 		if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - deleteFile(). target mor: " + _mor.getPresetParams()
+ ", file datastore path: " + datastoreFullPath);
+			s_logger.trace("vCenter API trace - deleteFile(). target mor: " + _mor.getValue() + ",
file datastore path: " + datastoreFullPath);
 
 		_context.getService().deleteFile(_mor, datastoreFullPath);
 
@@ -49,7 +49,7 @@ public class HostDatastoreBrowserMO extends BaseMO {
 
 	public HostDatastoreBrowserSearchResults searchDatastore(String datastorePath, HostDatastoreBrowserSearchSpec
searchSpec) throws Exception {
 		if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - searchDatastore(). target mor: " + _mor.getPresetParams()
+ ", file datastore path: " + datastorePath);
+			s_logger.trace("vCenter API trace - searchDatastore(). target mor: " + _mor.getValue()
+ ", file datastore path: " + datastorePath);
 
 		try {
 			ManagedObjectReference morTask = _context.getService().searchDatastoreTask(_mor, datastorePath,
searchSpec);
@@ -81,7 +81,7 @@ public class HostDatastoreBrowserMO extends BaseMO {
     @SuppressWarnings("unchecked")
     public ArrayList<HostDatastoreBrowserSearchResults> searchDatastoreSubFolders(String
datastorePath, HostDatastoreBrowserSearchSpec searchSpec) throws Exception {
 		if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - searchDatastoreSubFolders(). target mor: " + _mor.getPresetParams()
+ ", file datastore path: " + datastorePath);
+			s_logger.trace("vCenter API trace - searchDatastoreSubFolders(). target mor: " + _mor.getValue()
+ ", file datastore path: " + datastorePath);
 
 		try {
 			ManagedObjectReference morTask = _context.getService().searchDatastoreSubFoldersTask(_mor,
datastorePath, searchSpec);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4254cb85/vmware-base/src/com/cloud/hypervisor/vmware/mo/HostDatastoreSystemMO.java
----------------------------------------------------------------------
diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/mo/HostDatastoreSystemMO.java b/vmware-base/src/com/cloud/hypervisor/vmware/mo/HostDatastoreSystemMO.java
index 898e82b..3dcd724 100755
--- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/HostDatastoreSystemMO.java
+++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/HostDatastoreSystemMO.java
@@ -63,7 +63,7 @@ public class HostDatastoreSystemMO extends BaseMO {
 					DynamicProperty prop = oc.getPropSet().get(1);
 					if(prop != null && prop.getVal() != null) {
 						if(prop.getVal() instanceof CustomFieldStringValue) {
-							String val = ((CustomFieldStringValue)prop.getVal()).getPresetParams();
+							String val = ((CustomFieldStringValue)prop.getVal()).getValue();
 							if(val.equalsIgnoreCase(name))
 								return oc.getObj();
 						}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4254cb85/vmware-base/src/com/cloud/hypervisor/vmware/mo/HostMO.java
----------------------------------------------------------------------
diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/mo/HostMO.java b/vmware-base/src/com/cloud/hypervisor/vmware/mo/HostMO.java
index a228fc3..a866fdc 100755
--- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/HostMO.java
+++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/HostMO.java
@@ -544,7 +544,7 @@ public class HostMO extends BaseMO implements VmwareHypervisorHost {
 		        			name = (String)objProp.getVal();
 		        		} else {
 		        			OptionValue optValue = (OptionValue)objProp.getVal();
-		        			value = (String)optValue.getPresetParams();
+		        			value = (String)optValue.getValue();
 		        		}
 		        	}
 
@@ -561,7 +561,7 @@ public class HostMO extends BaseMO implements VmwareHypervisorHost {
 	@Override
     public ObjectContent[] getVmPropertiesOnHyperHost(String[] propertyPaths) throws Exception
{
 		if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - retrieveProperties() for VM properties. target MOR:
" + _mor.getPresetParams() + ", properties: " + new Gson().toJson(propertyPaths));
+			s_logger.trace("vCenter API trace - retrieveProperties() for VM properties. target MOR:
" + _mor.getValue() + ", properties: " + new Gson().toJson(propertyPaths));
 
 		PropertySpec pSpec = new PropertySpec();
 		pSpec.setType("VirtualMachine");
@@ -594,7 +594,7 @@ public class HostMO extends BaseMO implements VmwareHypervisorHost {
 	@Override
 	public ObjectContent[] getDatastorePropertiesOnHyperHost(String[] propertyPaths) throws
Exception {
 		if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - retrieveProperties() on Datastore properties. target
MOR: " + _mor.getPresetParams() + ", properties: " + new Gson().toJson(propertyPaths));
+			s_logger.trace("vCenter API trace - retrieveProperties() on Datastore properties. target
MOR: " + _mor.getValue() + ", properties: " + new Gson().toJson(propertyPaths));
 
 		PropertySpec pSpec = new PropertySpec();
 		pSpec.setType("Datastore");
@@ -628,7 +628,7 @@ public class HostMO extends BaseMO implements VmwareHypervisorHost {
 		List<Pair<ManagedObjectReference, String>> mounts = new ArrayList<Pair<ManagedObjectReference,
String>>();
 
 		ObjectContent[] ocs = getDatastorePropertiesOnHyperHost(new String[] {
-			String.format("host[\"%s\"].mountInfo.path", _mor.getPresetParams()) });
+			String.format("host[\"%s\"].mountInfo.path", _mor.getValue()) });
 		if(ocs != null) {
 			for(ObjectContent oc : ocs) {
 				Pair<ManagedObjectReference, String> mount = new Pair<ManagedObjectReference,
String>(
@@ -659,7 +659,7 @@ public class HostMO extends BaseMO implements VmwareHypervisorHost {
 
 	public void importVmFromOVF(String ovfFilePath, String vmName, String datastoreName, String
diskOption) throws Exception {
 	    if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - importVmFromOVF(). target MOR: " + _mor.getPresetParams()
+ ", ovfFilePath: " + ovfFilePath + ", vmName: " + vmName
+			s_logger.trace("vCenter API trace - importVmFromOVF(). target MOR: " + _mor.getValue()
+ ", ovfFilePath: " + ovfFilePath + ", vmName: " + vmName
 				+ ",datastoreName: " + datastoreName + ", diskOption: " + diskOption);
 
 		DatastoreMO dsMo = getHostDatastoreMO(datastoreName);
@@ -686,9 +686,9 @@ public class HostMO extends BaseMO implements VmwareHypervisorHost {
 		String guestOsIdentifier, ManagedObjectReference morDs, boolean snapshotDirToParent) throws
Exception {
 
 		if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - createBlankVm(). target MOR: " + _mor.getPresetParams()
+ ", vmName: " + vmName + ", cpuCount: " + cpuCount
+			s_logger.trace("vCenter API trace - createBlankVm(). target MOR: " + _mor.getValue() +
", vmName: " + vmName + ", cpuCount: " + cpuCount
 				+ ", cpuSpeedMhz: " + cpuSpeedMHz + ", cpuReservedMHz: " + cpuReservedMHz + ", limitCpu:
" + limitCpuUse + ", memoryMB: " + memoryMB
-				+ ", guestOS: " + guestOsIdentifier + ", datastore: " + morDs.getPresetParams() + ",
snapshotDirToParent: " + snapshotDirToParent);
+				+ ", guestOS: " + guestOsIdentifier + ", datastore: " + morDs.getValue() + ", snapshotDirToParent:
" + snapshotDirToParent);
 
 		boolean result = HypervisorHostHelper.createBlankVm(this, vmName, cpuCount, cpuSpeedMHz,
cpuReservedMHz, limitCpuUse,
 			memoryMB, memoryReserveMB, guestOsIdentifier, morDs, snapshotDirToParent);
@@ -736,7 +736,7 @@ public class HostMO extends BaseMO implements VmwareHypervisorHost {
 		int poolHostPort, String poolPath, String poolUuid) throws Exception {
 
 	    if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - mountDatastore(). target MOR: " + _mor.getPresetParams()
+ ", vmfs: " + vmfsDatastore + ", poolHost: " + poolHostAddress
+			s_logger.trace("vCenter API trace - mountDatastore(). target MOR: " + _mor.getValue()
+ ", vmfs: " + vmfsDatastore + ", poolHost: " + poolHostAddress
 				+ ", poolHostPort: " + poolHostPort + ", poolPath: " + poolPath + ", poolUuid: " + poolUuid);
 
     	HostDatastoreSystemMO hostDatastoreSystemMo = getHostDatastoreSystemMO();
@@ -751,7 +751,7 @@ public class HostMO extends BaseMO implements VmwareHypervisorHost {
                             poolUuid);
                 } catch (AlreadyExistsFaultMsg e) {
                     s_logger.info("Creation of NFS datastore on vCenter failed since datastore
already exists." +
-                            " Details: vCenter API trace - mountDatastore(). target MOR:
" + _mor.getPresetParams() + ", vmfs: " +
+                            " Details: vCenter API trace - mountDatastore(). target MOR:
" + _mor.getValue() + ", vmfs: " +
                             vmfsDatastore + ", poolHost: " + poolHostAddress + ", poolHostPort:
" + poolHostPort +
                             ", poolPath: " + poolPath + ", poolUuid: " + poolUuid);
                     // Retrieve the morDatastore and return it.
@@ -759,7 +759,7 @@ public class HostMO extends BaseMO implements VmwareHypervisorHost {
                             poolHostPort, poolPath, poolUuid, hostDatastoreSystemMo));
                 } catch (Exception e) {
                     s_logger.info("Creation of NFS datastore on vCenter failed. " +
-                            " Details: vCenter API trace - mountDatastore(). target MOR:
" + _mor.getPresetParams() + ", vmfs: " +
+                            " Details: vCenter API trace - mountDatastore(). target MOR:
" + _mor.getValue() + ", vmfs: " +
                             vmfsDatastore + ", poolHost: " + poolHostAddress + ", poolHostPort:
" + poolHostPort +
                             ", poolPath: " + poolPath + ", poolUuid: " + poolUuid + ". Exception
mesg: " + e.getMessage());
                     throw new Exception("Creation of NFS datastore on vCenter failed.");
@@ -800,7 +800,7 @@ public class HostMO extends BaseMO implements VmwareHypervisorHost {
 	public void unmountDatastore(String poolUuid) throws Exception {
 
 	    if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - unmountDatastore(). target MOR: " + _mor.getPresetParams()
+ ", poolUuid: " + poolUuid);
+			s_logger.trace("vCenter API trace - unmountDatastore(). target MOR: " + _mor.getValue()
+ ", poolUuid: " + poolUuid);
 
     	HostDatastoreSystemMO hostDatastoreSystemMo = getHostDatastoreSystemMO();
     	if(!hostDatastoreSystemMo.deleteDatastore(poolUuid)) {
@@ -836,7 +836,7 @@ public class HostMO extends BaseMO implements VmwareHypervisorHost {
 	@Override
 	public VmwareHypervisorHostResourceSummary getHyperHostResourceSummary() throws Exception
{
 	    if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - getHyperHostResourceSummary(). target MOR: " + _mor.getPresetParams());
+			s_logger.trace("vCenter API trace - getHyperHostResourceSummary(). target MOR: " + _mor.getValue());
 
 		VmwareHypervisorHostResourceSummary summary = new VmwareHypervisorHostResourceSummary();
 
@@ -854,7 +854,7 @@ public class HostMO extends BaseMO implements VmwareHypervisorHost {
 	@Override
 	public VmwareHypervisorHostNetworkSummary getHyperHostNetworkSummary(String managementPortGroup)
throws Exception {
 	    if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - getHyperHostNetworkSummary(). target MOR: " + _mor.getPresetParams()
+ ", mgmtPortgroup: " + managementPortGroup);
+			s_logger.trace("vCenter API trace - getHyperHostNetworkSummary(). target MOR: " + _mor.getValue()
+ ", mgmtPortgroup: " + managementPortGroup);
 
 		VmwareHypervisorHostNetworkSummary summary = new VmwareHypervisorHostNetworkSummary();
 
@@ -906,7 +906,7 @@ public class HostMO extends BaseMO implements VmwareHypervisorHost {
 	@Override
 	public ComputeResourceSummary getHyperHostHardwareSummary() throws Exception {
 	    if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - getHyperHostHardwareSummary(). target MOR: " + _mor.getPresetParams());
+			s_logger.trace("vCenter API trace - getHyperHostHardwareSummary(). target MOR: " + _mor.getValue());
 
 		//
 		// This is to adopt the model when using Cluster as a big host while ComputeResourceSummary
is used

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4254cb85/vmware-base/src/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java
----------------------------------------------------------------------
diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java b/vmware-base/src/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java
index 696b079..157c7a6 100755
--- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java
+++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java
@@ -747,9 +747,9 @@ public class HypervisorHostHelper {
         averageBandwidth.setValue((long) networkRateMbps.intValue() * 1024L * 1024L);
         // We chose 50% higher allocation than average bandwidth.
         // TODO(sateesh): Also let user specify the peak coefficient
-        peakBandwidth.setValue((long) (averageBandwidth.getPresetParams() * 1.5));
+        peakBandwidth.setValue((long) (averageBandwidth.getValue() * 1.5));
         // TODO(sateesh): Also let user specify the burst coefficient
-        burstSize.setValue((long) (5 * averageBandwidth.getPresetParams() / 8));
+        burstSize.setValue((long) (5 * averageBandwidth.getValue() / 8));
 
         shapingPolicy.setEnabled(isEnabled);
         shapingPolicy.setAverageBandwidth(averageBandwidth);
@@ -893,14 +893,14 @@ public class HypervisorHostHelper {
             ManagedObjectReference morParent = hostMo.getParentMor();
             if(morParent != null && morParent.getType().equals("ClusterComputeResource"))
{
                 // to be conservative, lock cluster
-                GlobalLock lock = GlobalLock.getInternLock("ClusterLock." + morParent.getPresetParams());
+                GlobalLock lock = GlobalLock.getInternLock("ClusterLock." + morParent.getValue());
                 try {
                     if(lock.lock(DEFAULT_LOCK_TIMEOUT_SECONDS)) {
                         try {
                             List<ManagedObjectReference> hosts = (List<ManagedObjectReference>)hostMo.getContext().getVimClient().getDynamicProperty(morParent,
"host");
                             if(hosts != null) {
                                 for(ManagedObjectReference otherHost: hosts) {
-                                    if(!otherHost.getPresetParams().equals(hostMo.getMor().getPresetParams()))
{
+                                    if(!otherHost.getValue().equals(hostMo.getMor().getValue()))
{
                                         HostMO otherHostMo = new HostMO(hostMo.getContext(),
otherHost);
                                         try {
                                             if(s_logger.isDebugEnabled())

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4254cb85/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 1bb560c..cf5ffde 100644
--- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
+++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
@@ -755,7 +755,7 @@ public class VirtualMachineMO extends BaseMO {
 	    			else if(prop.getName().startsWith("value[")) {
 		    			CustomFieldStringValue val = (CustomFieldStringValue)prop.getVal();
 		    			if(val != null)
-		    				gcTagValue = val.getPresetParams();
+		    				gcTagValue = val.getValue();
 	    			}
 	    		}
 
@@ -878,7 +878,7 @@ public class VirtualMachineMO extends BaseMO {
 		if(values != null) {
 			for(OptionValue option : values) {
 				if(option.getKey().equals("RemoteDisplay.vnc.port")) {
-					String value = (String)option.getPresetParams();
+					String value = (String)option.getValue();
 					if(value != null) {
                         return new Pair<String, Integer>(summary.getHostIp(), Integer.parseInt(value));
                     }
@@ -898,9 +898,9 @@ public class VirtualMachineMO extends BaseMO {
 		String rdmDeviceName, int sizeInMb, ManagedObjectReference morDs, int controllerKey) throws
Exception {
 
 		if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - createDisk(). target MOR: " + _mor.getPresetParams()
+ ", vmdkDatastorePath: " + vmdkDatastorePath
+			s_logger.trace("vCenter API trace - createDisk(). target MOR: " + _mor.getValue() + ",
vmdkDatastorePath: " + vmdkDatastorePath
 				+ ", sizeInMb: " + sizeInMb + ", diskType: " + diskType + ", diskMode: " + diskMode +
", rdmDeviceName: " + rdmDeviceName
-				+ ", datastore: " + morDs.getPresetParams() + ", controllerKey: " + controllerKey);
+				+ ", datastore: " + morDs.getValue() + ", controllerKey: " + controllerKey);
 
 		assert(vmdkDatastorePath != null);
 		assert(morDs != null);
@@ -984,8 +984,8 @@ public class VirtualMachineMO extends BaseMO {
 	public void attachDisk(String[] vmdkDatastorePathChain, ManagedObjectReference morDs) throws
Exception {
 
 		if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - attachDisk(). target MOR: " + _mor.getPresetParams()
+ ", vmdkDatastorePath: "
-				+ new Gson().toJson(vmdkDatastorePathChain) + ", datastore: " + morDs.getPresetParams());
+			s_logger.trace("vCenter API trace - attachDisk(). target MOR: " + _mor.getValue() + ",
vmdkDatastorePath: "
+				+ new Gson().toJson(vmdkDatastorePathChain) + ", datastore: " + morDs.getValue());
 
 		VirtualDevice newDisk = VmwareHelper.prepareDiskDevice(this, getScsiDeviceControllerKey(),
 			vmdkDatastorePathChain, morDs, -1, 1);
@@ -1017,7 +1017,7 @@ public class VirtualMachineMO extends BaseMO {
 	public void attachDisk(Pair<String, ManagedObjectReference>[] vmdkDatastorePathChain,
int controllerKey) throws Exception {
 
 		if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - attachDisk(). target MOR: " + _mor.getPresetParams()
+ ", vmdkDatastorePath: "
+			s_logger.trace("vCenter API trace - attachDisk(). target MOR: " + _mor.getValue() + ",
vmdkDatastorePath: "
 				+ new Gson().toJson(vmdkDatastorePathChain));
 
 		VirtualDevice newDisk = VmwareHelper.prepareDiskDevice(this, controllerKey,
@@ -1051,7 +1051,7 @@ public class VirtualMachineMO extends BaseMO {
 	public List<Pair<String, ManagedObjectReference>> detachDisk(String vmdkDatastorePath,
boolean deleteBackingFile) throws Exception {
 
 		if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - detachDisk(). target MOR: " + _mor.getPresetParams()
+ ", vmdkDatastorePath: "
+			s_logger.trace("vCenter API trace - detachDisk(). target MOR: " + _mor.getValue() + ",
vmdkDatastorePath: "
 				+ vmdkDatastorePath + ", deleteBacking: " + deleteBackingFile);
 
 		// Note: if VM has been taken snapshot, original backing file will be renamed, therefore,
when we try to find the matching
@@ -1117,7 +1117,7 @@ public class VirtualMachineMO extends BaseMO {
 
 	public void detachAllDisks() throws Exception {
 		if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - detachAllDisk(). target MOR: " + _mor.getPresetParams());
+			s_logger.trace("vCenter API trace - detachAllDisk(). target MOR: " + _mor.getValue());
 
 		VirtualDisk[] disks = getAllDiskDevice();
 		if(disks.length > 0) {
@@ -1152,8 +1152,8 @@ public class VirtualMachineMO extends BaseMO {
 		boolean connect, boolean connectAtBoot) throws Exception {
 
 		if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - detachIso(). target MOR: " + _mor.getPresetParams()
+ ", isoDatastorePath: "
-				+ isoDatastorePath + ", datastore: " + morDs.getPresetParams() + ", connect: " + connect
+ ", connectAtBoot: " + connectAtBoot);
+			s_logger.trace("vCenter API trace - detachIso(). target MOR: " + _mor.getValue() + ",
isoDatastorePath: "
+				+ isoDatastorePath + ", datastore: " + morDs.getValue() + ", connect: " + connect + ",
connectAtBoot: " + connectAtBoot);
 
 		assert(isoDatastorePath != null);
 		assert(morDs != null);
@@ -1211,7 +1211,7 @@ public class VirtualMachineMO extends BaseMO {
 
 	public void detachIso(String isoDatastorePath) throws Exception {
 		if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - detachIso(). target MOR: " + _mor.getPresetParams()
+ ", isoDatastorePath: "
+			s_logger.trace("vCenter API trace - detachIso(). target MOR: " + _mor.getValue() + ",
isoDatastorePath: "
 				+ isoDatastorePath);
 
 		VirtualDevice device = getIsoDevice();
@@ -1252,7 +1252,7 @@ public class VirtualMachineMO extends BaseMO {
 	public Pair<VmdkFileDescriptor, byte[]> getVmdkFileInfo(String vmdkDatastorePath)
throws Exception {
 
 		if(s_logger.isTraceEnabled())
-			s_logger.trace("vCenter API trace - getVmdkFileInfo(). target MOR: " + _mor.getPresetParams()
+ ", vmdkDatastorePath: "
+			s_logger.trace("vCenter API trace - getVmdkFileInfo(). target MOR: " + _mor.getValue()
+ ", vmdkDatastorePath: "
 				+ vmdkDatastorePath);
 
 		Pair<DatacenterMO, String> dcPair = getOwnerDatacenter();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4254cb85/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareHelper.java
----------------------------------------------------------------------
diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareHelper.java b/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareHelper.java
index a2fc1f3..4a6a135 100644
--- a/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareHelper.java
+++ b/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareHelper.java
@@ -145,7 +145,7 @@ public class VmwareHelper {
         final VirtualDeviceConnectInfo connectInfo = new VirtualDeviceConnectInfo();
 
         dvPortConnection.setSwitchUuid(dvSwitchUuid);
-        dvPortConnection.setPortgroupKey(morNetwork.getPresetParams());
+        dvPortConnection.setPortgroupKey(morNetwork.getValue());
         dvPortBacking.setPort(dvPortConnection);
         nic.setBacking(dvPortBacking);
         nic.setKey(30);


Mime
View raw message