show fhrp

show fhrp

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 fhrp",
  "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 fhrp",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_brief": {
            "ROW_brief": {
              "intf_name": "Vlan2",
              "intf_state": "up",
              "ipv4_state": "up",
              "ipv6_state": "up",
              "hardware_status": "present",
              "refcount": 3
            }
          }
        }
      }
    }
  }
}

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

Interface                               L2    IPv4  IPv6  Hardware     Ref Cnt

Vlan2                                   up    up    up    present            3





show fhrp vlan 2

show fhrp vlan 2

import json

"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'

myheaders={'content-type':'application/json'}
payload={
  "ins_api":{
  "version": "1.0",
  "type": "cli_show",
  "chunk": "0",
  "sid": "1",
  "input": "show fhrp vlan 2",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{
  "ins_api": {
    "type": "cli_show",
    "version": "1.0",
    "sid": "eoc",
    "outputs": {
      "output": {
        "input": "show fhrp vlan 2",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_brief": {
            "ROW_brief": {
              "intf_name": "Vlan2",
              "intf_state": "up",
              "ipv4_state": "up",
              "ipv6_state": "up",
              "hardware_status": "present",
              "refcount": 3
            }
          }
        }
      }
    }
  }
}

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

Interface                               L2    IPv4  IPv6  Hardware     Ref Cnt

Vlan2                                   up    up    up    present            3






show fhrp vlan 2 verbose

show fhrp vlan 2 verbose

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 fhrp vlan 2 verbose",
  "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 fhrp vlan 2 verbose",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_det": {
            "ROW_det": {
              "intf_name": "Vlan2",
              "handle": "0x9010002",
              "refcount": 3,
              "TABLE_clients": {
                "ROW_clients": [
                  {
                    "client_id": 1,
                    "client_name": "VRRP"
                  },
                  {
                    "client_id": 2,
                    "client_name": "PATHWAY"
                  }
                ]
              },
              "running": 0,
              "expired": null,
              "v_retries": 0,
              "v_time": "0.000 secs",
              "r_delay": 0,
              "min_delay": 0,
              "remaining_delay": "0.000 secs",
              "i_state": "up",
              "ipv4_state": "up",
              "ipv6_state": "up",
              "h_state": "present"
            }
          }
        }
      }
    }
  }
}

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


Interface Vlan2
  Interface handle     : 0x9010002
  Reference count      : 3
  Client             1 : VRRP
  Client             2 : PATHWAY
  Verify up running    : 0
  Verify up retries    : 0
  Verify up next retry : 0.000 secs
  Reload Delay         : 0
  Minimum Delay        : 0
  Delay remaining      : 0.000 secs
  Interface state      : up
  IPv4 state           : up
  IPv6 state           : up
  Hardware state       : present