-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
vultr.py: query_resource_by_key Handle list and dict #43301
Conversation
a49a0c4
to
41f1ae0
Compare
The Vultr API is inconsistent in the type of the value it returns based on the resources. While most of the time it will be a dict, for some resources it will be a list (/v1/user/list, /v1/block/list). query_resource_by_key() fails if the return value isn't a dict (.items() does not exist on list). This patch aims to support both list and dict.
41f1ae0
to
8962f6a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shipit
bot_status |
Componentslib/ansible/module_utils/vultr.py Metadatawaiting_on: ansible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shipit
SUMMARY
The Vultr API is inconsistent in the type of the value it returns
based on the resources. While most of the time it will be a dict, for
some resources it will be a list (
/v1/user/list
,/v1/block/list
).query_resource_by_key()
fails if the return value isn't a dict (.items()does not exist on list). This patch aims to support both list and dict.
ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
ADDITIONAL INFORMATION