Skip to content

Commit

Permalink
[fast-reboot]: Update fast-reboot-dump.py to handle invalid parsing o…
Browse files Browse the repository at this point in the history
…f genetlink type hostif object id attribute (#1318)

Fix fast reboot failure due to invalid parsing of genetlink type hostif object id attribute. Genetlink type hostif does NOT have object ID attribute.
SAI_HOSTIF_ATTR_OBJ_ID (SAI_HOSTIF_ATTR_TYPE == SAI_HOSTIF_TYPE_GENETLINK)
  • Loading branch information
jangidrk authored Dec 23, 2020
1 parent d63d11d commit ff1db4d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/fast-reboot-dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ def get_map_port_id_2_iface_name(db):
keys = [] if keys is None else keys
for key in keys:
value = db.get_all(db.ASIC_DB, key)
if value['SAI_HOSTIF_ATTR_TYPE'] != 'SAI_HOSTIF_TYPE_NETDEV':
continue
port_id = value['SAI_HOSTIF_ATTR_OBJ_ID']
iface_name = value['SAI_HOSTIF_ATTR_NAME']
port_id_2_iface[port_id] = iface_name
Expand Down

0 comments on commit ff1db4d

Please sign in to comment.