show ip ospf interface br vrf all
show ip ospf interface br vrf 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 ip ospf interface br vrf 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 ip ospf interface br vrf all ",
"msg": "Success",
"code": "200",
"body": {
"TABLE_ctx": {
"ROW_ctx": [
{
"ptag": "100",
"cname": "default",
"intf_count": 3,
"TABLE_intf": {
"ROW_intf": [
{
"ifname": "Eth6/23",
"index": 2,
"area": "0.0.0.0",
"cost": 40,
"state_str": "DR",
"nbr_total": 1,
"admin_status": "up"
},
{
"ifname": "Eth6/25",
"index": 3,
"area": "0.0.0.0",
"cost": 40,
"state_str": "DR",
"nbr_total": 0,
"admin_status": "up"
},
{
"ifname": "Lo0",
"index": 1,
"area": "0.0.0.0",
"cost": 1,
"state_str": "LOOPBACK",
"nbr_total": 0,
"admin_status": "up"
}
]
}
},
{
"ptag": "100",
"cname": "vrf1",
"intf_count": 2,
"TABLE_intf": {
"ROW_intf": [
{
"ifname": "SL1",
"index": 5,
"area": "0.0.0.0",
"cost": 1,
"state_str": "DOWN",
"nbr_total": 0,
"admin_status": "down"
},
{
"ifname": "Eth6/13",
"index": 4,
"area": "0.0.0.0",
"cost": 40,
"state_str": "BDR",
"nbr_total": 1,
"admin_status": "up"
}
]
}
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip ospf interface br vrf all command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show ip ospf neighbors summary vrf all
show ip ospf neighbors summary vrf 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 ip ospf neighbors summary vrf 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 ip ospf neighbors summary vrf all ",
"msg": "Success",
"code": "200",
"body": {
"TABLE_ctx": {
"ROW_ctx": [
{
"ptag": "100",
"cname": "default",
"TABLE_intf": {
"ROW_intf": [
{
"total": "true",
"down": 0,
"attempt": 0,
"init": 0,
"twoway": 0,
"exstart": 0,
"exchange": 0,
"loading": 0,
"full": 1,
"if_total": 1
},
{
"ifname": "Eth6/23",
"down": 0,
"attempt": 0,
"init": 0,
"twoway": 0,
"exstart": 0,
"exchange": 0,
"loading": 0,
"full": 1,
"if_total": 1
}
]
}
},
{
"ptag": "100",
"cname": "vrf1",
"TABLE_intf": {
"ROW_intf": [
{
"total": "true",
"down": 0,
"attempt": 0,
"init": 0,
"twoway": 0,
"exstart": 0,
"exchange": 0,
"loading": 0,
"full": 1,
"if_total": 1
},
{
"ifname": "Eth6/13",
"down": 0,
"attempt": 0,
"init": 0,
"twoway": 0,
"exstart": 0,
"exchange": 0,
"loading": 0,
"full": 1,
"if_total": 1
}
]
}
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip ospf neighbors summary vrf all command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show ip ospf test virtual-links brief vrf all
show ip ospf test virtual-links brief vrf 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 ip ospf test virtual-links brief vrf 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 ip ospf test virtual-links brief vrf all ",
"msg": "Success",
"code": "200",
"body": {
"TABLE_ctx": {
"ROW_ctx": {
"ptag": "test",
"cname": "default",
"vlink_count": 1,
"TABLE_vlink": {
"ROW_vlink": {
"nbr_rid": "1.1.1.1",
"vlink_num": 1,
"transit_area": "0.0.0.1",
"cost": 40,
"if_state": "up"
}
}
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip ospf test virtual-links brief vrf all command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show ospfv3 100 virtual-links br vrf all
show ospfv3 100 virtual-links br vrf 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 ospfv3 100 virtual-links br vrf 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 ospfv3 100 virtual-links br vrf all ",
"msg": "Success",
"code": "200",
"body": {
"TABLE_ctx": {
"ROW_ctx": [
{
"ptag": "100",
"cname": "default",
"vlink_count": 0
},
{
"ptag": "100",
"cname": "red",
"vlink_count": 1,
"TABLE_vlink": {
"ROW_vlink": {
"nbr_rid": "191.1.1.1",
"vlink_num": 1,
"transit_area": "0.0.0.1",
"cost": 40,
"if_state": "up"
}
}
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ospfv3 100 virtual-links br vrf all command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show ospfv3 interface brief vrf all
show ospfv3 interface brief vrf 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 ospfv3 interface brief vrf 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 ospfv3 interface brief vrf all ",
"msg": "Success",
"code": "200",
"body": {
"TABLE_ctx": {
"ROW_ctx": [
{
"ptag": "1",
"cname": "default",
"intf_count": 2,
"TABLE_intf": {
"ROW_intf": [
{
"ifname": "Eth6/3",
"index": 2,
"area": "0.0.0.0",
"cost": 40,
"state_str": "DOWN",
"nbr_total": 0,
"admin_status": "down"
},
{
"ifname": "Lo0",
"index": 1,
"area": "0.0.0.0",
"cost": 1,
"state_str": "LOOPBACK",
"nbr_total": 0,
"admin_status": "up"
}
]
}
},
{
"ptag": "100",
"cname": "default",
"intf_count": 2,
"TABLE_intf": {
"ROW_intf": [
{
"ifname": "Eth6/23",
"index": 1,
"area": "0.0.0.0",
"cost": 40,
"state_str": "BDR",
"nbr_total": 1,
"admin_status": "up"
},
{
"ifname": "Lo11",
"index": 2,
"area": "0.0.0.0",
"cost": 1,
"state_str": "LOOPBACK",
"nbr_total": 0,
"admin_status": "up"
}
]
}
},
{
"ptag": "100",
"cname": "red",
"intf_count": 1,
"TABLE_intf": {
"ROW_intf": {
"ifname": "Eth6/23.1",
"index": 3,
"area": "0.0.0.1",
"cost": 40,
"state_str": "BDR",
"nbr_total": 1,
"admin_status": "up"
}
}
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ospfv3 interface brief vrf all command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show ospfv3 neighbors vrf all
show ospfv3 neighbors vrf 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 ospfv3 neighbors vrf 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 ospfv3 neighbors vrf all ",
"msg": "Success",
"code": "200",
"body": {
"TABLE_ctx": {
"ROW_ctx": [
{
"ptag": "100",
"cname": "default",
"nbrcount": 1,
"TABLE_nbr": {
"ROW_nbr": {
"rid": "1.1.1.1",
"priority": 1,
"state": "FULL",
"drstate": "DR",
"uptime": "PT30S",
"ifid": 377,
"intf": "Eth6/23",
"addr": "fe80::4255:39ff:fe0b:dd41"
}
}
},
{
"ptag": "100",
"cname": "red",
"nbrcount": 1,
"TABLE_nbr": {
"ROW_nbr": {
"rid": "191.1.1.1",
"priority": 1,
"state": "FULL",
"drstate": "DR",
"uptime": "PT18S",
"ifid": 351,
"intf": "Eth6/23.1",
"addr": "fe80::4255:39ff:fe0b:dd41"
}
}
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ospfv3 neighbors vrf all command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|