From 38b7c80217c4e72b1d8988eb1e60bb6e77334114 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 18 Apr 2024 07:52:22 +0200 Subject: Adding upstream version 9.4.0+dfsg. Signed-off-by: Daniel Baumann --- .../cisco/meraki/plugins/doc_fragments/module.py | 126 +++++++++++++++++++++ .../meraki/plugins/doc_fragments/module_info.py | 126 +++++++++++++++++++++ .../doc_fragments/module_info_pagination.py | 27 +++++ 3 files changed, 279 insertions(+) create mode 100644 ansible_collections/cisco/meraki/plugins/doc_fragments/module.py create mode 100644 ansible_collections/cisco/meraki/plugins/doc_fragments/module_info.py create mode 100644 ansible_collections/cisco/meraki/plugins/doc_fragments/module_info_pagination.py (limited to 'ansible_collections/cisco/meraki/plugins/doc_fragments') diff --git a/ansible_collections/cisco/meraki/plugins/doc_fragments/module.py b/ansible_collections/cisco/meraki/plugins/doc_fragments/module.py new file mode 100644 index 000000000..3a08c7cdc --- /dev/null +++ b/ansible_collections/cisco/meraki/plugins/doc_fragments/module.py @@ -0,0 +1,126 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# Copyright (c) 2021, Cisco Systems +# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + + +class ModuleDocFragment(object): + + # Standard files documentation fragment + DOCUMENTATION = r''' +options: + meraki_base_url: + description: + - meraki_base_url (string), preceding all endpoint resources + type: str + default: https://api.meraki.com/api/v1 + meraki_api_key: + description: + - meraki_api_key (string), API key generated in dashboard; can also be set as an environment variable MERAKI_DASHBOARD_API_KEY + type: str + required: true + meraki_single_request_timeout: + description: + - meraki_single_request_timeout (integer), maximum number of seconds for each API call + type: int + default: 60 + meraki_certificate_path: + description: + - meraki_certificate_path (string), path for TLS/SSL certificate verification if behind local proxy + type: str + default: '' + meraki_requests_proxy: + description: + - meraki_requests_proxy (string), proxy server and port, if needed, for HTTPS + type: str + default: '' + meraki_wait_on_rate_limit: + description: + - meraki_wait_on_rate_limit (boolean), retry if 429 rate limit error encountered? + type: bool + default: true + meraki_nginx_429_retry_wait_time: + description: + - meraki_nginx_429_retry_wait_time (integer), Nginx 429 retry wait time + type: int + default: 60 + meraki_action_batch_retry_wait_time: + description: + - meraki_action_batch_retry_wait_time (integer), action batch concurrency error retry wait time + type: int + default: 60 + meraki_retry_4xx_error: + description: + - meraki_retry_4xx_error (boolean), retry if encountering other 4XX error (besides 429)? + type: bool + default: false + meraki_retry_4xx_error_wait_time: + description: + - meraki_retry_4xx_error_wait_time (integer), other 4XX error retry wait time + type: int + default: 60 + meraki_maximum_retries: + description: + - meraki_maximum_retries (integer), retry up to this many times when encountering 429s or other server-side errors + type: int + default: 2 + meraki_output_log: + description: + - meraki_output_log (boolean), create an output log file? + type: bool + default: true + meraki_log_file_prefix: + description: + - meraki_log_file_prefix (string), log file name appended with date and timestamp + type: str + default: meraki_api_ + meraki_log_path: + description: + - log_path (string), path to output log; by default, working directory of script if not specified + type: str + default: '' + meraki_print_console: + description: + - meraki_print_console (boolean), print logging output to console? + type: bool + default: true + meraki_suppress_logging: + description: + - meraki_suppress_logging (boolean), disable all logging? you're on your own then! + type: bool + default: false + meraki_simulate: + description: + - meraki_simulate (boolean), simulate POST/PUT/DELETE calls to prevent changes? + type: bool + default: false + meraki_be_geo_id: + description: + - meraki_be_geo_id (string), optional partner identifier for API usage tracking; can also be set as an environment variable BE_GEO_ID + type: str + default: '' + meraki_caller: + description: + - meraki_caller (string), optional identifier for API usage tracking; can also be set as an environment variable MERAKI_PYTHON_SDK_CALLER + type: str + default: '' + meraki_use_iterator_for_get_pages: + description: + - meraki_use_iterator_for_get_pages (boolean), list* methods will return an iterator with each object instead of a complete list with all items + type: bool + default: false + meraki_inherit_logging_config: + description: + - meraki_inherit_logging_config (boolean), Inherits your own logger instance + type: bool + default: false +notes: + - "Does not support C(check_mode)" + - "The plugin runs on the control node and does not use any ansible connection plugins, but instead the embedded connection manager from Cisco DNAC SDK" + - "The parameters starting with dnac_ are used by the Cisco DNAC Python SDK to establish the connection" +''' diff --git a/ansible_collections/cisco/meraki/plugins/doc_fragments/module_info.py b/ansible_collections/cisco/meraki/plugins/doc_fragments/module_info.py new file mode 100644 index 000000000..f40beec68 --- /dev/null +++ b/ansible_collections/cisco/meraki/plugins/doc_fragments/module_info.py @@ -0,0 +1,126 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# Copyright (c) 2021, Cisco Systems +# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + + +class ModuleDocFragment(object): + + # Standard files documentation fragment + DOCUMENTATION = r''' +options: + meraki_api_key: + description: + - meraki_api_key (string), API key generated in dashboard; can also be set as an environment variable MERAKI_DASHBOARD_API_KEY + type: str + required: true + meraki_base_url: + description: + - meraki_base_url (string), preceding all endpoint resources + type: str + default: https://api.meraki.com/api/v1 + meraki_single_request_timeout: + description: + - meraki_single_request_timeout (integer), maximum number of seconds for each API call + type: int + default: 60 + meraki_certificate_path: + description: + - meraki_certificate_path (string), path for TLS/SSL certificate verification if behind local proxy + type: str + default: '' + meraki_requests_proxy: + description: + - meraki_requests_proxy (string), proxy server and port, if needed, for HTTPS + type: str + default: '' + meraki_wait_on_rate_limit: + description: + - meraki_wait_on_rate_limit (boolean), retry if 429 rate limit error encountered? + type: bool + default: true + meraki_nginx_429_retry_wait_time: + description: + - meraki_nginx_429_retry_wait_time (integer), Nginx 429 retry wait time + type: int + default: 60 + meraki_action_batch_retry_wait_time: + description: + - meraki_action_batch_retry_wait_time (integer), action batch concurrency error retry wait time + type: int + default: 60 + meraki_retry_4xx_error: + description: + - meraki_retry_4xx_error (boolean), retry if encountering other 4XX error (besides 429)? + type: bool + default: false + meraki_retry_4xx_error_wait_time: + description: + - meraki_retry_4xx_error_wait_time (integer), other 4XX error retry wait time + type: int + default: 60 + meraki_maximum_retries: + description: + - meraki_maximum_retries (integer), retry up to this many times when encountering 429s or other server-side errors + type: int + default: 2 + meraki_output_log: + description: + - meraki_output_log (boolean), create an output log file? + type: bool + default: true + meraki_log_file_prefix: + description: + - meraki_log_file_prefix (string), log file name appended with date and timestamp + type: str + default: meraki_api_ + meraki_log_path: + description: + - log_path (string), path to output log; by default, working directory of script if not specified + type: str + default: '' + meraki_print_console: + description: + - meraki_print_console (boolean), print logging output to console? + type: bool + default: true + meraki_suppress_logging: + description: + - meraki_suppress_logging (boolean), disable all logging? you're on your own then! + type: bool + default: false + meraki_simulate: + description: + - meraki_simulate (boolean), simulate POST/PUT/DELETE calls to prevent changes? + type: bool + default: false + meraki_be_geo_id: + description: + - meraki_be_geo_id (string), optional partner identifier for API usage tracking; can also be set as an environment variable BE_GEO_ID + type: str + default: '' + meraki_caller: + description: + - meraki_caller (string), optional identifier for API usage tracking; can also be set as an environment variable MERAKI_PYTHON_SDK_CALLER + type: str + default: '' + meraki_use_iterator_for_get_pages: + description: + - meraki_use_iterator_for_get_pages (boolean), list* methods will return an iterator with each object instead of a complete list with all items + type: bool + default: false + meraki_inherit_logging_config: + description: + - meraki_inherit_logging_config (boolean), Inherits your own logger instance + type: bool + default: false +notes: + - "Supports C(check_mode)" + - "The plugin runs on the control node and does not use any ansible connection plugins, but instead the embedded connection manager from Cisco meraki SDK" + - "The parameters starting with meraki_ are used by the Cisco meraki Python SDK to establish the connection" +''' diff --git a/ansible_collections/cisco/meraki/plugins/doc_fragments/module_info_pagination.py b/ansible_collections/cisco/meraki/plugins/doc_fragments/module_info_pagination.py new file mode 100644 index 000000000..cb58b4ac8 --- /dev/null +++ b/ansible_collections/cisco/meraki/plugins/doc_fragments/module_info_pagination.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# Copyright (c) 2021, Cisco Systems +# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + + +class ModuleDocFragment(object): + + # Standard files documentation fragment + DOCUMENTATION = r''' +options: + total_pages: + description: + - total_pages(int), use with perPage to get total results up to total_pages*perPage; -1 for all pages + type: str + required: true + direction: + description: + - direction (string), direction to paginate, either "next" (default) or "prev" page + type: str + default: https://api.meraki.com/api/v1 +''' -- cgit v1.2.3