From dbd3b7ab5e798b3df5e813b0b26a744c06c53557 Mon Sep 17 00:00:00 2001 From: Tianrong Zhang Date: Thu, 2 Sep 2021 21:19:15 -0700 Subject: [PATCH] port two more commits to 202012 branch --- src/sonic-host-services/scripts/caclmgrd | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/sonic-host-services/scripts/caclmgrd b/src/sonic-host-services/scripts/caclmgrd index 803cc748652..eccacc31b80 100755 --- a/src/sonic-host-services/scripts/caclmgrd +++ b/src/sonic-host-services/scripts/caclmgrd @@ -378,27 +378,27 @@ class ControlPlaneAclManager(daemon_base.DaemonBase): execute = 1 if execute == 1: - self.run_commands([update_cmd]) + subprocess.call(update_cmd, shell=True) self.log_info("Update DHCP chain: {}".format(update_cmd)) def update_dhcp_acl(self, key, op, data): - if "status" not in data: + if "state" not in data: self.log_warning("Unexpected update in MUX_CABLE_TABLE") return intf = key - status = data["status"] + state = data["state"] - if status == "active": + if state == "active": self.update_dhcp_chain("delete", intf) - elif status == "standby": + elif state == "standby": self.update_dhcp_chain("insert", intf) - elif status == "unknown": + elif state == "unknown": self.update_dhcp_chain("delete", intf) - elif status == "error": - self.log_warning("Cable status shows error") + elif state == "error": + self.log_warning("Cable state shows error") else: - self.log_warning("Unexpected cable status") + self.log_warning("Unexpected cable state") def get_acl_rules_and_translate_to_iptables_commands(self, namespace): """