Skip to content

Commit

Permalink
Added cisco config platform commands (#2242) (#2418)
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

Signed-off-by: Yucai Gu yucgu@cisco.com
  • Loading branch information
yucgu authored Oct 3, 2022
1 parent be7da6b commit 342589e
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 @@ -1130,6 +1130,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 342589e

Please sign in to comment.