cloudstack: streamline modules doc (part 4) (#53874)

* cloudstack: streamline modules doc (part 4)

* Parameter types added
* Copyright format fixes
* Doc style fixes
* Examples format fixes
* validate-module errors fixes

* cs_network_offering: Rollback of the deletion of the choice list for supported_services param
This commit is contained in:
David Passante 2019-03-17 08:38:02 +01:00 committed by René Moser
parent e8972ce459
commit ef6da8ec5c
14 changed files with 278 additions and 244 deletions

View file

@ -2,21 +2,7 @@
# -*- coding: utf-8 -*-
#
# (c) 2016, René Moser <mail@renemoser.net>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
@ -29,36 +15,43 @@ module: cs_router
short_description: Manages routers on Apache CloudStack based clouds.
description:
- Start, restart, stop and destroy routers.
- C(state=present) is not able to create routers, use M(cs_network) instead.
version_added: "2.2"
author: "René Moser (@resmo)"
- I(state=present) is not able to create routers, use M(cs_network) instead.
version_added: '2.2'
author: René Moser (@resmo)
options:
name:
description:
- Name of the router.
type: str
required: true
service_offering:
description:
- Name or id of the service offering of the router.
type: str
domain:
description:
- Domain the router is related to.
type: str
account:
description:
- Account the router is related to.
type: str
project:
description:
- Name of the project the router is related to.
type: str
zone:
description:
- Name of the zone the router is deployed in.
- If not set, all zones are used.
version_added: "2.4"
type: str
version_added: '2.4'
state:
description:
- State of the router.
default: 'present'
choices: [ 'present', 'absent', 'started', 'stopped', 'restarted' ]
type: str
default: present
choices: [ present, absent, started, stopped, restarted ]
poll_async:
description:
- Poll async jobs until job has finished.
@ -70,36 +63,38 @@ extends_documentation_fragment: cloudstack
EXAMPLES = '''
# Ensure the router has the desired service offering, no matter if
# the router is running or not.
- local_action:
module: cs_router
- name: Present router
cs_router:
name: r-40-VM
service_offering: System Offering for Software Router
delegate_to: localhost
# Ensure started
- local_action:
module: cs_router
- name: Ensure started
cs_router:
name: r-40-VM
state: started
delegate_to: localhost
# Ensure started with desired service offering.
# If the service offerings changes, router will be rebooted.
- local_action:
module: cs_router
- name: Ensure started with desired service offering
cs_router:
name: r-40-VM
service_offering: System Offering for Software Router
state: started
delegate_to: localhost
# Ensure stopped
- local_action:
module: cs_router
- name: Ensure stopped
cs_router:
name: r-40-VM
state: stopped
delegate_to: localhost
# Remove a router
- local_action:
module: cs_router
- name: Remove a router
cs_router:
name: r-40-VM
state: absent
delegate_to: localhost
'''
RETURN = '''