Skip to content

Commit

Permalink
[CLI][Help string] Changed the show command help text to be more cons…
Browse files Browse the repository at this point in the history
…istent with each other.
  • Loading branch information
yutatsuchiyamicrosoft authored Dec 21, 2021
1 parent 818dcbf commit 1a75870
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion config/muxcable.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def get_value_for_key_in_config_tbl(config_db, port, key, table):

@click.group(name='muxcable', cls=clicommon.AliasedGroup)
def muxcable():
"""SONiC command line - 'show muxcable' command"""
"""Show muxcable information"""

if os.geteuid() != 0:
click.echo("Root privileges are required for this operation")
Expand Down
6 changes: 3 additions & 3 deletions doc/Command-Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ This command displays the full list of show commands available in the software;
ipv6 Show IPv6 commands
kubernetes Show kubernetes commands
line Show all /dev/ttyUSB lines and their info
lldp LLDP (Link Layer Discovery Protocol)...
lldp Show LLDP information
logging Show system log
mac Show MAC (FDB) entries
mirror_session Show existing everflow sessions
Expand All @@ -393,10 +393,10 @@ This command displays the full list of show commands available in the software;
pfc Show details of the priority-flow-control...
platform Show platform-specific hardware info
priority-group Show details of the PGs
processes Display process information
processes Show process information
queue Show details of the queues
reboot-cause Show cause of most recent reboot
route-map show route-map
route-map Show route-map
runningconfiguration Show current running configuration...
services Show all daemon services
startupconfiguration Show startup configuration information
Expand Down
2 changes: 1 addition & 1 deletion show/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ def link_local_mode(verbose):

@cli.group(cls=clicommon.AliasedGroup)
def lldp():
"""LLDP (Link Layer Discovery Protocol) information"""
"""Show LLDP information"""
pass

# Default 'lldp' command (called if no subcommands or their aliases were passed)
Expand Down
2 changes: 1 addition & 1 deletion show/processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

@click.group(cls=clicommon.AliasedGroup)
def processes():
"""Display process information"""
"""Show process information"""
pass


Expand Down
2 changes: 1 addition & 1 deletion show/system_health.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
@click.group(name='system-health', cls=clicommon.AliasedGroup)
def system_health():
"""SONiC command line - 'show system-health' command"""
"""Show system-health information"""
return

@system_health.command()
Expand Down
16 changes: 8 additions & 8 deletions utilities_common/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def is_port_vlan_member(config_db, port, vlan):
return False

def interface_is_in_vlan(vlan_member_table, interface_name):
""" Check if an interface is in a vlan """
""" Check if an interface is in a vlan """
for _,intf in vlan_member_table:
if intf == interface_name:
return True
Expand Down Expand Up @@ -437,12 +437,12 @@ def run_command_in_alias_mode(command):
print_output_in_alias_mode(output, index)

elif (command.startswith("sudo sfputil show eeprom")):
"""show interface transceiver eeprom"""
"""Show interface transceiver eeprom"""
index = 0
print_output_in_alias_mode(raw_output, index)

elif (command.startswith("sudo sfputil show")):
"""show interface transceiver lpmode,
"""Show interface transceiver lpmode,
presence
"""
index = 0
Expand All @@ -452,23 +452,23 @@ def run_command_in_alias_mode(command):
print_output_in_alias_mode(output, index)

elif command == "sudo lldpshow":
"""show lldp table"""
"""Show lldp table"""
index = 0
if output.startswith("LocalPort"):
output = output.replace("LocalPort", "LocalPort".rjust(
iface_alias_converter.alias_max_length))
print_output_in_alias_mode(output, index)

elif command.startswith("queuestat"):
"""show queue counters"""
"""Show queue counters"""
index = 0
if output.startswith("Port"):
output = output.replace("Port", "Port".rjust(
iface_alias_converter.alias_max_length))
print_output_in_alias_mode(output, index)

elif command == "fdbshow":
"""show mac"""
"""Show mac"""
index = 3
if output.startswith("No."):
output = " " + output
Expand All @@ -479,13 +479,13 @@ def run_command_in_alias_mode(command):
print_output_in_alias_mode(output, index)

elif command.startswith("nbrshow"):
"""show arp"""
"""Show arp"""
index = 2
if "Vlan" in output:
output = output.replace('Vlan', ' Vlan')
print_output_in_alias_mode(output, index)
elif command.startswith("sudo ipintutil"):
"""show ip(v6) int"""
"""Show ip(v6) int"""
index = 0
if output.startswith("Interface"):
output = output.replace("Interface", "Interface".rjust(
Expand Down

0 comments on commit 1a75870

Please sign in to comment.