Debian Codegraph @

ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_fc_interfaces_module.rst

raw
1 .. _cisco.nxos.nxos_fc_interfaces_module:
2
3
4 *****************************
5 cisco.nxos.nxos_fc_interfaces
6 *****************************
7
8 **Fc Interfaces resource module**
9
10
11 Version added: 5.2.0
12
13 .. contents::
14 :local:
15 :depth: 1
16
17
18 Synopsis
19 --------
20 - This module manages the interface attributes of NX-OS fc interfaces.
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="2">Parameter</th>
33 <th>Choices/<font color="blue">Defaults</font></th>
34 <th width="100%">Comments</th>
35 </tr>
36 <tr>
37 <td colspan="2">
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">list</span>
43 / <span style="color: purple">elements=dictionary</span>
44 </div>
45 </td>
46 <td>
47 </td>
48 <td>
49 <div>A dictionary of interface options</div>
50 </td>
51 </tr>
52 <tr>
53 <td class="elbow-placeholder"></td>
54 <td colspan="1">
55 <div class="ansibleOptionAnchor" id="parameter-"></div>
56 <b>analytics</b>
57 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
58 <div style="font-size: small">
59 <span style="color: purple">string</span>
60 </div>
61 </td>
62 <td>
63 <ul style="margin: 0; padding: 0"><b>Choices:</b>
64 <li>fc-scsi</li>
65 <li>fc-nvme</li>
66 <li>fc-all</li>
67 </ul>
68 </td>
69 <td>
70 <div>Analytics type on the fc interface</div>
71 </td>
72 </tr>
73 <tr>
74 <td class="elbow-placeholder"></td>
75 <td colspan="1">
76 <div class="ansibleOptionAnchor" id="parameter-"></div>
77 <b>description</b>
78 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
79 <div style="font-size: small">
80 <span style="color: purple">string</span>
81 </div>
82 </td>
83 <td>
84 </td>
85 <td>
86 <div>Interface description.</div>
87 </td>
88 </tr>
89 <tr>
90 <td class="elbow-placeholder"></td>
91 <td colspan="1">
92 <div class="ansibleOptionAnchor" id="parameter-"></div>
93 <b>enabled</b>
94 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
95 <div style="font-size: small">
96 <span style="color: purple">boolean</span>
97 </div>
98 </td>
99 <td>
100 <ul style="margin: 0; padding: 0"><b>Choices:</b>
101 <li>no</li>
102 <li>yes</li>
103 </ul>
104 </td>
105 <td>
106 <div>Administrative state of the interface. Set the value to <code>true</code> to administratively enable the interface or <code>true</code> to disable it</div>
107 </td>
108 </tr>
109 <tr>
110 <td class="elbow-placeholder"></td>
111 <td colspan="1">
112 <div class="ansibleOptionAnchor" id="parameter-"></div>
113 <b>mode</b>
114 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
115 <div style="font-size: small">
116 <span style="color: purple">string</span>
117 </div>
118 </td>
119 <td>
120 <ul style="margin: 0; padding: 0"><b>Choices:</b>
121 <li>auto</li>
122 <li>E</li>
123 <li>F</li>
124 <li>Fx</li>
125 <li>NP</li>
126 <li>SD</li>
127 </ul>
128 </td>
129 <td>
130 <div>Port mode of the fc interface</div>
131 </td>
132 </tr>
133 <tr>
134 <td class="elbow-placeholder"></td>
135 <td colspan="1">
136 <div class="ansibleOptionAnchor" id="parameter-"></div>
137 <b>name</b>
138 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
139 <div style="font-size: small">
140 <span style="color: purple">string</span>
141 / <span style="color: red">required</span>
142 </div>
143 </td>
144 <td>
145 </td>
146 <td>
147 <div>Full name of interface, e.g. fc1/1, fc18/48</div>
148 </td>
149 </tr>
150 <tr>
151 <td class="elbow-placeholder"></td>
152 <td colspan="1">
153 <div class="ansibleOptionAnchor" id="parameter-"></div>
154 <b>speed</b>
155 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
156 <div style="font-size: small">
157 <span style="color: purple">string</span>
158 </div>
159 </td>
160 <td>
161 <ul style="margin: 0; padding: 0"><b>Choices:</b>
162 <li>auto</li>
163 <li>1000</li>
164 <li>2000</li>
165 <li>4000</li>
166 <li>8000</li>
167 <li>10000</li>
168 <li>16000</li>
169 <li>32000</li>
170 <li>64000</li>
171 <li>auto max 2000</li>
172 <li>auto max 4000</li>
173 <li>auto max 8000</li>
174 <li>auto max 16000</li>
175 <li>auto max 32000</li>
176 <li>auto max 64000</li>
177 </ul>
178 </td>
179 <td>
180 <div>Interface link speed.</div>
181 </td>
182 </tr>
183 <tr>
184 <td class="elbow-placeholder"></td>
185 <td colspan="1">
186 <div class="ansibleOptionAnchor" id="parameter-"></div>
187 <b>trunk_mode</b>
188 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
189 <div style="font-size: small">
190 <span style="color: purple">string</span>
191 </div>
192 </td>
193 <td>
194 <ul style="margin: 0; padding: 0"><b>Choices:</b>
195 <li>auto</li>
196 <li>on</li>
197 <li>off</li>
198 </ul>
199 </td>
200 <td>
201 <div>Trunk mode of the fc interface</div>
202 </td>
203 </tr>
204
205 <tr>
206 <td colspan="2">
207 <div class="ansibleOptionAnchor" id="parameter-"></div>
208 <b>running_config</b>
209 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
210 <div style="font-size: small">
211 <span style="color: purple">string</span>
212 </div>
213 </td>
214 <td>
215 </td>
216 <td>
217 <div>This option is used only with state <em>parsed</em>.</div>
218 <div>The value of this option should be the output received from the NX-OS device by executing the command <b>show running-config interface</b></div>
219 <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
220 </td>
221 </tr>
222 <tr>
223 <td colspan="2">
224 <div class="ansibleOptionAnchor" id="parameter-"></div>
225 <b>state</b>
226 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
227 <div style="font-size: small">
228 <span style="color: purple">string</span>
229 </div>
230 </td>
231 <td>
232 <ul style="margin: 0; padding: 0"><b>Choices:</b>
233 <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
234 <li>replaced</li>
235 <li>overridden</li>
236 <li>deleted</li>
237 <li>gathered</li>
238 <li>rendered</li>
239 <li>parsed</li>
240 </ul>
241 </td>
242 <td>
243 <div>The state of the configuration after module completion</div>
244 </td>
245 </tr>
246 </table>
247 <br/>
248
249
250 Notes
251 -----
252
253 .. note::
254 - Tested against NXOS 9.3(2) on Cisco MDS Switches
255
256
257
258 Examples
259 --------
260
261 .. code-block:: yaml
262
263 # Using merged
264
265 # Before state:
266 # -------------
267 #
268 # switch# show running-config interface all
269 # interface fc18/10
270 # analytics type fc-nvme
271 # switchport speed auto max 16000
272 # switchport mode auto
273 # switchport description $
274 # switchport trunk mode on
275 # shutdown
276
277 - name: Merge provided configuration with device configuration
278 cisco.nxos.nxos_fc_interfaces:
279 config:
280 - name: fc18/10
281 analytics: fc-scsi
282 state: merged
283
284 # Task Output
285 # -----------
286 #
287 # before:
288 # - name: fc18/10
289 # speed: auto max 16000
290 # mode: auto
291 # trunk_mode: on
292 # enabled: true
293 # description: $
294 # analytics: fc-nvme
295 # commands:
296 # - interface fc18/10
297 # - analytics type fc-scsi
298 # after:
299 # - name: fc18/10
300 # speed: auto max 16000
301 # mode: auto
302 # trunk_mode: on
303 # enabled: true
304 # description: $
305 # analytics: fc-all
306
307 # After state:
308 # ------------
309 #
310 # switch# show running-config interface all
311 # interface fc18/10
312 # analytics type fc-scsi
313 # analytics type fc-nvme
314 # switchport speed auto max 16000
315 # switchport mode auto
316 # switchport description $
317 # switchport trunk mode on
318 # shutdown
319
320 # Using replaced
321
322 # Before state:
323 # -------------
324 #
325 # switch# show running-config interface all
326 # interface fc18/12
327 # analytics type fc-scsi
328 # analytics type fc-nvme
329 # switchport speed auto max 64000
330 # switchport mode auto
331 # switchport description 1
332 # switchport trunk mode on
333 # no shutdown
334
335 - name: Replaces device configuration of listed interfaces with provided configuration
336 cisco.nxos.nxos_fc_interfaces:
337 config:
338 - name: fc18/12
339 speed: auto max 64000
340 mode: auto
341 trunk_mode: "on"
342 enabled: true
343 description: 1
344 analytics: fc-scsi
345 state: replaced
346
347 # Task Output
348 # -----------
349 #
350 # before:
351 # - name: fc18/12
352 # speed: auto max 64000
353 # mode: auto
354 # trunk_mode: on
355 # enabled: true
356 # description: 1
357 # analytics: fc-all
358 # commands:
359 # - interface fc18/12
360 # - no analytics type fc-all
361 # - analytics type fc-scsi
362 # after:
363 # - name: fc18/12
364 # speed: auto max 64000
365 # mode: auto
366 # trunk_mode: on
367 # enabled: true
368 # description: 1
369 # analytics: fc-scsi
370
371 # After state:
372 # ------------
373 #
374 # switch# show running-config interface all
375 # interface fc18/12
376 # analytics type fc-scsi
377 # switchport speed auto max 64000
378 # switchport mode auto
379 # switchport description 1
380 # switchport trunk mode on
381 # no shutdown
382
383
384 # Using deleted
385
386 # Before state:
387 # -------------
388 #
389 # switch# show running-config interface all
390 # interface fc1/2
391 # switchport speed 1000
392 # switchport mode E
393 # no switchport description
394 # switchport trunk mode off
395 # no shutdown
396
397 - name: Delete or return interface parameters to default settings
398 cisco.nxos.nxos_fc_interfaces:
399 config:
400 - name: fc1/2
401 state: deleted
402
403 # Task Output
404 # -----------
405 #
406 # before:
407 # - name: fc1/2
408 # speed: 1000
409 # mode: E
410 # trunk_mode: off
411 # enabled: true
412 # commands:
413 # - interface fc1/2
414 # - no switchport speed 1000
415 # - no switchport mode E
416 # - switchport trunk mode on
417 # - shutdown
418 # after:
419 # - name: fc1/2
420 # speed: auto
421 # mode: auto
422 # trunk_mode: on
423 # enabled: true
424
425 # After state:
426 # ------------
427 #
428 # switch# show running-config interface all
429 # interface fc1/2
430 # switchport speed auto
431 # switchport mode auto
432 # no switchport description
433 # switchport trunk mode on
434 # shutdown
435
436 # Using overridden
437
438 # Before state:
439 # -------------
440 #
441 # switch# show running-config interface all
442 # interface fc18/12
443 # analytics type fc-scsi
444 # analytics type fc-nvme
445 # switchport speed auto max 64000
446 # switchport mode auto
447 # switchport description 1
448 # switchport trunk mode on
449 # no shutdown
450 # interface fc18/13
451 # analytics type fc-scsi
452 # analytics type fc-nvme
453 # switchport speed auto max 64000
454 # switchport mode auto
455 # switchport description 1
456 # switchport trunk mode on
457 # no shutdown
458
459 - name: Replaces device configuration of listed interfaces with provided configuration
460 cisco.nxos.nxos_fc_interfaces:
461 config:
462 - name: fc18/12
463 speed: auto max 64000
464 mode: auto
465 trunk_mode: "on"
466 enabled: true
467 description: 1
468 analytics: fc-scsi
469 state: overridden
470
471 # Task Output
472 # -----------
473 #
474 # before:
475 # - name: fc18/12
476 # speed: auto max 64000
477 # mode: auto
478 # trunk_mode: on
479 # enabled: true
480 # description: 1
481 # analytics: fc-all
482 # - name: fc18/13
483 # speed: auto max 64000
484 # mode: auto
485 # trunk_mode: on
486 # enabled: true
487 # description: 1
488 # analytics: fc-all
489 # commands:
490 # - interface fc18/12
491 # no analytics type fc-all
492 # analytics type fc-scsi
493 # - interface fc18/13
494 # no switchport description
495 # no switchport speed auto max 64000
496 # no switchport mode auto
497 # switchport trunk mode on
498 # shutdown
499 # after:
500 # - name: fc18/12
501 # speed: auto max 64000
502 # mode: auto
503 # trunk_mode: on
504 # enabled: true
505 # description: 1
506 # analytics: fc-scsi
507 # - name: fc18/13
508 # speed: auto max 64000
509 # mode: auto
510 # trunk_mode: on
511 # enabled: true
512
513 # After state:
514 # ------------
515 #
516 # switch# show running-config interface all
517 # interface fc18/12
518 # analytics type fc-scsi
519 # switchport speed auto max 64000
520 # switchport mode auto
521 # switchport description 1
522 # switchport trunk mode on
523 # no shutdown
524 # interface fc18/13
525 # switchport mode auto
526 # switchport trunk mode on
527 # shutdown
528
529 # Using rendered
530
531 - name: Use rendered state to convert task input to device specific commands
532 cisco.nxos.nxos_fc_interfaces:
533 config:
534 - name: fc1/1
535 speed: auto
536 mode: auto
537 trunk_mode: "on"
538 enabled: true
539 description: This is a sample line
540 - name: fc1/2
541 speed: 1000
542 mode: E
543 trunk_mode: "off"
544 enabled: true
545 state: rendered
546
547 # Task Output
548 # -----------
549 #
550 # rendered:
551 # interface fc1/1
552 # switchport speed auto
553 # switchport mode auto
554 # switchport description This is a sample line
555 # switchport trunk mode on
556 # no shutdown
557 #
558 # interface fc1/2
559 # switchport speed 1000
560 # switchport mode E
561 # no switchport description
562 # switchport trunk mode off
563 # no shutdown
564
565 # Using parsed
566
567 # parsed.cfg
568 # ------------
569 #
570 # interface fc1/1
571 # switchport speed auto
572 # switchport mode auto
573 # switchport description This is a sample line
574 # switchport trunk mode on
575 # no shutdown
576 #
577 # interface fc1/2
578 # switchport speed 1000
579 # switchport mode E
580 # no switchport description
581 # switchport trunk mode off
582 # no shutdown
583
584 - name: Use parsed state to convert externally supplied config to structured format
585 cisco.nxos.nxos_fc_interfaces:
586 running_config: "{{ lookup('file', 'parsed.cfg') }}"
587 state: parsed
588
589 # Task output
590 # -----------
591 #
592 # parsed:
593 # - name: fc1/1
594 # speed: auto
595 # mode: auto
596 # trunk_mode: on
597 # enabled: true
598 # description: This is a sample line
599 # - name: fc1/2
600 # speed: 1000
601 # mode: E
602 # trunk_mode: off
603 # enabled: true
604
605 # Using gathered
606
607 # Before state:
608 # -------------
609 #
610 # switch# show running-config | section interface
611 # interface fc1/1
612 # switchport speed auto
613 # switchport mode auto
614 # switchport description This is a sample line
615 # switchport trunk mode on
616 # no shutdown
617 #
618 # interface fc1/2
619 # switchport speed 1000
620 # switchport mode E
621 # no switchport description
622 # switchport trunk mode off
623 # no shutdown
624 #
625 - name: Gather interfaces facts from the device using nxos_fc_interfaces
626 cisco.nxos.nxos_fc_interfaces:
627 state: gathered
628 #
629 # Task output
630 # -----------
631 #
632 # - name: fc1/1
633 # speed: auto
634 # mode: auto
635 # trunk_mode: on
636 # enabled: true
637 # description: This is a sample line
638 # - name: fc1/2
639 # speed: 1000
640 # mode: E
641 # trunk_mode: off
642 # enabled: true
643
644
645
646 Return Values
647 -------------
648 Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
649
650 .. raw:: html
651
652 <table border=0 cellpadding=0 class="documentation-table">
653 <tr>
654 <th colspan="1">Key</th>
655 <th>Returned</th>
656 <th width="100%">Description</th>
657 </tr>
658 <tr>
659 <td colspan="1">
660 <div class="ansibleOptionAnchor" id="return-"></div>
661 <b>after</b>
662 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
663 <div style="font-size: small">
664 <span style="color: purple">dictionary</span>
665 </div>
666 </td>
667 <td>when changed</td>
668 <td>
669 <div>The resulting configuration after module execution.</div>
670 <br/>
671 <div style="font-size: smaller"><b>Sample:</b></div>
672 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
673 </td>
674 </tr>
675 <tr>
676 <td colspan="1">
677 <div class="ansibleOptionAnchor" id="return-"></div>
678 <b>before</b>
679 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
680 <div style="font-size: small">
681 <span style="color: purple">dictionary</span>
682 </div>
683 </td>
684 <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td>
685 <td>
686 <div>The configuration prior to the module execution.</div>
687 <br/>
688 <div style="font-size: smaller"><b>Sample:</b></div>
689 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
690 </td>
691 </tr>
692 <tr>
693 <td colspan="1">
694 <div class="ansibleOptionAnchor" id="return-"></div>
695 <b>commands</b>
696 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
697 <div style="font-size: small">
698 <span style="color: purple">list</span>
699 </div>
700 </td>
701 <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td>
702 <td>
703 <div>The set of commands pushed to the remote device.</div>
704 <br/>
705 <div style="font-size: smaller"><b>Sample:</b></div>
706 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface fc1/1&#x27;, &#x27;description sample description&#x27;, &#x27;shutdown&#x27;]</div>
707 </td>
708 </tr>
709 <tr>
710 <td colspan="1">
711 <div class="ansibleOptionAnchor" id="return-"></div>
712 <b>gathered</b>
713 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
714 <div style="font-size: small">
715 <span style="color: purple">list</span>
716 </div>
717 </td>
718 <td>when <em>state</em> is <code>gathered</code></td>
719 <td>
720 <div>Facts about the network resource gathered from the remote device as structured data.</div>
721 <br/>
722 <div style="font-size: smaller"><b>Sample:</b></div>
723 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
724 </td>
725 </tr>
726 <tr>
727 <td colspan="1">
728 <div class="ansibleOptionAnchor" id="return-"></div>
729 <b>parsed</b>
730 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
731 <div style="font-size: small">
732 <span style="color: purple">list</span>
733 </div>
734 </td>
735 <td>when <em>state</em> is <code>parsed</code></td>
736 <td>
737 <div>The device native config provided in <em>running_config</em> option parsed into structured data as per module argspec.</div>
738 <br/>
739 <div style="font-size: smaller"><b>Sample:</b></div>
740 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
741 </td>
742 </tr>
743 <tr>
744 <td colspan="1">
745 <div class="ansibleOptionAnchor" id="return-"></div>
746 <b>rendered</b>
747 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
748 <div style="font-size: small">
749 <span style="color: purple">list</span>
750 </div>
751 </td>
752 <td>when <em>state</em> is <code>rendered</code></td>
753 <td>
754 <div>The provided configuration in the task rendered in device-native format (offline).</div>
755 <br/>
756 <div style="font-size: smaller"><b>Sample:</b></div>
757 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface fc1/1&#x27;, &#x27;description sample description&#x27;, &#x27;shutdown&#x27;]</div>
758 </td>
759 </tr>
760 </table>
761 <br/><br/>
762
763
764 Status
765 ------
766
767
768 Authors
769 ~~~~~~~
770
771 - Suhas Bharadwaj (@srbharadwaj)