rhtyd commented on a change in pull request #2288: CLOUDSTACK-10107: For VMware 
VMs add devices without unit number
URL: https://github.com/apache/cloudstack/pull/2288#discussion_r143916379
 
 

 ##########
 File path: vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareHelper.java
 ##########
 @@ -210,16 +208,13 @@ public static VirtualDevice 
prepareDvNicDevice(VirtualMachineMO vmMo, ManagedObj
         dvPortConnection.setPortgroupKey(morNetwork.getValue());
         dvPortBacking.setPort(dvPortConnection);
         nic.setBacking(dvPortBacking);
-        nic.setKey(30);
 
         connectInfo.setAllowGuestControl(true);
-        connectInfo.setConnected(conntected);
+        connectInfo.setConnected(connected);
         connectInfo.setStartConnected(connectOnStart);
         nic.setAddressType("Manual");
         nic.setConnectable(connectInfo);
         nic.setMacAddress(macAddress);
-
-        nic.setUnitNumber(deviceNumber);
         nic.setKey(-contextNumber);
 
 Review comment:
   @rafaelweingartner when I was trying to fix the bug, I thought too why we're 
using negative values however, I could not find a reason. For backward 
compatibilities sake and to reduce our test scopes, I chose to keep it that 
way. IMO it's not a problem as long as the key is unique, being 
negative/positive is not a problem.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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