-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reconfigure VM: Add / Remove Network Adapters #163
Conversation
@agrare I will add a commit solving the rubocop offenses. The Travis CI build fails because this PR depends on PR ManageIQ/manageiq#16700 as part of the set of 4 PRs for this new functionality. |
con.connected = "true" | ||
con.startConnected = "true" | ||
end | ||
dev.backing = VimHash.new("VirtualEthernetCardDistributedVirtualPortBackingInfo") do |bck| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to check the Lan that has been selected to see if it is a distributed or standard network. We store that as the :shared
property on the switch so once you find the lan you can check lan.switch.shared
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the check for lan.switched.shared.
add_device_config_spec(vmcs, VirtualDeviceConfigSpecOperation::Add) do |vdcs| | ||
vdcs.device = VimHash.new("VirtualVmxnet3") do |dev| | ||
dev.key = rand(-9999..-100) # negative integer as temporary key | ||
dev.unitNumber = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to pick a unitNumber that is available and give it a controllerKey as well. For the key we usually just use -100 * options[:unit_number]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using unitNumber 0 instructs VMware to choose the next available unit number. The key must be a unique negative number (temporary key). The controllerKey will be chosen by VMware.
This pull request is not mergeable. Please rebase and repush. |
8dba93e
to
5040e9f
Compare
Tested adding and removing both dvPortGroup and VM Network backings and all works 👍 |
@agrare Please use 'Squash and Merge' to merge this feature branch as one commit. |
be02b69
to
d618d2e
Compare
We don't use that feature, I'll just fixup locally |
@agrare I have squashed the last two commits. |
Checked commits kruge002/manageiq-providers-vmware@946a0b8~...d618d2e with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0 |
Thanks so much @kruge002 ! Great enhancement |
@simaishi Done |
Reconfigure VM: Add / Remove Network Adapters (cherry picked from commit a8b0c37)
Gaprindashvili backport details:
|
…rval Set retry interval to 1 minute for generic service state-machine.
This PR adds support for reconfiguring network adapters for VMware VMs.
This PR is part of a set of PRs:
ManageIQ/vmware_web_service#25 (merged by @agrare)
#163
ManageIQ/manageiq#16700
ManageIQ/manageiq-ui-classic#3121
More info: ManageIQ/manageiq-ui-classic#3119