Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
--------------------------------------------------------------------------------
Fix
--------------------------------------------------------------------------------
* iosxe
* Modified ShowIpOspfInterfaceBrief:
* Updated regex pattern <p1> parse OSPF area as string to facilitate parsing dot notation areas, as well as numeric.
2 changes: 1 addition & 1 deletion src/genie/libs/parser/iosxe/show_ospf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1405,7 +1405,7 @@ def cli(self, output=None):
# Init vars
ret_dict = {}

p1 = re.compile(r'^(?P<interface>\S+) +(?P<instance>\S+) +(?P<area>\d+) +'
p1 = re.compile(r'^(?P<interface>\S+) +(?P<instance>\S+) +(?P<area>\S+) +'
'(?P<address>\S+) +(?P<cost>\d+) +(?P<state>\S+) +(?P<nbrs_full>\d+)'
'\/(?P<nbrs_count>\d+)$$')

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
expected_output = {
"instance": {
"1": {
"areas": {
"0.0.0.0": {
"interfaces": {
"GigabitEthernet3": {
"cost": 1,
"ip_address": "100.3.4.4/24",
"nbrs_count": 0,
"nbrs_full": 0,
"state": "P2P"
},
"GigabitEthernet4": {
"cost": 1,
"ip_address": "100.2.4.4/24",
"nbrs_count": 1,
"nbrs_full": 1,
"state": "P2P"
},
"Loopback0": {
"cost": 1,
"ip_address": "100.255.255.4/32",
"nbrs_count": 0,
"nbrs_full": 0,
"state": "LOOP"
}
}
},
"0.0.0.2": {
"interfaces": {
"GigabitEthernet5": {
"cost": 1,
"ip_address": "100.1.4.4/24",
"nbrs_count": 0,
"nbrs_full": 0,
"state": "P2P"
}
}
}
}
},
"200": {
"areas": {
"0.0.0.0": {
"interfaces": {
"GigabitEthernet6": {
"cost": 1,
"ip_address": "100.4.11.4/24",
"nbrs_count": 0,
"nbrs_full": 0,
"state": "P2P"
},
"GigabitEthernet7": {
"cost": 1,
"ip_address": "100.4.12.4/24",
"nbrs_count": 1,
"nbrs_full": 1,
"state": "P2P"
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
R4#show ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Lo0 1 0.0.0.0 100.255.255.4/32 1 LOOP 0/0
Gi4 1 0.0.0.0 100.2.4.4/24 1 P2P 1/1
Gi3 1 0.0.0.0 100.3.4.4/24 1 P2P 0/0
Gi5 1 2 100.1.4.4/24 1 P2P 0/0
Gi7 200 0 100.4.12.4/24 1 P2P 1/1
Gi6 200 0 100.4.11.4/24 1 P2P 0/0