System Clock
Import OPBNOS API
from opbclient import opb_api as opbapi
Initialize client
Use the appropriate JSON file that corresponds to the targetted device name. This JSON file should contain request body parameters corresponding to any potential configuration/post requests.
node = opbapi.connect_to('SN2010')
Get/Show Clock Information
Retrieves system clock information
node.execute(['show clock'])
Output
This is an example of the output of the above command:
b'{"currentTime": "Sat 07 Oct 2023 01:12:59 AM UTC"}'
The below table lists and describes input and output attributes:
Attribute | Values | Description |
---|---|---|
"currentTime" | "Sat 07 Oct 2023 01:12:59 AM UTC" | indicates current server clock (time, date, day and timezone) |
Note: Output of clock API
API will not produce any output unless the below status code in produced, indicating a server error.
Status : 500 -> Response : b'500'