Skip to content

Commit 96dc4a6

Browse files
authored
Merge pull request #322 from CiscoDevNet/fabric_isn
ISN Fabric Support for dcnm_fabric module.
2 parents 3f3bbaf + 1ac1255 commit 96dc4a6

15 files changed

+2863
-37
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ This collection is intended for use with the following release versions:
1212
<!--start requires_ansible-->
1313
## Ansible version compatibility
1414

15-
This collection has been tested against following Ansible versions: **>=2.9.10**.
15+
This collection has been tested against following Ansible versions: **>=2.15.0**.
1616

17+
For collections that support Ansible 2.9, please ensure you update your `network_os` to use the
18+
fully qualified collection name (for example, `cisco.ios.ios`).
1719
Plugins and modules within a collection may be tested with only specific Ansible versions.
1820
A collection may contain metadata that identifies these versions.
1921
PEP440 is the schema used to describe the versions of Ansible.
@@ -39,6 +41,7 @@ Name | Description
3941
[cisco.dcnm.dcnm_interface](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_interface_module.rst)|DCNM Ansible Module for managing interfaces.
4042
[cisco.dcnm.dcnm_inventory](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_inventory_module.rst)|Add and remove Switches from a DCNM managed VXLAN fabric.
4143
[cisco.dcnm.dcnm_links](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_links_module.rst)|DCNM ansible module for managing Links.
44+
[cisco.dcnm.dcnm_maintenance_mode](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_maintenance_mode_module.rst)|Manage Maintenance Mode Configuration of NX-OS Switches.
4245
[cisco.dcnm.dcnm_network](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_network_module.rst)|Add and remove Networks from a DCNM managed VXLAN fabric.
4346
[cisco.dcnm.dcnm_policy](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_policy_module.rst)|DCNM Ansible Module for managing policies.
4447
[cisco.dcnm.dcnm_resource_manager](https://github.com/CiscoDevNet/ansible-dcnm/blob/main/docs/cisco.dcnm.dcnm_resource_manager_module.rst)|DCNM ansible module for managing resources.

docs/cisco.dcnm.dcnm_fabric_module.rst

Lines changed: 940 additions & 1 deletion
Large diffs are not rendered by default.
Lines changed: 294 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,294 @@
1+
.. _cisco.dcnm.dcnm_maintenance_mode_module:
2+
3+
4+
********************************
5+
cisco.dcnm.dcnm_maintenance_mode
6+
********************************
7+
8+
**Manage Maintenance Mode Configuration of NX-OS Switches.**
9+
10+
11+
Version added: 3.5.0
12+
13+
.. contents::
14+
:local:
15+
:depth: 1
16+
17+
18+
Synopsis
19+
--------
20+
- Enable Maintenance or Normal Mode.
21+
22+
23+
24+
25+
Parameters
26+
----------
27+
28+
.. raw:: html
29+
30+
<table border=0 cellpadding=0 class="documentation-table">
31+
<tr>
32+
<th colspan="3">Parameter</th>
33+
<th>Choices/<font color="blue">Defaults</font></th>
34+
<th width="100%">Comments</th>
35+
</tr>
36+
<tr>
37+
<td colspan="3">
38+
<div class="ansibleOptionAnchor" id="parameter-"></div>
39+
<b>config</b>
40+
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
41+
<div style="font-size: small">
42+
<span style="color: purple">dictionary</span>
43+
/ <span style="color: red">required</span>
44+
</div>
45+
</td>
46+
<td>
47+
</td>
48+
<td>
49+
<div>A dictionary containing the maintenance mode configuration.</div>
50+
</td>
51+
</tr>
52+
<tr>
53+
<td class="elbow-placeholder"></td>
54+
<td colspan="2">
55+
<div class="ansibleOptionAnchor" id="parameter-"></div>
56+
<b>deploy</b>
57+
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
58+
<div style="font-size: small">
59+
<span style="color: purple">boolean</span>
60+
</div>
61+
</td>
62+
<td>
63+
<ul style="margin: 0; padding: 0"><b>Choices:</b>
64+
<li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
65+
<li>yes</li>
66+
</ul>
67+
</td>
68+
<td>
69+
<div>Whether to deploy the switch configurations.</div>
70+
</td>
71+
</tr>
72+
<tr>
73+
<td class="elbow-placeholder"></td>
74+
<td colspan="2">
75+
<div class="ansibleOptionAnchor" id="parameter-"></div>
76+
<b>mode</b>
77+
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
78+
<div style="font-size: small">
79+
<span style="color: purple">boolean</span>
80+
</div>
81+
</td>
82+
<td>
83+
<ul style="margin: 0; padding: 0"><b>Choices:</b>
84+
<li>no</li>
85+
<li>yes</li>
86+
</ul>
87+
<b>Default:</b><br/><div style="color: blue">"normal"</div>
88+
</td>
89+
<td>
90+
<div>Enable maintenance or normal mode on all switches.</div>
91+
</td>
92+
</tr>
93+
<tr>
94+
<td class="elbow-placeholder"></td>
95+
<td colspan="2">
96+
<div class="ansibleOptionAnchor" id="parameter-"></div>
97+
<b>switches</b>
98+
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
99+
<div style="font-size: small">
100+
<span style="color: purple">list</span>
101+
/ <span style="color: purple">elements=dictionary</span>
102+
/ <span style="color: red">required</span>
103+
</div>
104+
</td>
105+
<td>
106+
</td>
107+
<td>
108+
<div>A list of target switches.</div>
109+
<div>Per-switch options override the global options.</div>
110+
</td>
111+
</tr>
112+
<tr>
113+
<td class="elbow-placeholder"></td>
114+
<td class="elbow-placeholder"></td>
115+
<td colspan="1">
116+
<div class="ansibleOptionAnchor" id="parameter-"></div>
117+
<b>deploy</b>
118+
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
119+
<div style="font-size: small">
120+
<span style="color: purple">boolean</span>
121+
</div>
122+
</td>
123+
<td>
124+
<ul style="margin: 0; padding: 0"><b>Choices:</b>
125+
<li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
126+
<li>yes</li>
127+
</ul>
128+
</td>
129+
<td>
130+
<div>Whether to deploy the switch configuration.</div>
131+
</td>
132+
</tr>
133+
<tr>
134+
<td class="elbow-placeholder"></td>
135+
<td class="elbow-placeholder"></td>
136+
<td colspan="1">
137+
<div class="ansibleOptionAnchor" id="parameter-"></div>
138+
<b>ip_address</b>
139+
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
140+
<div style="font-size: small">
141+
<span style="color: purple">string</span>
142+
/ <span style="color: red">required</span>
143+
</div>
144+
</td>
145+
<td>
146+
</td>
147+
<td>
148+
<div>The IP address of the switch.</div>
149+
</td>
150+
</tr>
151+
<tr>
152+
<td class="elbow-placeholder"></td>
153+
<td class="elbow-placeholder"></td>
154+
<td colspan="1">
155+
<div class="ansibleOptionAnchor" id="parameter-"></div>
156+
<b>mode</b>
157+
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
158+
<div style="font-size: small">
159+
<span style="color: purple">string</span>
160+
</div>
161+
</td>
162+
<td>
163+
<ul style="margin: 0; padding: 0"><b>Choices:</b>
164+
<li>maintenance</li>
165+
<li><div style="color: blue"><b>normal</b>&nbsp;&larr;</div></li>
166+
</ul>
167+
</td>
168+
<td>
169+
<div>Enable maintenance or normal mode for the switch.</div>
170+
</td>
171+
</tr>
172+
<tr>
173+
<td class="elbow-placeholder"></td>
174+
<td class="elbow-placeholder"></td>
175+
<td colspan="1">
176+
<div class="ansibleOptionAnchor" id="parameter-"></div>
177+
<b>wait_for_mode_change</b>
178+
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
179+
<div style="font-size: small">
180+
<span style="color: purple">boolean</span>
181+
</div>
182+
</td>
183+
<td>
184+
<ul style="margin: 0; padding: 0"><b>Choices:</b>
185+
<li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
186+
<li>yes</li>
187+
</ul>
188+
</td>
189+
<td>
190+
<div>If deploy is enabled, whether to wait for NDFC to push the change to the switch. Ignored if deploy is not enabled.</div>
191+
</td>
192+
</tr>
193+
194+
<tr>
195+
<td class="elbow-placeholder"></td>
196+
<td colspan="2">
197+
<div class="ansibleOptionAnchor" id="parameter-"></div>
198+
<b>wait_for_mode_change</b>
199+
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
200+
<div style="font-size: small">
201+
<span style="color: purple">boolean</span>
202+
</div>
203+
</td>
204+
<td>
205+
<ul style="margin: 0; padding: 0"><b>Choices:</b>
206+
<li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
207+
<li>yes</li>
208+
</ul>
209+
</td>
210+
<td>
211+
<div>If deploy is enabled, whether to wait for NDFC to push the change to the switch. Ignored if deploy is not enabled.</div>
212+
</td>
213+
</tr>
214+
215+
<tr>
216+
<td colspan="3">
217+
<div class="ansibleOptionAnchor" id="parameter-"></div>
218+
<b>state</b>
219+
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
220+
<div style="font-size: small">
221+
<span style="color: purple">string</span>
222+
</div>
223+
</td>
224+
<td>
225+
<ul style="margin: 0; padding: 0"><b>Choices:</b>
226+
<li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
227+
<li>query</li>
228+
</ul>
229+
</td>
230+
<td>
231+
<div>The state of the feature or object after module completion</div>
232+
</td>
233+
</tr>
234+
</table>
235+
<br/>
236+
237+
238+
239+
240+
Examples
241+
--------
242+
243+
.. code-block:: yaml
244+
245+
# Enable maintenance mode on all switches.
246+
# Do not deploy the configuration on any switch.
247+
248+
- name: Configure switch mode
249+
cisco.dcnm.dcnm_maintenance_mode:
250+
state: merged
251+
config:
252+
deploy: true
253+
wait_for_mode_change: true
254+
mode: maintenance
255+
switches:
256+
- ip_address: 192.168.1.2
257+
- ip_address: 192.160.1.3
258+
- ip_address: 192.160.1.4
259+
register: result
260+
- debug:
261+
var: result
262+
263+
# Enable maintenance mode on two switches.
264+
# Enable normal mode on one switch.
265+
# Deploy the configuration on one switch.
266+
267+
- name: Configure switch mode
268+
cisco.dcnm.dcnm_maintenance_mode:
269+
state: merged
270+
config:
271+
deploy: false
272+
mode: maintenance
273+
switches:
274+
- ip_address: 192.168.1.2
275+
mode: normal
276+
- ip_address: 192.160.1.3
277+
deploy: true
278+
wait_for_mode_change: true
279+
- ip_address: 192.160.1.4
280+
register: result
281+
- debug:
282+
var: result
283+
284+
285+
286+
287+
Status
288+
------
289+
290+
291+
Authors
292+
~~~~~~~
293+
294+
- Allen Robel (@quantumonion)

playbooks/roles/dcnm_fabric/dcnm_tests.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,20 @@
2222
# Uncomment ONE of the following testcases
2323
# testcase: dcnm_fabric_deleted_basic
2424
# testcase: dcnm_fabric_deleted_basic_ipfm
25+
# testcase: dcnm_fabric_deleted_basic_isn
2526
# testcase: dcnm_fabric_deleted_basic_lan_classic
2627
# testcase: dcnm_fabric_deleted_basic_msd
2728
# testcase: dcnm_fabric_deleted_basic_vxlan
2829
# testcase: dcnm_fabric_merged_basic
2930
# testcase: dcnm_fabric_merged_basic_ipfm
31+
# testcase: dcnm_fabric_merged_basic_isn
3032
# testcase: dcnm_fabric_merged_save_deploy
3133
# testcase: dcnm_fabric_merged_save_deploy_ipfm
3234
# testcase: dcnm_fabric_replaced_basic
35+
# testcase: dcnm_fabric_replaced_basic_ipfm
36+
# testcase: dcnm_fabric_replaced_basic_isn
3337
# testcase: dcnm_fabric_replaced_basic_vxlan
3438
# testcase: dcnm_fabric_replaced_basic_vxlan_site_id
35-
# testcase: dcnm_fabric_replaced_basic_ipfm
3639
# testcase: dcnm_fabric_replaced_save_deploy
3740
# testcase: dcnm_fabric_replaced_save_deploy_ipfm
3841
# testcase: dcnm_fabric_query_basic.yaml
@@ -44,6 +47,8 @@
4447
fabric_type_3: LAN_CLASSIC
4548
fabric_name_4: IPFM_Fabric
4649
fabric_type_4: IPFM
50+
fabric_name_5: ISN_Fabric
51+
fabric_type_5: ISN
4752
leaf_1: 172.22.150.103
4853
leaf_2: 172.22.150.104
4954
nxos_username: admin

0 commit comments

Comments
 (0)