DaanHoogland 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_r399258922
 
 

 ##########
 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:
   it looks like both must be true so the account level cannot be used to 
override the global setting. Is that intentional? (this is both a functional as 
well as a technical question)

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to