From 9720f74fd5b09325ac26c44bca739eafc1485c87 Mon Sep 17 00:00:00 2001 From: Prince Sunny Date: Sat, 24 Apr 2021 12:51:18 -0700 Subject: [PATCH] [Monitor Vlan] Fix a typo in hostif (#1722) hostif_name -> host_ifname as per the schema definition Co-authored-by: Ubuntu --- cfgmgr/vlanmgr.cpp | 4 ++-- orchagent/portsorch.cpp | 2 +- tests/dvslib/dvs_vlan.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cfgmgr/vlanmgr.cpp b/cfgmgr/vlanmgr.cpp index 48a12becd915..e439420933de 100644 --- a/cfgmgr/vlanmgr.cpp +++ b/cfgmgr/vlanmgr.cpp @@ -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); } @@ -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); diff --git a/orchagent/portsorch.cpp b/orchagent/portsorch.cpp index b3f7ceeb0d0c..335d1d8d35a6 100755 --- a/orchagent/portsorch.cpp +++ b/orchagent/portsorch.cpp @@ -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); } diff --git a/tests/dvslib/dvs_vlan.py b/tests/dvslib/dvs_vlan.py index bf4acd31787b..068faa15d321 100644 --- a/tests/dvslib/dvs_vlan.py +++ b/tests/dvslib/dvs_vlan.py @@ -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):