apache / libcloud

Apache Libcloud is a Python library which hides differences between different cloud provider APIs and allows you to manage different cloud resources through a unified and easy to use API.
https://libcloud.apache.org
Apache License 2.0
2.04k stars 925 forks source link

Inconsistent uuid generation in azure_arm #1420

Open foospidy opened 4 years ago

foospidy commented 4 years ago

Summary

Azure returns inconsistent casing of the resource groups name in the id string, resulting in different uuid's for the same node (depending on what calls you make).

Detailed Information

When a node is created, the resource groups name in the id string is lower case. In subsequent calls, like in list_nodes(), for some reason Azure returns the resource groups name in upper case. This results in a different uuid from when create_node() is called. This also breaks wait_until_running(). Forcing the id string to lower case in _to_node() seems to resolve this issue.

I made the change here: https://github.com/foospidy/libcloud/commit/2682d1229466fa577d4360ababd650d777ea49f3

I'd be happy to submit a PR.

Kami commented 4 years ago

Please feel free to open a PR with your change (and some tests would be good as well) :)

foospidy commented 4 years ago

Cool, PR here https://github.com/apache/libcloud/pull/1432

stale[bot] commented 4 years ago

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically marking is as stale. If this issue is not relevant or applicable anymore (problem has been fixed in a new version or similar), please close the issue or let us know so we can close it. On the contrary, if the issue is still relevant, there is nothing you need to do, but if you have any additional details or context which would help us when working on this issue, please include it as a comment to this issue.