[Sonic-utilities]: Added commands to view acl and port running configs #557
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow commands are added-
Signed-off-by: Prem Prakash [email protected]
- What I did
Added above show commands, sonic-config-engine changes are under sonic-net/sonic-buildimage#3036
- How to verify it
Built the python-sonic-utilities deb package and installed it in the box and tested it.
- New command output (if the output of a command-line utility has changed)
admin@lnos-x1-a-csw02:~$ show runningconfiguration ?
Usage: show runningconfiguration [OPTIONS] COMMAND [ARGS]...
Show current running configuration information
Options:
-?, -h, --help Show this message and exit.
Commands:
accesslist Show acl running configuration
all Show full running configuration
bgp Show BGP running configuration
interface Show port running configuration
interfaces Show interfaces running configuration
ntp Show NTP running configuration
snmp Show SNMP information
admin@lnos-x1-a-csw02:
$ show runningconfiguration accesslist$ show runningconfiguration interface{
"ACL_RULE": {
"NO-NSW-PACL-V4|DEFAULT_DENY": {
"PACKET_ACTION": "DROP",
"IP_TYPE": "IPv4ANY",
"PRIORITY": "0"
},
"NO-NSW-PACL-V4|Rule_20": {
"PACKET_ACTION": "FORWARD",
"DST_IP": "X.X.X.0/24",
"SRC_IP": "X.X.0.0/16",
"IP_TYPE": "IPv4ANY",
"PRIORITY": "999980"
}
}
}
admin@lnos-x1-a-csw02:
{
"PORT": {
"Ethernet0": {
"index": "1",
"lanes": "65,66,67,68",
"mtu": "9100",
"alias": "Eth1",
"admin_status": "up",
"speed": "100000"
},
"Ethernet4": {
"index": "2",
"lanes": "69,70,71,72",
"mtu": "9100",
"alias": "Eth2",
"admin_status": "up",
"speed": "100000"
},
"Ethernet8": {
"index": "3",
"lanes": "73,74,75,76",
"mtu": "9100",
"alias": "Eth3",
"admin_status": "up",
"speed": "100000"
},
"Ethernet12": {
"index": "4",
"lanes": "77,78,79,80",
"mtu": "9100",
"alias": "Eth4",
"admin_status": "up",
"speed": "100000"
},
"Ethernet16": {
"index": "5",
"lanes": "33,34,35,36",
"mtu": "9100",
"alias": "Eth5",
"admin_status": "up",
"speed": "100000"
},
"Ethernet20": {
"index": "6",
"lanes": "37,38,39,40",
"mtu": "9100",
"alias": "Eth6",
"admin_status": "up",
"speed": "100000"
},
"Ethernet24": {
"index": "7",
"lanes": "41,42,43,44",
"mtu": "9100",
"alias": "Eth7",
"admin_status": "up",
"speed": "100000"
},
"Ethernet28": {
"index": "8",
"lanes": "45,46,47,48",
"mtu": "9100",
"alias": "Eth8",
"admin_status": "up",
"speed": "100000"
},
"Ethernet32": {
"index": "9",
"lanes": "49,50,51,52",
"mtu": "9100",
"alias": "Eth9",
"admin_status": "up",
"speed": "100000"
},
"Ethernet36": {
"index": "10",
"lanes": "53,54,55,56",
"mtu": "9100",
"alias": "Eth10",
"admin_status": "up",
"speed": "100000"
},
"Ethernet40": {
"index": "11",
"lanes": "57,58,59,60",
"mtu": "9100",
"alias": "Eth11",
"admin_status": "up",
"speed": "100000"
},
"Ethernet44": {
"index": "12",
"lanes": "61,62,63,64",
"mtu": "9100",
"alias": "Eth12",
"admin_status": "up",
"speed": "100000"
},
"Ethernet48": {
"index": "13",
"lanes": "81,82,83,84",
"mtu": "9100",
"alias": "Eth13",
"admin_status": "up",
"speed": "100000"
},
"Ethernet52": {
"index": "14",
"lanes": "85,86,87,88",
"mtu": "9100",
"alias": "Eth14",
"admin_status": "up",
"speed": "100000"
},
"Ethernet56": {
"index": "15",
"lanes": "89,90,91,92",
"mtu": "9100",
"alias": "Eth15",
"admin_status": "up",
"speed": "100000"
},
"Ethernet60": {
"index": "16",
"lanes": "93,94,95,96",
"mtu": "9100",
"alias": "Eth16",
"admin_status": "up",
"speed": "100000"
},
"Ethernet64": {
"index": "17",
"lanes": "97,98,99,100",
"mtu": "9100",
"alias": "Eth17",
"admin_status": "up",
"speed": "100000"
},
"Ethernet68": {
"index": "18",
"lanes": "101,102,103,104",
"mtu": "9100",
"alias": "Eth18",
"admin_status": "up",
"speed": "100000"
},
"Ethernet72": {
"index": "19",
"lanes": "105,106,107,108",
"mtu": "9100",
"alias": "Eth19",
"admin_status": "up",
"speed": "100000"
},
"Ethernet76": {
"index": "20",
"lanes": "109,110,111,112",
"mtu": "9100",
"alias": "Eth20",
"admin_status": "up",
"speed": "100000"
},
"Ethernet80": {
"index": "21",
"lanes": "1,2,3,4",
"mtu": "9100",
"alias": "Eth21",
"admin_status": "up",
"speed": "100000"
},
"Ethernet84": {
"index": "22",
"lanes": "5,6,7,8",
"mtu": "9100",
"alias": "Eth22",
"admin_status": "up",
"speed": "100000"
},
"Ethernet88": {
"index": "23",
"lanes": "9,10,11,12",
"mtu": "9100",
"alias": "Eth23",
"admin_status": "up",
"speed": "100000"
},
"Ethernet92": {
"index": "24",
"lanes": "13,14,15,16",
"mtu": "9100",
"alias": "Eth24",
"admin_status": "up",
"speed": "100000"
},
"Ethernet96": {
"index": "25",
"lanes": "17,18,19,20",
"mtu": "9100",
"alias": "Eth25",
"admin_status": "up",
"speed": "100000"
},
"Ethernet100": {
"index": "26",
"lanes": "21,22,23,24",
"mtu": "9100",
"alias": "Eth26",
"admin_status": "up",
"speed": "100000"
},
"Ethernet104": {
"index": "27",
"lanes": "25,26,27,28",
"mtu": "9100",
"alias": "Eth27",
"admin_status": "up",
"speed": "100000"
},
"Ethernet108": {
"index": "28",
"lanes": "29,30,31,32",
"mtu": "9100",
"alias": "Eth28",
"admin_status": "up",
"speed": "100000"
},
"Ethernet112": {
"index": "29",
"lanes": "113,114,115,116",
"mtu": "9100",
"alias": "Eth29",
"admin_status": "up",
"speed": "100000"
},
"Ethernet116": {
"index": "30",
"lanes": "117,118,119,120",
"mtu": "9100",
"alias": "Eth30",
"admin_status": "up",
"speed": "100000"
},
"Ethernet120": {
"index": "31",
"lanes": "121,122,123,124",
"mtu": "9100",
"alias": "Eth31",
"admin_status": "up",
"speed": "100000"
},
"Ethernet124": {
"index": "32",
"lanes": "125,126,127,128",
"mtu": "9100",
"alias": "Eth32",
"admin_status": "up",
"speed": "100000"
}
}
}
admin@lnos-x1-a-csw02:
$ ^C$ show runningconfiguration interface Ethernet0admin@lnos-x1-a-csw02:
{
"Ethernet0": {
"admin_status": "up",
"alias": "Eth1",
"index": "1",
"lanes": "65,66,67,68",
"mtu": "9100",
"speed": "100000"
}
}
admin@lnos-x1-a-csw02:
$$admin@lnos-x1-a-csw02:
-->