Skip to content

Commit 41da53d

Browse files
maipbuisonic-otn
authored andcommitted
modify commands using utilities_common.cli.run_command and advance sonic-utilities submodule on master (sonic-net#15193)
Dependency: sonic-net/sonic-utilities#2718 Why I did it This PR sonic-net/sonic-utilities#2718 reduce shell=True usage in utilities_common.cli.run_command() function. Work item tracking Microsoft ADO (number only): 15022050 How I did it Replace strings commands using utilities_common.cli.run_command() function to list of strings due to circular dependency, advance sonic-utilities submodule 72ca484 (HEAD -> master, upstream/master, upstream/HEAD) Add CLI configuration options for teamd retry count feature (sonic-net/sonic-utilities#2642) 359dfc0 [Clock] Implement clock CLI (sonic-net/sonic-utilities#2793) b316fc2 Add transceiver status CLI to show output from TRANSCEIVER_STATUS table (sonic-net/sonic-utilities#2772) dc59dbd Replace pickle by json (sonic-net/sonic-utilities#2849) a66f41c [show] replace shell=True, replace xml by lxml, replace exit by sys.exit (sonic-net/sonic-utilities#2666) 5750057 [utilities_common] replace shell=True (sonic-net/sonic-utilities#2718) 6e0ee3e [CRM][DASH] Extend CRM utility to support DASH resources. (sonic-net/sonic-utilities#2800) b2c29b0 [config] Generate sysinfo in single asic (sonic-net/sonic-utilities#2856)
1 parent 2ad7192 commit 41da53d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

dockers/docker-dhcp-relay/cli/config/plugins/dhcp_relay.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ def restart_dhcp_relay_service():
3939
Restart dhcp_relay service
4040
"""
4141
click.echo("Restarting DHCP relay service...")
42-
clicommon.run_command("systemctl stop dhcp_relay", display_cmd=False)
43-
clicommon.run_command("systemctl reset-failed dhcp_relay", display_cmd=False)
44-
clicommon.run_command("systemctl start dhcp_relay", display_cmd=False)
42+
clicommon.run_command(['systemctl', 'stop', 'dhcp_relay'], display_cmd=False)
43+
clicommon.run_command(['systemctl', 'reset-failed', 'dhcp_relay'], display_cmd=False)
44+
clicommon.run_command(['systemctl', 'start', 'dhcp_relay'], display_cmd=False)
4545

4646

4747
def add_dhcp_relay(vid, dhcp_relay_ips, db, ip_version):

dockers/docker-macsec/cli/clear/plugins/clear_macsec_counter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def macsec_clear_counters(clean_cache):
2525
print("Cleaned cache")
2626
return
2727

28-
clicommon.run_command("show macsec --dump-file")
28+
clicommon.run_command(['show', 'macsec', '--dump-file'])
2929
print("Clear MACsec counters")
3030

3131
def register(cli):

src/sonic-utilities

0 commit comments

Comments
 (0)