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
|
#!/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: reserve_ip_subpool
short_description: Resource module for Reserve Ip Subpool
description:
- Manage operations create, update and delete of the resource Reserve Ip Subpool.
- API to reserve an ip subpool from the global pool.
- API to delete the reserved ip subpool.
- API to update ip subpool from the global pool.
version_added: '3.1.0'
extends_documentation_fragment:
- cisco.dnac.module
author: Rafael Campos (@racampos)
options:
id:
description: Id path parameter. Id of reserve ip subpool to be deleted.
type: str
ipv4DhcpServers:
description: IPv4 input for dhcp server ip example "1.1.1.1".
elements: str
type: list
ipv4DnsServers:
description: IPv4 input for dns server ip example "4.4.4.4".
elements: str
type: list
ipv4GateWay:
description: Gateway ip address details, example 175.175.0.1.
type: str
version_added: 4.0.0
ipv4GlobalPool:
description: IP v4 Global pool address with cidr, example 175.175.0.0/16.
type: str
ipv4Prefix:
description: IPv4 prefix value is true, the ip4 prefix length input field is enabled
, if it is false ipv4 total Host input is enable.
type: bool
ipv4PrefixLength:
description: The ipv4 prefix length is required when ipv4prefix value is true.
type: int
ipv4Subnet:
description: IPv4 Subnet address, example 175.175.0.0. Either ipv4Subnet or ipv4TotalHost
needs to be passed if creating IPv4 subpool.
type: str
ipv4TotalHost:
description: IPv4 total host is required when ipv4prefix value is false.
type: int
ipv6AddressSpace:
description: If the value is omitted or false only ipv4 input are required, otherwise
both ipv6 and ipv4 are required.
type: bool
ipv6DhcpServers:
description: IPv6 format dhcp server as input example "2001 db8 1234".
elements: str
type: list
ipv6DnsServers:
description: IPv6 format dns server input example "2001 db8 1234".
elements: str
type: list
ipv6GateWay:
description: Gateway ip address details, example 2001 db8 85a3 0 100 1.
type: str
ipv6GlobalPool:
description: IPv6 Global pool address with cidr this is required when Ipv6AddressSpace
value is true, example 2001 db8 85a3 /64.
type: str
ipv6Prefix:
description: Ipv6 prefix value is true, the ip6 prefix length input field is enabled
, if it is false ipv6 total Host input is enable.
type: bool
ipv6PrefixLength:
description: IPv6 prefix length is required when the ipv6prefix value is true.
type: int
ipv6Subnet:
description: IPv6 Subnet address, example 2001 db8 85a3 0 100. Either ipv6Subnet
or ipv6TotalHost needs to be passed if creating IPv6 subpool.
type: str
ipv6TotalHost:
description: IPv6 total host is required when ipv6prefix value is false.
type: int
name:
description: Name of the reserve ip sub pool.
type: str
siteId:
description: SiteId path parameter. Site id to reserve the ip sub pool.
type: str
slaacSupport:
description: Slaac Support.
type: bool
type:
description: Type of the reserve ip sub pool.
type: str
requirements:
- dnacentersdk >= 2.7.1
- python >= 3.5
seealso:
- name: Cisco DNA Center documentation for Network Settings ReserveIPSubpool
description: Complete reference of the ReserveIPSubpool API.
link: https://developer.cisco.com/docs/dna-center/#!reserve-ip-subpool
- name: Cisco DNA Center documentation for Network Settings ReleaseReserveIPSubpool
description: Complete reference of the ReleaseReserveIPSubpool API.
link: https://developer.cisco.com/docs/dna-center/#!release-reserve-ip-subpool
- name: Cisco DNA Center documentation for Network Settings UpdateReserveIPSubpool
description: Complete reference of the UpdateReserveIPSubpool API.
link: https://developer.cisco.com/docs/dna-center/#!update-reserve-ip-subpool
notes:
- SDK Method used are
network_settings.NetworkSettings.release_reserve_ip_subpool,
network_settings.NetworkSettings.reserve_ip_subpool,
network_settings.NetworkSettings.update_reserve_ip_subpool,
- Paths used are
post /dna/intent/api/v1/reserve-ip-subpool/{siteId},
delete /dna/intent/api/v1/reserve-ip-subpool/{id},
put /dna/intent/api/v1/reserve-ip-subpool/{siteId},
"""
EXAMPLES = r"""
- name: Delete by id
cisco.dnac.reserve_ip_subpool:
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: absent
id: string
- name: Create
cisco.dnac.reserve_ip_subpool:
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
ipv4DhcpServers:
- string
ipv4DnsServers:
- string
ipv4GateWay: string
ipv4GlobalPool: string
ipv4Prefix: true
ipv4PrefixLength: 0
ipv4Subnet: string
ipv4TotalHost: 0
ipv6AddressSpace: true
ipv6DhcpServers:
- string
ipv6DnsServers:
- string
ipv6GateWay: string
ipv6GlobalPool: string
ipv6Prefix: true
ipv6PrefixLength: 0
ipv6Subnet: string
ipv6TotalHost: 0
name: string
siteId: string
slaacSupport: true
type: string
- name: Update by id
cisco.dnac.reserve_ip_subpool:
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
id: string
ipv4DhcpServers:
- string
ipv4DnsServers:
- string
ipv4GateWay: string
ipv6AddressSpace: true
ipv6DhcpServers:
- string
ipv6DnsServers:
- string
ipv6GateWay: string
ipv6GlobalPool: string
ipv6Prefix: true
ipv6PrefixLength: 0
ipv6Subnet: string
ipv6TotalHost: 0
name: string
siteId: string
slaacSupport: true
"""
RETURN = r"""
dnac_response:
description: A dictionary or list with the response returned by the Cisco DNAC Python SDK
returned: always
type: dict
sample: >
{
"executionId": "string",
"executionStatusUrl": "string",
"message": "string"
}
"""
|