Skip to content

Commit

Permalink
[pcieutil] Remove 'pcie-' prefix from arguments (sonic-net#1297)
Browse files Browse the repository at this point in the history
Remove redundant 'pcie-' prefix from subcommands

Note this will also require an update to files/image_config/pcie-check/pcie-check.sh in sonic-buildimage. Also, since these commands require sudo, they need to be added to the read-only commands in the sudoers file, which they have not yet been.
  • Loading branch information
jleveque authored Dec 13, 2020
1 parent 10ffc28 commit 0603c0b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pcieutil/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def print_test_title(testname):


@cli.command()
def pcie_show():
def show():
'''Display PCIe Device '''
testname = "Display PCIe Device"
print_test_title(testname)
Expand All @@ -107,7 +107,7 @@ def pcie_show():

# Show PCIE Vender ID and Device ID
@cli.command()
def pcie_check():
def check():
'''Check PCIe Device '''
testname = "PCIe Device Check"
err = 0
Expand All @@ -128,7 +128,7 @@ def pcie_check():

@cli.command()
@click.confirmation_option(prompt="Are you sure to overwrite config file pcie.yaml with current pcie device info?")
def pcie_generate():
def generate():
'''Generate config file with current pci device'''
platform_pcieutil.dump_conf_yaml()
click.echo("Generate config file pcie.yaml under path %s" % platform_plugins_path)
Expand Down
4 changes: 2 additions & 2 deletions show/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ def ssdhealth(device, verbose, vendor):
@click.option('-c', '--check', is_flag=True, help="Check the platfome pcie device")
def pcieinfo(check, verbose):
"""Show Device PCIe Info"""
cmd = "sudo pcieutil pcie-show"
cmd = "sudo pcieutil show"
if check:
cmd = "sudo pcieutil pcie-check"
cmd = "sudo pcieutil check"
clicommon.run_command(cmd, display_cmd=verbose)


Expand Down

0 comments on commit 0603c0b

Please sign in to comment.