Debian Codegraph @

ansible_collections/dellemc/enterprise_sonic/plugins/modules/sonic_interfaces.py

raw symbols SCIP
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
3 # © Copyright 2025 Dell Inc. or its subsidiaries. All Rights Reserved.
4 # GNU General Public License v3.0+
5 # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
6
7 """
8 The module file for sonic_interfaces
9 """
10
11 from __future__ import absolute_import, division, print_function
12 __metaclass__ = type
13
14 DOCUMENTATION = """
15 ---
16 module: sonic_interfaces
17 version_added: 1.0.0
18 notes:
19 - Tested against Enterprise SONiC Distribution by Dell Technologies.
20 - Supports C(check_mode).
21 short_description: Configure Interface attributes on interfaces such as, Eth, LAG, VLAN, and loopback.
22 (create a loopback interface if it does not exist.)
23 description: Configure Interface attributes such as, MTU, admin statu, and so on, on interfaces
24 such as, Eth, LAG, VLAN, and loopback. (create a loopback interface if it does not exist.)
25 author: Niraimadaiselvam M(@niraimadaiselvamm)
26 options:
27 config:
28 description: A list of interface configurations.
29 type: list
30 elements: dict
31 suboptions:
32 name:
33 type: str
34 description: The name of the interface, for example, 'Eth1/15'.
35 required: true
36 description:
37 type: str
38 description:
39 - Description about the interface.
40 enabled:
41 description:
42 - Administrative state of the interface.
43 type: bool
44 mtu:
45 description:
46 - MTU of the interface.
47 - Not applicable for Loopback interfaces.
48 type: int
49 speed:
50 description:
51 - Interface speed.
52 - Applicable only for Ethernet interfaces.
53 - Supported speeds are dependent on the type of switch.
54 type: str
55 choices:
56 - SPEED_10MB
57 - SPEED_100MB
58 - SPEED_1GB
59 - SPEED_2500MB
60 - SPEED_5GB
61 - SPEED_10GB
62 - SPEED_20GB
63 - SPEED_25GB
64 - SPEED_40GB
65 - SPEED_50GB
66 - SPEED_100GB
67 - SPEED_200GB
68 - SPEED_400GB
69 - SPEED_800GB
70 auto_negotiate:
71 description:
72 - auto-negotiate transmission parameters with peer interface.
73 - Applicable only for Ethernet interfaces.
74 type: bool
75 advertised_speed:
76 description:
77 - Advertised speeds of the interface.
78 - Applicable only for Ethernet interfaces.
79 - Supported speeds are dependent on the type of switch.
80 - Speeds may be 10, 100, 1000, 2500, 5000, 10000, 20000, 25000, 40000, 50000, 100000, 400000 or 800000.
81 type: list
82 elements: str
83 fec:
84 description:
85 - Interface FEC (Forward Error Correction).
86 - Applicable only for Ethernet interfaces.
87 type: str
88 choices:
89 - FEC_RS
90 - FEC_FC
91 - FEC_DISABLED
92 - FEC_DEFAULT
93 - FEC_AUTO
94 unreliable_los:
95 description: Monitoring type to be used for generating a loss of service alarm.
96 type: str
97 choices:
98 - UNRELIABLE_LOS_MODE_ON
99 - UNRELIABLE_LOS_MODE_OFF
100 - UNRELIABLE_LOS_MODE_AUTO
101 autoneg_mode:
102 description:
103 - BAM/MSA configuration for autonegotiation
104 - Applicable only for Ethernet interfaces.
105 - auto_negotiate should be set to true to configure autoneg_mode
106 - with auto_negotiate set to true , autoneg_mode defaults to BAM
107 version_added: '4.0.0'
108 type: str
109 choices:
110 - AUTONEG_MODE_BAM
111 - AUTONEG_MODE_MSA
112 state:
113 description:
114 - The state the configuration should be left in.
115 type: str
116 choices:
117 - merged
118 - replaced
119 - overridden
120 - deleted
121 default: merged
122 """
123
124 EXAMPLES = """
125 # Using "deleted" state
126 #
127 # Before state:
128 # -------------
129 #
130 # show interface status | no-more
131 # ------------------------------------------------------------------------------------------
132 # Name Description Admin Oper AutoNeg Speed MTU
133 # ------------------------------------------------------------------------------------------
134 # Ethernet0 - up 100000 9100
135 # Ethernet4 - up 100000 9100
136 # Ethernet8 Ethernet-8 down 100000 9100
137 # Ethernet12 Ethernet-12 down on - 5000
138 # Ethernet16 - down 40000 9100
139 #
140 # show running-configuration interface Ethernet 8
141 # !
142 # interface Ethernet8
143 # mtu 9100
144 # speed 100000
145 # fec AUTO
146 # shutdown
147 #
148 - name: Configure interfaces
149 sonic_interfaces:
150 config:
151 - name: Ethernet8
152 - name: Ethernet12
153 - name: Ethernet16
154 state: deleted
155 #
156 # After state:
157 # -------------
158 #
159 # show interface status | no-more
160 # ------------------------------------------------------------------------------------------
161 # Name Description Admin Oper AutoNeg Speed MTU
162 # ------------------------------------------------------------------------------------------
163 # Ethernet0 - up 100000 9100
164 # Ethernet4 - up 100000 9100
165 # Ethernet8 - up 100000 9100
166 # Ethernet12 - up 100000 9100
167 # Ethernet16 - up 100000 9100
168 #
169 # show running-configuration interface Ethernet 8
170 # !
171 # interface Ethernet8
172 # mtu 9100
173 # speed 100000
174 # shutdown
175 #
176 # Using "deleted" state
177 #
178 # Before state:
179 # -------------
180 #
181 # show interface status | no-more
182 # ------------------------------------------------------------------------------------------
183 # Name Description Admin Oper AutoNeg Speed MTU
184 # ------------------------------------------------------------------------------------------
185 # Ethernet0 - up 100000 9100
186 # Ethernet4 - up 100000 9100
187 # Ethernet8 - down 100000 9100
188 # Ethernet12 - down 1000 9100
189 # Ethernet16 - down 100000 9100
190 #
191 - name: Configure interfaces
192 sonic_interfaces:
193 config:
194
195 state: deleted
196 #
197 # After state:
198 # -------------
199 #
200 # show interface status | no-more
201 # ------------------------------------------------------------------------------------------
202 # Name Description Admin Oper AutoNeg Speed MTU
203 # ------------------------------------------------------------------------------------------
204 # Ethernet0 - up 100000 9100
205 # Ethernet4 - up 100000 9100
206 # Ethernet8 - up 100000 9100
207 # Ethernet12 - up 100000 9100
208 # Ethernet16 - up 100000 9100
209 #
210 #
211 #
212 # Using "merged" state
213 #
214 # Before state:
215 # -------------
216 #
217 # show interface status | no-more
218 # ------------------------------------------------------------------------------------------
219 # Name Description Admin Oper AutoNeg Speed MTU
220 # ------------------------------------------------------------------------------------------
221 # Ethernet0 - up 100000 9100
222 # Ethernet4 - up 100000 9100
223 # Ethernet8 - down 100000 9100
224 # Ethernet12 - down 100000 9100
225 # Ethernet16 - down 100000 9100
226 #
227 # show running-configuration interface Ethernet 8
228 # !
229 # interface Ethernet8
230 # mtu 9100
231 # speed 100000
232 # shutdown
233 #
234 - name: Configure interfaces
235 sonic_interfaces:
236 config:
237 - name: Ethernet8
238 fec: FEC_AUTO
239 - name: Ethernet12
240 description: 'Ethernet Twelve'
241 auto_negotiate: true
242 - name: Ethernet16
243 description: 'Ethernet Sixteen'
244 enabled: true
245 mtu: 3500
246 speed: SPEED_40GB
247 state: merged
248 #
249 # After state:
250 # ------------
251 #
252 # show interface status | no-more
253 # ------------------------------------------------------------------------------------------
254 # Name Description Admin Oper AutoNeg Speed MTU
255 # ------------------------------------------------------------------------------------------
256 # Ethernet0 - up 100000 9100
257 # Ethernet4 - up 100000 9100
258 # Ethernet8 - down 100000 9100
259 # Ethernet12 Ethernet Twelve down on 100000 9100
260 # Ethernet16 Ethernet Sixteen up 40000 3500
261 #
262 # show running-configuration interface Ethernet 8
263 # !
264 # interface Ethernet8
265 # mtu 9100
266 # speed 100000
267 # fec AUTO
268 # shutdown
269 #
270 # Using "overridden" state
271 #
272 # Before state:
273 # -------------
274 #
275 # show interface status | no-more
276 # ------------------------------------------------------------------------------------------
277 # Name Description Admin Oper AutoNeg Speed MTU
278 # ------------------------------------------------------------------------------------------
279 # Ethernet0 E0 up 100000 9100
280 # Ethernet4 E4 up 100000 9100
281 # Ethernet8 E8 down 100000 9100
282 # Ethernet12 - down 1000 9100
283 # Ethernet16 - down 100000 9100
284 #
285 # show running-configuration interface Ethernet 8
286 # !
287 # interface Ethernet8
288 # mtu 9100
289 # speed 100000
290 # shutdown
291 #
292 - name: Configure interfaces
293 sonic_interfaces:
294 config:
295 - name: Ethernet8
296 fec: FEC_AUTO
297 - name: Ethernet12
298 description: 'Ethernet Twelve'
299 mtu: 3500
300 enabled: true
301 auto_negotiate: true
302 - name: Ethernet16
303 description: 'Ethernet Sixteen'
304 mtu: 3000
305 enabled: false
306 speed: SPEED_40GB
307 state: overridden
308 #
309 # After state:
310 # ------------
311 #
312 # show interface status | no-more
313 # ------------------------------------------------------------------------------------------
314 # Name Description Admin Oper AutoNeg Speed MTU
315 # ------------------------------------------------------------------------------------------
316 # Ethernet0 - down 100000 9100
317 # Ethernet4 - down 100000 9100
318 # Ethernet8 - down 100000 9100
319 # Ethernet12 Ethernet Twelve up on 100000 3500
320 # Ethernet16 Ethernet Sixteen down 40000 3000
321 #
322 # show running-configuration interface Ethernet 8
323 # !
324 # interface Ethernet8
325 # mtu 9100
326 # speed 100000
327 # fec AUTO
328 # no shutdown
329 #
330 # Using "replaced" state
331 #
332 # Before state:
333 # -------------
334 #
335 # show interface status | no-more
336 # ------------------------------------------------------------------------------------------
337 # Name Description Admin Oper AutoNeg Speed MTU
338 # ------------------------------------------------------------------------------------------
339 # Ethernet0 - up 100000 9100
340 # Ethernet4 - up 100000 9100
341 # Ethernet8 - down on 100000 9100
342 # Ethernet12 - down 1000 9100
343 # Ethernet16 - down 100000 9100
344 #
345 # show running-configuration interface Ethernet 8
346 # !
347 # interface Ethernet8
348 # mtu 9100
349 # speed auto 40000
350 # shutdown
351 #
352 - name: Configure interfaces
353 sonic_interfaces:
354 config:
355 - name: Ethernet8
356 auto_negotiate: true
357 advertised_speed:
358 - "100000"
359 - name: Ethernet12
360 description: 'Ethernet Twelve'
361 mtu: 3500
362 enabled: true
363 auto_negotiate: true
364 - name: Ethernet16
365 description: 'Ethernet Sixteen'
366 mtu: 3000
367 enabled: false
368 speed: SPEED_40GB
369 state: replaced
370 #
371 # After state:
372 # ------------
373 #
374 # show interface status | no-more
375 # ------------------------------------------------------------------------------------------
376 # Name Description Admin Oper AutoNeg Speed MTU
377 # ------------------------------------------------------------------------------------------
378 # Ethernet0 - up 100000 9100
379 # Ethernet4 - up 100000 9100
380 # Ethernet8 - down on 100000 9100
381 # Ethernet12 Ethernet Twelve up on 100000 3500
382 # Ethernet16 Ethernet Sixteen down 40000 3000
383 #
384 # show running-configuration interface Ethernet 8
385 # !
386 # interface Ethernet8
387 # mtu 9100
388 # speed auto 100000
389 # fec AUTO
390 # shutdown
391 #
392 # Using "deleted" state for MSA/BAM config
393 #
394 # Before state:
395 # -------------
396 # show interface status
397 # --------------------------------------------------------------------------------------------------------------------------------------
398 # Name Description Oper Reason AutoNeg Speed MTU Alternate Name
399 # --------------------------------------------------------------------------------------------------------------------------------------
400 # Ethernet0 Ethernet0 down no-transceiver off 800000 9100 Eth1/1
401 # Ethernet8 Ethernet8 down no-transceiver on - 9100 Eth1/2
402 # Ethernet16 - down no-transceiver off 800000 9100 Eth1/3
403 #
404 # show running-configuration interface Ethernet 8
405 # !
406 # interface Ethernet8
407 # description Ethernet8
408 # mtu 9100
409 # speed auto MSA
410 # fec RS
411 # unreliable-los auto
412 # no shutdown
413 #
414 - name: Configure interfaces
415 sonic_interfaces:
416 config:
417 - name: Ethernet32
418 autoneg_mode: AUTONEG_MODE_MSA
419 state: deleted
420 #
421 # After State :
422 # -------------
423 # show interface status
424 # --------------------------------------------------------------------------------------------------------------------------------------
425 # Name Description Oper Reason AutoNeg Speed MTU Alternate Name
426 # --------------------------------------------------------------------------------------------------------------------------------------
427 # Ethernet0 Ethernet0 down no-transceiver off 800000 9100 Eth1/1
428 # Ethernet8 Ethernet8 down no-transceiver on - 9100 Eth1/2
429 # Ethernet16 - down no-transceiver off 800000 9100 Eth1/3
430 #
431 # show running-configuration interface Ethernet 8
432 # !
433 # interface Ethernet8
434 # description Ethernet8
435 # mtu 9100
436 # speed auto
437 # fec RS
438 # unreliable-los auto
439 # no shutdown
440 #
441 # Using "merged" state for MSA/BAM config
442 #
443 # Before state:
444 # -------------
445 # show interface status
446 # --------------------------------------------------------------------------------------------------------------------------------------
447 # Name Description Oper Reason AutoNeg Speed MTU Alternate Name
448 # --------------------------------------------------------------------------------------------------------------------------------------
449 # Ethernet0 Ethernet0 down no-transceiver off 800000 9100 Eth1/1
450 # Ethernet8 Ethernet8 down no-transceiver on - 9100 Eth1/2
451 # Ethernet16 - down no-transceiver off 800000 9100 Eth1/3
452 #
453 # show running-configuration interface Ethernet 8
454 # !
455 # interface Ethernet8
456 # description Ethernet8
457 # mtu 9100
458 # speed auto
459 # fec RS
460 # unreliable-los auto
461 # no shutdown
462 #
463 - name: Configure interfaces
464 sonic_interfaces:
465 config:
466 - name: Ethernet32
467 autoneg_mode: AUTONEG_MODE_MSA
468 state: merged
469 #
470 # After state:
471 # -------------
472 #
473 # show interface status
474 # --------------------------------------------------------------------------------------------------------------------------------------
475 # Name Description Oper Reason AutoNeg Speed MTU Alternate Name
476 # --------------------------------------------------------------------------------------------------------------------------------------
477 # Ethernet0 Ethernet0 down no-transceiver off 800000 9100 Eth1/1
478 # Ethernet8 Ethernet8 down no-transceiver on - 9100 Eth1/2
479 # Ethernet16 - down no-transceiver off 800000 9100 Eth1/3
480 #
481 # show running-configuration interface Ethernet 8
482 # !
483 # interface Ethernet8
484 # description Ethernet8
485 # mtu 9100
486 # speed auto MSA
487 # fec RS
488 # unreliable-los auto
489 # no shutdown
490 #
491 # Using "replaced" state for MSA/BAM config
492 #
493 # Before state:
494 # -------------
495 #
496 # show interface status
497 # --------------------------------------------------------------------------------------------------------------------------------------
498 # Name Description Oper Reason AutoNeg Speed MTU Alternate Name
499 # --------------------------------------------------------------------------------------------------------------------------------------
500 # Ethernet0 Ethernet0 down no-transceiver off 800000 9100 Eth1/1
501 # Ethernet8 Ethernet8 down admin-down on - 9100 Eth1/2
502 # Ethernet16 - down no-transceiver off 800000 9100 Eth1/3
503 #
504 # show running-configuration interface Ethernet 8
505 # !
506 # interface Ethernet8
507 # description Ethernet8
508 # mtu 9100
509 # speed auto MSA
510 # fec RS
511 # unreliable-los auto
512 # shutdown
513 #
514 - name: configure interface
515 sonic_interfaces:
516 config:
517 - name: Ethernet8
518 description: 'Ethernet eight'
519 state: replaced
520 #
521 # After state:
522 # -------------
523 #
524 # show interface status
525 # --------------------------------------------------------------------------------------------------------------------------------------
526 # Name Description Oper Reason AutoNeg Speed MTU Alternate Name
527 # --------------------------------------------------------------------------------------------------------------------------------------
528 # Ethernet0 Ethernet0 down no-transceiver off 800000 9100 Eth1/1
529 # Ethernet8 Ethernet eight down admin-down off 800000 9100 Eth1/2
530 # Ethernet16 - down no-transceiver off 800000 9100 Eth1/3
531 #
532 # show running-configuration interface Ethernet 8
533 # !
534 # interface Ethernet8
535 # description "Ethernet eight"
536 # mtu 9100
537 # speed 800000
538 # fec RS
539 # unreliable-los auto
540 # shutdown
541 #
542 # Using "replaced" state for MSA/BAM config
543 #
544 # Before state:
545 # -------------
546 #
547 # show interface status
548 # --------------------------------------------------------------------------------------------------------------------------------------
549 # Name Description Oper Reason AutoNeg Speed MTU Alternate Name
550 # --------------------------------------------------------------------------------------------------------------------------------------
551 # Ethernet0 Ethernet0 down no-transceiver off 800000 9100 Eth1/1
552 # Ethernet8 Ethernet8 down admin-down off 800000 9100 Eth1/2
553 #
554 # show running-configuration interface Ethernet 8
555 # !
556 # interface Ethernet8
557 # description Ethernet8
558 # mtu 9100
559 # speed 800000
560 # fec AUTO
561 # unreliable-los auto
562 # shutdown
563 #
564 - name: configure interface
565 sonic_interfaces:
566 config:
567 - name: Ethernet8
568 auto_negotiate: true
569 autoneg_mode: AUTONEG_MODE_MSA
570 state: replaced
571 #
572 # After state:
573 # -------------
574 # show interface status
575 # --------------------------------------------------------------------------------------------------------------------------------------
576 # Name Description Oper Reason AutoNeg Speed MTU Alternate Name
577 # --------------------------------------------------------------------------------------------------------------------------------------
578 # Ethernet0 Ethernet0 down no-transceiver off 800000 9100 Eth1/1
579 # Ethernet8 - down admin-down on - 9100 Eth1/2
580 # Ethernet16 - down no-transceiver off 800000 9100 Eth1/3
581 #
582 # show running-configuration interface Ethernet 8
583 # !
584 # interface Ethernet8
585 # mtu 9100
586 # speed auto MSA
587 # fec RS
588 # unreliable-los auto
589 # shutdown
590 #
591 # Using "overridden" state for MSA/BAM config
592 #
593 # Before state:
594 # -------------
595 # show interface status
596 # --------------------------------------------------------------------------------------------------------------------------------------
597 # Name Description Oper Reason AutoNeg Speed MTU Alternate Name
598 # --------------------------------------------------------------------------------------------------------------------------------------
599 # Ethernet0 Ethernet0 down admin-down on - 5432 Eth1/1
600 # Ethernet8 Ethernet8 down no-transceiver on - 4532 Eth1/2
601 # Ethernet16 - down admin-down off 800000 9100 Eth1/3
602 #
603 # show running-configuration interface Ethernet 0
604 # !
605 # interface Ethernet0
606 # description Ethernet0
607 # mtu 5432
608 # speed auto MSA
609 # fec RS
610 # unreliable-los auto
611 # shutdown
612 #
613 # show running-configuration interface Ethernet 8
614 # !
615 # interface Ethernet8
616 # description Ethernet8
617 # mtu 4532
618 # speed auto MSA
619 # fec RS
620 # unreliable-los auto
621 # no shutdown
622 #
623 - name: configure interface
624 dellemc.enterprise_sonic.sonic_interfaces:
625 config:
626 - name: Ethernet8
627 description: 'Ethernet eight'
628 state: overridden
629 #
630 # After state:
631 # -------------
632 # show interface status
633 # --------------------------------------------------------------------------------------------------------------------------------------
634 # Name Description Oper Reason AutoNeg Speed MTU Alternate Name
635 # --------------------------------------------------------------------------------------------------------------------------------------
636 # Ethernet0 - down admin-down off 800000 9100 Eth1/1
637 # Ethernet8 Ethernet eight down admin-down off 800000 9100 Eth1/2
638 # Ethernet16 - down admin-down off 800000 9100 Eth1/3
639 #
640 # show running-configuration interface Ethernet 0
641 # !
642 # interface Ethernet0
643 # mtu 9100
644 # speed 800000
645 # fec RS
646 # unreliable-los auto
647 # shutdown
648 # show running-configuration interface Ethernet 8
649 # !
650 # interface Ethernet8
651 # description "Ethernet eight"
652 # mtu 9100
653 # speed 800000
654 # fec RS
655 # unreliable-los auto
656 # shutdown
657 # sonic#
658 #
659 # Using "overridden" state for MSA/BAM config
660 #
661 # Before state:
662 # -------------
663 # show interface status
664 # --------------------------------------------------------------------------------------------------------------------------------------
665 # Name Description Oper Reason AutoNeg Speed MTU Alternate Name
666 # --------------------------------------------------------------------------------------------------------------------------------------
667 # Ethernet0 Ethernet0 down admin-down off 400000 5432 Eth1/1
668 # Ethernet8 Ethernet eight down no-transceiver off 800000 4352 Eth1/2
669 # Ethernet16 - down admin-down off 800000 9100 Eth1/3
670 #
671 # show running-configuration interface Ethernet 0
672 # !
673 # interface Ethernet0
674 # description Ethernet0
675 # mtu 5432
676 # speed 400000
677 # fec RS
678 # unreliable-los auto
679 # shutdown
680 #
681 # show running-configuration interface Ethernet 8
682 # !
683 # interface Ethernet8
684 # description "Ethernet eight"
685 # mtu 4352
686 # speed 800000
687 # fec RS
688 # unreliable-los auto
689 # no shutdown
690 - name: configure interface
691 sonic_interfaces:
692 config:
693 - name: Ethernet8
694 auto_negotiate: true
695 autoneg_mode: AUTONEG_MODE_MSA
696 state: overridden
697 #
698 # After state:
699 # -------------
700 # show interface status
701 # --------------------------------------------------------------------------------------------------------------------------------------
702 # Name Description Oper Reason AutoNeg Speed MTU Alternate Name
703 # --------------------------------------------------------------------------------------------------------------------------------------
704 # Ethernet0 - down admin-down off 800000 9100 Eth1/1
705 # Ethernet8 - down admin-down on - 9100 Eth1/2
706 # Ethernet16 - down admin-down off 800000 9100 Eth1/3
707 #
708 # show running-configuration interface Ethernet 0
709 # !
710 # interface Ethernet0
711 # mtu 9100
712 # speed 800000
713 # fec RS
714 # unreliable-los auto
715 # shutdown
716 #
717 # show running-configuration interface Ethernet 8
718 # !
719 # interface Ethernet8
720 # mtu 9100
721 # speed auto MSA
722 # fec RS
723 # unreliable-los auto
724 # shutdown
725 """
726
727 RETURN = """
728 before:
729 description: The configuration prior to the module invocation.
730 returned: always
731 type: list
732 sample: >
733 The configuration returned is always in the same format
734 as the parameters above.
735 after:
736 description: The resulting configuration module invocation.
737 returned: when changed
738 type: list
739 sample: >
740 The configuration returned is always in the same format
741 as the parameters above.
742 commands:
743 description: The set of commands pushed to the remote device.
744 returned: always
745 type: list
746 sample: ['command 1', 'command 2', 'command 3']
747 """
748
749
750 from ansible.module_utils.basic import AnsibleModule
751 from ansible_collections.dellemc.enterprise_sonic.plugins.module_utils.network.sonic.argspec.interfaces.interfaces import InterfacesArgs
752 from ansible_collections.dellemc.enterprise_sonic.plugins.module_utils.network.sonic.config.interfaces.interfaces import Interfaces
753
754
755 def main():
756 """
757 Main entry point for module execution
758
759 :returns: the result form module invocation
760 """
761 module = AnsibleModule(argument_spec=InterfacesArgs.argument_spec,
762 supports_check_mode=True)
763
764 result = Interfaces(module).execute_module()
765 module.exit_json(**result)
766
767
768 if __name__ == '__main__':
769 main()