Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Update nsx_attach_vm_switch.py #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yogeshvhora
Copy link

Current code attaches the logicalswitch to first network adapter of the VM. Incase the user wants to have first network adapter from VM for management and second one for overlay, then we need to provide option for attaching.
Adding this change to provide the device number to be attached to as per following API doc - https://docs.vmware.com/en/VMware-NSX-for-vSphere/6.3/nsx_63_api.pdf ( Page 44 )
It says " For example, if the instanceUuid is
502e71fa-1a00-759b-e40f-ce778e915f16 and the appropriate device value is device[4000], the objectId and
vnicUuid are both 502e71fa-1a00-759b-e40f-ce778e915f16.000"

Current code attaches the logicalswitch to first network adapter of the VM. Incase the user wants to have first network adapter from VM for management and second one for overlay, then we need to provide option for attaching.
Adding this change to provide the device number to be attached to as per following API doc - https://docs.vmware.com/en/VMware-NSX-for-vSphere/6.3/nsx_63_api.pdf  ( Page 44 ) 
It says " For example, if the instanceUuid is
502e71fa-1a00-759b-e40f-ce778e915f16 and the appropriate device value is device[4000], the objectId and
vnicUuid are both 502e71fa-1a00-759b-e40f-ce778e915f16.000"
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants