| 1 |
#!/usr/bin/env python |
| 2 |
# -*- coding: utf-8 -*- |
| 3 |
|
| 4 |
# Copyright (c) 2021, Cisco Systems |
| 5 |
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) |
| 6 |
|
| 7 |
from __future__ import absolute_import, division, print_function |
| 8 |
|
| 9 |
__metaclass__ = type |
| 10 |
|
| 11 |
|
| 12 |
class ModuleDocFragment(object): |
| 13 |
|
| 14 |
# Standard files documentation fragment |
| 15 |
DOCUMENTATION = r''' |
| 16 |
options: |
| 17 |
meraki_api_key: |
| 18 |
description: |
| 19 |
- meraki_api_key (string), API key generated in dashboard; can also be set as an environment variable MERAKI_DASHBOARD_API_KEY |
| 20 |
type: str |
| 21 |
required: true |
| 22 |
meraki_base_url: |
| 23 |
description: |
| 24 |
- meraki_base_url (string), preceding all endpoint resources |
| 25 |
type: str |
| 26 |
default: https://api.meraki.com/api/v1 |
| 27 |
meraki_single_request_timeout: |
| 28 |
description: |
| 29 |
- meraki_single_request_timeout (integer), maximum number of seconds for each API call |
| 30 |
type: int |
| 31 |
default: 60 |
| 32 |
meraki_certificate_path: |
| 33 |
description: |
| 34 |
- meraki_certificate_path (string), path for TLS/SSL certificate verification if behind local proxy |
| 35 |
type: str |
| 36 |
default: '' |
| 37 |
meraki_requests_proxy: |
| 38 |
description: |
| 39 |
- meraki_requests_proxy (string), proxy server and port, if needed, for HTTPS |
| 40 |
type: str |
| 41 |
default: '' |
| 42 |
meraki_wait_on_rate_limit: |
| 43 |
description: |
| 44 |
- meraki_wait_on_rate_limit (boolean), retry if 429 rate limit error encountered? |
| 45 |
type: bool |
| 46 |
default: true |
| 47 |
meraki_nginx_429_retry_wait_time: |
| 48 |
description: |
| 49 |
- meraki_nginx_429_retry_wait_time (integer), Nginx 429 retry wait time |
| 50 |
type: int |
| 51 |
default: 60 |
| 52 |
meraki_action_batch_retry_wait_time: |
| 53 |
description: |
| 54 |
- meraki_action_batch_retry_wait_time (integer), action batch concurrency error retry wait time |
| 55 |
type: int |
| 56 |
default: 60 |
| 57 |
meraki_retry_4xx_error: |
| 58 |
description: |
| 59 |
- meraki_retry_4xx_error (boolean), retry if encountering other 4XX error (besides 429)? |
| 60 |
type: bool |
| 61 |
default: false |
| 62 |
meraki_retry_4xx_error_wait_time: |
| 63 |
description: |
| 64 |
- meraki_retry_4xx_error_wait_time (integer), other 4XX error retry wait time |
| 65 |
type: int |
| 66 |
default: 60 |
| 67 |
meraki_maximum_retries: |
| 68 |
description: |
| 69 |
- meraki_maximum_retries (integer), retry up to this many times when encountering 429s or other server-side errors |
| 70 |
type: int |
| 71 |
default: 2 |
| 72 |
meraki_output_log: |
| 73 |
description: |
| 74 |
- meraki_output_log (boolean), create an output log file? |
| 75 |
type: bool |
| 76 |
default: true |
| 77 |
meraki_log_file_prefix: |
| 78 |
description: |
| 79 |
- meraki_log_file_prefix (string), log file name appended with date and timestamp |
| 80 |
type: str |
| 81 |
default: meraki_api_ |
| 82 |
meraki_log_path: |
| 83 |
description: |
| 84 |
- log_path (string), path to output log; by default, working directory of script if not specified |
| 85 |
type: str |
| 86 |
default: '' |
| 87 |
meraki_print_console: |
| 88 |
description: |
| 89 |
- meraki_print_console (boolean), print logging output to console? |
| 90 |
type: bool |
| 91 |
default: true |
| 92 |
meraki_suppress_logging: |
| 93 |
description: |
| 94 |
- meraki_suppress_logging (boolean), disable all logging? you're on your own then! |
| 95 |
type: bool |
| 96 |
default: false |
| 97 |
meraki_simulate: |
| 98 |
description: |
| 99 |
- meraki_simulate (boolean), simulate POST/PUT/DELETE calls to prevent changes? |
| 100 |
type: bool |
| 101 |
default: false |
| 102 |
meraki_be_geo_id: |
| 103 |
description: |
| 104 |
- meraki_be_geo_id (string), optional partner identifier for API usage tracking; can also be set as an environment variable BE_GEO_ID |
| 105 |
type: str |
| 106 |
default: '' |
| 107 |
meraki_use_iterator_for_get_pages: |
| 108 |
description: |
| 109 |
- meraki_use_iterator_for_get_pages (boolean), list* methods will return an iterator with each object instead of a complete list with all items |
| 110 |
type: bool |
| 111 |
default: false |
| 112 |
meraki_inherit_logging_config: |
| 113 |
description: |
| 114 |
- meraki_inherit_logging_config (boolean), Inherits your own logger instance |
| 115 |
type: bool |
| 116 |
default: false |
| 117 |
notes: |
| 118 |
- "Supports C(check_mode)" |
| 119 |
- "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" |
| 120 |
- "The parameters starting with meraki_ are used by the Cisco meraki Python SDK to establish the connection" |
| 121 |
''' |