Skip to content

Commit 7542a2d

Browse files
committed
Fixes related to learn("isis")
- Adjust area address regex to account for addresses that are hex or None - Adjust schemas to account for valid VRF configurations that do not have all information
1 parent 933ac99 commit 7542a2d

File tree

16 files changed

+3781
-7
lines changed

16 files changed

+3781
-7
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
----------------------
2+
Fix
3+
----------------------
4+
* nxos
5+
* Modified ShowIsis, ShowIsisAdjacency, ShowIsisHostname, ShowIsisHostnameDetail, ShowIsisInterface
6+
* Adjust area address regex to account for addresses that are hex or None
7+
* Adjust schemas to account for valid VRF configurations that do not have all information

src/genie/libs/parser/nxos/show_isis.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class ShowIsisSchema(MetaParser):
6565
'resolution_of_l3_to_l2': str,
6666
'sr_ipv4': str,
6767
'sr_ipv6': str,
68-
'supported_interfaces': list,
68+
Optional('supported_interfaces'): list,
6969
'topology': {
7070
Any(): {
7171
'address_family': {
@@ -169,7 +169,8 @@ def cli(self, vrf='', output=None):
169169

170170
# Area address(es) :
171171
# 49.0001
172-
p17 = re.compile(r'^(?P<area>[\d\.]+)$')
172+
# 49.fe51
173+
p17 = re.compile(r'^\s*(?P<area>([a-fA-F0-9.]+\.[a-fA-F0-9.]+)|None)$')
173174

174175
# Process is up and running
175176
p18 = re.compile(r'^Process +is +(?P<process>[\S\s]+)$')
@@ -520,7 +521,7 @@ class ShowIsisInterfaceSchema(MetaParser):
520521
Any(): { # process_id
521522
'vrf': {
522523
Any(): {
523-
'interfaces': {
524+
Optional('interfaces'): {
524525
Any(): {
525526
'name': str,
526527
'status': str,
@@ -549,7 +550,7 @@ class ShowIsisInterfaceSchema(MetaParser):
549550
Optional('passive'): str,
550551
Optional('mtu'): int,
551552
Optional('lsp_interval_ms'): int,
552-
'levels': {
553+
Optional('levels'): {
553554
Any(): { # 1, 2
554555
Optional('metric'): str,
555556
Optional('designated_is'): str,
@@ -1060,7 +1061,7 @@ class ShowIsisAdjacencySchema(MetaParser):
10601061
Any(): {
10611062
'vrf': {
10621063
Any(): {
1063-
'interfaces': {
1064+
Optional('interfaces'): {
10641065
Any(): {
10651066
'adjacencies': {
10661067
Any(): {
@@ -1163,7 +1164,7 @@ class ShowIsisHostnameSchema(MetaParser):
11631164
Any(): {
11641165
'vrf': {
11651166
Any(): {
1166-
'hostname_db': {
1167+
Optional('hostname_db'): {
11671168
'hostname': {
11681169
Any(): {
11691170
'hostname': str,
@@ -1257,7 +1258,7 @@ class ShowIsisHostnameDetailSchema(MetaParser):
12571258
Any(): {
12581259
'vrf': {
12591260
Any(): {
1260-
'hostname_db': {
1261+
Optional('hostname_db'): {
12611262
'hostname': {
12621263
Any(): {
12631264
'hostname': str,

src/genie/libs/parser/nxos/tests/ShowIsis/cli/equal/golden_output_1_expected.py

Lines changed: 278 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)