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:

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

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show ip ospf interface br vrf all
OSPF Process ID 100 VRF default
Total number of interface: 3
Interface ID Area Cost State Neighbors Status Eth6/23 2 0.0.0.0 40 DR 1 up
Eth6/25 3 0.0.0.0 40 DR 0 up
Lo0 1 0.0.0.0 1 LOOPBACK 0 up
OSPF Process ID 100 VRF vrf1 Total number of interface: 2 Interface ID Area Cost State Neighbors Status SL1 5 0.0.0.0 1 DOWN 0 down
Eth6/13 4 0.0.0.0 40 BDR 1 up

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:

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

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show ip ospf neighbors summary vrf all
 OSPF Process ID 100 VRF default, Neighbor Summary 
 Interface Down Attempt Init TwoWay ExStart Exchange Loading Full  Total
     Total    0       0    0      0       0        0       0    1      1
   Eth6/23    0       0    0      0       0        0       0    1      1

 OSPF Process ID 100 VRF vrf1, Neighbor Summary
 Interface Down Attempt Init TwoWay ExStart Exchange Loading Full  Total
     Total    0       0    0      0       0        0       0    1      1
   Eth6/13    0       0    0      0       0        0       0    1      1




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:

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

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show ip ospf test virtual-links brief vrf all
 OSPF Process ID test VRF default
 Total number of vlinks: 1
 Remote Router    ID     Transit Area    Cost    Status
 1.1.1.1          1      0.0.0.1         40      up



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:

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

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show ospfv3 100 virtual-links br vrf all
 OSPFv3 Process ID 100 VRF default
Total number of vlinks: 0
Remote Router ID Transit Area Cost Status OSPFv3 Process ID 100 VRF red
Total number of vlinks: 1
Remote Router ID Transit Area Cost Status 191.1.1.1 1 0.0.0.1 40 up

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:

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

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show ospfv3 interface brief vrf all
 OSPFv3 Process ID 1 VRF default
Total number of interface: 2
Interface ID Area Cost State Neighbors Status Eth6/3 2 0.0.0.0 40 DOWN 0 down
Lo0 1 0.0.0.0 1 LOOPBACK 0 up
OSPFv3 Process ID 100 VRF default Total number of interface: 2
Interface ID Area Cost State Neighbors Status Eth6/23 1 0.0.0.0 40 BDR 1 up
Lo11 2 0.0.0.0 1 LOOPBACK 0 up
OSPFv3 Process ID 100 VRF red Total number of interface: 1 Interface ID Area Cost State Neighbors Status Eth6/23.1 3 0.0.0.1 40 BDR 1 up

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:

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

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show ospfv3 neighbors vrf all
 OSPFv3 Process ID 100 VRF default
Total number of neighbors: 1
Neighbor ID Pri State Up Time Interface ID Interface 1.1.1.1 1 FULL/DR 00:00:25 377 Eth6/23
Neighbor address fe80::4255:39ff:fe0b:dd41
OSPFv3 Process ID 100 VRF red
Total number of neighbors: 1
Neighbor ID Pri State Up Time Interface ID Interface 191.1.1.1 1 FULL/DR 00:00:13 351 Eth6/23.1 Neighbor address fe80::4255:39ff:fe0b:dd41