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

New module: digital_ocean_size_facts #35898

Merged
merged 1 commit into from
Feb 28, 2018
Merged

Conversation

Akasurde
Copy link
Member

@Akasurde Akasurde commented Feb 8, 2018

SUMMARY

Signed-off-by: Abhijeet Kasurde akasurde@redhat.com

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

lib/ansible/modules/cloud/digital_ocean/digital_ocean_size_facts.py

ANSIBLE VERSION
2.6devel

@ansibot
Copy link
Contributor

ansibot commented Feb 8, 2018

@ansibot ansibot added cloud core_review In order to be merged, this PR must follow the core review workflow. digital_ocean module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. new_module This PR includes a new module. new_plugin This PR includes a new plugin. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Feb 8, 2018
@Akasurde Akasurde removed the needs_triage Needs a first human triage before being processed. label Feb 8, 2018
@Akasurde
Copy link
Member Author

@pmarques Could you please review this ?

@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Feb 16, 2018
Copy link
Contributor

@BondAnthony BondAnthony left a 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
Copy link
Contributor

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(
Copy link
Contributor

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)

@ansibot ansibot removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Feb 26, 2018
Copy link
Contributor

@BondAnthony BondAnthony left a 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.
Copy link
Contributor

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.

Copy link
Member Author

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
Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@BondAnthony
Copy link
Contributor

Tested the module and it works perfectly, please address the size comments in the documentation.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
@BondAnthony
Copy link
Contributor

Thank you!

shipit

@ansibot ansibot added shipit This PR is ready to be merged by Core and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Feb 28, 2018
@Akasurde Akasurde merged commit 529bc0e into ansible:devel Feb 28, 2018
@Akasurde Akasurde deleted the do_size_facts branch February 28, 2018 14:41
@Akasurde
Copy link
Member Author

@BondAnthony Thanks for review and testing.

@ansible ansible locked and limited conversation to collaborators Apr 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cloud digital_ocean module This issue/PR relates to a module. new_module This PR includes a new module. new_plugin This PR includes a new plugin. shipit This PR is ready to be merged by Core support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants