Cisco Nexus 9000 Series NX-API CLI Reference, Release 7(x)
NX-OS 7(x)
- Cisco Nexus 9000 Series NX-API CLI Reference, Release 7.x
- About NX-API CLI
- Access-List Commands
- BFD Commands
- BGP Commands
- CDP Commands
- DHCP Commands
- Diagnostic Commands
- Environment Commands
- Flow Commands
- Hardware Commands
- Interface Commands
- Inventory Commands
- LLDP Commands
- Module Commands
- NVE Commands
- RADIUS Commands
- SNMP Commands
- System Commands
- TACACS Commands
- Version Commands
show radius-server
Python
Copy
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 radius-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": {
"outputs": {
"output": {
"body": {
"TABLE_server": {
"ROW_server": [
{
"acct_port": 1813,
"auth_port": 1812,
"secretKey": "********",
"server_ip": "172.31.201.133"
},
{
"acct_port": 1813,
"auth_port": 1812,
"secretKey": "********",
"server_ip": "172.31.200.255"
}
]
},
"global_deadtime": 0,
"global_source_intf": "any available",
"global_timeout": 5,
"retransmissionCount": 1,
"server_count": 2
},
"code": "200",
"input": "show radius-server",
"msg": "Success"
}
},
"sid": "eoc",
"type": "cli_show",
"version": "1.0"
}
}