show ntp access-groups
show ntp access-groups
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 ntp access-groups",
"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 ntp access-groups",
"msg": "Success",
"code": "200",
"body": {
"matchall": "Enabled",
"TABLE_accessgroups": {
"ROW_accessgroups": [
{
"accesslist": "peeracl2",
"type": "Peer"
},
{
"accesslist": "peeracl1",
"type": "Peer"
},
{
"accesslist": "serve2",
"type": "Serve"
},
{
"accesslist": "serve1",
"type": "Serve"
},
{
"accesslist": "sonly2",
"type": "Serve-only"
},
{
"accesslist": "sonly1",
"type": "Serve-only"
},
{
"accesslist": "qonly2",
"type": "Query-only"
},
{
"accesslist": "qonly1",
"type": "Query-only"
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ntp access-groups command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show ntp authentication-keys
show ntp authentication-keys
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 ntp authentication-keys",
"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 ntp authentication-keys",
"msg": "Success",
"code": "200",
"body": {
"TABLE_authkeys": {
"ROW_authkeys": {
"Authkey": "50",
"MD5String": "wawyanbslsxi5"
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ntp authentication-keys command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show ntp authentication-status
show ntp authentication-status
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 ntp authentication-status",
"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 ntp authentication-status",
"msg": "Success",
"code": "200",
"body": {
"authentication": "Authentication enabled."
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ntp authentication-status command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show ntp logging-status
show ntp logging-status
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 ntp logging-status",
"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 ntp logging-status",
"msg": "Success",
"code": "200",
"body": {
"loggingstatus": "NTP logging enabled."
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ntp logging-status command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show ntp peer-status
show ntp peer-status
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 ntp peer-status",
"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 ntp peer-status",
"msg": "Success",
"code": "200",
"body": {
"totalpeers": "Total peers : 5",
"TABLE_peersstatus": {
"ROW_peersstatus": [
{
"syncmode": "=",
"remote": "1.1.1.1",
"local": "1.1.1.1",
"st": "16",
"poll": "32",
"reach": "0",
"delay": "0.00000",
"vrf": "default"
},
{
"syncmode": "+",
"remote": "192:168:1::1",
"local": "1::1",
"st": "16",
"poll": "32",
"reach": "0",
"delay": "0.00000",
"vrf": "default"
},
{
"syncmode": "*",
"remote": "127.127.1.0",
"local": "1.1.1.1",
"st": "2",
"poll": "32",
"reach": "377",
"delay": "0.00000"
},
{
"syncmode": "=",
"remote": "192:168:1::2",
"local": "1::1",
"st": "16",
"poll": "32",
"reach": "0",
"delay": "0.00000",
"vrf": "default"
},
{
"syncmode": "=",
"remote": "2.2.2.2",
"local": "1.1.1.1",
"st": "16",
"poll": "32",
"reach": "0",
"delay": "0.00000",
"vrf": "management"
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ntp peer-status command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show ntp peers
show ntp peers
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 ntp peers",
"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 ntp peers",
"msg": "Success",
"code": "200",
"body": {
"TABLE_peers": {
"ROW_peers": [
{
"PeerIPAddress": "1.1.1.1",
"serv_peer": "Server",
"conf_flag": "(configured)"
},
{
"PeerIPAddress": "192:168:1::1",
"serv_peer": "Peer",
"conf_flag": "(configured)"
},
{
"PeerIPAddress": "127.127.1.0",
"serv_peer": "Server",
"conf_flag": "(configured)"
},
{
"PeerIPAddress": "192:168:1::2",
"serv_peer": "Server",
"conf_flag": "(configured)"
},
{
"PeerIPAddress": "2.2.2.2",
"serv_peer": "Server",
"conf_flag": "(configured)"
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ntp peers command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show ntp rts-update
show ntp rts-update
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 ntp rts-update",
"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 ntp rts-update",
"msg": "Success",
"code": "200",
"body": {
"rtsupdate": "RTS update is enabled"
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ntp rts-update command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show ntp session status
show ntp session status
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 ntp session status",
"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 ntp session status",
"msg": "Success",
"code": "200",
"body": {
"session_status": "Last Action Time Stamp : None\nLast Action : None\nLast Action Result : None\nLast Action Failure Reason : none\n"
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ntp session status command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show ntp source
show ntp source
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 ntp source",
"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 ntp source",
"msg": "Success",
"code": "200",
"body": {
"TABLE_sourceip": {
"ROW_sourceip": [
{
"sourceip": "IPv4 address configured: 1.1.1.1"
},
{
"sourceip": "IPv6 address configured: 1::1"
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ntp source command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show ntp source-interface
show ntp source-interface
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 ntp source-interface",
"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 ntp source-interface",
"msg": "Success",
"code": "200",
"body": {
"sourceinterface": "No Source interface configured"
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ntp source-interface command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show ntp statistics io
show ntp statistics io
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 ntp statistics io",
"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 ntp statistics io",
"msg": "Success",
"code": "200",
"body": {
"iotimesincereset": "time since reset: 15319",
"ioreceivebuffers": "receive buffers: 10",
"iofreereceivebuffers": "free receive buffers: 9",
"iousedreceivebuffers": "used receive buffers: 0",
"iolowwaterrefills": "low water refills: 1",
"iodroppedpackets": "dropped packets: 0",
"ioignoredpackets": "ignored packets: 0",
"ioreceivedpackets": "received packets: 7543",
"iopacketssent": "packets sent: 7579",
"iopacketsnotsent": "packets not sent: 26",
"iointerruptshandled": "interrupts handled: 7543",
"ioreceivedbyint": "received by int: 7543"
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ntp statistics io command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show ntp status
show ntp status
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 ntp status",
"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 ntp status",
"msg": "Success",
"code": "200",
"body": {
"distribution": "Distribution : Disabled",
"operational_state": "Last operational state: No session"
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ntp status command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show ntp trusted-keys
show ntp trusted-keys
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 ntp trusted-keys",
"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 ntp trusted-keys",
"msg": "Success",
"code": "200",
"body": {
"TABLE_trustkeys": {
"ROW_trustkeys": {
"key": "50"
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ntp trusted-keys command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|