cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From likit...@apache.org
Subject git commit: updated refs/heads/master to 51ee900
Date Tue, 23 Dec 2014 06:20:57 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 507d9d337 -> 51ee90074


CLOUDSTACK-8110. VM name in vCenter should be VM's DisplayName if global config 'vm.instancename.flag'
is set.


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

Branch: refs/heads/master
Commit: 51ee90074d5b53be261dcc746e4bd8a1058dfb6a
Parents: 507d9d3
Author: Likitha Shetty <likitha.shetty@citrix.com>
Authored: Fri Oct 31 16:26:29 2014 +0530
Committer: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Committed: Tue Dec 23 11:42:26 2014 +0530

----------------------------------------------------------------------
 .../com/cloud/hypervisor/vmware/resource/VmwareResource.java   | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/51ee9007/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index d175d85..2e7553a 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -1834,10 +1834,8 @@ public class VmwareResource implements StoragePoolResource, ServerResource,
Vmwa
     private Pair<String, String> composeVmNames(VirtualMachineTO vmSpec) {
         String vmInternalCSName = vmSpec.getName();
         String vmNameOnVcenter = vmSpec.getName();
-        if (vmSpec.getType() == VirtualMachine.Type.User && _instanceNameFlag &&
vmSpec.getHostName() != null) {
-            String[] tokens = vmInternalCSName.split("-");
-            assert (tokens.length >= 3); // vmInternalCSName has format i-x-y-<instance.name>
-            vmNameOnVcenter = String.format("%s-%s-%s-%s", tokens[0], tokens[1], tokens[2],
vmSpec.getHostName());
+        if (_instanceNameFlag && vmSpec.getHostName() != null) {
+            vmNameOnVcenter = vmSpec.getHostName();
         }
         return new Pair<String, String>(vmInternalCSName, vmNameOnVcenter);
     }


Mime
View raw message