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:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
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:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
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:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|