mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-20 11:50:22 -07:00
[PR #9418/43599c68 backport][stable-10] c*.py: normalize docs (#9426)
c*.py: normalize docs (#9418)
* c*.py: normalize docs
* fix copy/paste mistake
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 43599c6850
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
05ba79c5fe
commit
3db0a11148
36 changed files with 1437 additions and 1614 deletions
|
@ -9,7 +9,7 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
DOCUMENTATION = r"""
|
||||
module: clc_server_snapshot
|
||||
short_description: Create, Delete and Restore server snapshots in CenturyLink Cloud
|
||||
description:
|
||||
|
@ -48,30 +48,28 @@ options:
|
|||
required: false
|
||||
type: str
|
||||
requirements:
|
||||
- python = 2.7
|
||||
- requests >= 2.5.0
|
||||
- clc-sdk
|
||||
- requests >= 2.5.0
|
||||
- clc-sdk
|
||||
author: "CLC Runner (@clc-runner)"
|
||||
notes:
|
||||
- To use this module, it is required to set the below environment variables which enables access to the
|
||||
Centurylink Cloud
|
||||
- CLC_V2_API_USERNAME, the account login id for the centurylink cloud
|
||||
- CLC_V2_API_PASSWORD, the account password for the centurylink cloud
|
||||
- Alternatively, the module accepts the API token and account alias. The API token can be generated using the
|
||||
CLC account login and password via the HTTP api call @ https://api.ctl.io/v2/authentication/login
|
||||
- CLC_V2_API_TOKEN, the API token generated from https://api.ctl.io/v2/authentication/login
|
||||
- CLC_ACCT_ALIAS, the account alias associated with the centurylink cloud
|
||||
- Users can set CLC_V2_API_URL to specify an endpoint for pointing to a different CLC environment.
|
||||
'''
|
||||
- To use this module, it is required to set the below environment variables which enables access to the Centurylink Cloud.
|
||||
- E(CLC_V2_API_USERNAME), the account login id for the Centurylink Cloud.
|
||||
- E(CLC_V2_API_PASSWORD), the account password for the Centurylink Cloud.
|
||||
- Alternatively, the module accepts the API token and account alias. The API token can be generated using the CLC account
|
||||
login and password using the HTTP API call @ https://api.ctl.io/v2/authentication/login
|
||||
- E(CLC_V2_API_TOKEN), the API token generated from https://api.ctl.io/v2/authentication/login
|
||||
- E(CLC_ACCT_ALIAS), the account alias associated with the Centurylink Cloud.
|
||||
- Users can set E(CLC_V2_API_URL) to specify an endpoint for pointing to a different CLC environment.
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
# Note - You must set the CLC_V2_API_USERNAME And CLC_V2_API_PASSWD Environment variables before running these examples
|
||||
|
||||
- name: Create server snapshot
|
||||
community.general.clc_server_snapshot:
|
||||
server_ids:
|
||||
- UC1TEST-SVR01
|
||||
- UC1TEST-SVR02
|
||||
- UC1TEST-SVR01
|
||||
- UC1TEST-SVR02
|
||||
expiration_days: 10
|
||||
wait: true
|
||||
state: present
|
||||
|
@ -79,31 +77,27 @@ EXAMPLES = '''
|
|||
- name: Restore server snapshot
|
||||
community.general.clc_server_snapshot:
|
||||
server_ids:
|
||||
- UC1TEST-SVR01
|
||||
- UC1TEST-SVR02
|
||||
- UC1TEST-SVR01
|
||||
- UC1TEST-SVR02
|
||||
wait: true
|
||||
state: restore
|
||||
|
||||
- name: Delete server snapshot
|
||||
community.general.clc_server_snapshot:
|
||||
server_ids:
|
||||
- UC1TEST-SVR01
|
||||
- UC1TEST-SVR02
|
||||
- UC1TEST-SVR01
|
||||
- UC1TEST-SVR02
|
||||
wait: true
|
||||
state: absent
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
server_ids:
|
||||
description: The list of server ids that are changed
|
||||
returned: success
|
||||
type: list
|
||||
sample:
|
||||
[
|
||||
"UC1TEST-SVR01",
|
||||
"UC1TEST-SVR02"
|
||||
]
|
||||
'''
|
||||
description: The list of server ids that are changed.
|
||||
returned: success
|
||||
type: list
|
||||
sample: ["UC1TEST-SVR01", "UC1TEST-SVR02"]
|
||||
"""
|
||||
|
||||
__version__ = '${version}'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue