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

don't break get_ip_address if static IP is assigned #285

Merged
merged 1 commit into from
Nov 16, 2016

Conversation

johnswanson
Copy link
Contributor

@johnswanson johnswanson commented Apr 29, 2016

If the first network in the config specifies a static IP address,
then the key to look up in addresses is network[:name], not the
bare network hash.

If the first network in the config specifies a static IP address,
then the key to look up in `addresses` is network[:name], not the
bare network hash.
@coveralls
Copy link

coveralls commented Apr 29, 2016

Coverage Status

Coverage decreased (-0.04%) to 92.188% when pulling 99896ed on johnswanson:master into 7a5d972 on ggiamarchi:master.

@ggiamarchi
Copy link
Owner

@johnswanson testing your code, i realize there's still non covered situations. As you pointed out, in the Vagrantfile a network can be either a string or a hash. But that's not all. When it's a string, it can be either the network name or the network id. And when it's a hash, it can contains either a key name or a key id.

If i summarize,

First network format before your PR your PR
String name / "private-net"
String ID / "adbcd056-2a60-4404-aa2b-c31bd9d2841a"
Hash with name / { name: "private-net" }
Hash with ID / { id: "adbcd056-2a60-4404-aa2b-c31bd9d2841a" }

If you meant to fix the whole issue it would be awesome, but as long as your patch partially fix it i don't have any objection for merging it and create an issue for the rest.

Let me know your preference.

@ggiamarchi ggiamarchi added this to the 0.8 milestone Nov 14, 2016
@ggiamarchi ggiamarchi merged commit ced92d2 into ggiamarchi:master Nov 16, 2016
Sharpie pushed a commit to Sharpie/vagrant-openstack-provider that referenced this pull request Dec 15, 2016
don't break get_ip_address if static IP is assigned
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.

3 participants