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>
This commit is contained in:
Alexei Znamensky 2024-12-28 02:29:05 +13:00 committed by GitHub
parent 912065ad0e
commit 43599c6850
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 1437 additions and 1614 deletions

View file

@ -10,7 +10,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
DOCUMENTATION = r"""
module: clc_loadbalancer
short_description: Create, Delete shared loadbalancers in CenturyLink Cloud
description:
@ -25,74 +25,72 @@ attributes:
options:
name:
description:
- The name of the loadbalancer
- The name of the loadbalancer.
type: str
required: true
description:
description:
- A description for the loadbalancer
- A description for the loadbalancer.
type: str
alias:
description:
- The alias of your CLC Account
- The alias of your CLC Account.
type: str
required: true
location:
description:
- The location of the datacenter where the load balancer resides in
- The location of the datacenter where the load balancer resides in.
type: str
required: true
method:
description:
-The balancing method for the load balancer pool
- The balancing method for the load balancer pool.
type: str
choices: ['leastConnection', 'roundRobin']
persistence:
description:
- The persistence method for the load balancer
- The persistence method for the load balancer.
type: str
choices: ['standard', 'sticky']
port:
description:
- Port to configure on the public-facing side of the load balancer pool
- Port to configure on the public-facing side of the load balancer pool.
type: str
choices: ['80', '443']
nodes:
description:
- A list of nodes that needs to be added to the load balancer pool
- A list of nodes that needs to be added to the load balancer pool.
type: list
default: []
elements: dict
status:
description:
- The status of the loadbalancer
- The status of the loadbalancer.
type: str
default: enabled
choices: ['enabled', 'disabled']
state:
description:
- Whether to create or delete the load balancer pool
- Whether to create or delete the load balancer pool.
type: str
default: present
choices: ['present', 'absent', 'port_absent', 'nodes_present', 'nodes_absent']
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 Loadbalancer
hosts: localhost
@ -173,11 +171,11 @@ EXAMPLES = '''
- ipAddress: 10.11.22.123
privatePort: 80
state: absent
'''
"""
RETURN = '''
RETURN = r"""
loadbalancer:
description: The load balancer result object from CLC
description: The load balancer result object from CLC.
returned: success
type: dict
sample:
@ -210,7 +208,7 @@ loadbalancer:
],
"status":"enabled"
}
'''
"""
__version__ = '${version}'