cloudstack: streamline modules doc (part 5) (#54523)

This commit is contained in:
David Passante 2019-03-29 09:50:15 +01:00 committed by René Moser
parent 8d96af2df5
commit 7f57d88f00
9 changed files with 224 additions and 175 deletions

View file

@ -17,42 +17,48 @@ DOCUMENTATION = '''
module: cs_vpc
short_description: "Manages VPCs on Apache CloudStack based clouds."
description:
- "Create, update and delete VPCs."
version_added: "2.3"
author: "René Moser (@resmo)"
- Create, update and delete VPCs.
version_added: '2.3'
author: René Moser (@resmo)
options:
name:
description:
- "Name of the VPC."
- Name of the VPC.
type: str
required: true
display_text:
description:
- "Display text of the VPC."
- "If not set, C(name) will be used for creating."
- Display text of the VPC.
- If not set, I(name) will be used for creating.
type: str
cidr:
description:
- "CIDR of the VPC, e.g. 10.1.0.0/16"
- "All VPC guest networks' CIDRs must be within this CIDR."
- "Required on I(state=present)."
- CIDR of the VPC, e.g. 10.1.0.0/16
- All VPC guest networks' CIDRs must be within this CIDR.
- Required on I(state=present).
type: str
network_domain:
description:
- "Network domain for the VPC."
- "All networks inside the VPC will belong to this domain."
- "Only considered while creating the VPC, can not be changed."
- Network domain for the VPC.
- All networks inside the VPC will belong to this domain.
- Only considered while creating the VPC, can not be changed.
type: str
vpc_offering:
description:
- "Name of the VPC offering."
- "If not set, default VPC offering is used."
- Name of the VPC offering.
- If not set, default VPC offering is used.
type: str
clean_up:
description:
- "Whether to redeploy a VPC router or not when I(state=restarted)"
version_added: "2.5"
- Whether to redeploy a VPC router or not when I(state=restarted)
version_added: '2.5'
type: bool
state:
description:
- "State of the VPC."
- "The state C(present) creates a started VPC."
- "The state C(stopped) is only considered while creating the VPC, added in version 2.6."
- State of the VPC.
- The state C(present) creates a started VPC.
- The state C(stopped) is only considered while creating the VPC, added in version 2.6.
type: str
default: present
choices:
- present
@ -61,26 +67,30 @@ options:
- restarted
domain:
description:
- "Domain the VPC is related to."
- Domain the VPC is related to.
type: str
account:
description:
- "Account the VPC is related to."
- Account the VPC is related to.
type: str
project:
description:
- "Name of the project the VPC is related to."
- Name of the project the VPC is related to.
type: str
zone:
description:
- "Name of the zone."
- "If not set, default zone is used."
- Name of the zone.
- If not set, default zone is used.
type: str
tags:
description:
- "List of tags. Tags are a list of dictionaries having keys C(key) and C(value)."
- List of tags. Tags are a list of dictionaries having keys I(key) and I(value).
- "For deleting all tags, set an empty list e.g. I(tags: [])."
aliases:
- tag
type: list
aliases: [ tag ]
poll_async:
description:
- "Poll async jobs until job has finished."
- Poll async jobs until job has finished.
default: yes
type: bool
extends_documentation_fragment: cloudstack
@ -88,32 +98,32 @@ extends_documentation_fragment: cloudstack
EXAMPLES = '''
- name: Ensure a VPC is present but not started after creating
local_action:
module: cs_vpc
cs_vpc:
name: my_vpc
display_text: My example VPC
cidr: 10.10.0.0/16
state: stopped
delegate_to: localhost
- name: Ensure a VPC is present and started after creating
local_action:
module: cs_vpc
cs_vpc:
name: my_vpc
display_text: My example VPC
cidr: 10.10.0.0/16
delegate_to: localhost
- name: Ensure a VPC is absent
local_action:
module: cs_vpc
cs_vpc:
name: my_vpc
state: absent
delegate_to: localhost
- name: Ensure a VPC is restarted with clean up
local_action:
module: cs_vpc
cs_vpc:
name: my_vpc
clean_up: yes
state: restarted
delegate_to: localhost
'''
RETURN = '''
@ -191,7 +201,7 @@ state:
tags:
description: "List of resource tags associated with the VPC."
returned: success
type: dict
type: list
sample: '[ { "key": "foo", "value": "bar" } ]'
'''