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) 2015, 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'],
@ -30,72 +16,79 @@ short_description: Manages projects on Apache CloudStack based clouds.
description:
- Create, update, suspend, activate and remove projects.
version_added: '2.0'
author: "René Moser (@resmo)"
author: René Moser (@resmo)
options:
name:
description:
- Name of the project.
type: str
required: true
display_text:
description:
- Display text of the project.
- If not specified, C(name) will be used as C(display_text).
- If not specified, I(name) will be used as I(display_text).
type: str
state:
description:
- State of the project.
default: 'present'
choices: [ 'present', 'absent', 'active', 'suspended' ]
type: str
default: present
choices: [ present, absent, active, suspended ]
domain:
description:
- Domain the project is related to.
type: str
account:
description:
- Account the project is related to.
type: str
tags:
description:
- List of tags. Tags are a list of dictionaries having keys C(key) and C(value).
- "If you want to delete all tags, set a empty list e.g. C(tags: [])."
version_added: "2.2"
- List of tags. Tags are a list of dictionaries having keys I(key) and I(value).
- "If you want to delete all tags, set a empty list e.g. I(tags: [])."
type: list
aliases: [ tag ]
version_added: '2.2'
poll_async:
description:
- Poll async jobs until job has finished.
type: bool
default: 'yes'
default: yes
extends_documentation_fragment: cloudstack
'''
EXAMPLES = '''
# Create a project
- local_action:
module: cs_project
- name: Create a project
cs_project:
name: web
tags:
- { key: admin, value: john }
- { key: foo, value: bar }
delegate_to: localhost
# Rename a project
- local_action:
module: cs_project
- name: Rename a project
cs_project:
name: web
display_text: my web project
delegate_to: localhost
# Suspend an existing project
- local_action:
module: cs_project
- name: Suspend an existing project
cs_project:
name: web
state: suspended
delegate_to: localhost
# Activate an existing project
- local_action:
module: cs_project
- name: Activate an existing project
cs_project:
name: web
state: active
delegate_to: localhost
# Remove a project
- local_action:
module: cs_project
- name: Remove a project
cs_project:
name: web
state: absent
delegate_to: localhost
'''
RETURN = '''
@ -133,7 +126,7 @@ account:
tags:
description: List of resource tags associated with the project.
returned: success
type: dict
type: list
sample: '[ { "key": "foo", "value": "bar" } ]'
'''