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:

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 ntp access-groups
Match All: Enabled
--------------------------------------
Access List                     Type
--------------------------------------
peeracl2                        Peer
peeracl1                        Peer
serve2                          Serve
serve1                          Serve
sonly2                          Serve-only
sonly1                          Serve-only
qonly2                          Query-only
qonly1                          Query-only












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:

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 ntp authentication-keys
-----------------------------
 Auth key         MD5  String
                  (Encrypted)
-----------------------------
     50             wawyanbslsxi5










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:

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 ntp authentication-status
Authentication enabled.










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:

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 ntp logging-status
NTP logging enabled.










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:

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 ntp peer-status
Total peers : 5
 - selected for sync, + -  peer mode(active),
- - peer mode(passive), = - polled in client mode
    remote                                 local                                   st   poll   reach delay   vrf
-----------------------------------------------------------------------------------------------------------------------
=1.1.1.1                                 1.1.1.1                                 16   32       0   0.00000default
+192:168:1::1                            1::1                                    16   32       0   0.00000default
127.127.1.0                             1.1.1.1                                  2   32     377   0.00000
=192:168:1::2                            1::1                                    16   32       0   0.00000default
=2.2.2.2                                 1.1.1.1                                 16   32       0   0.00000management















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:

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 ntp peers
--------------------------------------------------
  Peer IP Address               Serv/Peer
--------------------------------------------------
  1.1.1.1                       Server (configured)
  192:168:1::1                  Peer (configured)
  127.127.1.0                   Server (configured)
  192:168:1::2                  Server (configured)
  2.2.2.2                       Server (configured)












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:

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 ntp rts-update
RTS update is enabled









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:

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 ntp session status
Last Action Time Stamp     : None
Last Action                : None
Last Action Result         : None
Last Action Failure Reason : none









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:

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 ntp source
NTP Source IP configured

IPv4 address configured: 1.1.1.1
IPv6 address configured: 1::1












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:

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 ntp source-interface
No Source interface configured










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:

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 ntp statistics io
time since reset:     15292
receive buffers:      10
free receive buffers: 9
used receive buffers: 0
low water refills:    1
dropped packets:      0
ignored packets:      0
received packets:     7539
packets sent:         7573
packets not sent:     24
interrupts handled:   7539
received by int:      7539











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:

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 ntp status
Distribution : Disabled
Last operational state: No session










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:

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 ntp trusted-keys
Trusted Keys:
50