-
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
New module: digital_ocean_size_facts #35898
Conversation
@pmarques Could you please review this ? |
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.
Minor changes based on other work you have done. Tested the module and it works great, thank you!
def core(module): | ||
rest = DigitalOceanHelper(module) | ||
|
||
# Check if api_token is valid or not |
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.
We should no longer need this token validation if PR #36352 is merged before.
|
||
|
||
def main(): | ||
module = AnsibleModule( |
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.
Probably want to change this to your standard DO argument spec. This will handle testing the oauth_token
and finding the token in the users environment.
argument_spec = DigitalOceanHelper.digital_ocean_argument_spec()
module = AnsibleModule(argument_spec=argument_spec)
67da4ea
to
1b9f31b
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.
Just couple comments on the documentation to clearly define what sizes.
module: digital_ocean_size_facts | ||
short_description: Gather facts about DigitalOcean Sizes | ||
description: | ||
- This module can be used to gather facts about sizes. |
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.
Could we included the word Droplet Sizes
? That will clear up any confusion on what sizes.
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.
Done.
|
||
RETURN = ''' | ||
data: | ||
description: DigitalOcean size facts |
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.
DigitalOcean droplet size facts
would be clear to the end user.
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.
Done.
Tested the module and it works perfectly, please address the size comments in the documentation. |
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
1b9f31b
to
734e896
Compare
Thank you! shipit |
@BondAnthony Thanks for review and testing. |
SUMMARY
Signed-off-by: Abhijeet Kasurde akasurde@redhat.com
ISSUE TYPE
COMPONENT NAME
lib/ansible/modules/cloud/digital_ocean/digital_ocean_size_facts.py
ANSIBLE VERSION