show vrrs server

show vrrs  server

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 vrrs  server",
  "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 vrrs  server",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_srv": {
            "ROW_srv": [
              {
                "name": "vrrpVlan2v41",
                "af": "IPv4",
                "intf": "Vlan2",
                "state": "ACTIVE",
                "vmac": "0000.5e00.0101",
                "vip": "4.4.4.100",
                "TABLE_tag": {
                  "ROW_tag": {
                    "tag": "jsontest"
                  }
                }
              },
              {
                "name": "vrrpVlan2v61",
                "af": "IPv6",
                "intf": "Vlan2",
                "state": "ACTIVE",
                "vmac": "0000.5e00.0201",
                "vip": "fe80::101"
              },
              {
                "name": "vrrpVlan3v43",
                "af": "IPv4",
                "intf": "Vlan3",
                "state": "ACTIVE",
                "vmac": "0000.5e00.0103",
                "vip": "3.3.3.101"
              }
            ]
          }
        }
      }
    }
  }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vrrs server 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 vrrs  server
Server Name: vrrpVlan2v41
  Address Family: IPv4
  Interface: Vlan2
  State: ACTIVE
  vMAC: 0000.5e00.0101
  vIP Address: 4.4.4.100
  Tags Connected:
    Tag Name jsontest

Server Name: vrrpVlan2v61
  Address Family: IPv6
  Interface: Vlan2
  State: ACTIVE
  vMAC: 0000.5e00.0201
  vIP Address: fe80::101
  Tags Connected:

Server Name: vrrpVlan3v43
  Address Family: IPv4
  Interface: Vlan3
  State: ACTIVE
  vMAC: 0000.5e00.0103
  vIP Address: 3.3.3.101
  Tags Connected:




## show vrrs tag jsontest title show vrrs tag jsontest Python 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 vrrs tag jsontest", "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 vrrs tag jsontest", "msg": "Success", "code": "200", "body": { "TABLE_tag": { "ROW_tag": { "name": "jsontest", "server": "vrrpVlan2v41" } } } } } } } The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show vrrs tag jsontest 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 vrrs tag jsontest

Tag Name jsontest
  Following Server: vrrpVlan2v41
  Clients Listening: