File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1327,14 +1327,17 @@ def pfc(ctx):
1327
1327
#
1328
1328
1329
1329
@pfc .command ()
1330
+ @click .argument ('interface_name' , metavar = '<interface_name>' , required = True )
1330
1331
@click .argument ('status' , type = click .Choice (['on' , 'off' ]))
1331
1332
@click .pass_context
1332
- def asymmetric (ctx , status ):
1333
+ def asymmetric (ctx , interface_name , status ):
1333
1334
"""Set asymmetric PFC configuration."""
1334
- config_db = ctx .obj ["config_db" ]
1335
- interface = ctx .obj ["interface_name" ]
1335
+ if get_interface_naming_mode () == "alias" :
1336
+ interface_name = interface_alias_to_name (interface_name )
1337
+ if interface_name is None :
1338
+ ctx .fail ("'interface_name' is None!" )
1336
1339
1337
- run_command ("pfc config asymmetric {0} {1}" .format (status , interface ))
1340
+ run_command ("pfc config asymmetric {0} {1}" .format (status , interface_name ))
1338
1341
1339
1342
#
1340
1343
# 'platform' group ('config platform ...')
You can’t perform that action at this time.
0 commit comments