Skip to content

Commit

Permalink
Add or update API to support diff documentation
Browse files Browse the repository at this point in the history
Clean up documentation build errors

Signed-off-by: Webster Mudge <[email protected]>
  • Loading branch information
wmudge committed May 16, 2024
1 parent 475a2c4 commit 9770487
Show file tree
Hide file tree
Showing 14 changed files with 69 additions and 29 deletions.
2 changes: 1 addition & 1 deletion docsbuild/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pushd "$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
trap "{ popd; }" EXIT

# Create collection documentation into temporary directory
rm -rf temp-rst
rm -rf temp-rst rst build
mkdir -p temp-rst
chmod og-w temp-rst # antsibull-docs wants that directory only readable by itself
antsibull-docs \
Expand Down
3 changes: 3 additions & 0 deletions plugins/modules/cm_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
aliases:
- params
extends_documentation_fragment:
- ansible.builtin.action_common_attributes
- cloudera.cluster.cm_options
- cloudera.cluster.cm_endpoint
- cloudera.cluster.purge
Expand All @@ -54,6 +55,8 @@
support: full
diff_mode:
support: full
platform:
platforms: all
"""

EXAMPLES = r"""
Expand Down
10 changes: 5 additions & 5 deletions plugins/modules/cm_license.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,19 @@
returned: optional
expiration:
description: Expiration date of the license
type: date
type: str
returned: optional
features:
description: List of features within the license
description: List of features within the license
type: list
returned: optional
deactivation_date:
description: Date until license is valid
type: date
type: str
returned: optional
start_date:
description: License activation date
type: date
description: License activation date
type: str
returned: optional
"""

Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/cm_license_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,19 @@
returned: optional
expiration:
description: Expiration date of the license
type: date
type: str
returned: optional
features:
description: List of features within the license
type: list
returned: optional
deactivation_date:
description: Date until license is valid
type: date
type: str
returned: optional
start_date:
description: License activation date
type: date
type: str
returned: optional
"""

Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/cm_trial_license.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,19 @@
returned: optional
expiration:
description: Expiration date of trial license
type: date
type: str
returned: optional
features:
description: List of features within the trial license
type: list
returned: optional
deactivation_date:
description: Date until trial is active
type: date
type: str
returned: optional
start_date:
description: trial activation date
type: date
type: str
returned: optional
"""

Expand Down
8 changes: 8 additions & 0 deletions plugins/modules/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,17 @@
- 'attached'
- 'detached'
required: False
extends_documentation_fragment:
- ansible.builtin.action_common_attributes
- cloudera.cluster.cm_options
- cloudera.cluster.cm_endpoint
attributes:
check_mode:
support: full
diff_mode:
support: none
platform:
platforms: all
"""

EXAMPLES = r"""
Expand Down
19 changes: 15 additions & 4 deletions plugins/modules/parcel.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
author:
- "Ronald Suplina (@rsuplina)"
requirements:
- cm_client
- cm-client
options:
cluster_name:
description:
Expand Down Expand Up @@ -71,6 +71,17 @@
- 'present'
- 'absent'
required: False
extends_documentation_fragment:
- ansible.builtin.action_common_attributes
- cloudera.cluster.cm_options
- cloudera.cluster.cm_endpoint
attributes:
check_mode:
support: full
diff_mode:
support: full
platform:
platforms: all
"""

EXAMPLES = r"""
Expand Down Expand Up @@ -105,15 +116,15 @@
parcel_version: "1.5.1-b626-ecs-1.5.1-b626.p0.42068229"
state: "absent"
- name: Undistribute the parcel on a specified cluster
- name: Undistribute the parcel on a specified cluster (if "distributed" or "activated")
cloudera.cluster.parcel:
host: example.cloudera.com
username: "jane_smith"
password: "S&peR4Ec*re"
cluster_name: "Example_Cluster"
product: "ECS"
parcel_version: "1.5.1-b626-ecs-1.5.1-b626.p0.42068229"
state: "downloaded" # Assuming the current state is "distributed" or "activated"
state: "downloaded" # Assuming the current state as stated above
"""

