Fix nova driver bug parsing ip address #32138
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes a bug in the nova.py driver that prevents it from properly parsing out IP addresses from the data structure returned from OpenStack (Kilo version, but may work on others).
What issues does this PR fix or reference?
I could find no issues directly on point, but it may be related to issue 29666 "Nova driver broken for 2015.8.[1-3]".
Previous Behavior
Nova driver would hang (and ultimately time out) when used with OpenStack because it could not parse IP addresses for instances.
New Behavior
The nova driver can now parse an IP address for instances when used with OpenStack.
Tests written?
No, although it works well with the Kilo version of OpenStack.
To test, you need to create cloud provider and profile files, then use salt-cloud to create one or more instances on OpenStack. See https://docs.saltstack.com/en/latest/topics/cloud/openstack.html