Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/networks_devices_claim.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: networks_devices_claim
9 short_description: Resource module for networks _devices _claim
10 description:
11 - Manage operation create of the resource networks _devices _claim.
12 - >
13 Claim devices into a network. Note for recently claimed devices, it may take a
14 few minutes for API requests against that device to succeed. This operation can
15 be used up to ten times within a single five minute window.
16 version_added: '1.0.0'
17 extends_documentation_fragment:
18 - cisco.meraki.module
19 author: Francisco Munoz (@fmunoz)
20 options:
21 detailsByDevice:
22 description: Optional details for claimed devices (currently only used for Catalyst
23 devices).
24 elements: dict
25 suboptions:
26 details:
27 description: An array of details. Supported list of details includes "device
28 mode", "username", "password", "enable password", "ap mapping type" and
29 "ap network id". For onboarding into hybrid mode, the value of the device
30 mode detail must be "monitored".
31 elements: dict
32 suboptions:
33 name:
34 description: Name of device detail.
35 type: str
36 value:
37 description: Value of device detail.
38 type: str
39 type: list
40 serial:
41 description: The serial of the device these details relate to.
42 type: str
43 type: list
44 networkId:
45 description: NetworkId path parameter. Network ID.
46 type: str
47 serials:
48 description: A list of serials of devices to claim.
49 elements: str
50 type: list
51 requirements:
52 - meraki >= 2.4.9
53 - python >= 3.5
54 seealso:
55 - name: Cisco Meraki documentation for networks claimNetworkDevices
56 description: Complete reference of the claimNetworkDevices API.
57 link: https://developer.cisco.com/meraki/api-v1/#!claim-network-devices
58 notes:
59 - SDK Method used are
60 networks.Networks.claim_network_devices,
61 - Paths used are
62 post /networks/{networkId}/devices/claim,
63 """
64
65 EXAMPLES = r"""
66 - name: Create
67 cisco.meraki.networks_devices_claim:
68 meraki_api_key: "{{ meraki_api_key }}"
69 meraki_base_url: "{{ meraki_base_url }}"
70 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
71 meraki_certificate_path: "{{ meraki_certificate_path }}"
72 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
73 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
74 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
75 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
76 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
77 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
78 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
79 meraki_output_log: "{{ meraki_output_log }}"
80 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
81 meraki_log_path: "{{ meraki_log_path }}"
82 meraki_print_console: "{{ meraki_print_console }}"
83 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
84 meraki_simulate: "{{ meraki_simulate }}"
85 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
86 meraki_caller: "{{ meraki_caller }}"
87 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
88 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
89 addAtomically: true
90 detailsByDevice:
91 - details:
92 - name: username
93 value: milesmeraki
94 serial: Q234-ABCD-5678
95 networkId: string
96 serials:
97 - Q234-ABCD-0001
98 - Q234-ABCD-0002
99 - Q234-ABCD-0003
100 """
101 RETURN = r"""
102 meraki_response:
103 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
104 returned: always
105 type: dict
106 sample: >
107 {
108 "serials": [
109 "string"
110 ],
111 "errors": [
112 {
113 "serial": "string",
114 "errors": [
115 "string"
116 ]
117 }
118 ]
119 }
120 """