Skip to content

Commit 780673c

Browse files
authored
explicitly specify command with underscores (sonic-net#846)
Starting click 7.0. The default behavior of a command with under scores will be replace with dashes. this is to address the above default behavior change, so that the command remains the same. more details can be found: pallets/click#1123
1 parent 07dc201 commit 780673c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

config/main.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ def reload(filename, yes, load_sysinfo):
641641
log_info("'reload' restarting services...")
642642
_restart_services()
643643

644-
@config.command()
644+
@config.command("load_mgmt_config")
645645
@click.option('-y', '--yes', is_flag=True, callback=_abort_if_false,
646646
expose_value=False, prompt='Reload mgmt config?')
647647
@click.argument('filename', default='/etc/sonic/device_desc.xml', type=click.Path(exists=True))
@@ -665,7 +665,7 @@ def load_mgmt_config(filename):
665665
run_command(command, display_cmd=True, ignore_error=True)
666666
click.echo("Please note loaded setting will be lost after system reboot. To preserve setting, run `config save`.")
667667

668-
@config.command()
668+
@config.command("load_minigraph")
669669
@click.option('-y', '--yes', is_flag=True, callback=_abort_if_false,
670670
expose_value=False, prompt='Reload config from minigraph?')
671671
def load_minigraph():

pfcwd/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def stop(ports):
221221
configdb.mod_entry(CONFIG_DB_PFC_WD_TABLE_NAME, port, None)
222222

223223
# Set WD default configuration on server facing ports when enable flag is on
224-
@cli.command()
224+
@cli.command("start_default")
225225
def start_default():
226226
""" Start PFC WD by default configurations """
227227
if os.geteuid() != 0:

0 commit comments

Comments
 (0)