From 0e31790d962859d1f0292f85c35a4d538372ba88 Mon Sep 17 00:00:00 2001 From: vdahiya12 <67608553+vdahiya12@users.noreply.github.com> Date: Wed, 15 Jun 2022 13:46:59 -0700 Subject: [PATCH] [config][muxcable] fix minor config DB logic issue (#2210) Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com For active-standby type cable there will not be any soc_ipv4 entry in the "MUX_CABLE" table, hence when updating the config DB entry with update for sudo config mux mode we should just check the cable_type and update the table entry if no soc_ipv4 the value written in none in that case What I did How I did it How to verify it Unit-tests cover the change Signed-off-by: vaibhav-dahiya --- config/muxcable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/muxcable.py b/config/muxcable.py index 29375feb7a..fec0f16b3b 100644 --- a/config/muxcable.py +++ b/config/muxcable.py @@ -254,7 +254,7 @@ def lookup_statedb_and_update_configdb(db, per_npu_statedb, config_db, port, sta if str(state_cfg_val) == str(configdb_state): port_status_dict[port_name] = 'OK' else: - if cable_type is not None and soc_ipv4_value is not None: + if cable_type is not None or soc_ipv4_value is not None: config_db.set_entry("MUX_CABLE", port, {"state": state_cfg_val, "server_ipv4": ipv4_value, "server_ipv6": ipv6_value,