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:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 6.0(2)A8(8).

CLI Output
Switch# show vpc brief
Legend:
(*) - local vPC is down, forwarding via vPC peer-link

vPC domain id                     : 1
Peer status : peer adjacency formed ok
vPC keep-alive status : peer is alive
Configuration consistency status : success Per-vlan consistency status : success
Type-2 consistency status : success vPC role : primary, operational secondary Number of vPCs configured : 1
Peer Gateway : Enabled Peer gateway excluded VLANs : - Dual-active excluded VLANs : - Graceful Consistency Check : Enabled Operational Layer3 Peer-router : Disabled Auto-recovery status : Disabled vPC Peer-link status --------------------------------------------------------------------- id Port Status Active vlans
-- ---- ------ -------------------------------------------------- 1 Po45 up 26,551-651,2890
vPC status ---------------------------------------------------------------------------- id Port Status Consistency Reason Active vlans ------ ----------- ------ ----------- -------------------------- ----------- 1111 Po1111 up success success 26,551-651, 2890

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:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 6.0(2)A8(8).

CLI Output
Switch# show vpc consistency-parameters global

    Legend:
        Type 1 : vPC will be suspended in case of mismatch

Name                        Type  Local Value            Peer Value
------------- ---- ---------------------- ----------------------- QoS 2 ([], [], [], [], [], ([], [], [], [], [],
[], [], []) [], [], [])
Network QoS (MTU) 2 (9216, 0, 0, 0, 0, 0, (9216, 0, 0, 0, 0, 0, 0, 0) 0, 0)
Network Qos (Pause) 2 (F, F, F, F, F, F, F, (F, F, F, F, F, F, F, F) F)
Network Qos (WRED) 2 (F, F, F, F, F, F, F, (F, F, F, F, F, F, F, F) F)
Network Qos (ECN) 2 (F, F, F, F, F, F, F, (F, F, F, F, F, F, F, F) F)
Output Queuing (Bandwidth) 2 (100, 0, 0, 0, 0, 0, (100, 0, 0, 0, 0, 0,
0, 0) 0, 0)
Output Queuing (Absolute 2 (F, F, F, F, F, F, F, (F, F, F, F, F, F, F, Priority) F) F)
STP Mode 1 Rapid-PVST Rapid-PVST
STP Disabled 1 None None
STP MST Region Name 1 "" ""
STP MST Region Revision 1 0 0
STP MST Region Instance to 1
VLAN Mapping
STP Loopguard 1 Disabled Disabled
STP Bridge Assurance 1 Enabled Enabled
STP Port Type, Edge 1 Normal, Disabled, Normal, Disabled,
BPDUFilter, Edge BPDUGuard Disabled Disabled
STP MST Simulate PVST 1 Enabled Enabled
HW profile Forwarding Mode 1 normal normal
IGMP Snooping Group-Limit 2 8190 8190
Interface-vlan admin up 2 26,2890 26,2890
Interface-vlan routing 2 26,2890 26,2890
capability
VTP domain 2 -
VTP version 2 - 1
VTP mode 2 - Off
VTP password 2 -
VTP pruning status 2 - Disabled
Allowed VLANs - 26,551-651,2890 26,551-651,2890
Local suspended VLANs - - -