Skip to content
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

NetworkListing: vlan property not available for DVPortSetting #136

Closed
timogoebel opened this issue Apr 12, 2018 · 0 comments
Closed

NetworkListing: vlan property not available for DVPortSetting #136

timogoebel opened this issue Apr 12, 2018 · 0 comments
Assignees
Labels

Comments

@timogoebel
Copy link
Member

22a9988 added support for listing the vlan id of a network.

It uses network.config.defaultPortConfig.vlan to get the vlan id. That property is only available when network.config.defaultPortConfig is of kind VMwareDVSPortSetting and not available when it is a RbVmomi::VIM::DVPortSetting.

We should add a gate for that.

Stack trace:

 | NoMethodError: undefined method `vlan' for #<RbVmomi::VIM::DVPortSetting:0x007f576e0c79a8>
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/fog-vsphere-2.1.0/lib/fog/vsphere/requests/compute/list_networks.rb:30:in `network_attributes'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/fog-vsphere-2.1.0/lib/fog/vsphere/requests/compute/list_networks.rb:12:in `block in list_networks'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/fog-vsphere-2.1.0/lib/fog/vsphere/requests/compute/list_networks.rb:10:in `map'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/fog-vsphere-2.1.0/lib/fog/vsphere/requests/compute/list_networks.rb:10:in `list_networks'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/fog-vsphere-2.1.0/lib/fog/vsphere/models/compute/networks.rb:12:in `all'

Initially reported on the Foreman Community.

@timogoebel timogoebel added the Bug label Apr 12, 2018
@timogoebel timogoebel self-assigned this Apr 12, 2018
@timogoebel timogoebel changed the title NetworkListing NetworkListing: vlan property not available for DVPortSetting Apr 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant