@@ -120,7 +120,7 @@ public VirtualMachineMO findVmOnPeerHyperHost(String name) throws Exception {
120120 @ Override
121121 public ObjectContent [] getVmPropertiesOnHyperHost (String [] propertyPaths ) throws Exception {
122122 if (s_logger .isTraceEnabled ())
123- s_logger .trace ("vCenter API trace - retrieveProperties() for VM properties. target MOR: " + _mor .getPresetParams () + ", properties: " + new Gson ().toJson (propertyPaths ));
123+ s_logger .trace ("vCenter API trace - retrieveProperties() for VM properties. target MOR: " + _mor .getValue () + ", properties: " + new Gson ().toJson (propertyPaths ));
124124
125125 PropertySpec pSpec = new PropertySpec ();
126126 pSpec .setType ("VirtualMachine" );
@@ -158,7 +158,7 @@ public ObjectContent[] getVmPropertiesOnHyperHost(String[] propertyPaths) throws
158158 @ Override
159159 public ObjectContent [] getDatastorePropertiesOnHyperHost (String [] propertyPaths ) throws Exception {
160160 if (s_logger .isTraceEnabled ())
161- s_logger .trace ("vCenter API trace - retrieveProperties() on Datastore properties. target MOR: " + _mor .getPresetParams () + ", properties: " + new Gson ().toJson (propertyPaths ));
161+ s_logger .trace ("vCenter API trace - retrieveProperties() on Datastore properties. target MOR: " + _mor .getValue () + ", properties: " + new Gson ().toJson (propertyPaths ));
162162
163163 PropertySpec pSpec = new PropertySpec ();
164164 pSpec .setType ("Datastore" );
@@ -190,7 +190,7 @@ public ObjectContent[] getDatastorePropertiesOnHyperHost(String[] propertyPaths)
190190
191191 private ObjectContent [] getHostPropertiesOnCluster (String [] propertyPaths ) throws Exception {
192192 if (s_logger .isTraceEnabled ())
193- s_logger .trace ("vCenter API trace - retrieveProperties() on Host properties. target MOR: " + _mor .getPresetParams () + ", properties: " + new Gson ().toJson (propertyPaths ));
193+ s_logger .trace ("vCenter API trace - retrieveProperties() on Host properties. target MOR: " + _mor .getValue () + ", properties: " + new Gson ().toJson (propertyPaths ));
194194
195195 PropertySpec pSpec = new PropertySpec ();
196196 pSpec .setType ("HostSystem" );
@@ -224,7 +224,7 @@ private ObjectContent[] getHostPropertiesOnCluster(String[] propertyPaths) throw
224224 @ Override
225225 public boolean createVm (VirtualMachineConfigSpec vmSpec ) throws Exception {
226226 if (s_logger .isTraceEnabled ())
227- s_logger .trace ("vCenter API trace - createVM_Task(). target MOR: " + _mor .getPresetParams () + ", VirtualMachineConfigSpec: " + new Gson ().toJson (vmSpec ));
227+ s_logger .trace ("vCenter API trace - createVM_Task(). target MOR: " + _mor .getValue () + ", VirtualMachineConfigSpec: " + new Gson ().toJson (vmSpec ));
228228
229229 assert (vmSpec != null );
230230 DatacenterMO dcMo = new DatacenterMO (_context , getHyperHostDatacenter ());
@@ -252,14 +252,14 @@ public boolean createVm(VirtualMachineConfigSpec vmSpec) throws Exception {
252252 @ Override
253253 public void importVmFromOVF (String ovfFilePath , String vmName , DatastoreMO dsMo , String diskOption ) throws Exception {
254254 if (s_logger .isTraceEnabled ())
255- s_logger .trace ("vCenter API trace - importVmFromOVF(). target MOR: " + _mor .getPresetParams () + ", ovfFilePath: " + ovfFilePath + ", vmName: " + vmName
256- + ", datastore: " + dsMo .getMor ().getPresetParams () + ", diskOption: " + diskOption );
255+ s_logger .trace ("vCenter API trace - importVmFromOVF(). target MOR: " + _mor .getValue () + ", ovfFilePath: " + ovfFilePath + ", vmName: " + vmName
256+ + ", datastore: " + dsMo .getMor ().getValue () + ", diskOption: " + diskOption );
257257
258258 ManagedObjectReference morRp = getHyperHostOwnerResourcePool ();
259259 assert (morRp != null );
260260
261261 if (s_logger .isTraceEnabled ())
262- s_logger .trace ("vCenter API trace - importVmFromOVF(). resource pool: " + morRp .getPresetParams ());
262+ s_logger .trace ("vCenter API trace - importVmFromOVF(). resource pool: " + morRp .getValue ());
263263
264264 HypervisorHostHelper .importVmFromOVF (this , ovfFilePath , vmName , dsMo , diskOption , morRp , null );
265265
@@ -272,9 +272,9 @@ public boolean createBlankVm(String vmName, int cpuCount, int cpuSpeedMHz, int c
272272 String guestOsIdentifier , ManagedObjectReference morDs , boolean snapshotDirToParent ) throws Exception {
273273
274274 if (s_logger .isTraceEnabled ())
275- s_logger .trace ("vCenter API trace - createBlankVm(). target MOR: " + _mor .getPresetParams () + ", vmName: " + vmName + ", cpuCount: " + cpuCount
275+ s_logger .trace ("vCenter API trace - createBlankVm(). target MOR: " + _mor .getValue () + ", vmName: " + vmName + ", cpuCount: " + cpuCount
276276 + ", cpuSpeedMhz: " + cpuSpeedMHz + ", cpuReservedMHz: " + cpuReservedMHz + ", limitCpu: " + limitCpuUse + ", memoryMB: " + memoryMB
277- + ", guestOS: " + guestOsIdentifier + ", datastore: " + morDs .getPresetParams () + ", snapshotDirToParent: " + snapshotDirToParent );
277+ + ", guestOS: " + guestOsIdentifier + ", datastore: " + morDs .getValue () + ", snapshotDirToParent: " + snapshotDirToParent );
278278
279279 boolean result = HypervisorHostHelper .createBlankVm (this , vmName , cpuCount , cpuSpeedMHz , cpuReservedMHz , limitCpuUse ,
280280 memoryMB , memoryReserveMB , guestOsIdentifier , morDs , snapshotDirToParent );
@@ -290,7 +290,7 @@ public ManagedObjectReference mountDatastore(boolean vmfsDatastore, String poolH
290290 int poolHostPort , String poolPath , String poolUuid ) throws Exception {
291291
292292 if (s_logger .isTraceEnabled ())
293- s_logger .trace ("vCenter API trace - mountDatastore(). target MOR: " + _mor .getPresetParams () + ", vmfs: " + vmfsDatastore + ", poolHost: " + poolHostAddress
293+ s_logger .trace ("vCenter API trace - mountDatastore(). target MOR: " + _mor .getValue () + ", vmfs: " + vmfsDatastore + ", poolHost: " + poolHostAddress
294294 + ", poolHostPort: " + poolHostPort + ", poolPath: " + poolPath + ", poolUuid: " + poolUuid );
295295
296296 ManagedObjectReference morDs = null ;
@@ -304,7 +304,7 @@ public ManagedObjectReference mountDatastore(boolean vmfsDatastore, String poolH
304304 morDsFirst = morDs ;
305305
306306 // assume datastore is in scope of datacenter
307- assert (morDsFirst .getPresetParams ().equals (morDs .getPresetParams ()));
307+ assert (morDsFirst .getValue ().equals (morDs .getValue ()));
308308 }
309309 }
310310
@@ -326,7 +326,7 @@ public ManagedObjectReference mountDatastore(boolean vmfsDatastore, String poolH
326326 @ Override
327327 public void unmountDatastore (String poolUuid ) throws Exception {
328328 if (s_logger .isTraceEnabled ())
329- s_logger .trace ("vCenter API trace - unmountDatastore(). target MOR: " + _mor .getPresetParams () + ", poolUuid: " + poolUuid );
329+ s_logger .trace ("vCenter API trace - unmountDatastore(). target MOR: " + _mor .getValue () + ", poolUuid: " + poolUuid );
330330
331331 List <ManagedObjectReference > hosts = (List <ManagedObjectReference >)_context .getVimClient ().getDynamicProperty (_mor , "host" );
332332 if (hosts != null && hosts .size () > 0 ) {
@@ -344,7 +344,7 @@ public void unmountDatastore(String poolUuid) throws Exception {
344344 public ManagedObjectReference findDatastore (String poolUuid ) throws Exception {
345345
346346 if (s_logger .isTraceEnabled ())
347- s_logger .trace ("vCenter API trace - findDatastore(). target MOR: " + _mor .getPresetParams () + ", poolUuid: " + poolUuid );
347+ s_logger .trace ("vCenter API trace - findDatastore(). target MOR: " + _mor .getValue () + ", poolUuid: " + poolUuid );
348348
349349 CustomFieldsManagerMO cfmMo = new CustomFieldsManagerMO (_context ,
350350 _context .getServiceContent ().getCustomFieldsManager ());
@@ -361,7 +361,7 @@ public ManagedObjectReference findDatastore(String poolUuid) throws Exception {
361361 DynamicProperty prop = oc .getPropSet ().get (1 );
362362 if (prop != null && prop .getVal () != null ) {
363363 if (prop .getVal () instanceof CustomFieldStringValue ) {
364- String val = ((CustomFieldStringValue )prop .getVal ()).getPresetParams ();
364+ String val = ((CustomFieldStringValue )prop .getVal ()).getValue ();
365365 if (val .equalsIgnoreCase (poolUuid )) {
366366
367367 if (s_logger .isTraceEnabled ())
@@ -382,7 +382,7 @@ public ManagedObjectReference findDatastore(String poolUuid) throws Exception {
382382 @ Override
383383 public ManagedObjectReference findDatastoreByExportPath (String exportPath ) throws Exception {
384384 if (s_logger .isTraceEnabled ())
385- s_logger .trace ("vCenter API trace - findDatastoreByExportPath(). target MOR: " + _mor .getPresetParams () + ", exportPath: " + exportPath );
385+ s_logger .trace ("vCenter API trace - findDatastoreByExportPath(). target MOR: " + _mor .getValue () + ", exportPath: " + exportPath );
386386
387387 ObjectContent [] ocs = getDatastorePropertiesOnHyperHost (new String [] {"info" });
388388 if (ocs != null && ocs .length > 0 ) {
@@ -415,7 +415,7 @@ public ManagedObjectReference findDatastoreByExportPath(String exportPath) throw
415415 @ Override
416416 public ManagedObjectReference findMigrationTarget (VirtualMachineMO vmMo ) throws Exception {
417417 if (s_logger .isTraceEnabled ())
418- s_logger .trace ("vCenter API trace - findMigrationTarget(). target MOR: " + _mor .getPresetParams () + ", vm: " + vmMo .getName ());
418+ s_logger .trace ("vCenter API trace - findMigrationTarget(). target MOR: " + _mor .getValue () + ", vm: " + vmMo .getName ());
419419
420420 List <ClusterHostRecommendation > candidates = recommendHostsForVm (vmMo );
421421 if (candidates != null && candidates .size () > 0 ) {
@@ -464,7 +464,7 @@ public String getHyperHostDefaultGateway() throws Exception {
464464 @ Override
465465 public VmwareHypervisorHostResourceSummary getHyperHostResourceSummary () throws Exception {
466466 if (s_logger .isTraceEnabled ())
467- s_logger .trace ("vCenter API trace - getHyperHostResourceSummary(). target MOR: " + _mor .getPresetParams ());
467+ s_logger .trace ("vCenter API trace - getHyperHostResourceSummary(). target MOR: " + _mor .getValue ());
468468
469469 VmwareHypervisorHostResourceSummary summary = new VmwareHypervisorHostResourceSummary ();
470470
@@ -496,7 +496,7 @@ public VmwareHypervisorHostResourceSummary getHyperHostResourceSummary() throws
496496 public VmwareHypervisorHostNetworkSummary getHyperHostNetworkSummary (String esxServiceConsolePort ) throws Exception {
497497
498498 if (s_logger .isTraceEnabled ())
499- s_logger .trace ("vCenter API trace - getHyperHostNetworkSummary(). target MOR: " + _mor .getPresetParams () + ", mgmtPortgroup: " + esxServiceConsolePort );
499+ s_logger .trace ("vCenter API trace - getHyperHostNetworkSummary(). target MOR: " + _mor .getValue () + ", mgmtPortgroup: " + esxServiceConsolePort );
500500
501501 List <ManagedObjectReference > hosts = (List <ManagedObjectReference >)_context .getVimClient ().getDynamicProperty (_mor , "host" );
502502 if (hosts != null && hosts .size () > 0 ) {
@@ -515,7 +515,7 @@ public VmwareHypervisorHostNetworkSummary getHyperHostNetworkSummary(String esxS
515515 @ Override
516516 public ComputeResourceSummary getHyperHostHardwareSummary () throws Exception {
517517 if (s_logger .isTraceEnabled ())
518- s_logger .trace ("vCenter API trace - getHyperHostHardwareSummary(). target MOR: " + _mor .getPresetParams ());
518+ s_logger .trace ("vCenter API trace - getHyperHostHardwareSummary(). target MOR: " + _mor .getValue ());
519519
520520 ClusterComputeResourceSummary hardwareSummary = (ClusterComputeResourceSummary )
521521 _context .getVimClient ().getDynamicProperty (_mor , "summary" );
@@ -562,7 +562,7 @@ public HashMap<String, Integer> getVmVncPortsOnCluster() throws Exception {
562562 name = (String )objProp .getVal ();
563563 } else {
564564 OptionValue optValue = (OptionValue )objProp .getVal ();
565- value = (String )optValue .getPresetParams ();
565+ value = (String )optValue .getValue ();
566566 }
567567 }
568568
0 commit comments