From 881830e6841ce7b9ccde2599724a1f38d2e47276 Mon Sep 17 00:00:00 2001 From: MUTHU-RAKESH-27 <19cs127@psgitech.ac.in> Date: Sun, 4 Feb 2024 11:47:05 +0530 Subject: [PATCH] Added the documentation part for dnac_log_file_path, dnac_log_append --- plugins/modules/device_credential_intent.py | 23 +++++++++++++++++++ plugins/modules/discovery_intent.py | 23 +++++++++++++++++++ plugins/modules/inventory_intent.py | 23 +++++++++++++++++++ plugins/modules/pnp_intent.py | 23 +++++++++++++++++++ plugins/modules/provision_intent.py | 23 +++++++++++++++++++ plugins/modules/site_intent.py | 23 +++++++++++++++++++ plugins/modules/swim_intent.py | 23 +++++++++++++++++++ plugins/modules/template_intent.py | 25 ++++++++++++++++++++- 8 files changed, 185 insertions(+), 1 deletion(-) diff --git a/plugins/modules/device_credential_intent.py b/plugins/modules/device_credential_intent.py index f7d92f5701..3a808f24af 100644 --- a/plugins/modules/device_credential_intent.py +++ b/plugins/modules/device_credential_intent.py @@ -25,6 +25,27 @@ author: Muthu Rakesh (@MUTHU-RAKESH-27) Madhan Sankaranarayanan (@madhansansel) options: + dnac_log_file_path: + description: + - Governs logging. Logs are recorded if dnac_log is True. + - If unspecified, + - When 'dnac_log_append' is True, 'dnac.log' is generated in the + current Ansible directory; logs are appended. + - When 'dnac_log_append' is False, 'dnac.log' is generated; logs + are overwritten. + - If a path is specified, + - When 'dnac_log_append' is True, the file opens in append mode. + - When 'dnac_log_append' is False, the file opens in write (w) mode. + - In shared file scenarios, without append mode, content is + overwritten after each module execution. + - For a shared log file, set append to False for the 1st module + (to overwrite); for subsequent modules, set append to True. + type: str + default: dnac.log + dnac_log_append: + description: Determines the mode of the file. Set to True for 'append' mode. Set to False for 'write' mode. + type: bool + default: True config_verify: description: Set to True to verify the Cisco DNA Center after applying the playbook config. type: bool @@ -2568,6 +2589,8 @@ def main(): "dnac_debug": {"type": 'bool', "default": False}, "dnac_log": {"type": 'bool', "default": False}, "dnac_log_level": {"type": 'str', "default": 'WARNING'}, + "dnac_log_file_path": {"type": 'str', "default": 'dnac.log'}, + "dnac_log_append": {"type": 'bool', "default": True}, "config_verify": {"type": 'bool', "default": False}, "config": {"type": 'list', "required": True, "elements": 'dict'}, "state": {"default": 'merged', "choices": ['merged', 'deleted']}, diff --git a/plugins/modules/discovery_intent.py b/plugins/modules/discovery_intent.py index b83c26ac11..9064f76485 100644 --- a/plugins/modules/discovery_intent.py +++ b/plugins/modules/discovery_intent.py @@ -22,6 +22,27 @@ author: Abinash Mishra (@abimishr) Phan Nguyen (phannguy) options: + dnac_log_file_path: + description: + - Governs logging. Logs are recorded if dnac_log is True. + - If unspecified, + - When 'dnac_log_append' is True, 'dnac.log' is generated in the + current Ansible directory; logs are appended. + - When 'dnac_log_append' is False, 'dnac.log' is generated; logs + are overwritten. + - If a path is specified, + - When 'dnac_log_append' is True, the file opens in append mode. + - When 'dnac_log_append' is False, the file opens in write (w) mode. + - In shared file scenarios, without append mode, content is + overwritten after each module execution. + - For a shared log file, set append to False for the 1st module + (to overwrite); for subsequent modules, set append to True. + type: str + default: dnac.log + dnac_log_append: + description: Determines the mode of the file. Set to True for 'append' mode. Set to False for 'write' mode. + type: bool + default: True config_verify: description: Set to True to verify the Cisco DNA Center config after applying the playbook config. type: bool @@ -997,6 +1018,8 @@ def main(): 'dnac_debug': {'type': 'bool', 'default': False}, 'dnac_log': {'type': 'bool', 'default': False}, 'dnac_log_level': {'type': 'str', 'default': 'WARNING'}, + "dnac_log_file_path": {"type": 'str', "default": 'dnac.log'}, + "dnac_log_append": {"type": 'bool', "default": True}, 'validate_response_schema': {'type': 'bool', 'default': True}, 'config_verify': {"type": 'bool', "default": False}, 'config': {'required': True, 'type': 'list', 'elements': 'dict'}, diff --git a/plugins/modules/inventory_intent.py b/plugins/modules/inventory_intent.py index 448f9b5ca4..089bea34fb 100644 --- a/plugins/modules/inventory_intent.py +++ b/plugins/modules/inventory_intent.py @@ -24,6 +24,27 @@ author: Abhishek Maheshwari (@abmahesh) Madhan Sankaranarayanan (@madhansansel) options: + dnac_log_file_path: + description: + - Governs logging. Logs are recorded if dnac_log is True. + - If unspecified, + - When 'dnac_log_append' is True, 'dnac.log' is generated in the + current Ansible directory; logs are appended. + - When 'dnac_log_append' is False, 'dnac.log' is generated; logs + are overwritten. + - If a path is specified, + - When 'dnac_log_append' is True, the file opens in append mode. + - When 'dnac_log_append' is False, the file opens in write (w) mode. + - In shared file scenarios, without append mode, content is + overwritten after each module execution. + - For a shared log file, set append to False for the 1st module + (to overwrite); for subsequent modules, set append to True. + type: str + default: dnac.log + dnac_log_append: + description: Determines the mode of the file. Set to True for 'append' mode. Set to False for 'write' mode. + type: bool + default: True config_verify: description: Set to True to verify the Cisco Catalyst Center config after applying the playbook config. type: bool @@ -3217,6 +3238,8 @@ def main(): 'dnac_version': {'type': 'str', 'default': '2.2.3.3'}, 'dnac_debug': {'type': 'bool', 'default': False}, 'dnac_log_level': {'type': 'str', 'default': 'WARNING'}, + "dnac_log_file_path": {"type": 'str', "default": 'dnac.log'}, + "dnac_log_append": {"type": 'bool', "default": True}, 'dnac_log': {'type': 'bool', 'default': False}, 'validate_response_schema': {'type': 'bool', 'default': True}, 'config_verify': {'type': 'bool', "default": False}, diff --git a/plugins/modules/pnp_intent.py b/plugins/modules/pnp_intent.py index 489568cff1..7a8ae5c2cd 100644 --- a/plugins/modules/pnp_intent.py +++ b/plugins/modules/pnp_intent.py @@ -24,6 +24,27 @@ Rishita Chowdhary (@rishitachowdhary) Abinash Mishra (@abimishr) options: + dnac_log_file_path: + description: + - Governs logging. Logs are recorded if dnac_log is True. + - If unspecified, + - When 'dnac_log_append' is True, 'dnac.log' is generated in the + current Ansible directory; logs are appended. + - When 'dnac_log_append' is False, 'dnac.log' is generated; logs + are overwritten. + - If a path is specified, + - When 'dnac_log_append' is True, the file opens in append mode. + - When 'dnac_log_append' is False, the file opens in write (w) mode. + - In shared file scenarios, without append mode, content is + overwritten after each module execution. + - For a shared log file, set append to False for the 1st module + (to overwrite); for subsequent modules, set append to True. + type: str + default: dnac.log + dnac_log_append: + description: Determines the mode of the file. Set to True for 'append' mode. Set to False for 'write' mode. + type: bool + default: True config_verify: description: Set to True to verify the Cisco DNA Center config after applying the playbook config. type: bool @@ -1106,6 +1127,8 @@ def main(): 'dnac_debug': {'type': 'bool', 'default': False}, 'dnac_log': {'type': 'bool', 'default': False}, 'dnac_log_level': {'type': 'str', 'default': 'WARNING'}, + "dnac_log_file_path": {"type": 'str', "default": 'dnac.log'}, + "dnac_log_append": {"type": 'bool', "default": True}, 'validate_response_schema': {'type': 'bool', 'default': True}, 'config_verify': {"type": 'bool', "default": False}, 'config': {'required': True, 'type': 'list', 'elements': 'dict'}, diff --git a/plugins/modules/provision_intent.py b/plugins/modules/provision_intent.py index 9998e8c89d..c65a3faba7 100644 --- a/plugins/modules/provision_intent.py +++ b/plugins/modules/provision_intent.py @@ -21,6 +21,27 @@ - cisco.dnac.intent_params author: Abinash Mishra (@abimishr) options: + dnac_log_file_path: + description: + - Governs logging. Logs are recorded if dnac_log is True. + - If unspecified, + - When 'dnac_log_append' is True, 'dnac.log' is generated in the + current Ansible directory; logs are appended. + - When 'dnac_log_append' is False, 'dnac.log' is generated; logs + are overwritten. + - If a path is specified, + - When 'dnac_log_append' is True, the file opens in append mode. + - When 'dnac_log_append' is False, the file opens in write (w) mode. + - In shared file scenarios, without append mode, content is + overwritten after each module execution. + - For a shared log file, set append to False for the 1st module + (to overwrite); for subsequent modules, set append to True. + type: str + default: dnac.log + dnac_log_append: + description: Determines the mode of the file. Set to True for 'append' mode. Set to False for 'write' mode. + type: bool + default: True config_verify: description: Set to True to verify the Cisco Catalyst Center config after applying the playbook config. type: bool @@ -587,6 +608,8 @@ def main(): 'dnac_debug': {'type': 'bool', 'default': False}, 'dnac_log': {'type': 'bool', 'default': False}, "dnac_log_level": {"type": 'str', "default": 'WARNING'}, + "dnac_log_file_path": {"type": 'str', "default": 'dnac.log'}, + "dnac_log_append": {"type": 'bool', "default": True}, "config_verify": {"type": 'bool', "default": False}, 'validate_response_schema': {'type': 'bool', 'default': True}, 'config': {'required': True, 'type': 'list', 'elements': 'dict'}, diff --git a/plugins/modules/site_intent.py b/plugins/modules/site_intent.py index d0c4db7f6a..814d32b53c 100644 --- a/plugins/modules/site_intent.py +++ b/plugins/modules/site_intent.py @@ -25,6 +25,27 @@ Rishita Chowdhary (@rishitachowdhary) Abhishek Maheshwari (@abhishekmaheshwari) options: + dnac_log_file_path: + description: + - Governs logging. Logs are recorded if dnac_log is True. + - If unspecified, + - When 'dnac_log_append' is True, 'dnac.log' is generated in the + current Ansible directory; logs are appended. + - When 'dnac_log_append' is False, 'dnac.log' is generated; logs + are overwritten. + - If a path is specified, + - When 'dnac_log_append' is True, the file opens in append mode. + - When 'dnac_log_append' is False, the file opens in write (w) mode. + - In shared file scenarios, without append mode, content is + overwritten after each module execution. + - For a shared log file, set append to False for the 1st module + (to overwrite); for subsequent modules, set append to True. + type: str + default: dnac.log + dnac_log_append: + description: Determines the mode of the file. Set to True for 'append' mode. Set to False for 'write' mode. + type: bool + default: True config_verify: description: Set to True to verify the Cisco Catalyst Center config after applying the playbook config. type: bool @@ -1026,6 +1047,8 @@ def main(): 'dnac_version': {'type': 'str', 'default': '2.2.3.3'}, 'dnac_debug': {'type': 'bool', 'default': False}, 'dnac_log_level': {'type': 'str', 'default': 'WARNING'}, + "dnac_log_file_path": {"type": 'str', "default": 'dnac.log'}, + "dnac_log_append": {"type": 'bool', "default": True}, 'dnac_log': {'type': 'bool', 'default': False}, 'validate_response_schema': {'type': 'bool', 'default': True}, 'config_verify': {'type': 'bool', "default": False}, diff --git a/plugins/modules/swim_intent.py b/plugins/modules/swim_intent.py index 93aadd8308..429a3bf606 100644 --- a/plugins/modules/swim_intent.py +++ b/plugins/modules/swim_intent.py @@ -30,6 +30,27 @@ Rishita Chowdhary (@rishitachowdhary) Abhishek Maheshwari (@abmahesh) options: + dnac_log_file_path: + description: + - Governs logging. Logs are recorded if dnac_log is True. + - If unspecified, + - When 'dnac_log_append' is True, 'dnac.log' is generated in the + current Ansible directory; logs are appended. + - When 'dnac_log_append' is False, 'dnac.log' is generated; logs + are overwritten. + - If a path is specified, + - When 'dnac_log_append' is True, the file opens in append mode. + - When 'dnac_log_append' is False, the file opens in write (w) mode. + - In shared file scenarios, without append mode, content is + overwritten after each module execution. + - For a shared log file, set append to False for the 1st module + (to overwrite); for subsequent modules, set append to True. + type: str + default: dnac.log + dnac_log_append: + description: Determines the mode of the file. Set to True for 'append' mode. Set to False for 'write' mode. + type: bool + default: True config_verify: description: Set to True to verify the Cisco Catalyst Center config after applying the playbook config. type: bool @@ -1631,6 +1652,8 @@ def main(): 'dnac_version': {'type': 'str', 'default': '2.2.3.3'}, 'dnac_debug': {'type': 'bool', 'default': False}, 'dnac_log_level': {'type': 'str', 'default': 'WARNING'}, + "dnac_log_file_path": {"type": 'str', "default": 'dnac.log'}, + "dnac_log_append": {"type": 'bool', "default": True}, 'dnac_log': {'type': 'bool', 'default': False}, 'validate_response_schema': {'type': 'bool', 'default': True}, 'config_verify': {'type': 'bool', "default": False}, diff --git a/plugins/modules/template_intent.py b/plugins/modules/template_intent.py index 1e9fde74b8..c766626283 100644 --- a/plugins/modules/template_intent.py +++ b/plugins/modules/template_intent.py @@ -30,6 +30,27 @@ Akash Bhaskaran (@akabhask) Muthu Rakesh (@MUTHU-RAKESH-27) options: + dnac_log_file_path: + description: + - Governs logging. Logs are recorded if dnac_log is True. + - If unspecified, + - When 'dnac_log_append' is True, 'dnac.log' is generated in the + current Ansible directory; logs are appended. + - When 'dnac_log_append' is False, 'dnac.log' is generated; logs + are overwritten. + - If a path is specified, + - When 'dnac_log_append' is True, the file opens in append mode. + - When 'dnac_log_append' is False, the file opens in write (w) mode. + - In shared file scenarios, without append mode, content is + overwritten after each module execution. + - For a shared log file, set append to False for the 1st module + (to overwrite); for subsequent modules, set append to True. + type: str + default: dnac.log + dnac_log_append: + description: Determines the mode of the file. Set to True for 'append' mode. Set to False for 'write' mode. + type: bool + default: True config_verify: description: Set to True to verify the Cisco DNA Center after applying the playbook config. type: bool @@ -579,7 +600,7 @@ type: str import: description: Import the project/template details. - type: + type: dict suboptions: project: description: Import the project details. @@ -2762,6 +2783,8 @@ def main(): 'dnac_debug': {'type': 'bool', 'default': False}, 'dnac_log': {'type': 'bool', 'default': False}, "dnac_log_level": {"type": 'str', "default": 'WARNING'}, + "dnac_log_file_path": {"type": 'str', "default": 'dnac.log'}, + "dnac_log_append": {"type": 'bool', "default": True}, 'validate_response_schema': {'type': 'bool', 'default': True}, "config_verify": {"type": 'bool', "default": False}, 'config': {'required': True, 'type': 'list', 'elements': 'dict'},