Skip to content

Commit

Permalink
Allow show ztp to display non-sensitive information visible to non-ro…
Browse files Browse the repository at this point in the history
…ot user (#872)

Removed user privileges checks. These changes fix #800. The ZTP PR sonic-net/sonic-ztp#13 is also required for these changes to work as expected.

```
admin@sonic:~$ show ztp status
ZTP Admin Mode : True
ZTP Service : Processing
ZTP Status : IN-PROGRESS
ZTP Source : local-fs (/host/ztp/ztp_data_local.json)
Runtime : 06m 26s
Timestamp : 2020-04-08 13:08:22 UTC

ZTP Service is active

01-test-plugin: IN-PROGRESS
```

Signed-off-by: Rajendra Dendukuri <rajendra.dendukuri@broadcom.com>
  • Loading branch information
malletvapid23 committed Apr 29, 2020
1 parent 2e7034b commit 87397b2
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions show/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2848,9 +2848,6 @@ def ztp(status, verbose):
if os.path.isfile('/usr/bin/ztp') is False:
exit("ZTP feature unavailable in this image version")

if os.geteuid() != 0:
exit("Root privileges are required for this operation")

cmd = "ztp status"
if verbose:
cmd = cmd + " --verbose"
Expand Down

0 comments on commit 87397b2

Please sign in to comment.