Pearl1594 commented on a change in pull request #3976: Enable sending hypervior 
host name via metadata - VR and Config Drive
URL: https://github.com/apache/cloudstack/pull/3976#discussion_r399343433
 
 

 ##########
 File path: 
engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
 ##########
 @@ -2802,9 +2802,10 @@ private void orchestrateMigrateWithStorage(final String 
vmUuid, final long srcHo
                 if 
(_networkModel.isSharedNetworkWithoutServices(network.getId())) {
                     final String serviceOffering = 
_serviceOfferingDao.findByIdIncludingRemoved(vm.getId(), 
vm.getServiceOfferingId()).getDisplayText();
                     boolean isWindows = 
_guestOSCategoryDao.findById(_guestOSDao.findById(vm.getGuestOSId()).getCategoryId()).getName().equalsIgnoreCase("Windows");
-
+                    final Account caller = 
CallContext.current().getCallingAccount();
+                    String destHostname = 
(VirtualMachineManager.AllowExposeHypervisorHostname.value() && 
VirtualMachineManager.AllowExposeHypervisorHostnameAccoutLevel.valueIn(caller.getId()))
 ? destination.getHost().getName() : null;
 
 Review comment:
   Yes @DaanHoogland , both need to be true (i.e., the Global value and the 
account scope level) for it to show the hypervisor hostname

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to