Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/devices_live_tools_throughput_test.py

raw
1 #!/usr/bin/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 DOCUMENTATION = r"""
8 module: devices_live_tools_throughput_test
9 short_description: Resource module for devices _livetools _throughputtest
10 description:
11 - Manage operation create of the resource devices _livetools _throughputtest.
12 - >
13 Enqueue a job to test a device throughput, the test will run for 10 secs to test
14 throughput. This endpoint has a rate limit of one request every five seconds per
15 device.
16 version_added: '1.0.0'
17 extends_documentation_fragment:
18 - cisco.meraki.module
19 author: Francisco Munoz (@fmunoz)
20 options:
21 callback:
22 description: Details for the callback. Please include either an httpServerId OR
23 url and sharedSecret.
24 suboptions:
25 httpServer:
26 description: The webhook receiver used for the callback webhook.
27 suboptions:
28 id:
29 description: The webhook receiver ID that will receive information. If
30 specifying this, please leave the url and sharedSecret fields blank.
31 type: str
32 type: dict
33 payloadTemplate:
34 description: The payload template of the webhook used for the callback.
35 suboptions:
36 id:
37 description: The ID of the payload template. Defaults to 'wpt_00005' for
38 the Callback (included) template.
39 type: str
40 type: dict
41 sharedSecret:
42 description: A shared secret that will be included in the requests sent to
43 the callback URL. It can be used to verify that the request was sent by
44 Meraki. If using this field, please also specify an url.
45 type: str
46 url:
47 description: The callback URL for the webhook target. If using this field,
48 please also specify a sharedSecret.
49 type: str
50 type: dict
51 serial:
52 description: Serial path parameter.
53 type: str
54 requirements:
55 - meraki >= 2.4.9
56 - python >= 3.5
57 seealso:
58 - name: Cisco Meraki documentation for devices createDeviceLiveToolsThroughputTest
59 description: Complete reference of the createDeviceLiveToolsThroughputTest API.
60 link: https://developer.cisco.com/meraki/api-v1/#!create-device-live-tools-throughput-test
61 notes:
62 - SDK Method used are
63 devices.Devices.create_device_live_tools_throughput_test,
64 - Paths used are
65 post /devices/{serial}/liveTools/throughputTest,
66 """
67
68 EXAMPLES = r"""
69 - name: Create
70 cisco.meraki.devices_live_tools_throughput_test:
71 meraki_api_key: "{{ meraki_api_key }}"
72 meraki_base_url: "{{ meraki_base_url }}"
73 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
74 meraki_certificate_path: "{{ meraki_certificate_path }}"
75 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
76 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
77 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
78 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
79 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
80 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
81 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
82 meraki_output_log: "{{ meraki_output_log }}"
83 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
84 meraki_log_path: "{{ meraki_log_path }}"
85 meraki_print_console: "{{ meraki_print_console }}"
86 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
87 meraki_simulate: "{{ meraki_simulate }}"
88 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
89 meraki_caller: "{{ meraki_caller }}"
90 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
91 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
92 state: present
93 callback:
94 httpServer:
95 id: aHR0cHM6Ly93d3cuZXhhbXBsZS5jb20vd2ViaG9va3M=
96 payloadTemplate:
97 id: wpt_2100
98 sharedSecret: secret
99 url: https://webhook.site/28efa24e-f830-4d9f-a12b-fbb9e5035031
100 serial: string
101 """
102 RETURN = r"""
103 meraki_response:
104 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
105 returned: always
106 type: dict
107 sample: >
108 {
109 "throughputTestId": "string",
110 "url": "string",
111 "status": "string",
112 "result": {
113 "speeds": {
114 "downstream": 0
115 }
116 },
117 "request": {
118 "serial": "string"
119 },
120 "error": "string",
121 "callback": {
122 "id": "string",
123 "url": "string",
124 "status": "string"
125 }
126 }
127 """