Skip to content

Commit

Permalink
Don't report VLAN interfaces as oper_down
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasstockner committed Oct 30, 2023
1 parent 7a88058 commit a1e11f8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/sonic_ax_impl/mibs/ietf/rfc1213.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,12 @@ def get_oper_status(self, sub_id):
:param sub_id: The 1-based sub-identifier query.
:return: oper state value for the respective sub_id.
"""
return self._get_status(sub_id, "oper_status")
if self.get_oid(sub_id) in self.vlan_oid_name_map:
# VLAN interfaces don't have an operational status, so return admin status for them
key = "admin_status"
else:
key = "oper_status"
return self._get_status(sub_id, key)

def get_mtu(self, sub_id):
"""
Expand Down

0 comments on commit a1e11f8

Please sign in to comment.