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
DigitalOcean: new module: digital_ocean_account_facts #36003
Conversation
@BondAnthony @Akasurde @alukovenko @harneksidhu @kontrafiktion @mgregson @pmarques @zbal As a maintainer of a module in the same namespace this new module has been submitted to, your vote counts for shipits. Please review this module and add |
@pmarques Could you please review this ? |
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7d3c91c
to
1c01546
Compare
The test
|
Closing and re-opening to trigger CI. |
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.
LGTM other than the response object.
description: DigitalOcean account facts | ||
returned: success | ||
type: dictionary | ||
sample: { |
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.
Change sample to data
that will represent what is being returned to the user.
Example task:
- debug:
var: resp.data
Outputs:
"resp.data": {
"droplet_limit": 100,
"email": "sammy@digitalocean.com",
"email_verified": true,
"floating_ip_limit": 20,
"status": "active",
"status_message": "",
"uuid": "b0ea118ed29548573729203027a0442f9"
}
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.
sample
is actual table header in documentation - e.g., DO Tag return values table.
|
||
response = rest.get("account") | ||
if response.status_code != 200: | ||
module.fail_json(msg="Failed to fetch 'account' facts due to error : %s" % response.json['message']) |
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.
Will not be this caught inside the DO helper?
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.
My fault, only 401 is handled.
@pmarques @BondAnthony Thanks for reviews. |
SUMMARY
Signed-off-by: Abhijeet Kasurde akasurde@redhat.com
ISSUE TYPE
COMPONENT NAME
lib/ansible/modules/cloud/digital_ocean/digital_ocean_account_facts.py
ANSIBLE VERSION