@@ -1492,6 +1492,10 @@ def change_ports_status_for_y_cable_change_event(port_dict, y_cable_presence, st
1492
1492
1493
1493
if read_side == - 1 :
1494
1494
read_side = process_loopback_interface_and_get_read_side (loopback_keys )
1495
+ if os .path .isfile (SECRETS_PATH ):
1496
+ with open (SECRETS_PATH , 'r' ) as f :
1497
+ parsed_data = json .load (f )
1498
+ apply_grpc_secrets_configuration (parsed_data )
1495
1499
1496
1500
1497
1501
# Init PORT_STATUS table if ports are on Y cable and an event is received
@@ -1553,6 +1557,7 @@ def delete_ports_status_for_y_cable():
1553
1557
state_db , config_db , port_tbl , y_cable_tbl = {}, {}, {}, {}
1554
1558
y_cable_tbl_keys = {}
1555
1559
static_tbl , mux_tbl = {}, {}
1560
+ grpc_config = {}
1556
1561
namespaces = multi_asic .get_front_end_namespaces ()
1557
1562
for namespace in namespaces :
1558
1563
asic_id = multi_asic .get_asic_index_from_namespace (namespace )
@@ -1566,6 +1571,14 @@ def delete_ports_status_for_y_cable():
1566
1571
mux_tbl [asic_id ] = swsscommon .Table (
1567
1572
state_db [asic_id ], MUX_CABLE_INFO_TABLE )
1568
1573
port_tbl [asic_id ] = swsscommon .Table (config_db [asic_id ], "MUX_CABLE" )
1574
+ grpc_config [asic_id ] = swsscommon .Table (config_db [asic_id ], "GRPCCLIENT" )
1575
+
1576
+
1577
+ if read_side != - 1 :
1578
+ asic_index = multi_asic .get_asic_index_from_namespace (DEFAULT_NAMESPACE )
1579
+ if os .path .isfile (SECRETS_PATH ):
1580
+ grpc_config [asic_id ]._del ("config" )
1581
+ grpc_config [asic_id ]._del ("certs" )
1569
1582
1570
1583
# delete PORTS on Y cable table if ports on Y cable
1571
1584
logical_port_list = y_cable_platform_sfputil .logical
0 commit comments