Skip to content

Commit

Permalink
Added cisco config platform commands (sonic-net#2242)
Browse files Browse the repository at this point in the history
What I did
Add cisco sub-command option under 'config platform' command

How I did it
In config/main.py, check the platform type and import the cisco.py file under cisco platform code when it's cisco-8000.

How to verify it
Run config platform -h to see all commands. We will be able to see config platform cisco. This is only available on cisco devices.

Signed-off-by: Yucai Gu yucgu@cisco.com
  • Loading branch information
yucgu authored and preetham-singh committed Nov 18, 2022
1 parent 091e3c5 commit 721248c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1209,6 +1209,10 @@ def config(ctx):
print("Caught an exception: " + str(e))
raise click.Abort()

if asic_type == 'cisco-8000':
from sonic_platform.cli.cisco import cisco
platform.add_command(cisco)

# Load database config files
load_db_config()

Expand Down

0 comments on commit 721248c

Please sign in to comment.