show isis 2 adj det

show isis 2 adj det

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 isis 2 adj det",
  "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 isis 2 adj det",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_process_tag": {
            "ROW_process_tag": [
              {
                "process-tag-out": "2",
                "TABLE_vrf": {
                  "ROW_vrf": [
                    {
                      "vrf-name-out": "default",
                      "adj-summary-out": "false",
                      "adj-interface-out": "false",
                      "TABLE_process_adj": {
                        "ROW_process_adj": [
                          {
                            "adj-sys-name-out": "n9k-reg-4",
                            "adj-sys-id-out": "N/A",
                            "adj-usage-out": "2",
                            "adj-state-out": "UP",
                            "adj-hold-time-out": "00:00:29",
                            "adj-intf-name-out": "Ethernet1/21",
                            "adj-detail-set-out": "true",
                            "adj-transitions-out": "1",
                            "adj-flap-out": "true",
                            "adj-flap-time-out": "01:33:34",
                            "adj-ckt-type-out": "L2",
                            "adj-ipv4-addr-out": "45.1.1.1",
                            "adj-ipv6-addr-out": "0::",
                            "adj-bcast-out": "false",
                            "adj-bfd-ipv4-establish-out": "false",
                            "adj-bfd-ipv6-establish-out": "false",
                            "adj-resurrect-out": "false",
                            "adj-restart-capable-out": "true",
                            "adj-restart-ack-out": "false",
                            "adj-restart-mode-out": "false",
                            "adj-restart-adj-seen-ra-out": "false",
                            "adj-restart-adj-seen-csnp-out": "false",
                            "adj-restart-adj-seen-l1-csnp-out": "false",
                            "adj-restart-adj-seen-l2-csnp-out": "false",
                            "adj-restart-suppress-adj-out": "false",
                            "TABLE_adj_sid": {
                              "ROW_adj_sid": [
                                {
                                  "adj-sid-value": "16",
                                  "adj-sid-f-flag": "false",
                                  "adj-sid-b-flag": "false",
                                  "adj-sid-v-flag": "true",
                                  "adj-sid-l-flag": "true",
                                  "adj-sid-s-flag": "false",
                                  "adj-sid-p-flag": "false",
                                  "adj-sid-weight": "1"
                                }
                              ]
                            }
                          },
                          {
                            "adj-sys-name-out": "n9k-reg-2",
                            "adj-sys-id-out": "N/A",
                            "adj-usage-out": "2",
                            "adj-state-out": "UP",
                            "adj-hold-time-out": "00:00:28",
                            "adj-intf-name-out": "Ethernet1/31",
                            "adj-detail-set-out": "true",
                            "adj-transitions-out": "1",
                            "adj-flap-out": "true",
                            "adj-flap-time-out": "01:33:30",
                            "adj-ckt-type-out": "L2",
                            "adj-ipv4-addr-out": "25.1.1.1",
                            "adj-ipv6-addr-out": "0::",
                            "adj-bcast-out": "false",
                            "adj-bfd-ipv4-establish-out": "false",
                            "adj-bfd-ipv6-establish-out": "false",
                            "adj-resurrect-out": "false",
                            "adj-restart-capable-out": "true",
                            "adj-restart-ack-out": "false",
                            "adj-restart-mode-out": "false",
                            "adj-restart-adj-seen-ra-out": "false",
                            "adj-restart-adj-seen-csnp-out": "false",
                            "adj-restart-adj-seen-l1-csnp-out": "false",
                            "adj-restart-adj-seen-l2-csnp-out": "false",
                            "adj-restart-suppress-adj-out": "false",
                            "TABLE_adj_sid": {
                              "ROW_adj_sid": [
                                {
                                  "adj-sid-value": "17",
                                  "adj-sid-f-flag": "false",
                                  "adj-sid-b-flag": "false",
                                  "adj-sid-v-flag": "true",
                                  "adj-sid-l-flag": "true",
                                  "adj-sid-s-flag": "false",
                                  "adj-sid-p-flag": "false",
                                  "adj-sid-weight": "1"
                                }
                              ]
                            }
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis 2 adj det 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 isis 2 adj det
IS-IS process: 2 VRF: default
IS-IS adjacency database:
Legend: '!': No AF level connectivity in given topology
System ID       SNPA            Level  State  Hold Time  Interface
n9k-reg-4       N/A             2      UP     00:00:29   Ethernet1/21
  Up/Down transitions: 1, Last transition: 01:33:34 ago
  Circuit Type: L2
  IPv4 Address: 45.1.1.1
  IPv6 Address: 0::
  BFD session for IPv4 not requested 
  BFD session for IPv6 not requested 
   MT-0 AF IPv4: BFD OFF, topo_nlpid_bfd_required N, topo_nlpid_state Y
   MT-0: topo_bfd_required N, topo_usable Y
   isis_bfd_required N, isis_neighbor_usable Y
  Restart capable: 1; ack 0;
  Restart mode: 0; seen(ra 0; csnp(0; l1 0; l2 0)); suppress 0
  IPv4 Adj-SID: 16,  Flags V/L, weight: 1

n9k-reg-2       N/A             2      UP     00:00:28   Ethernet1/31
  Up/Down transitions: 1, Last transition: 01:33:30 ago
  Circuit Type: L2
  IPv4 Address: 25.1.1.1
  IPv6 Address: 0::
  BFD session for IPv4 not requested 
  BFD session for IPv6 not requested 
   MT-0 AF IPv4: BFD OFF, topo_nlpid_bfd_required N, topo_nlpid_state Y
   MT-0: topo_bfd_required N, topo_usable Y
   isis_bfd_required N, isis_neighbor_usable Y
  Restart capable: 1; ack 0;
  Restart mode: 0; seen(ra 0; csnp(0; l1 0; l2 0)); suppress 0
  IPv4 Adj-SID: 17,  Flags V/L, weight: 1


show isis 2 route 192.169.14.1 detail

show isis 2 route 192.169.14.1 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 isis 2 route 192.169.14.1 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 isis 2 route 192.169.14.1 detail",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_process_tag": {
            "ROW_process_tag": [
              {
                "process-tag-out": "2",
                "TABLE_vrf": {
                  "ROW_vrf": [
                    {
                      "vrf-name-out": "default",
                      "afi-safi-out": "IPv4",
                      "TABLE_prefix": {
                        "ROW_prefix": [
                          {
                            "route-addr-print-out": "192.169.14.1",
                            "route-mask-len-print-out": "32",
                            "route-direct-print-out": "",
                            "TABLE_best_path": {
                              "ROW_best_path": [
                                {
                                  "route-no-def-prefix-out": "45.1.1.1",
                                  "route-addr-valid-out": "true",
                                  "route-marker-out": " *",
                                  "route-ifname-out": "Ethernet1/21",
                                  "route-metric-out": "54",
                                  "route-pref-out": "L2 (I,U)",
                                  "route-instance-out": "D"
                                }
                              ]
                            }
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis 2 route 192.169.14.1 detail 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 isis 2 route 192.169.14.1 detail
IS-IS process: 2 VRF: default
IS-IS IPv4 routing table

192.169.14.1/32, L2
   *via 45.1.1.1, Ethernet1/21, metric 54, L2 (I,U), table-map-deny no-pol, admin-dist 115
        Instance 0x0000000D

show isis 2 rrm ethernet 1/21

show isis 2 rrm ethernet 1/21

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 isis 2 rrm ethernet 1/21",
  "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": "VAR",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_process_tag": {
            "ROW_process_tag": [
              {
                "process-tag-out": "2",
                "rrm-if-name": "Ethernet1/21",
                "TABLE_rrm": {
                  "ROW_rrm": [
                    {
                      "rrm-level": "1",
                      "rrm-retx-interval": "5",
                      "rrm-retx-throttle-interval": "66",
                      "rrm-retx-queue-length": "0",
                      "rrm-next-retx": "Inactive",
                      "rrm-retx-queue-hwm": "0",
                      "rrm-retx-queue-exceed": "0"
                    },
                    {
                      "rrm-level": "2",
                      "rrm-retx-interval": "5",
                      "rrm-retx-throttle-interval": "66",
                      "rrm-retx-queue-length": "0",
                      "rrm-next-retx": "Inactive",
                      "rrm-retx-queue-hwm": "5",
                      "rrm-retx-queue-exceed": "0"
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis 2 rrm ethernet 1/21 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 isis 2 rrm ethernet 1/21
IS-IS process: 2

IS-IS RRM information for interface Ethernet1/21:
IS-IS Level-1 Link State Database
  Retx interval: 5, Retx throttle interval: 66 ms
  Retx queue length: 0, Next Retx: Inactive
  Retx queue HWM: 0, Retx queue exceed: 0
  LSPID                 Seq Number   Checksum  Lifetime   A/P/O/T  Ago

IS-IS Level-2 Link State Database
  Retx interval: 5, Retx throttle interval: 66 ms
  Retx queue length: 0, Next Retx: Inactive
  Retx queue HWM: 5, Retx queue exceed: 0
  LSPID                 Seq Number   Checksum  Lifetime   A/P/O/T  Ago

show isis 2 vrf all adjacency ethernet 1/21 detail

show isis 2 vrf all adjacency ethernet 1/21 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 isis 2 vrf all adjacency ethernet 1/21 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": "VAR",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_process_tag": {
            "ROW_process_tag": [
              {
                "process-tag-out": "2",
                "TABLE_vrf": {
                  "ROW_vrf": [
                    {
                      "vrf-name-out": "default",
                      "adj-summary-out": "false",
                      "adj-interface-out": "true",
                      "adj-interface-name-out": "Ethernet1/21",
                      "TABLE_process_adj": {
                        "ROW_process_adj": [
                          {
                            "adj-sys-name-out": "n9k-reg-4",
                            "adj-sys-id-out": "N/A",
                            "adj-usage-out": "2",
                            "adj-state-out": "UP",
                            "adj-hold-time-out": "00:00:29",
                            "adj-intf-name-out": "Ethernet1/21",
                            "adj-detail-set-out": "true",
                            "adj-transitions-out": "1",
                            "adj-flap-out": "true",
                            "adj-flap-time-out": "01:33:34",
                            "adj-ckt-type-out": "L2",
                            "adj-ipv4-addr-out": "45.1.1.1",
                            "adj-ipv6-addr-out": "0::",
                            "adj-bcast-out": "false",
                            "adj-bfd-ipv4-establish-out": "false",
                            "adj-bfd-ipv6-establish-out": "false",
                            "adj-resurrect-out": "false",
                            "adj-restart-capable-out": "true",
                            "adj-restart-ack-out": "false",
                            "adj-restart-mode-out": "false",
                            "adj-restart-adj-seen-ra-out": "false",
                            "adj-restart-adj-seen-csnp-out": "false",
                            "adj-restart-adj-seen-l1-csnp-out": "false",
                            "adj-restart-adj-seen-l2-csnp-out": "false",
                            "adj-restart-suppress-adj-out": "false",
                            "TABLE_adj_sid": {
                              "ROW_adj_sid": [
                                {
                                  "adj-sid-value": "16",
                                  "adj-sid-f-flag": "false",
                                  "adj-sid-b-flag": "false",
                                  "adj-sid-v-flag": "true",
                                  "adj-sid-l-flag": "true",
                                  "adj-sid-s-flag": "false",
                                  "adj-sid-p-flag": "false",
                                  "adj-sid-weight": "1"
                                }
                              ]
                            }
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis 2 vrf all adjacency ethernet 1/21 detail 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 isis 2 vrf all adjacency ethernet 1/21 detail
IS-IS process: 2 VRF: default
IS-IS adjacency database for Ethernet1/21:
Legend: '!': No AF level connectivity in given topology
System ID       SNPA            Level  State  Hold Time  Interface
n9k-reg-4       N/A             2      UP     00:00:29   Ethernet1/21
  Up/Down transitions: 1, Last transition: 01:33:34 ago
  Circuit Type: L2
  IPv4 Address: 45.1.1.1
  IPv6 Address: 0::
  BFD session for IPv4 not requested 
  BFD session for IPv6 not requested 
   MT-0 AF IPv4: BFD OFF, topo_nlpid_bfd_required N, topo_nlpid_state Y
   MT-0: topo_bfd_required N, topo_usable Y
   isis_bfd_required N, isis_neighbor_usable Y
  Restart capable: 1; ack 0;
  Restart mode: 0; seen(ra 0; csnp(0; l1 0; l2 0)); suppress 0
  IPv4 Adj-SID: 16,  Flags V/L, weight: 1


show isis 2 vrf all database level-2 detail

show isis 2 vrf all database level-2 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 isis 2 vrf all database level-2 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 isis 2 vrf all database level-2 detail ",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_process_tag": {
            "ROW_process_tag": [{
                "process-tag-out": "2",
                "TABLE_vrf": {
                  "RO
                  W_vrf": [{
                      "vrf-name-out": "default",
                      "TABLE_process_lvl": {
                        "ROW_process_lvl": [{
                            "dbas
                            e-level-out": "2",
                            "TABLE_process_lsp": {
                              "ROW_process_lsp": [{
                                  "dbase-lsp-name-out": "
                                  n9k-reg-2.00-00",
                                  "dbase-lsp-status-out": " ",
                                  "dbase-lsp-absent-out": "false",
                                  "dbas
                                  e-lsp-seqnum-out": "318",
                                  "dbase-lsp-cksum-out": "A48A",
                                  "dbase-lsp-lifetime-out": "9
                                  77",
                                  "dbase-att-out": "0",
                                  "dbase-partition-out": "0",
                                  "dbase-overload-out": "0",
                                  "dbas
                                  e-istype-out": "3"
                                }, {
                                  "dbase-lsp-name-out": "n9k-reg-4.00-00",
                                  "dbase-lsp-status-out
                                  ": " ",
                                  "dbase-lsp-absent-out": "false",
                                  "dbase-lsp-seqnum-out": "15",
                                  "dbase-lsp-cksu
                                  m-out": "B5F9",
                                  "dbase-lsp-lifetime-out": "847",
                                  "dbase-att-out": "0",
                                  "dbase-partitio
                                  n-out": "0",
                                  "dbase-overload-out": "0",
                                  "dbase-istype-out": "3"
                                }, {
                                  "dbase-lsp-name-out
                                  ": "n9k-reg-6.00-00",
                                  "dbase-lsp-status-out": " ",
                                  "dbase-lsp-absent-out": "false",
                                  "d
                                  base-lsp-seqnum-out": "12",
                                  "dbase-lsp-cksum-out": "DC68",
                                  "dbase-lsp-lifetime-out":
                                  "879",
                                  "dbase-att-out": "0",
                                  "dbase-partition-out": "0",
                                  "dbase-overload-out": "0",
                                  "db
                                  ase-istype-out": "3"
                                }, {
                                  "dbase-lsp-name-out": "n9k-reg-5.00-00",
                                  "dbase-lsp-status-o
                                  ut": "*",
                                  "dbase-lsp-absent-out": "false",
                                  "dbase-lsp-seqnum-out": "12",
                                  "dbase-lsp-ck
                                  sum-out": "E56A",
                                  "dbase-lsp-lifetime-out": "939",
                                  "dbase-att-out": "0",
                                  "dbase-partit
                                  ion-out": "0",
                                  "dbase-overload-out": "0",
                                  "dbase-istype-out": "3"
                                }, {
                                  "dbase-lsp-name-o
                                  ut": "xtc.00-00",
                                  "dbase-lsp-status-out": " ",
                                  "dbase-lsp-absent-out": "false",
                                  "dbase
                                  -lsp-seqnum-out": "1C66",
                                  "dbase-lsp-cksum-out": "1780",
                                  "dbase-lsp-lifetime-out": "5
                                  68",
                                  "dbase-att-out": "0",
                                  "dbase-partition-out": "0",
                                  "dbase-overload-out": "0",
                                  "dbas
                                  e-istype-out": "3"
                                                }
                                            ]
                                        }
                                    }
                                ]
                            }
                        }
                    ]
                }
            }
        ]
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis 2 vrf all database level-2 detail 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 isis 2 vrf all database level-2
IS-IS Process: 2 LSP database VRF: default
IS-IS Level-2 Link State Database
  LSPID                 Seq Number   Checksum  Lifetime   A/P/O/T
  n9k-reg-2.00-00       0x00000318   0xA48A    1132       0/0/0/3
  n9k-reg-4.00-00       0x00000015   0xB5F9    1002       0/0/0/3
  n9k-reg-6.00-00       0x00000012   0xDC68    1034       0/0/0/3
  n9k-reg-5.00-00     * 0x00000012   0xE56A    1094       0/0/0/3
  xtc.00-00             0x00001C66   0x1780    722        0/0/0/3


show isis 2 vrf all hostname detail

show isis 2 vrf all hostname 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 isis 2 vrf all hostname 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 isis 2 vrf all hostname detail",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_vrf": {
            "ROW_vrf": [
              {
                "vrf-name-out": "default",
                "tag-out": "2",
                "hname-enabled-out": "true",
                "hname-detail-out": "true",
                "TABLE_hostname": {
                  "ROW_hostname": [
                    {
                      "hname-id-out": "0000.0000.0002.00-00",
                      "hname-level-out": "2",
                      "hname-id-mine-out": "false",
                      "hname-name-out": "n9k-reg-2"
                    },
                    {
                      "hname-id-out": "0000.0000.0004.00-00",
                      "hname-level-out": "2",
                      "hname-id-mine-out": "false",
                      "hname-name-out": "n9k-reg-4"
                    },
                    {
                      "hname-id-out": "0000.0000.0006.00-00",
                      "hname-level-out": "2",
                      "hname-id-mine-out": "false",
                      "hname-name-out": "n9k-reg-6"
                    },
                    {
                      "hname-id-out": "0000.0000.0055.00-00",
                      "hname-level-out": "2",
                      "hname-id-mine-out": "true",
                      "hname-name-out": "n9k-reg-5"
                    },
                    {
                      "hname-id-out": "0001.0000.0008.00-00",
                      "hname-level-out": "2",
                      "hname-id-mine-out": "false",
                      "hname-name-out": "xtc"
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis 2 vrf all hostname detail 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 isis 2 vrf all hostname detail
IS-IS Process: 2 dynamic hostname table VRF: default
  Level  LSP ID                Dynamic hostname
  2      0000.0000.0002.00-00  n9k-reg-2
  2      0000.0000.0004.00-00  n9k-reg-4
  2      0000.0000.0006.00-00  n9k-reg-6
  2      0000.0000.0055.00-00* n9k-reg-5
  2      0001.0000.0008.00-00  xtc

show isis 2 vrf all interface ethernet 1/21 level-2

show isis 2 vrf all interface ethernet 1/21 level-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 isis 2 vrf all interface ethernet 1/21 level-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": "VAR",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_process_tag": {
            "ROW_process_tag": [
              {
                "process-tag-out": "2",
                "TABLE_vrf": {
                  "ROW_vrf": [
                    {
                      "vrf-name-out": "default",
                      "TABLE_interface": {
                        "ROW_interface": [
                          {
                            "intf-name-out": "Ethernet1/21",
                            "intf-status-out": "protocol-up/link-up/admin-up",
                            "TABLE_auth": {
                              "ROW_auth": [
                                {
                                  "intf-auth-info-out": "    No auth type and keychain",
                                  "intf-auth-chk-info-out": "    Auth check set"
                                }
                              ]
                            },
                            "intf-ix-out": "1",
                            "intf-cid-out": "1",
                            "intf-ckt-type-out": "L2",
                            "TABLE_bfd": {
                              "ROW_bfd": [
                                {
                                  "intf-bfd-ipv4-state-out": "false",
                                  "intf-bfd-ipv6-state-out": "false"
                                }
                              ]
                            },
                            "intf-passive-mask-out": "false",
                            "intf-mgrp-set-out": "false",
                            "intf-p2p-type-out": "true",
                            "intf-p2p-ext-local-cid-out": "1A002800",
                            "intf-p2p-cid-out": "0000.0000.0000.00",
                            "intf-retx-intv-out": "5",
                            "intf-retx-throttle-out": "66",
                            "intf-loopback-type-out": "false",
                            "intf-lsp-intv-out": "33",
                            "intf-mtu-out": "1500",
                            "intf-p2p-adj-count-out": "1",
                            "intf-p2p-adj-up-count-out": "1",
                            "intf-p2p-prio-out": "64",
                            "intf-p2p-hello-intv-out": "10",
                            "intf-p2p-hello-multi-out": "3",
                            "intf-p2p-hello-next-out": "00:00:08",
                            "TABLE_p2p": {
                              "ROW_p2p": [
                                {
                                  "intf-p2p-lvl-out": "2",
                                  "intf-p2p-adj-lvl-out": "1",
                                  "intf-p2p-adj-up-lvl-out": "1",
                                  "intf-p2p-metric-lvl-out": "4",
                                  "intf-p2p-csnp-lvl-out": "60",
                                  "intf-p2p-csnp-nxt-lvl-out": "00:00:47",
                                  "intf-p2p-lspid-last-lvl-out": "ffff.ffff.ffff.ff-ff"
                                }
                              ]
                            }
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis 2 vrf all interface ethernet 1/21 level-2 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 isis 2 vrf all interface ethernet 1/21 level-2
IS-IS process: 2 VRF: default
Ethernet1/21, Interface status: protocol-up/link-up/admin-up
  IP address: 45.1.1.2, IP subnet: 45.1.1.0/24
  IPv6 routing is disabled
    No auth type and keychain 
    Auth check set
  Index: 0x0001, Local Circuit ID: 0x01, Circuit Type: L2
  BFD IPv4 is locally disabled for Interface Ethernet1/21
  BFD IPv6 is locally disabled for Interface Ethernet1/21
  MTR is disabled
  Extended Local Circuit ID: 0x1A002800, P2P Circuit ID: 0000.0000.0000.00
  Retx interval: 5, Retx throttle interval: 66 ms
  LSP interval: 33 ms, MTU: 1500
  P2P Adjs: 1, AdjsUp: 1, Priority 64
  Hello Interval: 10, Multi: 3, Next IIH: 00:00:08
  MT    Adjs   AdjsUp  Metric   CSNP  Next CSNP  Last LSP ID
  2          1        1       4     60  00:00:47   ffff.ffff.ffff.ff-ff
  Topologies enabled:
    L  MT  Metric  MetricCfg  Fwdng IPV4-MT  IPV4Cfg  IPV6-MT  IPV6Cfg 
    2  0        4       no   UP    UP       yes      DN       no

show isis 2 vrf all ip redistribute route summary

show isis 2 vrf all ip redistribute route summary

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 isis 2 vrf all ip redistribute route summary",
  "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 isis 2 vrf all ip redistribute route summary",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_process_tag": {
            "ROW_process_tag": [
              {
                "process-tag-out": "2",
                "redist-route-vrf": "default",
                "redist-route-af-ix": "IPv4",
                "redist-route-summary-route-total": "8",
                "TABLE_protocol": {
                  "ROW_protocol": [
                    {
                      "redist-route-summary-pib-name": "direct",
                      "redist-route-summary-prot-route-total": "7"
                    },
                    {
                      "redist-route-summary-pib-name": "static",
                      "redist-route-summary-prot-route-total": "1"
                    }
                  ]
                },
                "TABLE_mask_len": {
                  "ROW_mask_len": [
                    {
                      "redist-route-summary-mask-len-ix": "24",
                      "redist-route-summary-mask-len": "1"
                    },
                    {
                      "redist-route-summary-mask-len-ix": "32",
                      "redist-route-summary-mask-len": "7"
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis 2 vrf all ip redistribute route summary 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 isis 2 vrf all ip redistribute route summary
IS-IS process: 2 VRF: default
IS-IS IPv4 redistribute route

Total number of routes  : 8

Routes per protocol
  direct          : 7
  static          : 1

Number of routes per mask-length
  /24 : 1       /32 : 7

show isis 2 vrf all ip redistribute route

show isis 2 vrf all ip redistribute route

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 isis 2 vrf all ip redistribute route",
  "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 isis 2 vrf all ip redistribute route",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_process_tag": {
            "ROW_process_tag": [
              {
                "process-tag-out": "2",
                "redist-route-vrf": "default",
                "redist-route-af-ix": "IPv4",
                "TABLE_one_route": {
                  "ROW_one_route": [
                    {
                      "redist-route-prefix": "35.1.1.0",
                      "redist-route-mask-len": "24",
                      "redist-route-pib-name": "direct",
                      "redist-route-route-type": "",
                      "TABLE_redist": {
                        "ROW_redist": [
                          {
                            "redist-route-status": "Redistributed",
                            "redist-route-level": "2",
                            "redist-route-metric": "10"
                          }
                        ]
                      }
                    },
                    {
                      "redist-route-prefix": "50.50.50.1",
                      "redist-route-mask-len": "32",
                      "redist-route-pib-name": "direct",
                      "redist-route-route-type": "",
                      "TABLE_redist": {
                        "ROW_redist": [
                          {
                            "redist-route-status": "Redistributed",
                            "redist-route-level": "2",
                            "redist-route-metric": "10"
                          }
                        ]
                      }
                    },
                    {
                      "redist-route-prefix": "55.1.2.5",
                      "redist-route-mask-len": "32",
                      "redist-route-pib-name": "direct",
                      "redist-route-route-type": "",
                      "TABLE_redist": {
                        "ROW_redist": [
                          {
                            "redist-route-status": "Redistributed",
                            "redist-route-level": "2",
                            "redist-route-metric": "10"
                          }
                        ]
                      }
                    },
                    {
                      "redist-route-prefix": "55.1.3.5",
                      "redist-route-mask-len": "32",
                      "redist-route-pib-name": "direct",
                      "redist-route-route-type": "",
                      "TABLE_redist": {
                        "ROW_redist": [
                          {
                            "redist-route-status": "Redistributed",
                            "redist-route-level": "2",
                            "redist-route-metric": "10"
                          }
                        ]
                      }
                    },
                    {
                      "redist-route-prefix": "55.1.4.5",
                      "redist-route-mask-len": "32",
                      "redist-route-pib-name": "direct",
                      "redist-route-route-type": "",
                      "TABLE_redist": {
                        "ROW_redist": [
                          {
                            "redist-route-status": "Redistributed",
                            "redist-route-level": "2",
                            "redist-route-metric": "10"
                          }
                        ]
                      }
                    },
                    {
                      "redist-route-prefix": "55.1.5.5",
                      "redist-route-mask-len": "32",
                      "redist-route-pib-name": "direct",
                      "redist-route-route-type": "",
                      "TABLE_redist": {
                        "ROW_redist": [
                          {
                            "redist-route-status": "Redistributed",
                            "redist-route-level": "2",
                            "redist-route-metric": "10"
                          }
                        ]
                      }
                    },
                    {
                      "redist-route-prefix": "55.1.22.5",
                      "redist-route-mask-len": "32",
                      "redist-route-pib-name": "direct",
                      "redist-route-route-type": "",
                      "TABLE_redist": {
                        "ROW_redist": [
                          {
                            "redist-route-status": "Redistributed",
                            "redist-route-level": "2",
                            "redist-route-metric": "10"
                          }
                        ]
                      }
                    },
                    {
                      "redist-route-prefix": "77.1.1.7",
                      "redist-route-mask-len": "32",
                      "redist-route-pib-name": "static",
                      "redist-route-route-type": "",
                      "TABLE_redist": {
                        "ROW_redist": [
                          {
                            "redist-route-status": "Redistributed",
                            "redist-route-level": "2",
                            "redist-route-metric": "10"
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis 2 vrf all ip redistribute route 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 isis 2 vrf all ip redistribute route
IS-IS process: 2 VRF: default
IS-IS IPv4 redistribute route

35.1.1.0/24, direct, 
  Redistributed into L2, metric 10
50.50.50.1/32, direct, 
  Redistributed into L2, metric 10
55.1.2.5/32, direct, 
  Redistributed into L2, metric 10
55.1.3.5/32, direct, 
  Redistributed into L2, metric 10
55.1.4.5/32, direct, 
  Redistributed into L2, metric 10
55.1.5.5/32, direct, 
  Redistributed into L2, metric 10
55.1.22.5/32, direct, 
  Redistributed into L2, metric 10
77.1.1.7/32, static, 
  Redistributed into L2, metric 10

show isis 2 vrf all ip route detail

show isis 2 vrf all ip route 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 isis 2 vrf all ip route 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 isis 2 vrf all ip route detail",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_process_tag": {
            "ROW_process_tag": [
              {
                "process-tag-out": "2",
                "TABLE_vrf": {
                  "ROW_vrf": [
                    {
                      "vrf-name-out": "default",
                      "afi-safi-out": "IPv4",
                      "TABLE_prefix": {
                        "ROW_prefix": [
                          {
                            "route-addr-print-out": "4.1.1.4",
                            "route-mask-len-print-out": "32",
                            "route-direct-print-out": "",
                            "TABLE_best_path": {
                              "ROW_best_path": [
                                {
                                  "route-no-def-prefix-out": "45.1.1.1",
                                  "route-addr-valid-out": "true",
                                  "route-marker-out": " *",
                                  "route-ifname-out": "Ethernet1/21",
                                  "route-metric-out": "5",
                                  "route-pref-out": "L2 (I,U)",
                                  "route-instance-out": "D"
                                }
                              ]
                            }
                          },
                          {
                            "route-addr-print-out": "6.1.1.6",
                            "route-mask-len-print-out": "32",
                            "route-direct-print-out": "",
                            "TABLE_best_path": {
                              "ROW_best_path": [
                                {
                                  "route-no-def-prefix-out": "45.1.1.1",
                                  "route-addr-valid-out": "true",
                                  "route-marker-out": " *",
                                  "route-ifname-out": "Ethernet1/21",
                                  "route-metric-out": "9",
                                  "route-pref-out": "L2 (I,U)",
                                  "route-instance-out": "D"
                                }
                              ]
                            }
                          },
                          {
                            "route-addr-print-out": "21.2.1.0",
                            "route-mask-len-print-out": "24",
                            "route-direct-print-out": "",
                            "TABLE_best_path": {
                              "ROW_best_path": [
                                {
                                  "route-no-def-prefix-out": "45.1.1.1",
                                  "route-addr-valid-out": "true",
                                  "route-marker-out": " *",
                                  "route-ifname-out": "Ethernet1/21",
                                  "route-metric-out": "44",
                                  "route-pref-out": "L2 (I,U)",
                                  "route-instance-out": "D"
                                }
                              ]
                            }
                          },
                          {
                            "route-addr-print-out": "22.1.1.2",
                            "route-mask-len-print-out": "32",
                            "route-direct-print-out": "",
                            "TABLE_best_path": {
                              "ROW_best_path": [
                                {
                                  "route-no-def-prefix-out": "45.1.1.1",
                                  "route-addr-valid-out": "true",
                                  "route-marker-out": " *",
                                  "route-ifname-out": "Ethernet1/21",
                                  "route-metric-out": "13",
                                  "route-pref-out": "L2 (I,U)",
                                  "route-instance-out": "D"
                                }
                              ]
                            }
                          },
                          {
                            "route-addr-print-out": "25.1.1.0",
                            "route-mask-len-print-out": "24",
                            "route-direct-print-out": ", direct",
                            "TABLE_direct_path": {
                              "ROW_direct_path": [
                                {
                                  "route-direct-out": "true",
                                  "route-direct-via-out": "*",
                                  "route-direct-if-name-out": "Ethernet1/31",
                                  "route-direct-metric-out": "40",
                                  "route-direct-level-out": "2",
                                  "route-direct-instance-out": "0"
                                }
                              ]
                            }
                          },
                          {
                            "route-addr-print-out": "26.1.1.0",
                            "route-mask-len-print-out": "24",
                            "route-direct-print-out": "",
                            "TABLE_best_path": {
                              "ROW_best_path": [
                                {
                                  "route-no-def-prefix-out": "45.1.1.1",
                                  "route-addr-valid-out": "true",
                                  "route-marker-out": " *",
                                  "route-ifname-out": "Ethernet1/21",
                                  "route-metric-out": "12",
                                  "route-pref-out": "L2 (I,U)",
                                  "route-instance-out": "D"
                                }
                              ]
                            }
                          },
                          {
                            "route-addr-print-out": "45.1.1.0",
                            "route-mask-len-print-out": "24",
                            "route-direct-print-out": ", direct",
                            "TABLE_direct_path": {
                              "ROW_direct_path": [
                                {
                                  "route-direct-out": "true",
                                  "route-direct-via-out": "*",
                                  "route-direct-if-name-out": "Ethernet1/21",
                                  "route-direct-metric-out": "4",
                                  "route-direct-level-out": "2",
                                  "route-direct-instance-out": "0"
                                }
                              ]
                            }
                          },
                          {
                            "route-addr-print-out": "46.1.1.0",
                            "route-mask-len-print-out": "24",
                            "route-direct-print-out": "",
                            "TABLE_best_path": {
                              "ROW_best_path": [
                                {
                                  "route-no-def-prefix-out": "45.1.1.1",
                                  "route-addr-valid-out": "true",
                                  "route-marker-out": " *",
                                  "route-ifname-out": "Ethernet1/21",
                                  "route-metric-out": "8",
                                  "route-pref-out": "L2 (I,U)",
                                  "route-instance-out": "D"
                                }
                              ]
                            }
                          },
                          {
                            "route-addr-print-out": "55.1.1.5",
                            "route-mask-len-print-out": "32",
                            "route-direct-print-out": ", direct",
                            "TABLE_direct_path": {
                              "ROW_direct_path": [
                                {
                                  "route-direct-out": "true",
                                  "route-direct-via-out": "*",
                                  "route-direct-if-name-out": "loopback1",
                                  "route-direct-metric-out": "1",
                                  "route-direct-level-out": "2",
                                  "route-direct-instance-out": "0"
                                }
                              ]
                            }
                          },
                          {
                            "route-addr-print-out": "77.1.1.7",
                            "route-mask-len-print-out": "32",
                            "route-direct-print-out": "",
                            "TABLE_best_path": {
                              "ROW_best_path": [
                                {
                                  "route-no-def-prefix-out": "45.1.1.1",
                                  "route-addr-valid-out": "true",
                                  "route-marker-out": " *",
                                  "route-ifname-out": "Ethernet1/21",
                                  "route-metric-out": "18",
                                  "route-pref-out": "L2 (I,U)",
                                  "route-instance-out": "D"
                                }
                              ]
                            }
                          },
                          {
                            "route-addr-print-out": "99.99.99.99",
                            "route-mask-len-print-out": "32",
                            "route-direct-print-out": "",
                            "TABLE_best_path": {
                              "ROW_best_path": [
                                {
                                  "route-no-def-prefix-out": "45.1.1.1",
                                  "route-addr-valid-out": "true",
                                  "route-marker-out": " *",
                                  "route-ifname-out": "Ethernet1/21",
                                  "route-metric-out": "18",
                                  "route-pref-out": "L2 (I,U)",
                                  "route-instance-out": "D"
                                }
                              ]
                            }
                          },
                          {
                            "route-addr-print-out": "192.169.14.1",
                            "route-mask-len-print-out": "32",
                            "route-direct-print-out": "",
                            "TABLE_best_path": {
                              "ROW_best_path": [
                                {
                                  "route-no-def-prefix-out": "45.1.1.1",
                                  "route-addr-valid-out": "true",
                                  "route-marker-out": " *",
                                  "route-ifname-out": "Ethernet1/21",
                                  "route-metric-out": "54",
                                  "route-pref-out": "L2 (I,U)",
                                  "route-instance-out": "D"
                                }
                              ]
                            }
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis 2 vrf all ip route detail 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 isis 2 vrf all ip route detail
IS-IS process: 2 VRF: default
IS-IS IPv4 routing table

4.1.1.4/32, L2, SID 44 Flags N, Ingress label 16044
   via 45.1.1.1, Ethernet1/21, metric 5, L2 (I,U), table-map-deny no-pol, admin-dist 115, label 3
        Instance 0x0000000D
6.1.1.6/32, L2, SID 66 Flags N, Ingress label 16066
   via 45.1.1.1, Ethernet1/21, metric 9, L2 (I,U), table-map-deny no-pol, admin-dist 115, label 16066
        Instance 0x0000000D
21.2.1.0/24, L2
   via 45.1.1.1, Ethernet1/21, metric 44, L2 (I,U), table-map-deny no-pol, admin-dist 115
        Instance 0x0000000D
22.1.1.2/32, L2, SID 22 Flags N, Ingress label 16022
   via 45.1.1.1, Ethernet1/21, metric 13, L2 (I,U), table-map-deny no-pol, admin-dist 115, label 16022
        Instance 0x0000000D
25.1.1.0/24, L2, direct
   via Ethernet1/31, metric 40, L2, direct
        Instance 0x00000000
26.1.1.0/24, L2
   via 45.1.1.1, Ethernet1/21, metric 12, L2 (I,U), table-map-deny no-pol, admin-dist 115
        Instance 0x0000000D
45.1.1.0/24, L2, direct
   via Ethernet1/21, metric 4, L2, direct
        Instance 0x00000000
46.1.1.0/24, L2
   via 45.1.1.1, Ethernet1/21, metric 8, L2 (I,U), table-map-deny no-pol, admin-dist 115
        Instance 0x0000000D
55.1.1.5/32, L2, direct
   via loopback1, metric 1, L2, direct
        Instance 0x00000000
77.1.1.7/32, L2
   via 45.1.1.1, Ethernet1/21, metric 18, L2 (I,U), table-map-deny no-pol, admin-dist 115
        Instance 0x0000000D
99.99.99.99/32, L2
   via 45.1.1.1, Ethernet1/21, metric 18, L2 (I,U), table-map-deny no-pol, admin-dist 115
        Instance 0x0000000D
192.169.14.1/32, L2
   via 45.1.1.1, Ethernet1/21, metric 54, L2 (I,U), table-map-deny no-pol, admin-dist 115
        Instance 0x0000000D

show isis 2 vrf all protocol

show isis 2 vrf all protocol

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 isis 2 vrf all protocol ",
  "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 isis 2 vrf all protocol ",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_process_tag": {
            "ROW_process_tag": [
              {
                "process-tag-out": "2",
                "instance_num": "1",
                "uuid": "1090519320",
                "process-id": "31924",
                "vrf-name-out": "default",
                "system-id-out": "0000.0000.0055",
                "is-type-out": "L2",
                "sap-out": "412",
                "qh-out": "13",
                "mtu-out": "1492",
                "gr-status-out": "  Graceful Restart enabled.",
                "gr-state-inactive-out": " State: Inactive",
                "last-gr-status-none-out": "  Last graceful restart status : none",
                "TABLE_afi_safi": {
                  "ROW_afi_safi": [
                    {
                      "af-ix": "IPv4",
                      "af-bfd-config": "disabled",
                      "af-pib-tag": "2"
                    },
                    {
                      "af-ix": "IPv6",
                      "af-bfd-config": "disabled",
                      "af-pib-tag": "2"
                    }
                  ]
                },
                "metric-style": "",
                "accept-metric": "accept(narrow, wide)",
                "TABLE_area_addr": {
                  "ROW_area_addr": [
                    {
                      "area-addr-nsap": "49"
                    }
                  ]
                },
                "proc-state-running": "  Process is up and running",
                "vrf-id-out": "1",
                "TABLE_segment_routing": {
                  "ROW_segment_routing": [
                    {
                      "af-out": "IPv4",
                      "ptag-out": "2",
                      "cfg-out": "true",
                      "enable-out": "true",
                      "exp-null-cfg": "false"
                    },
                    {
                      "af-out": "IPv6",
                      "ptag-out": "2",
                      "cfg-out": "false",
                      "enable-out": "false"
                    }
                  ]
                },
                "TABLE_iib_list_yeild": {
                  "ROW_iib_list_yeild": [
                    {
                      "intf-name-out": "loopback1"
                    },
                    {
                      "intf-name-out": "Ethernet1/21"
                    },
                    {
                      "intf-name-out": "Ethernet1/31"
                    }
                  ]
                },
                "TABLE_auth": {
                  "ROW_auth": [
                    {
                      "auth-lvl-out": "1",
                      "auth-type-none": "  No auth type and keychain",
                      "auth-check": "  Auth check set"
                    },
                    {
                      "auth-lvl-out": "2",
                      "auth-type-none": "  No auth type and keychain",
                      "auth-check": "  Auth check set"
                    }
                  ]
                },
                "TABLE_spf": {
                  "ROW_spf": [
                    {
                      "spf-lvl-out": "1",
                      "spf-timer": "Inactive"
                    },
                    {
                      "spf-lvl-out": "2",
                      "spf-timer": "Inactive"
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis 2 vrf all protocol 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 isis 2 vrf all protocol 

ISIS process : 2
 Instance number :  1
 UUID: 1090519320
 Process ID 31924
VRF: default
  System ID : 0000.0000.0055  IS-Type : L2
  SAP : 412  Queue Handle : 13
  Maximum LSP MTU: 1492
  Stateful HA enabled
  Graceful Restart enabled. State: Inactive 
  Last graceful restart status : none
  Start-Mode Complete
  BFD IPv4 is globally disabled for ISIS process: 2
  BFD IPv6 is globally disabled for ISIS process: 2
  Topology-mode is base
  Metric-style : advertise(wide), accept(narrow, wide)
  Area address(es) :
    49
  Process is up and running
  VRF ID: 1
  Stale routes during non-graceful controlled restart
  Enable resolution of L3->L2 address for ISIS adjacency
  SR IPv4 is configured and enabled for ISIS process: 2
    Explicit-null not configured
  SR IPv6 is not configured and disabled for ISIS process: 2
  Interfaces supported by IS-IS :
    loopback1
    Ethernet1/21
    Ethernet1/31
  Topology : 0
  Address family IPv4 unicast :
    Number of interface : 3
    Distance : 115
  Address family IPv6 unicast :
    Number of interface : 0
    Distance : 115
  Topology : 2
  Address family IPv4 unicast :
    Number of interface : 0
    Distance : 115
  Address family IPv6 unicast :
    Number of interface : 0
    Distance : 115
  Level1
  No auth type and keychain
  Auth check set
  Level2
  No auth type and keychain
  Auth check set
  L1 Next SPF: Inactive
  L2 Next SPF: Inactive

show isis 2 vrf all route detail

show isis 2 vrf all route 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 isis 2 vrf all route 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 isis 2 vrf all route detail",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_process_tag": {
            "ROW_process_tag": [
              {
                "process-tag-out": "2",
                "TABLE_vrf": {
                  "ROW_vrf": [
                    {
                      "vrf-name-out": "default",
                      "afi-safi-out": "IPv4",
                      "TABLE_prefix": {
                        "ROW_prefix": [
                          {
                            "route-addr-print-out": "4.1.1.4",
                            "route-mask-len-print-out": "32",
                            "route-direct-print-out": "",
                            "TABLE_best_path": {
                              "ROW_best_path": [
                                {
                                  "route-no-def-prefix-out": "45.1.1.1",
                                  "route-addr-valid-out": "true",
                                  "route-marker-out": " *",
                                  "route-ifname-out": "Ethernet1/21",
                                  "route-metric-out": "5",
                                  "route-pref-out": "L2 (I,U)",
                                  "route-instance-out": "D"
                                }
                              ]
                            }
                          },
                          {
                            "route-addr-print-out": "6.1.1.6",
                            "route-mask-len-print-out": "32",
                            "route-direct-print-out": "",
                            "TABLE_best_path": {
                              "ROW_best_path": [
                                {
                                  "route-no-def-prefix-out": "45.1.1.1",
                                  "route-addr-valid-out": "true",
                                  "route-marker-out": " *",
                                  "route-ifname-out": "Ethernet1/21",
                                  "route-metric-out": "9",
                                  "route-pref-out": "L2 (I,U)",
                                  "route-instance-out": "D"
                                }
                              ]
                            }
                          },
                          {
                            "route-addr-print-out": "21.2.1.0",
                            "route-mask-len-print-out": "24",
                            "route-direct-print-out": "",
                            "TABLE_best_path": {
                              "ROW_best_path": [
                                {
                                  "route-no-def-prefix-out": "45.1.1.1",
                                  "route-addr-valid-out": "true",
                                  "route-marker-out": " *",
                                  "route-ifname-out": "Ethernet1/21",
                                  "route-metric-out": "44",
                                  "route-pref-out": "L2 (I,U)",
                                  "route-instance-out": "D"
                                }
                              ]
                            }
                          },
                          {
                            "route-addr-print-out": "22.1.1.2",
                            "route-mask-len-print-out": "32",
                            "route-direct-print-out": "",
                            "TABLE_best_path": {
                              "ROW_best_path": [
                                {
                                  "route-no-def-prefix-out": "45.1.1.1",
                                  "route-addr-valid-out": "true",
                                  "route-marker-out": " *",
                                  "route-ifname-out": "Ethernet1/21",
                                  "route-metric-out": "13",
                                  "route-pref-out": "L2 (I,U)",
                                  "route-instance-out": "D"
                                }
                              ]
                            }
                          },
                          {
                            "route-addr-print-out": "25.1.1.0",
                            "route-mask-len-print-out": "24",
                            "route-direct-print-out": ", direct",
                            "TABLE_direct_path": {
                              "ROW_direct_path": [
                                {
                                  "route-direct-out": "true",
                                  "route-direct-via-out": "*",
                                  "route-direct-if-name-out": "Ethernet1/31",
                                  "route-direct-metric-out": "40",
                                  "route-direct-level-out": "2",
                                  "route-direct-instance-out": "0"
                                }
                              ]
                            }
                          },
                          {
                            "route-addr-print-out": "26.1.1.0",
                            "route-mask-len-print-out": "24",
                            "route-direct-print-out": "",
                            "TABLE_best_path": {
                              "ROW_best_path": [
                                {
                                  "route-no-def-prefix-out": "45.1.1.1",
                                  "route-addr-valid-out": "true",
                                  "route-marker-out": " *",
                                  "route-ifname-out": "Ethernet1/21",
                                  "route-metric-out": "12",
                                  "route-pref-out": "L2 (I,U)",
                                  "route-instance-out": "D"
                                }
                              ]
                            }
                          },
                          {
                            "route-addr-print-out": "45.1.1.0",
                            "route-mask-len-print-out": "24",
                            "route-direct-print-out": ", direct",
                            "TABLE_direct_path": {
                              "ROW_direct_path": [
                                {
                                  "route-direct-out": "true",
                                  "route-direct-via-out": "*",
                                  "route-direct-if-name-out": "Ethernet1/21",
                                  "route-direct-metric-out": "4",
                                  "route-direct-level-out": "2",
                                  "route-direct-instance-out": "0"
                                }
                              ]
                            }
                          },
                          {
                            "route-addr-print-out": "46.1.1.0",
                            "route-mask-len-print-out": "24",
                            "route-direct-print-out": "",
                            "TABLE_best_path": {
                              "ROW_best_path": [
                                {
                                  "route-no-def-prefix-out": "45.1.1.1",
                                  "route-addr-valid-out": "true",
                                  "route-marker-out": " *",
                                  "route-ifname-out": "Ethernet1/21",
                                  "route-metric-out": "8",
                                  "route-pref-out": "L2 (I,U)",
                                  "route-instance-out": "D"
                                }
                              ]
                            }
                          },
                          {
                            "route-addr-print-out": "55.1.1.5",
                            "route-mask-len-print-out": "32",
                            "route-direct-print-out": ", direct",
                            "TABLE_direct_path": {
                              "ROW_direct_path": [
                                {
                                  "route-direct-out": "true",
                                  "route-direct-via-out": "*",
                                  "route-direct-if-name-out": "loopback1",
                                  "route-direct-metric-out": "1",
                                  "route-direct-level-out": "2",
                                  "route-direct-instance-out": "0"
                                }
                              ]
                            }
                          },
                          {
                            "route-addr-print-out": "77.1.1.7",
                            "route-mask-len-print-out": "32",
                            "route-direct-print-out": "",
                            "TABLE_best_path": {
                              "ROW_best_path": [
                                {
                                  "route-no-def-prefix-out": "45.1.1.1",
                                  "route-addr-valid-out": "true",
                                  "route-marker-out": " *",
                                  "route-ifname-out": "Ethernet1/21",
                                  "route-metric-out": "18",
                                  "route-pref-out": "L2 (I,U)",
                                  "route-instance-out": "D"
                                }
                              ]
                            }
                          },
                          {
                            "route-addr-print-out": "99.99.99.99",
                            "route-mask-len-print-out": "32",
                            "route-direct-print-out": "",
                            "TABLE_best_path": {
                              "ROW_best_path": [
                                {
                                  "route-no-def-prefix-out": "45.1.1.1",
                                  "route-addr-valid-out": "true",
                                  "route-marker-out": " *",
                                  "route-ifname-out": "Ethernet1/21",
                                  "route-metric-out": "18",
                                  "route-pref-out": "L2 (I,U)",
                                  "route-instance-out": "D"
                                }
                              ]
                            }
                          },
                          {
                            "route-addr-print-out": "192.169.14.1",
                            "route-mask-len-print-out": "32",
                            "route-direct-print-out": "",
                            "TABLE_best_path": {
                              "ROW_best_path": [
                                {
                                  "route-no-def-prefix-out": "45.1.1.1",
                                  "route-addr-valid-out": "true",
                                  "route-marker-out": " *",
                                  "route-ifname-out": "Ethernet1/21",
                                  "route-metric-out": "54",
                                  "route-pref-out": "L2 (I,U)",
                                  "route-instance-out": "D"
                                }
                              ]
                            }
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis 2 vrf all route detail 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 isis 2 vrf all route detail
IS-IS process: 2 VRF: default
IS-IS IPv4 routing table

4.1.1.4/32, L2, SID 44 Flags N, Ingress label 16044
   via 45.1.1.1, Ethernet1/21, metric 5, L2 (I,U), table-map-deny no-pol, admin-dist 115, label 3
        Instance 0x0000000D
6.1.1.6/32, L2, SID 66 Flags N, Ingress label 16066
   via 45.1.1.1, Ethernet1/21, metric 9, L2 (I,U), table-map-deny no-pol, admin-dist 115, label 16066
        Instance 0x0000000D
21.2.1.0/24, L2
   via 45.1.1.1, Ethernet1/21, metric 44, L2 (I,U), table-map-deny no-pol, admin-dist 115
        Instance 0x0000000D
22.1.1.2/32, L2, SID 22 Flags N, Ingress label 16022
   via 45.1.1.1, Ethernet1/21, metric 13, L2 (I,U), table-map-deny no-pol, admin-dist 115, label 16022
        Instance 0x0000000D
25.1.1.0/24, L2, direct
   via Ethernet1/31, metric 40, L2, direct
        Instance 0x00000000
26.1.1.0/24, L2
   via 45.1.1.1, Ethernet1/21, metric 12, L2 (I,U), table-map-deny no-pol, admin-dist 115
        Instance 0x0000000D
45.1.1.0/24, L2, direct
   via Ethernet1/21, metric 4, L2, direct
        Instance 0x00000000
46.1.1.0/24, L2
   via 45.1.1.1, Ethernet1/21, metric 8, L2 (I,U), table-map-deny no-pol, admin-dist 115
        Instance 0x0000000D
55.1.1.5/32, L2, direct
   via loopback1, metric 1, L2, direct
        Instance 0x00000000
77.1.1.7/32, L2
   via 45.1.1.1, Ethernet1/21, metric 18, L2 (I,U), table-map-deny no-pol, admin-dist 115
        Instance 0x0000000D
99.99.99.99/32, L2
   via 45.1.1.1, Ethernet1/21, metric 18, L2 (I,U), table-map-deny no-pol, admin-dist 115
        Instance 0x0000000D
192.169.14.1/32, L2
   via 45.1.1.1, Ethernet1/21, metric 54, L2 (I,U), table-map-deny no-pol, admin-dist 115
        Instance 0x0000000D

show isis 2 vrf all route summary

show isis 2 vrf all route summary

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 isis 2 vrf all route summary",
  "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 isis 2 vrf all route summary",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_process_tag": {
            "ROW_process_tag": [
              {
                "process-tag-out": "2",
                "TABLE_vrf": {
                  "ROW_vrf": [
                    {
                      "vrf-name-out": "default",
                      "afi-safi-out": "IPv4",
                      "TABLE_prefix": {
                        "ROW_prefix": [
                          {
                            "route-total-out": "12",
                            "route-paths-total-out": "12",
                            "route-paths-best-out": "12",
                            "route-paths-backup-out": "0",
                            "TABLE_sum_best_route": {
                              "ROW_sum_best_route": [
                                {
                                  "route-sum-lvl-out": "2",
                                  "route-sum-total-out": "12",
                                  "route-sum-direct-out": "3",
                                  "route-sum-normal-out": "9"
                                }
                              ]
                            },
                            "route-bestpaths-out": "\nBest paths per level",
                            "TABLE_sum_best_path": {
                              "ROW_sum_best_path": [
                                {
                                  "route-path-sum-lvl-out": "2",
                                  "route-path-sum-total-out": "12",
                                  "route-path-sum-direct-out": "3",
                                  "route-path-sum-normal-out": "9"
                                }
                              ]
                            },
                            "route-backuppaths-out": "\nBackup paths per level",
                            "route-bestroutes-per-mask-out": "\nNumber of best routes per mask-length",
                            "TABLE_best_mask": {
                              "ROW_best_mask": [
                                {
                                  "route-best-mask-val-out": "24",
                                  "route-best-mask-count-out": "5"
                                },
                                {
                                  "route-best-mask-val-out": "32",
                                  "route-best-mask-count-out": "7"
                                }
                              ]
                            }
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis 2 vrf all route summary 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 isis 2 vrf all route summary
IS-IS process: 2 VRF: default
IS-IS IPv4 routing table

Total number of best routes  : 12
Total number of paths        : 12
Total number of best paths   : 12
Total number of backup paths : 0

Best routes per level
  L2         total    : 12
             direct   : 3
             normal   : 9

Best paths per level
  L2         total    : 12
             direct   : 3
             normal   : 9

Backup paths per level
  None

Number of best routes per mask-length
  /24 : 5       /32 : 7

show isis 2 vrf all route-map statistics redistribute static

show isis 2 vrf all route-map statistics redistribute static

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 isis 2 vrf all route-map statistics redistribute static",
  "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 isis 2 vrf all route-map statistics redistribute static",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_process_tag": {
            "ROW_process_tag": [
              {
                "process-tag-out": "2",
                "TABLE_vrf": {
                  "ROW_vrf": [
                    {
                      "route-map-stat-vrf": "default",
                      "TABLE_process_route_map": {
                        "ROW_process_route_map": [
                          {
                            "name": "pass-all",
                            "action": "permit",
                            "seq": "10",
                            "accept-count": "1",
                            "reject-count": "0"
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis 2 vrf all route-map statistics redistribute static 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 isis 2 vrf all route-map statistics redistribute static 
IS-IS process: 2
VRF: default
C: No. of comparisions, M: No. of matches

route-map pass-all permit 10

Total accept count for policy: 1
Total reject count for policy: 0
n9k-reg-5# exit

show isis 2 vrf all rrm ethernet 1/21

show isis 2 vrf all rrm ethernet 1/21

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 isis 2 vrf all rrm ethernet 1/21 ",
  "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": "VAR",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_process_tag": {
            "ROW_process_tag": [
              {
                "process-tag-out": "2",
                "rrm-if-name": "Ethernet1/21",
                "TABLE_rrm": {
                  "ROW_rrm": [
                    {
                      "rrm-level": "1",
                      "rrm-retx-interval": "5",
                      "rrm-retx-throttle-interval": "66",
                      "rrm-retx-queue-length": "0",
                      "rrm-next-retx": "Inactive",
                      "rrm-retx-queue-hwm": "0",
                      "rrm-retx-queue-exceed": "0"
                    },
                    {
                      "rrm-level": "2",
                      "rrm-retx-interval": "5",
                      "rrm-retx-throttle-interval": "66",
                      "rrm-retx-queue-length": "0",
                      "rrm-next-retx": "Inactive",
                      "rrm-retx-queue-hwm": "5",
                      "rrm-retx-queue-exceed": "0"
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis 2 vrf all rrm ethernet 1/21 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 isis 2 vrf all rrm ethernet 1/21 
IS-IS process: 2

IS-IS RRM information for interface Ethernet1/21:
IS-IS Level-1 Link State Database
  Retx interval: 5, Retx throttle interval: 66 ms
  Retx queue length: 0, Next Retx: Inactive
  Retx queue HWM: 0, Retx queue exceed: 0
  LSPID                 Seq Number   Checksum  Lifetime   A/P/O/T  Ago

IS-IS Level-2 Link State Database
  Retx interval: 5, Retx throttle interval: 66 ms
  Retx queue length: 0, Next Retx: Inactive
  Retx queue HWM: 5, Retx queue exceed: 0
  LSPID                 Seq Number   Checksum  Lifetime   A/P/O/T  Ago

show isis 2 vrf all spf-log detail

show isis 2 vrf all spf-log 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 isis 2 vrf all spf-log 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 isis 2 vrf all spf-log detail ",
        "msg": "Success",
        "code": "200",
        "body": {
          "tag-out": "2",
          "TABLE_vrf": {
            "ROW_vrf": [
              {
                "vrf-name-out": "default",
                "TABLE_topo": {
                  "ROW_topo": [
                    {
                      "topo-id-out": "0",
                      "spflog-calc-out": "12",
                      "spflog-size-out": "14",
                      "spflog-maxsize-out": "20",
                      "TABLE_log_detail": {
                        "ROW_log_detail": [
                          {
                            "num-out": "1",
                            "ts-out": "01:33:38",
                            "date-out": "Mon Aug 20 16:25:38 2018"
                          },
                          {
                            "num-out": "2",
                            "ts-out": "01:33:38",
                            "date-out": "Mon Aug 20 16:25:39 2018"
                          },
                          {
                            "num-out": "3",
                            "ts-out": "01:33:38",
                            "date-out": "Mon Aug 20 16:25:39 2018",
                            "TABLE_lvl_detail": {
                              "ROW_lvl_detail": [
                                {
                                  "lvld-out": "2",
                                  "instance-out": "2",
                                  "init-ts-out": "0.000216",
                                  "ts-lvl-out": "0.000011"
                                }
                              ]
                            },
                            "ts-is-out": "0.000014",
                            "ts-urib-out": "0.000222",
                            "ts-elapsed-out": "0.000518",
                            "TABLE_lvl_second": {
                              "ROW_lvl_second": [
                                {
                                  "lvls-out": "2",
                                  "spf-node-out": "1",
                                  "spf-cnt-out": "3",
                                  "changed-cnt-out": "0",
                                  "spf-reason-out": "SR enable change"
                                }
                              ]
                            }
                          },
                          {
                            "num-out": "4",
                            "ts-out": "01:33:34",
                            "date-out": "Mon Aug 20 16:25:42 2018",
                            "TABLE_lvl_detail": {
                              "ROW_lvl_detail": [
                                {
                                  "lvld-out": "2",
                                  "instance-out": "3",
                                  "init-ts-out": "0.000213",
                                  "ts-lvl-out": "0.000005"
                                }
                              ]
                            },
                            "ts-is-out": "0.000015",
                            "ts-urib-out": "0.000208",
                            "ts-elapsed-out": "0.000506",
                            "TABLE_lvl_second": {
                              "ROW_lvl_second": [
                                {
                                  "lvls-out": "2",
                                  "spf-node-out": "1",
                                  "spf-cnt-out": "2",
                                  "changed-cnt-out": "0",
                                  "spf-reason-out": "New adj n9k-reg-4 on Ethernet1/21"
                                }
                              ]
                            }
                          },
                          {
                            "num-out": "5",
                            "ts-out": "01:33:33",
                            "date-out": "Mon Aug 20 16:25:44 2018",
                            "TABLE_lvl_detail": {
                              "ROW_lvl_detail": [
                                {
                                  "lvld-out": "2",
                                  "instance-out": "4",
                                  "init-ts-out": "0.000284",
                                  "ts-lvl-out": "0.000005"
                                }
                              ]
                            },
                            "ts-is-out": "0.000024",
                            "ts-urib-out": "0.000233",
                            "ts-elapsed-out": "0.000635",
                            "TABLE_lvl_second": {
                              "ROW_lvl_second": [
                                {
                                  "lvls-out": "2",
                                  "spf-node-out": "1",
                                  "spf-cnt-out": "2",
                                  "changed-cnt-out": "0",
                                  "spf-reason-out": "New LSP n9k-reg-4.00-00"
                                }
                              ]
                            }
                          },
                          {
                            "num-out": "6",
                            "ts-out": "01:33:31",
                            "date-out": "Mon Aug 20 16:25:45 2018",
                            "TABLE_lvl_detail": {
                              "ROW_lvl_detail": [
                                {
                                  "lvld-out": "2",
                                  "instance-out": "5",
                                  "init-ts-out": "0.000526",
                                  "ts-lvl-out": "0.000502"
                                }
                              ]
                            },
                            "ts-is-out": "0.000065",
                            "ts-urib-out": "0.000601",
                            "ts-elapsed-out": "0.001805",
                            "TABLE_lvl_second": {
                              "ROW_lvl_second": [
                                {
                                  "lvls-out": "2",
                                  "spf-node-out": "3",
                                  "spf-cnt-out": "1",
                                  "changed-cnt-out": "0",
                                  "spf-reason-out": "Updated LSP n9k-reg-4.00-00"
                                }
                              ]
                            }
                          },
                          {
                            "num-out": "7",
                            "ts-out": "01:33:29",
                            "date-out": "Mon Aug 20 16:25:47 2018",
                            "TABLE_lvl_detail": {
                              "ROW_lvl_detail": [
                                {
                                  "lvld-out": "2",
                                  "instance-out": "6",
                                  "init-ts-out": "0.000679",
                                  "ts-lvl-out": "0.000527"
                                }
                              ]
                            },
                            "ts-is-out": "0.000085",
                            "ts-urib-out": "0.000633",
                            "ts-elapsed-out": "0.002031",
                            "TABLE_lvl_second": {
                              "ROW_lvl_second": [
                                {
                                  "lvls-out": "2",
                                  "spf-node-out": "4",
                                  "spf-cnt-out": "3",
                                  "changed-cnt-out": "0",
                                  "spf-reason-out": "New adj n9k-reg-2 on Ethernet1/31"
                                }
                              ]
                            }
                          },
                          {
                            "num-out": "8",
                            "ts-out": "01:31:47",
                            "date-out": "Mon Aug 20 16:27:29 2018",
                            "TABLE_lvl_detail": {
                              "ROW_lvl_detail": [
                                {
                                  "lvld-out": "2",
                                  "instance-out": "7",
                                  "init-ts-out": "0.000412",
                                  "ts-lvl-out": "0.000289"
                                }
                              ]
                            },
                            "ts-is-out": "0.000047",
                            "ts-urib-out": "0.000419",
                            "ts-elapsed-out": "0.001242",
                            "TABLE_lvl_second": {
                              "ROW_lvl_second": [
                                {
                                  "lvls-out": "2",
                                  "spf-node-out": "4",
                                  "spf-cnt-out": "1",
                                  "changed-cnt-out": "0",
                                  "spf-reason-out": "Updated LSP n9k-reg-2.00-00"
                                }
                              ]
                            }
                          },
                          {
                            "num-out": "9",
                            "ts-out": "01:31:46",
                            "date-out": "Mon Aug 20 16:27:30 2018",
                            "TABLE_lvl_detail": {
                              "ROW_lvl_detail": [
                                {
                                  "lvld-out": "2",
                                  "instance-out": "8",
                                  "init-ts-out": "0.000411",
                                  "ts-lvl-out": "0.000302"
                                }
                              ]
                            },
                            "ts-is-out": "0.000047",
                            "ts-urib-out": "0.000451",
                            "ts-elapsed-out": "0.001293",
                            "TABLE_lvl_second": {
                              "ROW_lvl_second": [
                                {
                                  "lvls-out": "2",
                                  "spf-node-out": "4",
                                  "spf-cnt-out": "1",
                                  "changed-cnt-out": "0",
                                  "spf-reason-out": "Updated LSP n9k-reg-4.00-00"
                                }
                              ]
                            }
                          },
                          {
                            "num-out": "10",
                            "ts-out": "01:31:20",
                            "date-out": "Mon Aug 20 16:27:56 2018",
                            "TABLE_lvl_detail": {
                              "ROW_lvl_detail": [
                                {
                                  "lvld-out": "2",
                                  "instance-out": "9",
                                  "init-ts-out": "0.000401",
                                  "ts-lvl-out": "0.000465"
                                }
                              ]
                            },
                            "ts-is-out": "0.000057",
                            "ts-urib-out": "0.000486",
                            "ts-elapsed-out": "0.001471",
                            "TABLE_lvl_second": {
                              "ROW_lvl_second": [
                                {
                                  "lvls-out": "2",
                                  "spf-node-out": "5",
                                  "spf-cnt-out": "2",
                                  "changed-cnt-out": "0",
                                  "spf-reason-out": "Updated LSP n9k-reg-2.00-00"
                                }
                              ]
                            }
                          },
                          {
                            "num-out": "11",
                            "ts-out": "01:31:19",
                            "date-out": "Mon Aug 20 16:27:57 2018",
                            "TABLE_lvl_detail": {
                              "ROW_lvl_detail": [
                                {
                                  "lvld-out": "2",
                                  "instance-out": "A",
                                  "init-ts-out": "0.000415",
                                  "ts-lvl-out": "0.000423"
                                }
                              ]
                            },
                            "ts-is-out": "0.000058",
                            "ts-urib-out": "0.000429",
                            "ts-elapsed-out": "0.001401",
                            "TABLE_lvl_second": {
                              "ROW_lvl_second": [
                                {
                                  "lvls-out": "2",
                                  "spf-node-out": "5",
                                  "spf-cnt-out": "1",
                                  "changed-cnt-out": "0",
                                  "spf-reason-out": "Updated LSP n9k-reg-6.00-00"
                                }
                              ]
                            }
                          },
                          {
                            "num-out": "12",
                            "ts-out": "01:31:17",
                            "date-out": "Mon Aug 20 16:27:59 2018",
                            "TABLE_lvl_detail": {
                              "ROW_lvl_detail": [
                                {
                                  "lvld-out": "2",
                                  "instance-out": "B",
                                  "init-ts-out": "0.000638",
                                  "ts-lvl-out": "0.001157"
                                }
                              ]
                            },
                            "ts-is-out": "0.000136",
                            "ts-urib-out": "0.000618",
                            "ts-elapsed-out": "0.002689",
                            "TABLE_lvl_second": {
                              "ROW_lvl_second": [
                                {
                                  "lvls-out": "2",
                                  "spf-node-out": "5",
                                  "spf-cnt-out": "1",
                                  "changed-cnt-out": "0",
                                  "spf-reason-out": "Updated LSP n9k-reg-4.00-00"
                                }
                              ]
                            }
                          },
                          {
                            "num-out": "13",
                            "ts-out": "01:31:16",
                            "date-out": "Mon Aug 20 16:28:00 2018",
                            "TABLE_lvl_detail": {
                              "ROW_lvl_detail": [
                                {
                                  "lvld-out": "2",
                                  "instance-out": "C",
                                  "init-ts-out": "0.000430",
                                  "ts-lvl-out": "0.000471"
                                }
                              ]
                            },
                            "ts-is-out": "0.000058",
                            "ts-urib-out": "0.000608",
                            "ts-elapsed-out": "0.001646",
                            "TABLE_lvl_second": {
                              "ROW_lvl_second": [
                                {
                                  "lvls-out": "2",
                                  "spf-node-out": "5",
                                  "spf-cnt-out": "1",
                                  "changed-cnt-out": "0",
                                  "spf-reason-out": "Updated LSP n9k-reg-6.00-00"
                                }
                              ]
                            }
                          },
                          {
                            "num-out": "14",
                            "ts-out": "01:31:14",
                            "date-out": "Mon Aug 20 16:28:02 2018",
                            "TABLE_lvl_detail": {
                              "ROW_lvl_detail": [
                                {
                                  "lvld-out": "2",
                                  "instance-out": "D",
                                  "init-ts-out": "0.000448",
                                  "ts-lvl-out": "0.000495"
                                }
                              ]
                            },
                            "ts-is-out": "0.000058",
                            "ts-urib-out": "0.000444",
                            "ts-elapsed-out": "0.001517",
                            "TABLE_lvl_second": {
                              "ROW_lvl_second": [
                                {
                                  "lvls-out": "2",
                                  "spf-node-out": "5",
                                  "spf-cnt-out": "1",
                                  "changed-cnt-out": "0",
                                  "spf-reason-out": "Updated LSP n9k-reg-6.00-00"
                                }
                              ]
                            }
                          }
                        ]
                      }
                    },
                    {
                      "topo-id-out": "2",
                      "spflog-calc-out": "0",
                      "spflog-size-out": "0",
                      "spflog-maxsize-out": "20"
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis 2 vrf all spf-log detail 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 isis 2 vrf all spf-log detail 
IS-IS Process: 2 SPF information VRF: default
SPF log for Topology 0
Total number of SPF calculations: 12

Log entry (current/max): 14/20
Log entry: 01, Ago: 01:33:38, Date: Mon Aug 20 16:25:38 2018
  ------------------------ SPF Error ------------------------ 
Log entry: 02, Ago: 01:33:38, Date: Mon Aug 20 16:25:39 2018
  ------------------------ SPF Error ------------------------ 
Log entry: 03, Ago: 01:33:38, Date: Mon Aug 20 16:25:39 2018
  Level  Instance    Init      SPF       IS Update  URIB Update  Total
2 0x00000002 0.000216 0.000011 0.000014 0.000222 0.000518 Level Node Count Changed Reason
2 1 3 0 SR enable change
Log entry: 04, Ago: 01:33:34, Date: Mon Aug 20 16:25:42 2018 Level Instance Init SPF IS Update URIB Update Total
2 0x00000003 0.000213 0.000005 0.000015 0.000208 0.000506 Level Node Count Changed Reason
2 1 2 0 New adj n9k-reg-4 on Ethernet1/21
Log entry: 05, Ago: 01:33:33, Date: Mon Aug 20 16:25:44 2018 Level Instance Init SPF IS Update URIB Update Total
2 0x00000004 0.000284 0.000005 0.000024 0.000233 0.000635 Level Node Count Changed Reason
2 1 2 0 New LSP n9k-reg-4.00-00
Log entry: 06, Ago: 01:33:31, Date: Mon Aug 20 16:25:45 2018 Level Instance Init SPF IS Update URIB Update Total
2 0x00000005 0.000526 0.000502 0.000065 0.000601 0.001805 Level Node Count Changed Reason
2 3 1 0 Updated LSP n9k-reg-4.00-00
Log entry: 07, Ago: 01:33:29, Date: Mon Aug 20 16:25:47 2018 Level Instance Init SPF IS Update URIB Update Total
2 0x00000006 0.000679 0.000527 0.000085 0.000633 0.002031 Level Node Count Changed Reason
2 4 3 0 New adj n9k-reg-2 on Ethernet1/31
Log entry: 08, Ago: 01:31:47, Date: Mon Aug 20 16:27:29 2018 Level Instance Init SPF IS Update URIB Update Total
2 0x00000007 0.000412 0.000289 0.000047 0.000419 0.001242 Level Node Count Changed Reason
2 4 1 0 Updated LSP n9k-reg-2.00-00
Log entry: 09, Ago: 01:31:46, Date: Mon Aug 20 16:27:30 2018 Level Instance Init SPF IS Update URIB Update Total
2 0x00000008 0.000411 0.000302 0.000047 0.000451 0.001293 Level Node Count Changed Reason
2 4 1 0 Updated LSP n9k-reg-4.00-00
Log entry: 10, Ago: 01:31:20, Date: Mon Aug 20 16:27:56 2018 Level Instance Init SPF IS Update URIB Update Total
2 0x00000009 0.000401 0.000465 0.000057 0.000486 0.001471 Level Node Count Changed Reason
2 5 2 0 Updated LSP n9k-reg-2.00-00
Log entry: 11, Ago: 01:31:19, Date: Mon Aug 20 16:27:57 2018 Level Instance Init SPF IS Update URIB Update Total
2 0x0000000A 0.000415 0.000423 0.000058 0.000429 0.001401 Level Node Count Changed Reason
2 5 1 0 Updated LSP n9k-reg-6.00-00
Log entry: 12, Ago: 01:31:17, Date: Mon Aug 20 16:27:59 2018 Level Instance Init SPF IS Update URIB Update Total
2 0x0000000B 0.000638 0.001157 0.000136 0.000618 0.002689 Level Node Count Changed Reason
2 5 1 0 Updated LSP n9k-reg-4.00-00
Log entry: 13, Ago: 01:31:16, Date: Mon Aug 20 16:28:00 2018 Level Instance Init SPF IS Update URIB Update Total
2 0x0000000C 0.000430 0.000471 0.000058 0.000608 0.001646 Level Node Count Changed Reason
2 5 1 0 Updated LSP n9k-reg-6.00-00
Log entry: 14, Ago: 01:31:14, Date: Mon Aug 20 16:28:02 2018 Level Instance Init SPF IS Update URIB Update Total
2 0x0000000D 0.000448 0.000495 0.000058 0.000444 0.001517 Level Node Count Changed Reason
2 5 1 0 Updated LSP n9k-reg-6.00-00
SPF log for Topology 2 Total number of SPF calculations: 0 Log entry (current/max): 0/20

show isis 2 vrf all srm ethernet 1/21

show isis 2 vrf all srm ethernet 1/21

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 isis 2 vrf all srm ethernet 1/21 ",
  "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": "VAR",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_process_tag": {
            "ROW_process_tag": [
              {
                "process-tag-out": "2",
                "srm-if-name": "Ethernet1/21",
                "TABLE_srm": {
                  "ROW_srm": [
                    {
                      "srm-level": "1",
                      "srm-if-eligible": "not",
                      "srm-if-not-on-srm-list": "not",
                      "srm-lsp-interval": "33",
                      "srm-next-lsp": "Inactive",
                      "srm-dbase-hdr": "  LSPID                 Seq Number   Checksum  Lifetime   A/P/O/T"
                    },
                    {
                      "srm-level": "2",
                      "srm-if-eligible": "",
                      "srm-if-not-on-srm-list": "",
                      "srm-lsp-interval": "33",
                      "srm-next-lsp": "Inactive",
                      "srm-dbase-hdr": "  LSPID                 Seq Number   Checksum  Lifetime   A/P/O/T"
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis 2 vrf all srm ethernet 1/21 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 isis 2 vrf all srm ethernet 1/21 
IS-IS process: 2

IS-IS SRM information for interface Ethernet1/21:
IS-IS Level-1 Link State Database
  Interface is not eligible for flooding LSP
  Interface is not on stopped SRM list
  LSP interval: 33 ms, Next LSP: Inactive
  LSPID                 Seq Number   Checksum  Lifetime   A/P/O/T

IS-IS Level-2 Link State Database
  Interface is eligible for flooding LSP
  Interface is on stopped SRM list
  LSP interval: 33 ms, Next LSP: Inactive
  LSPID                 Seq Number   Checksum  Lifetime   A/P/O/T

show isis 2 vrf all ssn ethernet 1/21

show isis 2 vrf all ssn ethernet 1/21

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 isis 2 vrf all ssn ethernet 1/21 ",
  "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": "VAR",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_process_tag": {
            "ROW_process_tag": [
              {
                "process-tag-out": "2",
                "snn-if-name": "Ethernet1/21",
                "TABLE_ssn": {
                  "ROW_ssn": [
                    {
                      "snn-level": "1",
                      "snn-psnp-eligible": "not",
                      "snn-next-psnp": "Inactive",
                      "snn-dbase_hdr": "  LSPID                 Seq Number   Checksum  Lifetime   A/P/O/T"
                    },
                    {
                      "snn-level": "2",
                      "snn-psnp-eligible": "",
                      "snn-next-psnp": "Inactive",
                      "snn-dbase_hdr": "  LSPID                 Seq Number   Checksum  Lifetime   A/P/O/T"
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis 2 vrf all ssn ethernet 1/21 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 isis 2 vrf all ssn ethernet 1/21 
IS-IS process: 2

IS-IS SSN information for interface Ethernet1/21:
IS-IS Level-1 Link State Database
  Interface is not eligible for sending PSNP
  Next PSNP: Inactive
  LSPID                 Seq Number   Checksum  Lifetime   A/P/O/T

IS-IS Level-2 Link State Database
  Interface is eligible for sending PSNP
  Next PSNP: Inactive
  LSPID                 Seq Number   Checksum  Lifetime   A/P/O/T

show isis 2 vrf all statistics ethernet 1/21

show isis 2 vrf all statistics ethernet 1/21

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 isis 2 vrf all statistics ethernet 1/21",
  "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": "VAR",
        "msg": "Success",
        "code": "200",
        "body": {
          "stat-if-out": "true",
          "tag-out": "2",
          "TABLE_vrf": {
            "ROW_vrf": [
              {
                "vrf-name-out": "default",
                "stat-if-name-out": "Ethernet1/21",
                "stat-dis-elections-out": "0"
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis 2 vrf all statistics ethernet 1/21 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 isis 2 vrf all statistics ethernet 1/21
IS-IS Process:      2
VRF: default
DIS elections: 0

show isis 2 vrf all topology

show isis 2 vrf all topology

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 isis 2 vrf all topology ",
  "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 isis 2 vrf all topology ",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_process_tag": {
            "ROW_process_tag": [
              {
                "process-tag-out": "2",
                "topology-vrf": "default",
                "TABLE_LEVEL": {
                  "ROW_LEVEL": [
                    {
                      "topology-level": "1"
                    },
                    {
                      "topology-level": "2",
                      "TABLE_ONE_ROUTE": {
                        "ROW_ONE_ROUTE": [
                          {
                            "topology-one-route-node-name": "n9k-reg-2.00",
                            "topology-one-route-spf-instance": "D",
                            "topology-one-route-on-path": "",
                            "TABLE_ONE_ROUTE_NH": {
                              "ROW_ONE_ROUTE_NH": [
                                {
                                  "topology-one-route-nh-system-name": "n9k-reg-4",
                                  "topology-one-route-nh-if-name": "Ethernet1/21",
                                  "topology-one-route-nh-metric": "12"
                                }
                              ]
                            }
                          },
                          {
                            "topology-one-route-node-name": "n9k-reg-4.00",
                            "topology-one-route-spf-instance": "D",
                            "topology-one-route-on-path": "",
                            "TABLE_ONE_ROUTE_NH": {
                              "ROW_ONE_ROUTE_NH": [
                                {
                                  "topology-one-route-nh-system-name": "n9k-reg-4",
                                  "topology-one-route-nh-if-name": "Ethernet1/21",
                                  "topology-one-route-nh-metric": "4"
                                }
                              ]
                            }
                          },
                          {
                            "topology-one-route-node-name": "n9k-reg-6.00",
                            "topology-one-route-spf-instance": "D",
                            "topology-one-route-on-path": "",
                            "TABLE_ONE_ROUTE_NH": {
                              "ROW_ONE_ROUTE_NH": [
                                {
                                  "topology-one-route-nh-system-name": "n9k-reg-4",
                                  "topology-one-route-nh-if-name": "Ethernet1/21",
                                  "topology-one-route-nh-metric": "8"
                                }
                              ]
                            }
                          },
                          {
                            "topology-one-route-node-name": "xtc.00",
                            "topology-one-route-spf-instance": "D",
                            "topology-one-route-on-path": "",
                            "TABLE_ONE_ROUTE_NH": {
                              "ROW_ONE_ROUTE_NH": [
                                {
                                  "topology-one-route-nh-system-name": "n9k-reg-4",
                                  "topology-one-route-nh-if-name": "Ethernet1/21",
                                  "topology-one-route-nh-metric": "44"
                                }
                              ]
                            }
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis 2 vrf all topology 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 isis 2 vrf all topology 
IS-IS process: 2
VRF: default
IS-IS Level-1 IS routing table

IS-IS Level-2 IS routing table
n9k-reg-2.00, Instance 0x0000000D
   via n9k-reg-4, Ethernet1/21, metric 12
n9k-reg-4.00, Instance 0x0000000D
   via n9k-reg-4, Ethernet1/21, metric 4
n9k-reg-6.00, Instance 0x0000000D
   via n9k-reg-4, Ethernet1/21, metric 8
xtc.00, Instance 0x0000000D
   via n9k-reg-4, Ethernet1/21, metric 44

show isis 2 vrf all traffic

show isis 2 vrf all traffic

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 isis 2 vrf all traffic ",
  "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 isis 2 vrf all traffic ",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_process_tag": {
            "ROW_process_tag": [
              {
                "process-tag-out": "2",
                "TABLE_vrf": {
                  "ROW_vrf": [
                    {
                      "vrf-name-out": "default",
                      "traffic-if-out": "false",
                      "traffic-lan-iih-out": "LAN-IIH",
                      "traffic-lan-iih-rcv-out": "0",
                      "traffic-lan-iih-xmit-out": "0",
                      "traffic-lan-iih-rcv-auth-err-out": "0",
                      "traffic-lan-iih-rcv-err-out": "0",
                      "traffic-p2p-iih-out": "P2P-IIH",
                      "traffic-p2p-iih-rcv-out": "1217",
                      "traffic-p2p-iih-xmit-out": "1217",
                      "traffic-p2p-iih-rcv-auth-err-out": "0",
                      "traffic-p2p-iih-rcv-err-out": "0",
                      "traffic-csnp-out": "CSNP",
                      "traffic-csnp-rcv-out": "83",
                      "traffic-csnp-xmit-out": "95",
                      "traffic-csnp-rcv-auth-err-out": "0",
                      "traffic-csnp-rcv-err-out": "0",
                      "traffic-psnp-out": "PSNP",
                      "traffic-psnp-rcv-out": "52",
                      "traffic-psnp-xmit-out": "56",
                      "traffic-psnp-rcv-auth-err-out": "0",
                      "traffic-psnp-rcv-err-out": "0",
                      "traffic-lsp-out": "LSP",
                      "traffic-lsp-rcv-out": "70",
                      "traffic-lsp-flood-out": "63",
                      "traffic-lsp-rcv-auth-err-out": "0",
                      "traffic-lsp-rcv-err-out": "0",
                      "traffic-lsp-rexmit-out": "0"
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis 2 vrf all traffic 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 isis 2 vrf all traffic 
IS-IS process: 2
VRF: default
IS-IS Traffic:
PDU        Received        Sent  RcvAuthErr OtherRcvErr  ReTransmit
LAN-IIH           0           0           0           0         n/a
P2P-IIH        1217        1217           0           0         n/a
CSNP             83          95           0           0         n/a
PSNP             52          56           0           0         n/a
LSP              70          63           0           0           0

show isis 2 vrf all traffic ethernet 1/21 mbuf-priority

show isis 2 vrf all traffic ethernet 1/21 mbuf-priority

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 isis 2 vrf all traffic ethernet 1/21 mbuf-priority",
  "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": "VAR",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_process_tag": {
            "ROW_process_tag": [
              {
                "process-tag-out": "2",
                "TABLE_vrf": {
                  "ROW_vrf": [
                    {
                      "vrf-name-out": "default",
                      "traffic-if-out": "true",
                      "traffic-if-name-out": "Ethernet1/21",
                      "traffic-lan-iih-out": "LAN-IIH",
                      "traffic-lan-iih-rcv-out": "0",
                      "traffic-lan-iih-xmit-out": "0",
                      "traffic-lan-iih-rcv-auth-err-out": "0",
                      "traffic-lan-iih-rcv-err-out": "0",
                      "traffic-p2p-iih-out": "P2P-IIH",
                      "traffic-p2p-iih-rcv-out": "608",
                      "traffic-p2p-iih-xmit-out": "609",
                      "traffic-p2p-iih-rcv-auth-err-out": "0",
                      "traffic-p2p-iih-rcv-err-out": "0",
                      "traffic-csnp-out": "CSNP",
                      "traffic-csnp-rcv-out": "46",
                      "traffic-csnp-xmit-out": "43",
                      "traffic-csnp-rcv-auth-err-out": "0",
                      "traffic-csnp-rcv-err-out": "0",
                      "traffic-psnp-out": "PSNP",
                      "traffic-psnp-rcv-out": "22",
                      "traffic-psnp-xmit-out": "33",
                      "traffic-psnp-rcv-auth-err-out": "0",
                      "traffic-psnp-rcv-err-out": "0",
                      "traffic-lsp-out": "LSP",
                      "traffic-lsp-rcv-out": "39",
                      "traffic-lsp-flood-out": "29",
                      "traffic-lsp-rcv-auth-err-out": "0",
                      "traffic-lsp-rcv-err-out": "0",
                      "traffic-lsp-rexmit-out": "0"
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis 2 vrf all traffic ethernet 1/21 mbuf-priority 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 isis 2 vrf all traffic ethernet 1/21 mbuf-priority
IS-IS process: 2
VRF: default
IS-IS Traffic for Ethernet1/21:
PDU        Received        Sent  RcvAuthErr OtherRcvErr  ReTransmit
LAN-IIH           0           0           0           0         n/a
P2P-IIH         608         609           0           0         n/a
CSNP             46          43           0           0         n/a
PSNP             22          33           0           0         n/a
LSP              39          29           0           0           0

---- PDU mbuf priority ---
IIH PDU rcvd [priority=count]:      [0=608]
OTHER PDU rcvd [priority=count]:    [0=107]
Unexpected priority IIH PDU rcvd:   608
Unexpected priority OTHER PDU rcvd: 107

show isis adj vrf all

show isis adj 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 isis adj 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 isis adj vrf all",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_process_tag": {
            "ROW_process_tag": [
              {
                "process-tag-out": "2",
                "TABLE_vrf": {
                  "ROW_vrf": [
                    {
                      "vrf-name-out": "default",
                      "adj-summary-out": "false",
                      "adj-interface-out": "false",
                      "TABLE_process_adj": {
                        "ROW_process_adj": [
                          {
                            "adj-sys-name-out": "n9k-reg-4",
                            "adj-sys-id-out": "N/A",
                            "adj-usage-out": "2",
                            "adj-state-out": "UP",
                            "adj-hold-time-out": "00:00:29",
                            "adj-intf-name-out": "Ethernet1/21",
                            "adj-detail-set-out": "false"
                          },
                          {
                            "adj-sys-name-out": "n9k-reg-2",
                            "adj-sys-id-out": "N/A",
                            "adj-usage-out": "2",
                            "adj-state-out": "UP",
                            "adj-hold-time-out": "00:00:27",
                            "adj-intf-name-out": "Ethernet1/31",
                            "adj-detail-set-out": "false"
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis adj 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 isis adj vrf all
IS-IS process: 2 VRF: default
IS-IS adjacency database:
Legend: '!': No AF level connectivity in given topology
System ID       SNPA            Level  State  Hold Time  Interface
n9k-reg-4       N/A             2      UP     00:00:29   Ethernet1/21
n9k-reg-2       N/A             2      UP     00:00:27   Ethernet1/31

show isis hostname vrf all

show isis hostname 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 isis hostname 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 isis hostname vrf all",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_vrf": {
            "ROW_vrf": [
              {
                "vrf-name-out": "default",
                "tag-out": "2",
                "hname-enabled-out": "true",
                "hname-detail-out": "false",
                "TABLE_hostname": {
                  "ROW_hostname": [
                    {
                      "hname-id-out": "0000.0000.0002",
                      "hname-level-out": "2",
                      "hname-id-mine-out": "false",
                      "hname-name-out": "n9k-reg-2"
                    },
                    {
                      "hname-id-out": "0000.0000.0004",
                      "hname-level-out": "2",
                      "hname-id-mine-out": "false",
                      "hname-name-out": "n9k-reg-4"
                    },
                    {
                      "hname-id-out": "0000.0000.0006",
                      "hname-level-out": "2",
                      "hname-id-mine-out": "false",
                      "hname-name-out": "n9k-reg-6"
                    },
                    {
                      "hname-id-out": "0000.0000.0055",
                      "hname-level-out": "2",
                      "hname-id-mine-out": "true",
                      "hname-name-out": "n9k-reg-5"
                    },
                    {
                      "hname-id-out": "0001.0000.0008",
                      "hname-level-out": "2",
                      "hname-id-mine-out": "false",
                      "hname-name-out": "xtc"
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis hostname 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 isis hostname vrf all
IS-IS Process: 2 dynamic hostname table VRF: default
  Level  System ID       Dynamic hostname
  2      0000.0000.0002  n9k-reg-2
  2      0000.0000.0004  n9k-reg-4
  2      0000.0000.0006  n9k-reg-6
  2      0000.0000.0055* n9k-reg-5
  2      0001.0000.0008  xtc

show isis interface brief

show isis interface 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 isis interface 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 isis interface brief",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_process_tag": {
            "ROW_process_tag": [
              {
                "process-tag-out": "2",
                "TABLE_vrf": {
                  "ROW_vrf": [
                    {
                      "vrf-name-out": "default",
                      "TABLE_interface": {
                        "ROW_interface": [
                          {
                            "intfb-name-out": "loopback1",
                            "intfb-type-out": "Loop",
                            "intfb-ix-out": "3",
                            "intfb-state-out": "Up",
                            "intfb-ready-state-out": "Ready",
                            "intfb-cid-out": "1",
                            "intfb-ckt-type-out": "L2",
                            "intfb-mtu-out": "1500",
                            "intf-loopback-metric-lvl-1-out": "1",
                            "intf-loopback-metric-lvl-2-out": "1",
                            "intf-loopback-prio-lvl-1-out": "64",
                            "intf-loopback-prio-lvl-2-out": "64",
                            "intf-loopback-adj-count-lvl-1-out": "0",
                            "intf-loopback-adj-up-count-lvl-1-out": "0",
                            "intf-loopback-adj-count-lvl-2-out": "0",
                            "intf-loopback-adj-up-count-lvl-2-out": "0"
                          },
                          {
                            "intfb-name-out": "Ethernet1/21",
                            "intfb-type-out": "P2P",
                            "intfb-ix-out": "1",
                            "intfb-state-out": "Up",
                            "intfb-ready-state-out": "Ready",
                            "intfb-cid-out": "1",
                            "intfb-ckt-type-out": "L2",
                            "intfb-mtu-out": "1500",
                            "intf-p2p-metric-lvl-1-out": "4",
                            "intf-p2p-metric-lvl-2-out": "4",
                            "intf-p2p-prio-lvl-1-out": "64",
                            "intf-p2p-prio-lvl-2-out": "64",
                            "intf-p2p-adj-count-lvl-1-out": "0",
                            "intf-p2p-adj-up-count-lvl-1-out": "0",
                            "intf-p2p-adj-count-lvl-2-out": "1",
                            "intf-p2p-adj-up-count-lvl-2-out": "1"
                          },
                          {
                            "intfb-name-out": "Ethernet1/31",
                            "intfb-type-out": "P2P",
                            "intfb-ix-out": "2",
                            "intfb-state-out": "Up",
                            "intfb-ready-state-out": "Ready",
                            "intfb-cid-out": "1",
                            "intfb-ckt-type-out": "L2",
                            "intfb-mtu-out": "1500",
                            "intf-p2p-metric-lvl-1-out": "40",
                            "intf-p2p-metric-lvl-2-out": "40",
                            "intf-p2p-prio-lvl-1-out": "64",
                            "intf-p2p-prio-lvl-2-out": "64",
                            "intf-p2p-adj-count-lvl-1-out": "0",
                            "intf-p2p-adj-up-count-lvl-1-out": "0",
                            "intf-p2p-adj-count-lvl-2-out": "1",
                            "intf-p2p-adj-up-count-lvl-2-out": "1"
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show isis interface brief 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 isis interface brief
IS-IS process: 2 VRF: default
Interface    Type  Idx State        Circuit   MTU  Metric  Priority  Adjs/AdjsUp
                                                   L1  L2  L1  L2    L1    L2
-------------------------------------------------------------------------------- Topology: TopoID: 0 loopback1 Loop 3 Up/Ready 0x01/L2 1500 1 1 64 64 0/0 0/0 Topology: TopoID: 0 Ethernet1/21 P2P 1 Up/Ready 0x01/L2 1500 4 4 64 64 0/0 1/1 Topology: TopoID: 0 Ethernet1/31 P2P 2 Up/Ready 0x01/L2 1500 40 40 64 64 0/0 1/1