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": "1",
"peer-up-vlan-bitset": "35-37,100-101,104-105",
"peerlink-ifindex": "Po2"
}
},
"TABLE_vpc": {
"ROW_vpc": [
{
"es-attr": "DF: Invalid",
"phy-port-if-removed": "disabled",
"up-vlan-bitset": "35,100-101,105",
"vpc-consistency": "consistent",
"vpc-consistency-status": "SUCCESS",
"vpc-id": "35",
"vpc-ifindex": "Po101",
"vpc-port-state": "1",
"vpc-thru-peerlink": "0"
},
{
"es-attr": "DF: Invalid",
"phy-port-if-removed": "disabled",
"up-vlan-bitset": "-",
"vpc-consistency": "consistent",
"vpc-consistency-status": "SUCCESS",
"vpc-id": "36",
"vpc-ifindex": "Po36",
"vpc-port-state": "0",
"vpc-thru-peerlink": "1"
},
{
"es-attr": "DF: Invalid",
"phy-port-if-removed": "disabled",
"up-vlan-bitset": "36,100-101,104",
"vpc-consistency": "consistent",
"vpc-consistency-status": "SUCCESS",
"vpc-id": "100",
"vpc-ifindex": "Po100",
"vpc-port-state": "1",
"vpc-thru-peerlink": "0"
}
]
},
"dual-active-excluded-vlans": "-",
"num-of-vpcs": "3",
"operational-l3-peer": "Disabled",
"peer-gateway": "0",
"vpc-auto-recovery-status": "Disabled",
"vpc-delay-restore-status": "Timer is off.(timeout = 30s)",
"vpc-delay-restore-svi-status": "Timer is off.(timeout = 10s)",
"vpc-domain-id": "2",
"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": "inconsistent",
"vpc-type-2-consistency-status": "INVALID"
},
"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:
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_vpc_consistency": {
"ROW_vpc_consistency": [
{
"vpc-param-local-val": "Enabled",
"vpc-param-name": "STP MST Simulate PVST",
"vpc-param-peer-val": "Enabled",
"vpc-param-type": "1"
},
{
"vpc-param-local-val": "Normal, Disabled, Disabled",
"vpc-param-name": "STP Port Type, Edge BPDUFilter, Edge BPDUGuard",
"vpc-param-peer-val": "Normal, Disabled, Disabled",
"vpc-param-type": "1"
},
{
"vpc-param-local-val": "\"\"",
"vpc-param-name": "STP MST Region Name",
"vpc-param-peer-val": "\"\"",
"vpc-param-type": "1"
},
{
"vpc-param-local-val": "None",
"vpc-param-name": "STP Disabled",
"vpc-param-peer-val": "None",
"vpc-param-type": "1"
},
{
"vpc-param-local-val": "Rapid-PVST",
"vpc-param-name": "STP Mode",
"vpc-param-peer-val": "Rapid-PVST",
"vpc-param-type": "1"
},
{
"vpc-param-local-val": "Enabled",
"vpc-param-name": "STP Bridge Assurance",
"vpc-param-peer-val": "Enabled",
"vpc-param-type": "1"
},
{
"vpc-param-local-val": "Disabled",
"vpc-param-name": "STP Loopguard",
"vpc-param-peer-val": "Disabled",
"vpc-param-type": "1"
},
{
"vpc-param-local-val": "",
"vpc-param-name": "STP MST Region Instance to VLAN Mapping",
"vpc-param-peer-val": "",
"vpc-param-type": "1"
},
{
"vpc-param-local-val": "0",
"vpc-param-name": "STP MST Region Revision",
"vpc-param-peer-val": "0",
"vpc-param-type": "1"
},
{
"vpc-param-local-val": "100-101,104-105",
"vpc-param-name": "Interface-vlan admin up",
"vpc-param-peer-val": "100-101,104-105",
"vpc-param-type": "2"
},
{
"vpc-param-local-val": "100-101,104-105",
"vpc-param-name": "Interface-vlan routing capability",
"vpc-param-peer-val": "100-101,104-105",
"vpc-param-type": "2"
},
{
"vpc-param-local-val": "",
"vpc-param-name": "Xconnect Vlans",
"vpc-param-peer-val": "",
"vpc-param-type": "1"
},
{
"vpc-param-local-val": "([0-7], [], [], [], [], [])",
"vpc-param-name": "QoS (Cos)",
"vpc-param-peer-val": "([0,4-7], [1], [2], [3], [], [])",
"vpc-param-type": "2"
},
{
"vpc-param-local-val": "(1500, 1500, 1500, 1500, 1500, 1500)",
"vpc-param-name": "Network QoS (MTU)",
"vpc-param-peer-val": "(1500, 1500, 1500, 1500, 1500, 1500)",
"vpc-param-type": "2"
},
{
"vpc-param-local-val": "(F, F, F, F, F, F)",
"vpc-param-name": "Network Qos (Pause: T->Enabled, F->Disabled)",
"vpc-param-peer-val": "(F, F, F, F, F, F)",
"vpc-param-type": "2"
},
{
"vpc-param-local-val": "(100, 0, 0, 0, 0, 0)",
"vpc-param-name": "Input Queuing (Bandwidth)",
"vpc-param-peer-val": "(100, 0, 0, 0, 0, 0)",
"vpc-param-type": "2"
},
{
"vpc-param-local-val": "(F, F, F, F, F, F)",
"vpc-param-name": "Input Queuing (Absolute Priority: T->Enabled, F->Disabled)",
"vpc-param-peer-val": "(F, F, F, F, F, F)",
"vpc-param-type": "2"
},
{
"vpc-param-local-val": "(100, 0, 0, 0, 0, 0)",
"vpc-param-name": "Output Queuing (Bandwidth Remaining)",
"vpc-param-peer-val": "(20, 0, 0, 0, 0, 0)",
"vpc-param-type": "2"
},
{
"vpc-param-local-val": "(F, F, F, F, F, F)",
"vpc-param-name": "Output Queuing (Absolute Priority: T->Enabled, F->Disabled)",
"vpc-param-peer-val": "(F, F, F, F, F, F)",
"vpc-param-type": "2"
},
{
"vpc-param-local-val": "warp",
"vpc-param-name": "HW profile Forwarding Mode",
"vpc-param-peer-val": "warp",
"vpc-param-type": "1"
},
{
"vpc-param-local-val": "35-37,100-101,104-105",
"vpc-param-name": "Allowed VLANs",
"vpc-param-peer-val": "35-37,100-101,104-105",
"vpc-param-type": "-"
},
{
"vpc-param-local-val": "-",
"vpc-param-name": "Local suspended VLANs",
"vpc-param-peer-val": "-",
"vpc-param-type": "-"
}
]
}
},
"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:
CLI Output |
---|
|