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

Cannot change IP Allocation Mode and set static IP to VM when ip_allocation_mode is DHCP #51

Open
cpumanaz opened this issue Aug 18, 2017 · 0 comments

Comments

@cpumanaz
Copy link

When setting the ip for the network, the current state is checked. If there is no IP, the .first does not return a value and node is null leading to the error below. It's reasonable to expect that someone would want to use the API to change the allocation method to MANUAL, and then assign the IP address. Changing these two attributes results in the error as IP is null.

It is possible to do this in the web UI, but prevents automation with VMWare when compared to competing clouds like MS Azure or AWS.

Please update to allow changing to/from DHCP.

connection.rb lines 158-161

if config[:ip]
node = picked_network.css('IpAddress').first
node.content = config[:ip]
end

/Ruby24-x64/lib/ruby/gems/2.4.0/gems/vcloud-rest-1.4.0/lib/vcloud-rest/vcloud/vm.rb:160:in edit_vm_network': undefined method content=' for nil:NilClass (NoMethodError) from ./VMWareNicTest.rb:47:in `

'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant