We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a21b7a9 commit 3b07479Copy full SHA for 3b07479
1 file changed
src/swsssdk/port_util.py
@@ -38,6 +38,9 @@ def get_interface_oid_map(db):
38
"""
39
db.connect('COUNTERS_DB')
40
if_name_map = db.get_all('COUNTERS_DB', 'COUNTERS_PORT_NAME_MAP', blocking=True)
41
+ oid_pfx = len("oid:0x")
42
+ if_name_map = {if_name: sai_oid[oid_pfx:] for if_name, sai_oid in if_name_map.items()}
43
+
44
if_id_map = {sai_oid: if_name for if_name, sai_oid in if_name_map.items()
45
# only map the interface if it's a style understood to be a SONiC interface.
46
if get_index(if_name) is not None}
0 commit comments