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

method list_sizes() on driver object does not accept location #1455

Closed
RobertH1993 opened this issue May 2, 2020 · 1 comment
Closed

method list_sizes() on driver object does not accept location #1455

RobertH1993 opened this issue May 2, 2020 · 1 comment

Comments

@RobertH1993
Copy link

RobertH1993 commented May 2, 2020

Summary

method list_sizes() on driver object does not accept location parameter. The docs states that it should accept a location parameter: https://libcloud.readthedocs.io/en/stable/compute/api.html#libcloud.compute.base.NodeDriver.list_sizes

Detailed Information

Tried to get all the sizes through the digitalOcean driver, filtering on a certain location. I pass a NodeLocation object (retrieved from driver with function list_locations()) into list_sizes(). After that i get the error:

list_sizes() takes 1 positional argument but 2 were given

Expected to get a list of sizes available for the given location as stated in the documentation.

Fix

The api of digitalOcean returns a region key for every returned size, this key holds a list with all regions this size is available. Accept location parameter in list_sizes() and check if the NodeLocation.id is in regions.

@RobertH1993
Copy link
Author

Just made a pull_request, tested locally works fine :)
#1456

@asfgit asfgit closed this as completed in dc1ee88 May 3, 2020
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

No branches or pull requests

1 participant