Skip to content

Commit 0603c0b

Browse files
authored
[pcieutil] Remove 'pcie-' prefix from arguments (#1297)
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.
1 parent 10ffc28 commit 0603c0b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pcieutil/main.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def print_test_title(testname):
9191

9292

9393
@cli.command()
94-
def pcie_show():
94+
def show():
9595
'''Display PCIe Device '''
9696
testname = "Display PCIe Device"
9797
print_test_title(testname)
@@ -107,7 +107,7 @@ def pcie_show():
107107

108108
# Show PCIE Vender ID and Device ID
109109
@cli.command()
110-
def pcie_check():
110+
def check():
111111
'''Check PCIe Device '''
112112
testname = "PCIe Device Check"
113113
err = 0
@@ -128,7 +128,7 @@ def pcie_check():
128128

129129
@cli.command()
130130
@click.confirmation_option(prompt="Are you sure to overwrite config file pcie.yaml with current pcie device info?")
131-
def pcie_generate():
131+
def generate():
132132
'''Generate config file with current pci device'''
133133
platform_pcieutil.dump_conf_yaml()
134134
click.echo("Generate config file pcie.yaml under path %s" % platform_plugins_path)

show/platform.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ def ssdhealth(device, verbose, vendor):
100100
@click.option('-c', '--check', is_flag=True, help="Check the platfome pcie device")
101101
def pcieinfo(check, verbose):
102102
"""Show Device PCIe Info"""
103-
cmd = "sudo pcieutil pcie-show"
103+
cmd = "sudo pcieutil show"
104104
if check:
105-
cmd = "sudo pcieutil pcie-check"
105+
cmd = "sudo pcieutil check"
106106
clicommon.run_command(cmd, display_cmd=verbose)
107107

108108

0 commit comments

Comments
 (0)