Skip to content

Commit

Permalink
resolve remaining comments, update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ctronco committed Feb 7, 2024
1 parent 2ae8718 commit 522643e
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 17 deletions.
20 changes: 12 additions & 8 deletions docs/modules/fault_set.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,24 @@ Parameters

fault_set_id(optional, str, None)
ID of the Fault Set being affected.
Specify either fault_set_name or fault_set_id for remove operation.
Mutually exclusive with *fault_set_name*

fault_set_name(optional, str, None)
Name of the Fault Set.
Required when creating a fault set
Specify either fault_set_name or fault_set_id for remove operation.
It is unique across the Powerflex Array.
Mutually exclusive with *fault_set_id*

fault_set_new_name(optional, str, None)
New Name of the Fault Set.
This is used to rename the fault set.

protection_domain_id (optional, str, None)
ID of the protection domain
Specify either protection_domain_name or protection_domain_id when creating a fault set
Mutually exclusive with *protection_domain_name*
Specify either *protection_domain_name* or *protection_domain_id* when creating a fault set

protection_domain_name(optional, str, None)
Name of protection domain.
Specify either protection_domain_name or protection_domain_id when creating a fault set
Mutually exclusive with *protection_domain_id*
Specify either *protection_domain_name* or *protection_domain_id* when creating a fault set

state (True, str, None)
State of the Fault Set.
Expand Down Expand Up @@ -145,14 +145,18 @@ Return Values:
changed(always, bool, false)
Whether or not the resource has changed.

