Skip to content

Commit a1dc3e3

Browse files
authored
Interface parser fixes (#839)
* Interfaces Parser: IOS parser fixes Signed-off-by: Dinesh Dutt <[email protected]> * NXOS interface parser: link flap was not recorded Signed-off-by: Dinesh Dutt <[email protected]> Signed-off-by: Dinesh Dutt <[email protected]>
1 parent 99ae4ed commit a1dc3e3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

suzieq/config/interfaces.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ apply:
210210
"linklocal-addr: _linklocal"
211211
]'
212212

213-
- command: show interface | egrep '^\w|Hardware|MTU|reset|Description'
213+
- command: show interface | egrep '^\w|Hardware|MTU|reset|Description|flapped'
214214
textfsm: textfsm_templates/nxos_show_int_grep.tfsm
215215
_entryType: mtumac
216216

suzieq/poller/worker/services/interfaces.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,8 +877,12 @@ def _clean_iosxr_data(self, processed_data, raw_data):
877877
'type': 'bond_slave'}
878878

879879
if entry['adminState'] == 'administratively down':
880-
entry['state'] = 'down'
881880
entry['adminState'] = 'down'
881+
else:
882+
# IOS reports the admin state as down when the oper state
883+
# (line protocol) is down. administratively down is what
884+
# is administratively down.
885+
entry['adminState'] = 'up'
882886

883887
entry['macaddr'] = convert_macaddr_format_to_colon(
884888
entry.get('macaddr', '0000.0000.0000'))

0 commit comments

Comments
 (0)