Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/devices_switch_ports_statuses_info.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_switch_ports_statuses_info
9 short_description: Information module for devices _switch _ports _statuses
10 description:
11 - Information module for Devices Switch Ports Statuses Info.
12 - Get all devices _switch _ports _statuses.
13 - Return the status for all the ports of a switch.
14 version_added: '1.0.0'
15 extends_documentation_fragment:
16 - cisco.meraki.module_info
17 author: Francisco Munoz (@fmunoz)
18 options:
19 headers:
20 description: Additional headers.
21 type: dict
22 serial:
23 description:
24 - Information module for Devices Switch Ports Statuses Info.
25 - Serial path parameter.
26 type: str
27 t0:
28 description:
29 - Information module for Devices Switch Ports Statuses Info.
30 - T0 query parameter. The beginning of the timespan for the data. The maximum
31 lookback period is 31 days from today.
32 type: str
33 timespan:
34 description:
35 - Information module for Devices Switch Ports Statuses Info.
36 - >
37 Timespan query parameter. The timespan for which the information will be fetched.
38 If specifying timespan, do not specify parameter t0. The value must be in
39 seconds and be less than or equal to 31 days. The default is 1 day.
40 type: float
41 requirements:
42 - meraki >= 2.4.9
43 - python >= 3.5
44 seealso:
45 - name: Cisco Meraki documentation for switch getDeviceSwitchPortsStatuses
46 description: Complete reference of the getDeviceSwitchPortsStatuses API.
47 link: https://developer.cisco.com/meraki/api-v1/#!get-device-switch-ports-statuses
48 notes:
49 - SDK Method used are
50 switch.Switch.get_device_switch_ports_statuses,
51 - Paths used are
52 get /devices/{serial}/switch/ports/statuses,
53 """
54
55 EXAMPLES = r"""
56 - name: Get all devices _switch _ports _statuses
57 cisco.meraki.devices_switch_ports_statuses_info:
58 meraki_api_key: "{{ meraki_api_key }}"
59 meraki_base_url: "{{ meraki_base_url }}"
60 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
61 meraki_certificate_path: "{{ meraki_certificate_path }}"
62 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
63 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
64 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
65 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
66 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
67 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
68 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
69 meraki_output_log: "{{ meraki_output_log }}"
70 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
71 meraki_log_path: "{{ meraki_log_path }}"
72 meraki_print_console: "{{ meraki_print_console }}"
73 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
74 meraki_simulate: "{{ meraki_simulate }}"
75 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
76 meraki_caller: "{{ meraki_caller }}"
77 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
78 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
79 t0: string
80 timespan: 0
81 serial: string
82 register: result
83 """
84 RETURN = r"""
85 meraki_response:
86 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
87 returned: always
88 type: list
89 elements: dict
90 sample: >
91 [
92 {
93 "portId": "string",
94 "enabled": true,
95 "status": "string",
96 "isUplink": true,
97 "errors": [
98 "string"
99 ],
100 "warnings": [
101 "string"
102 ],
103 "speed": "string",
104 "duplex": "string",
105 "spanningTree": {
106 "statuses": [
107 "string"
108 ]
109 },
110 "poe": {
111 "isAllocated": true
112 },
113 "usageInKb": {
114 "total": 0,
115 "sent": 0,
116 "recv": 0
117 },
118 "cdp": {
119 "systemName": "string",
120 "platform": "string",
121 "deviceId": "string",
122 "portId": "string",
123 "nativeVlan": 0,
124 "address": "string",
125 "managementAddress": "string",
126 "version": "string",
127 "vtpManagementDomain": "string",
128 "capabilities": "string"
129 },
130 "lldp": {
131 "systemName": "string",
132 "systemDescription": "string",
133 "chassisId": "string",
134 "portId": "string",
135 "managementVlan": 0,
136 "portVlan": 0,
137 "managementAddress": "string",
138 "portDescription": "string",
139 "systemCapabilities": "string"
140 },
141 "clientCount": 0,
142 "powerUsageInWh": 0,
143 "trafficInKbps": {
144 "total": 0,
145 "sent": 0,
146 "recv": 0
147 },
148 "securePort": {
149 "enabled": true,
150 "active": true,
151 "authenticationStatus": "string",
152 "configOverrides": {
153 "type": "string",
154 "vlan": 0,
155 "voiceVlan": 0,
156 "allowedVlans": "string"
157 }
158 }
159 }
160 ]
161 """