This section provides a sample of configuring the system date and time using the rpc method.
Operation |
XPATH |
|---|---|
rpc |
/ietf-system:set-current-datetime/current-datetime |
Data Requirements
Item |
Data |
Description |
|---|---|---|
System data and time |
2000-01-01T00:00:00-12:00 |
Set the system date and time to 2000-01-01 12:00:00. |
Request Example
<?xml version="1.0" encoding="UTF-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="6fa5610f-6adf-11e7-8676-879e0ca0e2bd"> <sys:set-current-datetime xmlns:sys="urn:ietf:params:xml:ns:yang:ietf-system"> <sys:current-datetime>2000-01-01T00:00:00-12:00</sys:current-datetime> </sys:set-current-datetime> </rpc>
Response Example
Sample of successful response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="6fa5610f-6adf-11e7-8676-879e0ca0e2bd"> <ok/> </rpc-reply>
Sample of failed response
<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="40">
<rpc-error>
<error-type>application</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
<error-message>parse rpc config error.</error-message>
</rpc-error>
</rpc-reply>