@@ -858,13 +858,13 @@ def _stop_services():
858
858
859
859
860
860
def _get_sonic_services ():
861
- out = clicommon .run_command ("systemctl list-dependencies --plain sonic.target | sed '1d'" , return_cmd = True )
861
+ out , _ = clicommon .run_command ("systemctl list-dependencies --plain sonic.target | sed '1d'" , return_cmd = True )
862
862
return (unit .strip () for unit in out .splitlines ())
863
863
864
864
865
865
def _get_delayed_sonic_units (get_timers = False ):
866
- rc1 = clicommon .run_command ("systemctl list-dependencies --plain sonic-delayed.target | sed '1d'" , return_cmd = True )
867
- rc2 = clicommon .run_command ("systemctl is-enabled {}" .format (rc1 .replace ("\n " , " " )), return_cmd = True )
866
+ rc1 , _ = clicommon .run_command ("systemctl list-dependencies --plain sonic-delayed.target | sed '1d'" , return_cmd = True )
867
+ rc2 , _ = clicommon .run_command ("systemctl is-enabled {}" .format (rc1 .replace ("\n " , " " )), return_cmd = True )
868
868
timer = [line .strip () for line in rc1 .splitlines ()]
869
869
state = [line .strip () for line in rc2 .splitlines ()]
870
870
services = []
@@ -899,16 +899,16 @@ def _restart_services():
899
899
900
900
def _delay_timers_elapsed ():
901
901
for timer in _get_delayed_sonic_units (get_timers = True ):
902
- out = clicommon .run_command ("systemctl show {} --property=LastTriggerUSecMonotonic --value" .format (timer ), return_cmd = True )
902
+ out , _ = clicommon .run_command ("systemctl show {} --property=LastTriggerUSecMonotonic --value" .format (timer ), return_cmd = True )
903
903
if out .strip () == "0" :
904
904
return False
905
905
return True
906
906
907
907
def _per_namespace_swss_ready (service_name ):
908
- out = clicommon .run_command ("systemctl show {} --property ActiveState --value" .format (service_name ), return_cmd = True )
908
+ out , _ = clicommon .run_command ("systemctl show {} --property ActiveState --value" .format (service_name ), return_cmd = True )
909
909
if out .strip () != "active" :
910
910
return False
911
- out = clicommon .run_command ("systemctl show {} --property ActiveEnterTimestampMonotonic --value" .format (service_name ), return_cmd = True )
911
+ out , _ = clicommon .run_command ("systemctl show {} --property ActiveEnterTimestampMonotonic --value" .format (service_name ), return_cmd = True )
912
912
swss_up_time = float (out .strip ())/ 1000000
913
913
now = time .monotonic ()
914
914
if (now - swss_up_time > 120 ):
@@ -933,7 +933,7 @@ def _swss_ready():
933
933
return True
934
934
935
935
def _is_system_starting ():
936
- out = clicommon .run_command ("sudo systemctl is-system-running" , return_cmd = True )
936
+ out , _ = clicommon .run_command ("sudo systemctl is-system-running" , return_cmd = True )
937
937
return out .strip () == "starting"
938
938
939
939
def interface_is_in_vlan (vlan_member_table , interface_name ):
@@ -2813,7 +2813,7 @@ def _qos_update_ports(ctx, ports, dry_run, json_data):
2813
2813
command = "{} {} {} -t {},config-db -t {},config-db -y {} --print-data" .format (
2814
2814
SONIC_CFGGEN_PATH , cmd_ns , from_db , buffer_template_file , qos_template_file , sonic_version_file
2815
2815
)
2816
- jsonstr = clicommon .run_command (command , display_cmd = False , return_cmd = True )
2816
+ jsonstr , _ = clicommon .run_command (command , display_cmd = False , return_cmd = True )
2817
2817
2818
2818
jsondict = json .loads (jsonstr )
2819
2819
port_table = jsondict .get ('PORT' )
0 commit comments