Skip to content

Get Vlan Id from ASIC_STATE Vlan Object if bvid present#62

Merged
prsunny merged 2 commits intosonic-net:masterfrom
prsunny:master
Jan 30, 2018
Merged

Get Vlan Id from ASIC_STATE Vlan Object if bvid present#62
prsunny merged 2 commits intosonic-net:masterfrom
prsunny:master

Conversation

@prsunny
Copy link
Copy Markdown
Contributor

@prsunny prsunny commented Jan 29, 2018

return (int(fdb["vlan"]),) + mac_decimals(fdb["mac"])
elif 'bvid' in fdb:
vlan_id = port_util.get_vlan_id_from_bvid(db_conn, fdb["bvid"])
return (int(vlan_id),) + mac_decimals(fdb["mac"])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel this is a must-change;

I would assign vlan_id in both if and elif branches and return the vlanmac from a same statement, for the sake of consistency.

@prsunny prsunny merged commit 12bc0e0 into sonic-net:master Jan 30, 2018
ssithaia-ebay pushed a commit to ssithaia-ebay/sonic-snmpagent that referenced this pull request May 23, 2025
* Get Vlan Id from ASIC_STATE Vlan Object if bvid present

* Address review comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants