show vpc brief
show vpc brief
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 vpc brief",
"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": {
"outputs": {
"output": {
"body": {
"TABLE_peerlink": {
"ROW_peerlink": {
"peer-link-id": "1",
"peer-link-port-state": "enabled",
"peer-up-vlan-bitset": "26,551-651,2890",
"peerlink-ifindex": "Po45"
}
},
"TABLE_vpc": {
"ROW_vpc": {
"es-attr": "DF: Invalid",
"up-vlan-bitset": "26,551-651,2890",
"vpc-consistency": "consistent",
"vpc-consistency-status": "SUCCESS",
"vpc-id": "1111",
"vpc-ifindex": "Po1111",
"vpc-port-state": "enabled",
"vpc-thru-peerlink": "disabled"
}
},
"dual-active-excluded-vlans": "-",
"num-of-vpcs": "1",
"operational-l3-peer": "disabled",
"peer-gateway": "enabled",
"peer-gateway-excluded-vlans": "-",
"vpc-auto-recovery-status": "Disabled",
"vpc-domain-id": "1",
"vpc-end": [
"End of table",
"End of table"
],
"vpc-graceful-consistency-check-status": "enabled",
"vpc-hdr": "Start of vPC table",
"vpc-not-es": "vPC complex",
"vpc-peer-consistency": "consistent",
"vpc-peer-consistency-status": "SUCCESS",
"vpc-peer-keepalive-status": "peer-alive",
"vpc-peer-link-hdr": "Start of VPC peer-link table",
"vpc-peer-status": "peer-ok",
"vpc-peer-status-reason": "SUCCESS",
"vpc-per-vlan-peer-consistency": "consistent",
"vpc-role": "primary-secondary",
"vpc-type-2-consistency": "consistent",
"vpc-type-2-consistency-status": "SUCCESS"
},
"code": "200",
"input": "show vpc brief",
"msg": "Success"
}
},
"sid": "eoc",
"type": "cli_show",
"version": "1.0"
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vpc brief command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 6.0(2)A8(8).
| CLI Output |
|---|
|
show vpc consistency-parameters global
show vpc consistency-parameters global
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 vpc consistency-parameters global",
"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": {
"outputs": {
"output": {
"body": {
"table_name": "VPC Table"
},
"code": "200",
"input": "show vpc consistency-parameters global",
"msg": "Success"
}
},
"sid": "eoc",
"type": "cli_show",
"version": "1.0"
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vpc consistency-parameters global command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 6.0(2)A8(8).
| CLI Output |
|---|
|