Skip to content

Commit 2eba32d

Browse files
Added changes to support OSPFv3_area ansible (ansible-collections#540)
* Added changes to support OSPFv3_area ansible * Adding check mode and changing delete all URLs * Sanity fix * Addressing review comments * Refactoring deleted and replace/override * Addressing advertise default value * Addressing delete ranges * Update plugins/modules/sonic_ospfv3_area.py * Update plugins/modules/sonic_ospfv3_area.py * Update plugins/modules/sonic_ospfv3_area.py * Apply suggestion from @stalabi1 --------- Co-authored-by: stalabi1 <54641848+stalabi1@users.noreply.github.com>
1 parent 18eb9e7 commit 2eba32d

File tree

21 files changed

+3423
-2
lines changed

21 files changed

+3423
-2
lines changed

meta/runtime.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,12 @@ plugin_routing:
104104
redirect: dellemc.enterprise_sonic.sonic_ospf_area
105105
ospfv2:
106106
redirect: dellemc.enterprise_sonic.sonic_ospfv2
107-
ospfv3:
108-
redirect: dellemc.enterprise_sonic.sonic_ospfv3
109107
ospfv2_interfaces:
110108
redirect: dellemc.enterprise_sonic.sonic_ospfv2_interfaces
109+
ospfv3:
110+
redirect: dellemc.enterprise_sonic.sonic_ospfv3
111+
ospfv3_area:
112+
redirect: dellemc.enterprise_sonic.sonic_ospfv3_area
111113
ospfv3_interfaces:
112114
redirect: dellemc.enterprise_sonic.sonic_ospfv3_interfaces
113115
pim_global:

plugins/action/ospfv3_area.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sonic.py

plugins/module_utils/network/sonic/argspec/facts/facts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def __init__(self, **kwargs):
3737
'ospfv2_interfaces',
3838
'ospfv2',
3939
'ospfv3',
40+
'ospfv3_area',
4041
'ospfv3_interfaces',
4142
'mclag',
4243
'prefix_lists',

plugins/module_utils/network/sonic/argspec/ospfv3_area/__init__.py

Whitespace-only changes.
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
#
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+
"""
9+
The arg spec for the sonic_ospfv3_area module
10+
"""
11+
from __future__ import absolute_import, division, print_function
12+
__metaclass__ = type
13+
14+
15+
class Ospfv3_areaArgs(object): # pylint: disable=R0903
16+
"""The arg spec for the sonic_ospfv3_area module
17+
"""
18+
19+
def __init__(self, **kwargs):
20+
pass
21+
22+
argument_spec = {
23+
'config': {
24+
'elements': 'dict',
25+
'mutually_exclusive': [['stub', 'nssa']],
26+
'options': {
27+
'area_id': {'required': True, 'type': 'str'},
28+
'filter_list_in': {'type': 'str'},
29+
'filter_list_out': {'type': 'str'},
30+
'nssa': {
31+
'mutually_exclusive': [['no_summary', 'default_originate']],
32+
'options': {
33+
'enabled': {'required': True, 'type': 'bool'},
34+
'default_originate': {
35+
'type': 'dict',
36+
'options': {
37+
'enabled': {'required': True, 'type': 'bool'},
38+
'metric': {'type': 'int'},
39+
'metric_type': {'type': 'int', 'choices': [1, 2]}
40+
}
41+
},
42+
'no_summary': {'type': 'bool'},
43+
'ranges': {
44+
'elements': 'dict',
45+
'options': {
46+
'advertise': {'type': 'bool'},
47+
'cost': {'type': 'int'},
48+
'prefix': {'required': True, 'type': 'str'}
49+
},
50+
'type': 'list'
51+
}
52+
},
53+
'type': 'dict'
54+
},
55+
'ranges': {
56+
'elements': 'dict',
57+
'options': {
58+
'advertise': {'type': 'bool'},
59+
'cost': {'type': 'int'},
60+
'prefix': {'required': True, 'type': 'str'}
61+
},
62+
'type': 'list'
63+
},
64+
'stub': {
65+
'options': {
66+
'enabled': {'required': True, 'type': 'bool'},
67+
'no_summary': {'type': 'bool'}
68+
},
69+
'type': 'dict'
70+
},
71+
'vrf_name': {'required': True, 'type': 'str'},
72+
},
73+
'type': 'list'
74+
},
75+
'state': {
76+
'choices': ['merged', 'replaced', 'overridden', 'deleted'],
77+
'default': 'merged',
78+
'type': 'str'
79+
}
80+
} # pylint: disable=C0301

plugins/module_utils/network/sonic/config/ospfv3_area/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)