show lacp counters
show lacp counters
import json
"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show lacp counters ",
"output_format": "json"
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
{
"ins_api": {
"type": "cli_show",
"version": "1.0",
"sid": "eoc",
"outputs": {
"output": {
"input": "show lacp counters ",
"msg": "Success",
"code": "200",
"body": {
"TABLE_interface": {
"ROW_interface": [
{
"interface": "port-channel1",
"TABLE_member": {
"ROW_member": {
"port": "Ethernet1/31",
"pdus-sent": "857",
"pdus-rcvd": "857",
"marker-rcvd": "0",
"marker-resp-sent": "0",
"pkt-errors": "0"
}
}
},
{
"interface": "port-channel2",
"TABLE_member": {
"ROW_member": [
{
"port": "Ethernet1/39",
"pdus-sent": "858",
"pdus-rcvd": "855",
"marker-rcvd": "0",
"marker-resp-sent": "0",
"pkt-errors": "0"
},
{
"port": "Ethernet1/41",
"pdus-sent": "858",
"pdus-rcvd": "859",
"marker-rcvd": "0",
"marker-resp-sent": "0",
"pkt-errors": "0"
}
]
}
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show lacp counters command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show lacp neighbor
show lacp neighbor
import json
"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show lacp neighbor ",
"output_format": "json"
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
{
"ins_api": {
"type": "cli_show",
"version": "1.0",
"sid": "eoc",
"outputs": {
"output": {
"input": "show lacp neighbor ",
"msg": "Success",
"code": "200",
"body": {
"TABLE_interface": {
"ROW_interface": [
{
"interface": "port-channel1",
"TABLE_member": {
"ROW_member": {
"port": "Ethernet1/31",
"partner-system-id": "32768,e8-65-49-cc-92-3f",
"partner-port-num": "0x11f",
"partner-age": "25168",
"partner-flags": "SA",
"partner-port-priority": "32768",
"partner-oper-key": "0x8000",
"partner-port-state": "0x3130303d"
}
}
},
{
"interface": "port-channel2",
"TABLE_member": {
"ROW_member": [
{
"port": "Ethernet1/39",
"partner-system-id": "32768,e8-65-49-cc-92-3f",
"partner-port-num": "0x127",
"partner-age": "25167",
"partner-flags": "SA",
"partner-port-priority": "32768",
"partner-oper-key": "0x1",
"partner-port-state": "0x7461673d"
},
{
"port": "Ethernet1/41",
"partner-system-id": "32768,e8-65-49-cc-92-3f",
"partner-port-num": "0x129",
"partner-age": "25166",
"partner-flags": "SA",
"partner-port-priority": "32768",
"partner-oper-key": "0x1",
"partner-port-state": "0x78303d3d"
}
]
}
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show lacp neighbor command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show lacp port-channel
show lacp port-channel
import json
"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show lacp port-channel ",
"output_format": "json"
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
{
"ins_api": {
"type": "cli_show",
"version": "1.0",
"sid": "eoc",
"outputs": {
"output": {
"input": "show lacp port-channel ",
"msg": "Success",
"code": "200",
"body": {
"TABLE_interface": {
"ROW_interface": [
{
"interface": "port-channel1",
"aggr-mac-address": "2c-d0-2d-50-be-ff",
"local-system-priority": "0x8000",
"local-system-id": "2c-d0-2d-50-be-ff",
"local-admin-key": "0x8001",
"local-oper-key": "0x8001",
"partner-system-priority": "0x8000",
"partner-system-id": "e8-65-49-cc-92-3f",
"partner-oper-key": "0x8000",
"max-delay": "0",
"agg-or-indiv": "0",
"port-list": "Ethernet1/31"
},
{
"interface": "port-channel2",
"aggr-mac-address": "2c-d0-2d-50-be-ff",
"local-system-priority": "0x8000",
"local-system-id": "2c-d0-2d-50-be-ff",
"local-admin-key": "0x8002",
"local-oper-key": "0x8002",
"partner-system-priority": "0x8000",
"partner-system-id": "e8-65-49-cc-92-3f",
"partner-oper-key": "0x1",
"max-delay": "0",
"agg-or-indiv": "1",
"port-list": [
"Ethernet1/39",
"Ethernet1/41"
]
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show lacp port-channel command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show lacp system-identifier
show lacp system-identifier
import json
"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show lacp system-identifier ",
"output_format": "json"
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
{
"ins_api": {
"type": "cli_show",
"version": "1.0",
"sid": "eoc",
"outputs": {
"output": {
"input": "show lacp system-identifier ",
"msg": "Success",
"code": "200",
"body": {
"system-priority": "32768",
"system-mac": "2c-d0-2d-50-be-ff"
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show lacp system-identifier command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|