From 068736ca95d6e72a291f02d8a61276773357d130 Mon Sep 17 00:00:00 2001 From: MUTHU-RAKESH-27 <19cs127@psgitech.ac.in> Date: Sun, 4 Feb 2024 18:51:18 +0530 Subject: [PATCH 1/3] Added the dnac_log_file_path, dnac_log_append common intent documentation file --- plugins/doc_fragments/intent_params.py | 41 +++++++++++++++++++++----- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/plugins/doc_fragments/intent_params.py b/plugins/doc_fragments/intent_params.py index afaae9f79f..087544872d 100644 --- a/plugins/doc_fragments/intent_params.py +++ b/plugins/doc_fragments/intent_params.py @@ -50,16 +50,43 @@ class ModuleDocFragment(object): default: false dnac_log: description: - - Flag for logging playbook execution details. - If set to true the log file will be created at the location of the execution with the name dnac.log + - Flag for logging playbook execution details. + If set to true the log file will be created at the location of the execution with the name dnac.log type: bool default: false dnac_log_level: - description: - - Specifies the desired log level for Cisco Catalyst Center logging. - Options - [CRITICAL, ERROR, WARNING, INFO, DEBUG] - type: str - default: WARNING + description: + - Sets the threshold for log level. Messages with a level equal to or higher than + this will be logged. Levels are listed in order of severity. + - CRITICAL: Indicates serious errors halting the program. Displays only CRITICAL messages. + - ERROR: Indicates problems preventing a function. Displays ERROR and CRITICAL messages. + - WARNING: Indicates potential future issues. Displays WARNING, ERROR, CRITICAL messages. + - INFO: Tracks normal operation. Displays INFO, WARNING, ERROR, CRITICAL messages. + - DEBUG: Provides detailed diagnostic info. Displays all log messages. + type: str + choices: [CRITICAL, ERROR, WARNING, INFO, DEBUG] + default: WARNING + dnac_log_file_path: + description: + - Governs logging. Logs are recorded if dnac_log is True. + - If path is not specified, + - 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 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 validate_response_schema: description: - Flag for Cisco DNA Center SDK to enable the validation of request bodies against a JSON schema. From 57d8da28573fbd4f24bec069bcd2d115343713c6 Mon Sep 17 00:00:00 2001 From: MUTHU-RAKESH-27 <19cs127@psgitech.ac.in> Date: Sun, 4 Feb 2024 19:02:02 +0530 Subject: [PATCH 2/3] Changes in documentation --- plugins/doc_fragments/intent_params.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/doc_fragments/intent_params.py b/plugins/doc_fragments/intent_params.py index 087544872d..99d0937d4a 100644 --- a/plugins/doc_fragments/intent_params.py +++ b/plugins/doc_fragments/intent_params.py @@ -57,14 +57,13 @@ class ModuleDocFragment(object): dnac_log_level: description: - Sets the threshold for log level. Messages with a level equal to or higher than - this will be logged. Levels are listed in order of severity. + this will be logged. Levels are listed in order of severity [CRITICAL, ERROR, WARNING, INFO, DEBUG]. - CRITICAL: Indicates serious errors halting the program. Displays only CRITICAL messages. - ERROR: Indicates problems preventing a function. Displays ERROR and CRITICAL messages. - WARNING: Indicates potential future issues. Displays WARNING, ERROR, CRITICAL messages. - INFO: Tracks normal operation. Displays INFO, WARNING, ERROR, CRITICAL messages. - DEBUG: Provides detailed diagnostic info. Displays all log messages. type: str - choices: [CRITICAL, ERROR, WARNING, INFO, DEBUG] default: WARNING dnac_log_file_path: description: From 7b4860ae357bb6c8cb70dab62a9b6dd0d0e596ff Mon Sep 17 00:00:00 2001 From: MUTHU-RAKESH-27 <19cs127@psgitech.ac.in> Date: Sun, 4 Feb 2024 19:05:39 +0530 Subject: [PATCH 3/3] Changes in documentation --- plugins/doc_fragments/intent_params.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/doc_fragments/intent_params.py b/plugins/doc_fragments/intent_params.py index 99d0937d4a..3efee055a3 100644 --- a/plugins/doc_fragments/intent_params.py +++ b/plugins/doc_fragments/intent_params.py @@ -58,11 +58,11 @@ class ModuleDocFragment(object): description: - Sets the threshold for log level. Messages with a level equal to or higher than this will be logged. Levels are listed in order of severity [CRITICAL, ERROR, WARNING, INFO, DEBUG]. - - CRITICAL: Indicates serious errors halting the program. Displays only CRITICAL messages. - - ERROR: Indicates problems preventing a function. Displays ERROR and CRITICAL messages. - - WARNING: Indicates potential future issues. Displays WARNING, ERROR, CRITICAL messages. - - INFO: Tracks normal operation. Displays INFO, WARNING, ERROR, CRITICAL messages. - - DEBUG: Provides detailed diagnostic info. Displays all log messages. + - CRITICAL Indicates serious errors halting the program. Displays only CRITICAL messages. + - ERROR Indicates problems preventing a function. Displays ERROR and CRITICAL messages. + - WARNING Indicates potential future issues. Displays WARNING, ERROR, CRITICAL messages. + - INFO Tracks normal operation. Displays INFO, WARNING, ERROR, CRITICAL messages. + - DEBUG Provides detailed diagnostic info. Displays all log messages. type: str default: WARNING dnac_log_file_path: