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 OpenStack IP type resolution #738

Closed
wants to merge 3 commits into
base: trunk
from

Conversation

Projects
None yet
2 participants
@schaubl
Contributor

schaubl commented Apr 6, 2016

Checking the type of the IP with explicit_ip_type is not reliable.
A fixed IP is not always a private IP and a floating IP is not always a public one.

So I moved up the check of the public subnets.

I also added the addresses element of the reply in the extra dict.
This allows users to implement their own algorithm to find the right IP (e.g. by network name).

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Apr 6, 2016

Member

Thanks.

The change looks good to me, but it would be great if you can also add some tests cases for it.

Member

Kami commented Apr 6, 2016

Thanks.

The change looks good to me, but it would be great if you can also add some tests cases for it.

@schaubl

This comment has been minimized.

Show comment
Hide comment
@schaubl

schaubl Apr 6, 2016

Contributor

Ok, I will add a test case.

Contributor

schaubl commented Apr 6, 2016

Ok, I will add a test case.

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Apr 7, 2016

Member

Mention me when the test case has been added and I will go ahead and merge it.

Thanks!

Member

Kami commented Apr 7, 2016

Mention me when the test case has been added and I will go ahead and merge it.

Thanks!

@schaubl

This comment has been minimized.

Show comment
Hide comment
@schaubl

schaubl Apr 13, 2016

Contributor

@Kami I improved a bit the implementatino of the IP type resolution and updated tests accordingly.

Contributor

schaubl commented Apr 13, 2016

@Kami I improved a bit the implementatino of the IP type resolution and updated tests accordingly.

@asfgit asfgit closed this in 0bcc7d6 Apr 13, 2016

asfgit pushed a commit that referenced this pull request Apr 13, 2016

Improve OpenStack IP type resolution and improve tests
Closes #738

Signed-off-by: Tomaz Muraus <tomaz@tomaz.me>

asfgit pushed a commit that referenced this pull request Apr 13, 2016

minor pep8 fix
Closes #738

Signed-off-by: Tomaz Muraus <tomaz@tomaz.me>
@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Apr 13, 2016

Member

Merged into trunk. Thanks!

Member

Kami commented Apr 13, 2016

Merged into trunk. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment