Skip to content

Commit

Permalink
[ycabled] fix bug for show mux status delayed response (#364)
Browse files Browse the repository at this point in the history
This PR fixes a bug for show mux status CLI delay. In particular a subroutine is missing an argument which is invoked when
show mux status CLI is invoked.

This PR therefore fixes these exceptions, which includes a fix for insecure channel having a credential argument by removing it

assignment
Description
Motivation and Context
How Has This Been Tested?
Running the changes on DUT and through unit-tests

Signed-off-by: vaibhav dahiya <vdahiya@microsoft.com>
  • Loading branch information
vdahiya12 authored May 31, 2023
1 parent d6b2a02 commit 4f9ea2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sonic-ycabled/ycable/ycable_utilities/y_cable_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ def wait_for_state_change(channel_connectivity):

else:
if is_async:
channel = grpc.aio.insecure_channel("{}:{}".format(soc_ip, GRPC_PORT), credential, options=GRPC_CLIENT_OPTIONS)
channel = grpc.aio.insecure_channel("{}:{}".format(soc_ip, GRPC_PORT), options=GRPC_CLIENT_OPTIONS)
else:
channel = grpc.insecure_channel("{}:{}".format(soc_ip, GRPC_PORT), options=GRPC_CLIENT_OPTIONS)

Expand Down Expand Up @@ -3872,7 +3872,7 @@ def task_cli_worker(self):
break

if fvp:
handle_config_hwmode_state_cmd_arg_tbl_notification(fvp, self.cli_table_helper.xcvrd_config_hwmode_state_cmd_sts_tbl, self.cli_table_helper.xcvrd_config_hwmode_state_rsp_tbl, asic_index, port)
handle_config_hwmode_state_cmd_arg_tbl_notification(fvp, self.cli_table_helper.xcvrd_config_hwmode_state_cmd_sts_tbl, self.cli_table_helper.xcvrd_config_hwmode_state_rsp_tbl, self.cli_table_helper.hw_mux_cable_tbl, asic_index, port)
break


Expand Down
3 changes: 3 additions & 0 deletions sonic-ycabled/ycable/ycable_utilities/y_cable_table_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ class YcableCliUpdateTableHelper(object):
def __init__(self):

self.appl_db, self.state_db, self.config_db = {}, {}, {}
self.hw_mux_cable_tbl = {}
self.xcvrd_log_tbl = {}
self.port_tbl = {}
self.mux_tbl = {}
Expand Down Expand Up @@ -460,6 +461,8 @@ def __init__(self):
self.port_tbl[asic_id] = swsscommon.Table(self.config_db[asic_id], "MUX_CABLE")
self.mux_tbl[asic_id] = swsscommon.Table(
self.state_db[asic_id], MUX_CABLE_INFO_TABLE)
self.hw_mux_cable_tbl[asic_id] = swsscommon.Table(
self.state_db[asic_id], swsscommon.STATE_HW_MUX_CABLE_TABLE_NAME)

def get_state_db(self):
return self.state_db
Expand Down

0 comments on commit 4f9ea2d

Please sign in to comment.