Expand All @@ -124,7 +135,7 @@
type: dict
contains:
product:
product: The name of the product.
description: The name of the product.
type: str
returned: always
version:
Expand Down
10 changes: 6 additions & 4 deletions plugins/modules/parcel_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,23 +80,25 @@
elements: dict
contains:
product:
product: The name of the product.
description: The name of the product.
type: str
returned: always
version:
description: The version of the product
description: The version of the product.
type: str
returned: always
stage:
description: Current stage of the parcel.
type: str
returned: always
state:
description: The state of the parcel. This shows the progress of state transitions and if there were any errors.
description:
- The state of the parcel.
- Shows the progress of state transitions and reports any errors.
type: dict
returned: always
clusterRef:
description: A reference to the enclosing cluster.
description: A reference to the enclosing cluster.
type: dict
returned: always
displayName:
Expand Down
5 changes: 4 additions & 1 deletion plugins/modules/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
author:
- "Webster Mudge (@wmudge)"
requirements:
- cm_client
- cm-client
options:
cluster:
description:
Expand Down Expand Up @@ -101,13 +101,16 @@
- started
- stopped
extends_documentation_fragment:
- ansible.builtin.action_common_attributes
- cloudera.cluster.cm_options
- cloudera.cluster.cm_endpoint
attributes:
check_mode:
support: full
diff_mode:
support: full
platform:
platforms: all
"""

EXAMPLES = r"""
Expand Down
7 changes: 4 additions & 3 deletions plugins/modules/service_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
author:
- "Webster Mudge (@wmudge)"
requirements:
- cm_client
- cm-client
options:
cluster:
description:
Expand Down Expand Up @@ -78,6 +78,7 @@
- summary
- full
extends_documentation_fragment:
- ansible.builtin.action_common_attributes
- cloudera.cluster.cm_options
- cloudera.cluster.cm_endpoint
- cloudera.cluster.purge
Expand All @@ -87,10 +88,11 @@
support: full
diff_mode:
support: full
platform:
platforms: all
"""

EXAMPLES = r"""
---
- name: Update (append) several service-wide parameters
cloudera.cluster.service_config:
host: example.cloudera.com
Expand Down Expand Up @@ -136,7 +138,6 @@
"""

RETURN = r"""
---
config:
description: Service-wide configuration details about a cluster service.
type: list
Expand Down
5 changes: 4 additions & 1 deletion plugins/modules/service_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
author:
- "Webster Mudge (@wmudge)"
requirements:
- cm_client
- cm-client
options:
cluster:
description:
Expand Down Expand Up @@ -122,13 +122,16 @@
- started
- stopped
extends_documentation_fragment:
- ansible.builtin.action_common_attributes
- cloudera.cluster.cm_options
- cloudera.cluster.cm_endpoint
attributes:
check_mode:
support: full
diff_mode:
support: full
platform:
platforms: all
"""

EXAMPLES = r"""
Expand Down
5 changes: 4 additions & 1 deletion plugins/modules/service_role_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
author:
- "Webster Mudge (@wmudge)"
requirements:
- cm_client
- cm-client
options:
cluster:
description:
Expand Down Expand Up @@ -84,6 +84,7 @@
type: bool
default: False
extends_documentation_fragment:
- ansible.builtin.action_common_attributes
- cloudera.cluster.cm_options
- cloudera.cluster.cm_endpoint
- cloudera.cluster.purge
Expand All @@ -93,6 +94,8 @@
support: full
diff_mode:
support: full
platform:
platforms: all
"""

EXAMPLES = r"""
Expand Down
7 changes: 5 additions & 2 deletions plugins/modules/service_role_config_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
author:
- "Webster Mudge (@wmudge)"
requirements:
- cm_client
- cm-client
options:
cluster:
description:
Expand Down Expand Up @@ -102,14 +102,15 @@
description:
- The presence or absence of the role config group.
- On I(state=absent), any associated role will be moved to the service's default group, i.e. the C(base) role config group.
- NOTE: you cannot remove a C(base) role config group.
- "NOTE: you cannot remove a C(base) role config group."
type: str
required: False
choices:
- present
- absent
default: present
extends_documentation_fragment:
- ansible.builtin.action_common_attributes
- cloudera.cluster.cm_options
- cloudera.cluster.cm_endpoint
- cloudera.cluster.message
Expand All @@ -118,6 +119,8 @@
support: full
diff_mode:
support: full
platform:
platforms: all
"""

EXAMPLES = r"""
Expand Down
5 changes: 4 additions & 1 deletion plugins/modules/service_role_config_group_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
author:
- "Webster Mudge (@wmudge)"
requirements:
- cm_client
- cm-client
options:
cluster:
description:
Expand Down Expand Up @@ -86,6 +86,7 @@
- summary
- full
extends_documentation_fragment:
- ansible.builtin.action_common_attributes
- cloudera.cluster.cm_options
- cloudera.cluster.cm_endpoint
- cloudera.cluster.purge
Expand All @@ -95,6 +96,8 @@
support: full
diff_mode:
support: full
platform:
platforms: all
"""

EXAMPLES = r"""
Expand Down

0 comments on commit 9770487

Please sign in to comment.