@@ -1424,12 +1424,12 @@ def acl(verbose):
1424
1424
@runningconfiguration .command ()
1425
1425
@click .argument ('portname' , required = False )
1426
1426
@click .option ('--verbose' , is_flag = True , help = "Enable verbose output" )
1427
- def ports (interfacename , verbose ):
1427
+ def ports (portname , verbose ):
1428
1428
"""Show ports running configuration"""
1429
1429
cmd = "sonic-cfggen -d --var-json PORT"
1430
1430
1431
1431
if portname is not None :
1432
- cmd += " {0} {1}" .format ("--port " , portname )
1432
+ cmd += " {0} {1}" .format ("--key " , portname )
1433
1433
1434
1434
run_command (cmd , display_cmd = verbose )
1435
1435
@@ -1449,10 +1449,10 @@ def bgp(verbose):
1449
1449
@click .option ('--verbose' , is_flag = True , help = "Enable verbose output" )
1450
1450
def interfaces (interfacename , verbose ):
1451
1451
"""Show interfaces running configuration"""
1452
- cmd = "cat /etc/network/interfaces "
1452
+ cmd = "sonic-cfggen -d --var-json INTERFACE "
1453
1453
1454
1454
if interfacename is not None :
1455
- cmd += " | grep {} -A 4 " .format (interfacename )
1455
+ cmd += " {0} {1} " .format ("--key" , interfacename )
1456
1456
1457
1457
run_command (cmd , display_cmd = verbose )
1458
1458
0 commit comments