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

Fix distributed port group switches support for cloning with multiple networks #3689

Merged
merged 2 commits into from
Oct 21, 2015

Conversation

iNecas
Copy link
Contributor

@iNecas iNecas commented Sep 14, 2015

We were not passing the datacenter parameter when searching for networks,
which caused issues when searching for distributed switches attributes

Also, I've extracted the virtualswitch parameter to the network model,
which allows to specify the virtualswitch value for the network interface
based on the network data later. Our workflow is letting the user
to choose what network should be the nic attached to and then creating
the networks correspondingly and we use the network object for that.

… networks

We were not passing the datacenter parameter when searching for
networks, which caused issues when searching for distributed switches attributes
This allows to specify the virtualswitch value for the network
interface based on the network data.
@geemus
Copy link
Member

geemus commented Sep 14, 2015

@nirvdrum could you take a peak when you have a moment? Thanks!

@dLobatog
Copy link
Contributor

@nirvdrum This is holding up a feature in Foreman, theforeman/foreman#2714, would you mind taking a look? Thanks!

@nirvdrum nirvdrum self-assigned this Oct 15, 2015
@nirvdrum
Copy link
Contributor

Sorry, I missed the first ping. Just to set expectations, I probably won't be able to look at this until the weekend.

:name => network.name,
:accessible => network.summary.accessible,
:datacenter => datacenter,
:virtualswitch => network.class.to_s == "DistributedVirtualPortgroup" ? network.config.distributedVirtualSwitch.name : nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can fix this after, but calling class.to_s seems like an odd pattern to me. class.name is the typical way I've seen things done like this.

nirvdrum added a commit that referenced this pull request Oct 21, 2015
Fix distributed port group switches support for cloning with multiple networks
@nirvdrum nirvdrum merged commit ffcf2b0 into fog:master Oct 21, 2015
@dLobatog
Copy link
Contributor

@nirvdrum Thanks!

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

Successfully merging this pull request may close these issues.

4 participants