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

Document return values for ec2_vpc_net.py #21294

Merged
merged 3 commits into from
Sep 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
43 changes: 43 additions & 0 deletions lib/ansible/modules/cloud/amazon/ec2_vpc_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,49 @@

'''

RETURN = '''
vpc.id:
Copy link
Member

Choose a reason for hiding this comment

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

document vpc itself as a key, the rest as the structure of this key

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See #21556

description: VPC resource id
returned: success
type: string
sample: vpc-b883b2c4
vpc.cidr_block:
description: The CIDR of the VPC
returned: success
type: string
sample: "10.0.0.0/16"
vpc.state:
description: state of the VPC
returned: success
type: string
sample: available
vpc.tags:
description: tags attached to the VPC, includes name
returned: success
type: dict
sample: {"Name": "My VPC", "env": "staging"}
vpc.classic_link_enabled:
description: indicates whether ClassicLink is enabled
returned: success
type: boolean
sample: false
vpc.dhcp_options_id:
description: the id of the DHCP options assocaited with this VPC
returned: success
type: string
sample: dopt-67236184
vpc.instance_tenancy:
description: indicates whther VPC uses default or dedicated tenancy
returned: success
type: string
sample: default
vpc.is_default:
description: indicates whether this is the default VPC
returned: success
type: boolean
sample: false
'''

try:
import boto
import boto.ec2
Expand Down