Skip to content

Commit 7419c67

Browse files
authored
Added cisco config platform commands (#2242)
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
1 parent 8760bbe commit 7419c67

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

config/main.py

+4
Original file line numberDiff line numberDiff line change
@@ -1209,6 +1209,10 @@ def config(ctx):
12091209
print("Caught an exception: " + str(e))
12101210
raise click.Abort()
12111211

1212+
if asic_type == 'cisco-8000':
1213+
from sonic_platform.cli.cisco import cisco
1214+
platform.add_command(cisco)
1215+
12121216
# Load database config files
12131217
load_db_config()
12141218

0 commit comments

Comments
 (0)