Skip to content

Commit

Permalink
[Monitor Vlan] Fix a typo in hostif (sonic-net#1722)
Browse files Browse the repository at this point in the history
hostif_name -> host_ifname as per the schema definition

Co-authored-by: Ubuntu <prsunny@prince-vm.vzw1i4tqyeburcdz5lrgulxi2c.yx.internal.cloudapp.net>
  • Loading branch information
prsunny and Ubuntu authored Apr 24, 2021
1 parent b34f783 commit 9720f74
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cfgmgr/vlanmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ void VlanMgr::doVlanTask(Consumer &consumer)
mac = fvValue(i);
setHostVlanMac(vlan_id, mac);
}
else if (fvField(i) == "hostif_name")
else if (fvField(i) == "host_ifname")
{
hostif_name = fvValue(i);
}
Expand All @@ -381,7 +381,7 @@ void VlanMgr::doVlanTask(Consumer &consumer)
FieldValueTuple mc("mac", mac);
fvVector.push_back(mc);

FieldValueTuple hostif_name_fvt("hostif_name", hostif_name);
FieldValueTuple hostif_name_fvt("host_ifname", hostif_name);
fvVector.push_back(hostif_name_fvt);

m_appVlanTableProducer.set(key, fvVector);
Expand Down
2 changes: 1 addition & 1 deletion orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2934,7 +2934,7 @@ void PortsOrch::doVlanTask(Consumer &consumer)
{
mac = MacAddress(fvValue(i));
}
if (fvField(i) == "hostif_name")
if (fvField(i) == "host_ifname")
{
hostif_name = fvValue(i);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/dvslib/dvs_vlan.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def create_vlan(self, vlan):

def create_vlan_hostif(self, vlan, hostif_name):
vlan = "Vlan{}".format(vlan)
vlan_entry = {"vlanid": vlan, "hostif_name": hostif_name}
vlan_entry = {"vlanid": vlan, "host_ifname": hostif_name}
self.config_db.update_entry("VLAN", vlan, vlan_entry)

def remove_vlan(self, vlan):
Expand Down

0 comments on commit 9720f74

Please sign in to comment.