fault_set_details (when fault set exists, dict, { 'protectionDomainId': 'da721a8300000000','name': 'fs_001','id': 'eb44b70500000000','links': [{ 'rel': 'self', 'href': '/api/instances/FaultSet::eb44b70500000000' }, {'rel': '/api/FaultSet/relationship/Statistics', 'href': '/api/instances/FaultSet::eb44b70500000000/relationships/Statistics'},{'rel': '/api/FaultSet/relationship/Sds', 'href': '/api/instances/FaultSet::eb44b70500000000/relationships/Sds' }, { 'rel': '/api/parent/relationship/protectionDomainId', 'href': '/api/instances/ProtectionDomain::da721a8300000000' }})
fault_set_details (when fault set exists, dict, { 'protectionDomainId': 'da721a8300000000', 'protectionDomainName': 'pd001', 'name': 'fs_001','id': 'eb44b70500000000','links': [{ 'rel': 'self', 'href': '/api/instances/FaultSet::eb44b70500000000' }, {'rel': '/api/FaultSet/relationship/Statistics', 'href': '/api/instances/FaultSet::eb44b70500000000/relationships/Statistics'},{'rel': '/api/FaultSet/relationship/Sds', 'href': '/api/instances/FaultSet::eb44b70500000000/relationships/Sds' }, { 'rel': '/api/parent/relationship/protectionDomainId', 'href': '/api/instances/ProtectionDomain::da721a8300000000' }})
Details of fault set.


protectionDomainId(, str,):
The ID of the protection domain.


protectionDomainName(, str,):
The name of the protection domain.


name(, str,)
fault set name.

Expand Down
32 changes: 32 additions & 0 deletions docs/modules/info.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ Parameters
Replication consistency groups - ``rcg``.

Replication pairs - ``replication_pair``.

Fault Sets - ``fault_set``.



filters (optional, list, None)
Expand Down Expand Up @@ -636,7 +639,36 @@ Replication_pairs (Always, list, {'copyType': 'OnlineCopy', 'id': '23aa0bc900000
remoteActivityState (, str, )
The state of activity of the remote replication pair.

Fault_sets (Always, dict, { 'protectionDomainId': 'da721a8300000000', 'protectionDomainName': 'pd001', 'name': 'fs_001','id': 'eb44b70500000000','links': [{ 'rel': 'self', 'href': '/api/instances/FaultSet::eb44b70500000000' }, {'rel': '/api/FaultSet/relationship/Statistics', 'href': '/api/instances/FaultSet::eb44b70500000000/relationships/Statistics'},{'rel': '/api/FaultSet/relationship/Sds', 'href': '/api/instances/FaultSet::eb44b70500000000/relationships/Sds' }, { 'rel': '/api/parent/relationship/protectionDomainId', 'href': '/api/instances/ProtectionDomain::da721a8300000000' }})
Details of fault set.


protectionDomainId(, str,):
The ID of the protection domain.


protectionDomainId(, str,):
The name of the protection domain.


name(, str,)
fault set name.


id(, str,)
fault set id


links (, list, )
Device links.


href (, str, )
Device instance URL.


rel (, str, )
Relationship of device with different entities.



Expand Down
15 changes: 6 additions & 9 deletions plugins/modules/fault_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
fault_set_name:
description:
- Name of the Fault Set.
- Specify either fault_set_name or fault_set_id for remove operation.
- It is unuique across the PowerFlex array.
- Mutually exclusive with I(fault_set_id).
type: str
fault_set_id:
Expand Down Expand Up @@ -53,12 +53,6 @@
required: True
type: str
default: present
zz:
description:
- dummy internal parameter
- not used
- doesn't do anything
type: str
notes:
- The I(check_mode) is supported.
'''
Expand Down Expand Up @@ -94,7 +88,6 @@
fault_set_new_name: "{{fault_set_new_name}}"

Check failure on line 89 in plugins/modules/fault_set.py

View workflow job for this annotation

GitHub Actions / Ansible lint (3.11, stable-2.14)

yaml[trailing-spaces]

Trailing spaces

Check failure on line 89 in plugins/modules/fault_set.py

View workflow job for this annotation

GitHub Actions / Ansible lint (3.11, stable-2.16)

yaml[trailing-spaces]

Trailing spaces

Check failure on line 89 in plugins/modules/fault_set.py

View workflow job for this annotation

GitHub Actions / Ansible lint (3.11, stable-2.15)

yaml[trailing-spaces]

Trailing spaces

Check failure on line 89 in plugins/modules/fault_set.py

View workflow job for this annotation

GitHub Actions / Ansible lint (3.10, stable-2.16)

yaml[trailing-spaces]

Trailing spaces

Check failure on line 89 in plugins/modules/fault_set.py

View workflow job for this annotation

GitHub Actions / Ansible lint (3.9, stable-2.15)

yaml[trailing-spaces]

Trailing spaces

Check failure on line 89 in plugins/modules/fault_set.py

View workflow job for this annotation

GitHub Actions / Ansible lint (3.9, stable-2.14)

yaml[trailing-spaces]

Trailing spaces

Check failure on line 89 in plugins/modules/fault_set.py

View workflow job for this annotation

GitHub Actions / Ansible lint (3.10, stable-2.14)

yaml[trailing-spaces]

Trailing spaces

Check failure on line 89 in plugins/modules/fault_set.py

View workflow job for this annotation

GitHub Actions / Ansible lint (3.10, stable-2.15)

yaml[trailing-spaces]

Trailing spaces
- name: Delete Fault Set
dellemc.powerflex.fault_set:
hostname: "{{hostname}}"
Expand Down Expand Up @@ -129,6 +122,9 @@
protectionDomainId:
description: The ID of the protection domain.
type: str
protectionDomainName:
description: The name of the protection domain.
type: str
name:
description: fault set name.
type: str
Expand All @@ -148,6 +144,7 @@
type: str
sample: {
"protectionDomainId": "da721a8300000000",
"protectionDomainName": "pd_001",
"name": "fs_001",
"id": "eb44b70500000000",
"links": [
Expand Down Expand Up @@ -202,7 +199,7 @@ def __init__(self):
# initialize the Ansible module
self.module = AnsibleModule(
argument_spec=self.module_params,
supports_check_mode=False,
supports_check_mode=True,
mutually_exclusive=mutually_exclusive,
# required_one_of=required_one_of,
required_if=required_if,
Expand Down

0 comments on commit 522643e

Please sign in to comment.