show vrrpv3
show vrrpv3
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 vrrpv3",
"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 vrrpv3",
"msg": "Success",
"code": "200",
"body": {
"TABLE_grp": {
"ROW_grp": [
{
"intf": "Vlan2",
"id": 1,
"af": "IPv4",
"desc": "\"vrrpv3_json_test\"",
"state": "MASTER",
"duration": "2 mins 7.902 secs",
"vip": "4.4.4.100",
"vmac": "0000.5e00.0101",
"adv": 2000,
"preempt": "enabled",
"priority": 101,
"m_addr": "4.4.4.2",
"m_priority": 101,
"m_adv": 2000,
"m_expire": 1380
},
{
"intf": "Vlan2",
"id": 1,
"af": "IPv6",
"desc": "\"vrrpv3_v6_json_test\"",
"state": "MASTER",
"duration": "58.071 secs",
"vip": "fe80::101",
"TABLE_sec": {
"ROW_sec": {
"addr": "4000::100"
}
},
"vmac": "0000.5e00.0201",
"adv": 2000,
"preempt": "enabled",
"priority": 101,
"m_addr": "fe80::1034:12ff:fe34:1234",
"m_priority": 101,
"m_adv": 2000,
"m_expire": 852
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vrrpv3 command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show vrrpv3 all
show vrrpv3 all
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 vrrpv3 all",
"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 vrrpv3 all",
"msg": "Success",
"code": "200",
"body": {
"TABLE_grp": {
"ROW_grp": [
{
"intf": "Vlan2",
"id": 1,
"af": "IPv4",
"desc": "\"vrrpv3_json_test\"",
"state": "MASTER",
"duration": "3 mins 54.492 secs",
"vip": "4.4.4.100",
"vmac": "0000.5e00.0101",
"adv": 2000,
"preempt": "enabled",
"priority": 101,
"m_addr": "4.4.4.2",
"m_priority": 101,
"m_adv": 2000,
"m_expire": 1476
},
{
"intf": "Vlan2",
"id": 1,
"af": "IPv6",
"desc": "\"vrrpv3_v6_json_test\"",
"state": "MASTER",
"duration": "2 mins 44.661 secs",
"vip": "fe80::101",
"TABLE_sec": {
"ROW_sec": {
"addr": "4000::100"
}
},
"vmac": "0000.5e00.0201",
"adv": 2000,
"preempt": "enabled",
"priority": 101,
"m_addr": "fe80::1034:12ff:fe34:1234",
"m_priority": 101,
"m_adv": 2000,
"m_expire": 532
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vrrpv3 all command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show vrrpv3 brief
show vrrpv3 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 vrrpv3 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": {
"type": "cli_show",
"version": "1.0",
"sid": "eoc",
"outputs": {
"output": {
"input": "show vrrpv3 brief",
"msg": "Success",
"code": "200",
"body": {
"TABLE_vbrief": {
"ROW_vbrief": [
{
"intf_b": "Vlan2",
"id_b": 1,
"af_b": "IPv4",
"priority_b": 101,
"down_b": 0,
"owner_b": "N",
"preempt_b": "Y",
"state_b": "MASTER",
"m_addr_b": "4.4.4.2",
"vip_b": "4.4.4.100"
},
{
"intf_b": "Vlan2",
"id_b": 1,
"af_b": "IPv6",
"priority_b": 101,
"down_b": 0,
"owner_b": "N",
"preempt_b": "Y",
"state_b": "MASTER",
"m_addr_b": "fe80::1034:12ff:fe34:1234",
"vip_b": "fe80::101"
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vrrpv3 brief command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show vrrpv3 detail
show vrrpv3 detail
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 vrrpv3 detail",
"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 vrrpv3 detail",
"msg": "Success",
"code": "200",
"body": {
"TABLE_grp": {
"ROW_grp": [
{
"intf": "Vlan2",
"id": 1,
"af": "IPv4",
"desc": "\"vrrpv3_json_test\"",
"state": "MASTER",
"duration": "2 days 0 hours 52 mins",
"vip": "4.4.4.100",
"vmac": "0000.5e00.0101",
"adv": 2000,
"preempt": "enabled",
"priority": 101,
"m_addr": "4.4.4.2",
"m_priority": 101,
"m_adv": 2000,
"m_expire": 1803,
"adv_sent": 97670,
"adv_err": 0,
"adv_recvd": 0,
"v2adv_sent": 0,
"v2adv_err": 0,
"v2adv_recvd": 0,
"drops": 0,
"incompat": 0,
"conflict": 0,
"bad_count": 0,
"bad_config": 0,
"bad_advert": 0,
"bad_state": 0,
"bad_other": 0,
"init_master": 0,
"init_backup": 1,
"init_backup_time": "Fri Aug 03 07:11:48.658 UTC",
"back_master": 1,
"back_master_time": "Fri Aug 03 07:11:52.268 UTC",
"master_back": 0,
"mast_init": 0,
"back_init": 0
},
{
"intf": "Vlan2",
"id": 1,
"af": "IPv6",
"desc": "\"vrrpv3_v6_json_test\"",
"state": "MASTER",
"duration": "2 days 0 hours 51 mins",
"vip": "fe80::101",
"TABLE_sec": {
"ROW_sec": {
"addr": "4000::100"
}
},
"vmac": "0000.5e00.0201",
"adv": 2000,
"preempt": "enabled",
"priority": 101,
"m_addr": "fe80::1034:12ff:fe34:1234",
"m_priority": 101,
"m_adv": 2000,
"m_expire": 1308,
"adv_sent": 97623,
"adv_err": 0,
"adv_recvd": 0,
"v2adv_sent": 0,
"v2adv_err": 0,
"v2adv_recvd": 0,
"drops": 0,
"incompat": 0,
"conflict": 0,
"bad_count": 0,
"bad_config": 0,
"bad_advert": 0,
"bad_state": 0,
"bad_other": 0,
"init_master": 0,
"init_backup": 1,
"init_backup_time": "Fri Aug 03 07:12:58.488 UTC",
"back_master": 1,
"back_master_time": "Fri Aug 03 07:13:02.098 UTC",
"master_back": 0,
"mast_init": 0,
"back_init": 0
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vrrpv3 detail command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show vrrpv3 ipv4
show vrrpv3 ipv4
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 vrrpv3 ipv4",
"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 vrrpv3 ipv4",
"msg": "Success",
"code": "200",
"body": {
"TABLE_grp": {
"ROW_grp": {
"intf": "Vlan2",
"id": 1,
"af": "IPv4",
"desc": "\"vrrpv3_json_test\"",
"state": "MASTER",
"duration": "2 days 0 hours 55 mins",
"vip": "4.4.4.100",
"vmac": "0000.5e00.0101",
"adv": 2000,
"preempt": "enabled",
"priority": 101,
"m_addr": "4.4.4.2",
"m_priority": 101,
"m_adv": 2000,
"m_expire": 986
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vrrpv3 ipv4 command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show vrrpv3 ipv6
show vrrpv3 ipv6
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 vrrpv3 ipv6",
"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 vrrpv3 ipv6",
"msg": "Success",
"code": "200",
"body": {
"TABLE_grp": {
"ROW_grp": {
"intf": "Vlan2",
"id": 1,
"af": "IPv6",
"desc": "\"vrrpv3_v6_json_test\"",
"state": "MASTER",
"duration": "2 days 0 hours 54 mins",
"vip": "fe80::101",
"TABLE_sec": {
"ROW_sec": {
"addr": "4000::100"
}
},
"vmac": "0000.5e00.0201",
"adv": 2000,
"preempt": "enabled",
"priority": 101,
"m_addr": "fe80::1034:12ff:fe34:1234",
"m_priority": 101,
"m_adv": 2000,
"m_expire": 1650
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vrrpv3 ipv6 command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show vrrpv3 statistics
show vrrpv3 statistics
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 vrrpv3 statistics",
"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 vrrpv3 statistics",
"msg": "Success",
"code": "200",
"body": {
"global_drops": 0,
"TABLE_istats": {
"ROW_istats": {
"i_intf": "Vlan2",
"i_drops": 0,
"ttl": 0,
"checksum": 0,
"version": 0,
"type": 0,
"length": 0,
"badid": 0,
"other": 0
}
},
"TABLE_grp": {
"ROW_grp": [
{
"intf": "Vlan2",
"id": 1,
"af": "IPv4",
"state": "MASTER",
"duration": "2 days 0 hours 53 mins",
"adv_sent": 97707,
"adv_err": 0,
"adv_recvd": 0,
"v2adv_sent": 0,
"v2adv_err": 0,
"v2adv_recvd": 0,
"drops": 0,
"incompat": 0,
"conflict": 0,
"bad_count": 0,
"bad_config": 0,
"bad_advert": 0,
"bad_state": 0,
"bad_other": 0,
"init_master": 0,
"init_backup": 1,
"init_backup_time": "Fri Aug 03 07:11:48.658 UTC",
"back_master": 1,
"back_master_time": "Fri Aug 03 07:11:52.268 UTC",
"master_back": 0,
"mast_init": 0,
"back_init": 0
},
{
"intf": "Vlan2",
"id": 1,
"af": "IPv6",
"state": "MASTER",
"duration": "2 days 0 hours 52 mins",
"adv_sent": 97660,
"adv_err": 0,
"adv_recvd": 0,
"v2adv_sent": 0,
"v2adv_err": 0,
"v2adv_recvd": 0,
"drops": 0,
"incompat": 0,
"conflict": 0,
"bad_count": 0,
"bad_config": 0,
"bad_advert": 0,
"bad_state": 0,
"bad_other": 0,
"init_master": 0,
"init_backup": 1,
"init_backup_time": "Fri Aug 03 07:12:58.488 UTC",
"back_master": 1,
"back_master_time": "Fri Aug 03 07:13:02.098 UTC",
"master_back": 0,
"mast_init": 0,
"back_init": 0
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vrrpv3 statistics command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show vrrpv3 vlan 2
show vrrpv3 vlan 2
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 vrrpv3 vlan 2",
"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 vrrpv3 vlan 2",
"msg": "Success",
"code": "200",
"body": {
"TABLE_grp": {
"ROW_grp": [
{
"intf": "Vlan2",
"id": 1,
"af": "IPv4",
"desc": "\"vrrpv3_json_test\"",
"state": "MASTER",
"duration": "2 days 0 hours 54 mins",
"vip": "4.4.4.100",
"vmac": "0000.5e00.0101",
"adv": 2000,
"preempt": "enabled",
"priority": 101,
"m_addr": "4.4.4.2",
"m_priority": 101,
"m_adv": 2000,
"m_expire": 1871
},
{
"intf": "Vlan2",
"id": 1,
"af": "IPv6",
"desc": "\"vrrpv3_v6_json_test\"",
"state": "MASTER",
"duration": "2 days 0 hours 53 mins",
"vip": "fe80::101",
"TABLE_sec": {
"ROW_sec": {
"addr": "4000::100"
}
},
"vmac": "0000.5e00.0201",
"adv": 2000,
"preempt": "enabled",
"priority": 101,
"m_addr": "fe80::1034:12ff:fe34:1234",
"m_priority": 101,
"m_adv": 2000,
"m_expire": 380
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vrrpv3 vlan 2 command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|