Skip to content

Commit e781cdb

Browse files
author
Dahn Highland
committed
rename new and use old method
1 parent bb1d988 commit e781cdb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -7209,7 +7209,7 @@ private Answer execute(PrepareUnmanageVMInstanceCommand cmd) {
72097209

72107210
ManagedObjectReference dcMor = hyperHost.getHyperHostDatacenter();
72117211
DatacenterMO dataCenterMo = new DatacenterMO(getServiceContext(), dcMor);
7212-
VirtualMachineMO vm = dataCenterMo.findVm2(instanceName);
7212+
VirtualMachineMO vm = dataCenterMo.findVm(instanceName);
72137213
if (vm == null) {
72147214
return new PrepareUnmanageVMInstanceAnswer(cmd, false, String.format("Cannot find VM with name [%s] in datacenter [%s].", instanceName, dataCenterMo.getName()));
72157215
}
@@ -7515,7 +7515,7 @@ public String acquireVirtualMachineVncTicket(String vmInternalCSName) throws Exc
75157515
VmwareContext context = getServiceContext();
75167516
VmwareHypervisorHost hyperHost = getHyperHost(context);
75177517
DatacenterMO dcMo = new DatacenterMO(hyperHost.getContext(), hyperHost.getHyperHostDatacenter());
7518-
VirtualMachineMO vmMo = dcMo.findVm2(vmInternalCSName);
7518+
VirtualMachineMO vmMo = dcMo.findVm(vmInternalCSName);
75197519
return vmMo.acquireVncTicket();
75207520
}
75217521

Diff for: vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/DatacenterMO.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public String getName() throws InvalidPropertyFaultMsg, RuntimeFaultFaultMsg, In
7373
return _context.getVimClient().getDynamicProperty(_mor, "name");
7474
}
7575

76-
public VirtualMachineMO findVm(String vmName) throws Exception {
76+
public VirtualMachineMO findVmEx(String vmName) throws Exception {
7777
int key = getCustomFieldKey("VirtualMachine", CustomFieldConstants.CLOUD_VM_INTERNAL_NAME);
7878
if (key == 0) {
7979
s_logger.warn("Custom field " + CustomFieldConstants.CLOUD_VM_INTERNAL_NAME + " is not registered ?!");
@@ -82,7 +82,7 @@ public VirtualMachineMO findVm(String vmName) throws Exception {
8282
List<ObjectContent> ocs = getVmProperties(new String[] {"name", instanceNameCustomField});
8383
return HypervisorHostHelper.findVmFromObjectContent(_context, ocs.toArray(new ObjectContent[0]), vmName, instanceNameCustomField);
8484
}
85-
public VirtualMachineMO findVm2(String vmName) throws Exception {
85+
public VirtualMachineMO findVm(String vmName) throws Exception {
8686
int key = getCustomFieldKey("VirtualMachine", CustomFieldConstants.CLOUD_VM_INTERNAL_NAME);
8787
if (key == 0) {
8888
logger.warn("Custom field " + CustomFieldConstants.CLOUD_VM_INTERNAL_NAME + " is not registered ?!");

0 commit comments

Comments
 (0)