1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
|
#!/usr/bin/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)
DOCUMENTATION = r"""
---
module: network_v2
short_description: Resource module for Network V2
description:
- Manage operations create and update of the resource Network V2.
- >
API to create network settings for DHCP, Syslog, SNMP, NTP, Network AAA, Client and Endpoint AAA, and/or DNS
center server settings.
- >
API to update network settings for DHCP, Syslog, SNMP, NTP, Network AAA, Client and Endpoint AAA, and/or DNS
center server settings.
version_added: '6.7.0'
extends_documentation_fragment:
- cisco.dnac.module
author: Rafael Campos (@racampos)
options:
settings:
description: Network V2's settings.
suboptions:
clientAndEndpoint_aaa:
description: Network V2's clientAndEndpoint_aaa.
suboptions:
ipAddress:
description: IP address for ISE serve (eg 1.1.1.4).
type: str
network:
description: IP address for AAA or ISE server (eg 2.2.2.1).
type: str
protocol:
description: Protocol for AAA or ISE serve (eg RADIUS).
type: str
servers:
description: Server type AAA or ISE server (eg AAA).
type: str
sharedSecret:
description: Shared secret for ISE server.
type: str
type: dict
dhcpServer:
description: DHCP Server IP (eg 1.1.1.1).
elements: str
type: list
dnsServer:
description: Network V2's dnsServer.
suboptions:
domainName:
description: Domain Name of DHCP (eg; cisco).
type: str
primaryIpAddress:
description: Primary IP Address for DHCP (eg 2.2.2.2).
type: str
secondaryIpAddress:
description: Secondary IP Address for DHCP (eg 3.3.3.3).
type: str
type: dict
messageOfTheday:
description: Network V2's messageOfTheday.
suboptions:
bannerMessage:
description: Massage for Banner message (eg; Good day).
type: str
retainExistingBanner:
description: Retain existing Banner Message (eg "true" or "false").
type: str
type: dict
netflowcollector:
description: Network V2's netflowcollector.
suboptions:
ipAddress:
description: IP Address for NetFlow collector (eg 3.3.3.1).
type: str
port:
description: Port for NetFlow Collector (eg; 443).
type: int
type: dict
network_aaa:
description: Network V2's network_aaa.
suboptions:
ipAddress:
description: IP address for AAA and ISE server (eg 1.1.1.1).
type: str
network:
description: IP Address for AAA or ISE server (eg 2.2.2.2).
type: str
protocol:
description: Protocol for AAA or ISE serve (eg RADIUS).
type: str
servers:
description: Server type for AAA Network (eg AAA).
type: str
sharedSecret:
description: Shared secret for ISE Server.
type: str
type: dict
ntpServer:
description: IP address for NTP server (eg 1.1.1.2).
elements: str
type: list
snmpServer:
description: Network V2's snmpServer.
suboptions:
configureDnacIP:
description: Configuration DNAC IP for SNMP Server (eg true).
type: bool
ipAddresses:
description: IP Address for SNMP Server (eg 4.4.4.1).
elements: str
type: list
type: dict
syslogServer:
description: Network V2's syslogServer.
suboptions:
configureDnacIP:
description: Configuration DNAC IP for syslog server (eg true).
type: bool
ipAddresses:
description: IP Address for syslog server (eg 4.4.4.4).
elements: str
type: list
type: dict
timezone:
description: Input for time zone (eg Africa/Abidjan).
type: str
type: dict
siteId:
description: SiteId path parameter. Site Id to which site details to associate with
the network settings.
type: str
requirements:
- dnacentersdk >= 2.7.1
- python >= 3.9
seealso:
- name: Cisco DNA Center documentation for Network Settings CreateNetworkV2
description: Complete reference of the CreateNetworkV2 API.
link: https://developer.cisco.com/docs/dna-center/#!create-network-v-2
- name: Cisco DNA Center documentation for Network Settings UpdateNetworkV2
description: Complete reference of the UpdateNetworkV2 API.
link: https://developer.cisco.com/docs/dna-center/#!update-network-v-2
notes:
- SDK Method used are
network_settings.NetworkSettings.create_network_v2,
network_settings.NetworkSettings.update_network_v2,
- Paths used are
post /dna/intent/api/v2/network/{siteId},
put /dna/intent/api/v2/network/{siteId},
"""
EXAMPLES = r"""
- name: Create
cisco.dnac.network_v2:
dnac_host: "{{dnac_host}}"
dnac_username: "{{dnac_username}}"
dnac_password: "{{dnac_password}}"
dnac_verify: "{{dnac_verify}}"
dnac_port: "{{dnac_port}}"
dnac_version: "{{dnac_version}}"
dnac_debug: "{{dnac_debug}}"
state: present
settings:
clientAndEndpoint_aaa:
ipAddress: string
network: string
protocol: string
servers: string
sharedSecret: string
dhcpServer:
- string
dnsServer:
domainName: string
primaryIpAddress: string
secondaryIpAddress: string
messageOfTheday:
bannerMessage: string
retainExistingBanner: string
netflowcollector:
ipAddress: string
port: 0
network_aaa:
ipAddress: string
network: string
protocol: string
servers: string
sharedSecret: string
ntpServer:
- string
snmpServer:
configureDnacIP: true
ipAddresses:
- string
syslogServer:
configureDnacIP: true
ipAddresses:
- string
timezone: string
siteId: string
- name: Update by id
cisco.dnac.network_v2:
dnac_host: "{{dnac_host}}"
dnac_username: "{{dnac_username}}"
dnac_password: "{{dnac_password}}"
dnac_verify: "{{dnac_verify}}"
dnac_port: "{{dnac_port}}"
dnac_version: "{{dnac_version}}"
dnac_debug: "{{dnac_debug}}"
state: present
settings:
clientAndEndpoint_aaa:
ipAddress: string
network: string
protocol: string
servers: string
sharedSecret: string
dhcpServer:
- string
dnsServer:
domainName: string
primaryIpAddress: string
secondaryIpAddress: string
messageOfTheday:
bannerMessage: string
retainExistingBanner: string
netflowcollector:
ipAddress: string
port: 0
network_aaa:
ipAddress: string
network: string
protocol: string
servers: string
sharedSecret: string
ntpServer:
- string
snmpServer:
configureDnacIP: true
ipAddresses:
- string
syslogServer:
configureDnacIP: true
ipAddresses:
- string
timezone: string
siteId: string
"""
RETURN = r"""
dnac_response:
description: A dictionary or list with the response returned by the Cisco DNAC Python SDK
returned: always
type: dict
sample: >
{
"taskId": "string",
"url": "string"
}
"""
|