Skip to content

Commit

Permalink
[show] Add 'show boot' command (sonic-net#630)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsvanduyn authored and jleveque committed Sep 5, 2019
1 parent 6e2b1bf commit 8d0df0a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
15 changes: 15 additions & 0 deletions doc/Command-Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,21 @@ This command displays the current date and time configured on the system
Mon Mar 25 20:25:16 UTC 2019
```

**show boot**
This command displays the current OS image, the image loaded on next reboot, and the lists the available images on the system

- Usage:
show boot

- Example:
```
admin@sonic:~$ show boot
Current: SONiC-OS-20181130.31
Next: SONiC-OS-20181130.31
Available:
SONiC-OS-20181130.31
```

**show environment**
This command displays the platform environmentals, such as voltages, temperatures and fan speeds

Expand Down
11 changes: 11 additions & 0 deletions show/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1860,6 +1860,17 @@ def ecn():
click.echo(proc.stdout.read())


#
# 'boot' command ("show boot")
#
@cli.command('boot')
def boot():
"""Show boot configuration"""
cmd = "sudo sonic_installer list"
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
click.echo(proc.stdout.read())


# 'mmu' command ("show mmu")
#
@cli.command('mmu')
Expand Down

0 comments on commit 8d0df0a

Please sign in to comment.