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

[LIBCLOUD-766] Unique node.public_ips returned by CloudStack ex_get_nodes and list_nodes #626

Closed
wants to merge 1 commit into from

Conversation

atsaki
Copy link
Contributor

@atsaki atsaki commented Nov 7, 2015

This fixes the issue node's public_ips have duplicate values.

https://issues.apache.org/jira/browse/LIBCLOUD-766

@Kami
Copy link
Member

Kami commented Nov 7, 2015

Thanks.

The change looks good to me, but I will wait on @Runseb or someone else with more CloudStack experience :)

@@ -4652,7 +4652,8 @@ def _to_node(self, data, public_ips=None):
extra['tags'] = self._get_resource_tags(data['tags'])

node = CloudStackNode(id=id, name=name, state=state,
public_ips=public_ips, private_ips=private_ips,
public_ips=list(set(public_ips)),
Copy link
Member

Choose a reason for hiding this comment

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

Just curious - so the issue only exists for public, but not private ips?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The issue only exists for public ips because private ips are not passed with argument.
The issue occurs when an ip is included in both data['nic'] and argument public_ips.

@Kami
Copy link
Member

Kami commented Nov 8, 2015

Would appreciate if you can sync this branch with latest trunk so I can apply patch directly (I've merged 767 first and now there are conflicts).

@atsaki
Copy link
Contributor Author

atsaki commented Nov 10, 2015

I rebased the branch to the latest trunk.

@asfgit asfgit closed this in 455a279 Nov 10, 2015
@Kami
Copy link
Member

Kami commented Nov 10, 2015

Merged, 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.

None yet

2 participants