Skip to content

Commit

Permalink
Ensure the mandatory fields required by the EDA API are respcted with…
Browse files Browse the repository at this point in the history
…in the modules

Signed-off-by: Alina Buzachis <[email protected]>
  • Loading branch information
alinabuzachis committed Sep 17, 2024
1 parent 139f534 commit 16fa409
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 36 deletions.
6 changes: 3 additions & 3 deletions plugins/modules/controller_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

__metaclass__ = type

DOCUMENTATION = """
DOCUMENTATION = r"""
---
module: controller_token
author:
Expand Down Expand Up @@ -47,7 +47,7 @@
- ansible.eda.eda_controller.auths
"""

EXAMPLES = """
EXAMPLES = r"""
- name: Create AWX token
ansible.eda.controller_token:
controller_host: https://my_eda_host/
Expand All @@ -69,7 +69,7 @@
"""


RETURN = """
RETURN = r"""
id:
description: ID of the managed AWX token.
returned: when state is 'present' and successful
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/credential.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
__metaclass__ = type


DOCUMENTATION = """
DOCUMENTATION = r"""
---
module: credential
author:
Expand Down Expand Up @@ -61,7 +61,7 @@
"""


EXAMPLES = """
EXAMPLES = r"""
- name: Create an EDA Credential
ansible.eda.credential:
name: "Example Credential"
Expand All @@ -78,7 +78,7 @@
"""


RETURN = """
RETURN = r"""
id:
description: ID of the credential.
returned: when exists
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/credential_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
__metaclass__ = type


DOCUMENTATION = """
DOCUMENTATION = r"""
---
module: credential_info
author:
Expand All @@ -31,7 +31,7 @@
"""


EXAMPLES = """
EXAMPLES = r"""
- name: Get information about a credential
ansible.eda.credential_info:
name: "Test"
Expand All @@ -41,7 +41,7 @@
"""


RETURN = """
RETURN = r"""
credentials:
description: Information about credentials.
returned: always
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/credential_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
__metaclass__ = type


DOCUMENTATION = """
DOCUMENTATION = r"""
---
module: credential_type
author:
Expand Down Expand Up @@ -53,7 +53,7 @@
"""


EXAMPLES = """
EXAMPLES = r"""
- name: Create a credential type
ansible.eda.credential_type:
name: "Test"
Expand All @@ -75,7 +75,7 @@
"""


RETURN = """
RETURN = r"""
id:
description: ID of the credential type.
returned: when exists
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/credential_type_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
__metaclass__ = type


DOCUMENTATION = """
DOCUMENTATION = r"""
---
module: credential_type_info
author:
Expand All @@ -31,7 +31,7 @@
"""


EXAMPLES = """
EXAMPLES = r"""
- name: Get information about a credential type
ansible.eda.credential_type_info:
name: "Test"
Expand All @@ -41,7 +41,7 @@
"""


RETURN = """
RETURN = r"""
credential_types:
description: Information about the credential types.
returned: always
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/decision_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

__metaclass__ = type

DOCUMENTATION = """
DOCUMENTATION = r"""
---
module: decision_environment
author:
Expand Down Expand Up @@ -57,7 +57,7 @@
- ansible.eda.eda_controller.auths
"""

EXAMPLES = """
EXAMPLES = r"""
- name: Create EDA Decision Environment
ansible.eda.decision_environment:
controller_host: https://my_eda_host/
Expand Down Expand Up @@ -89,7 +89,7 @@
state: absent
"""

RETURN = """
RETURN = r"""
id:
description: ID of the decision environment
returned: when exists
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/decision_environment_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

__metaclass__ = type

DOCUMENTATION = """
DOCUMENTATION = r"""
---
module: decision_environment_info
author:
Expand All @@ -26,7 +26,7 @@
- ansible.eda.eda_controller.auths
"""

EXAMPLES = """
EXAMPLES = r"""
- name: List all EDA Decision Environments
ansible.eda.decision_environment_info:
controller_host: https://my_eda_host/
Expand All @@ -41,7 +41,7 @@
name: Example
"""

RETURN = """
RETURN = r"""
decision_environments:
description: List of dict containing information about decision environments
returned: when exists
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

__metaclass__ = type

DOCUMENTATION = """
DOCUMENTATION = r"""
---
module: project
author:
Expand Down Expand Up @@ -57,7 +57,7 @@
- ansible.eda.eda_controller.auths
"""

EXAMPLES = """
EXAMPLES = r"""
- name: Create EDA Projects
ansible.eda.project:
controller_host: https://my_eda_host/
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/project_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

__metaclass__ = type

DOCUMENTATION = """
DOCUMENTATION = r"""
---
module: project_info
author:
Expand All @@ -27,7 +27,7 @@
- ansible.eda.eda_controller.auths
"""

EXAMPLES = """
EXAMPLES = r"""
- name: List a particular project
ansible.eda.project_info:
controller_host: https://my_eda_host/
Expand All @@ -44,7 +44,7 @@
register: r
"""

RETURN = """
RETURN = r"""
projects:
description: List of dicts containing information about projects
returned: success
Expand Down
8 changes: 4 additions & 4 deletions plugins/modules/rulebook_activation.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
__metaclass__ = type


DOCUMENTATION = """
DOCUMENTATION = r"""
---
module: rulebook_activation
author:
Expand Down Expand Up @@ -143,7 +143,7 @@
not perform any modification when an existing rulebook activation is found.
"""

EXAMPLES = """
EXAMPLES = r"""
- name: Create a rulebook activation
ansible.eda.rulebook_activation:
name: "Example Rulebook Activation"
Expand Down Expand Up @@ -175,7 +175,7 @@
"""


RETURN = """
RETURN = r"""
id:
description: ID of the rulebook activation.
returned: when exists
Expand Down Expand Up @@ -459,7 +459,7 @@ def main() -> None:
(
"state",
"present",
("name", "rulebook_name", "decision_environment_name"),
("name", "rulebook_name", "decision_environment_name", "project_name"),
)
]

Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/rulebook_activation_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
__metaclass__ = type


DOCUMENTATION = """
DOCUMENTATION = r"""
---
module: rulebook_activation_info
author:
Expand All @@ -29,7 +29,7 @@
"""


EXAMPLES = """
EXAMPLES = r"""
- name: Get information about a rulebook activation
ansible.eda.rulebook_activation_info:
name: "Example Rulebook Activation"
Expand All @@ -39,7 +39,7 @@
"""


RETURN = """
RETURN = r"""
activations:
description: Information about rulebook activations.
returned: always
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

__metaclass__ = type

DOCUMENTATION = """
DOCUMENTATION = r"""
---
module: user
author:
Expand Down Expand Up @@ -77,7 +77,7 @@
- ansible.eda.eda_controller.auths
"""

EXAMPLES = """
EXAMPLES = r"""
- name: Create EDA user
ansible.eda.user:
controller_host: https://my_eda_host/
Expand Down Expand Up @@ -111,7 +111,7 @@
"""


RETURN = """
RETURN = r"""
id:
description: ID of the managed AWX token.
returned: when state is 'present' and successful
Expand Down

0 comments on commit 16fa409

Please sign in to comment.