ZTP
8 min
AsterNOS-ZTP
This chapter provides examples on how to use Netconf to manage ZTP configurations on AsterNOS devices.
Enable ZTP
Request example to set ztp admin status via rpc set-ztp-admin-status.
<set-ztp-admin-status>
<enabled>true</enabled>
</set-ztp-admin-status>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:90f520b1-0da5-4bb9-85ed-81138ba10bdf">
<ok/>
</rpc-reply>Disable ZTP
Request example to set ztp admin status via rpc set-ztp-admin-status.
<set-ztp-admin-status>
<enabled>false</enabled>
</set-ztp-admin-status>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:dfe0e6f4-471e-4dc9-ab82-e0182efebf65">
<ok/>
</rpc-reply>Restart ZTP
Request example to restart ztp process via rpc restart-ztp.
<restart-ztp/>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:b34dc760-089e-454b-b0e3-36f9bb409b54">
<ok/>
</rpc-reply>Show ZTP Status
Request example to show ztp status via rpc show-ztp.
<show-ztp/>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4be3864b-e602-4bdb-b4ee-469a8bdec322">
<data xmlns="http://asterfusion.com/ns/yang/asternos-ztp">
ZTP Admin Mode : False
ZTP Service : Inactive
ZTP Status : Not Started
ZTP Service is not running
</data>
</rpc-reply>Show ZTP Status Details
Request example to show ztp status details via rpc show-ztp.
<show-ztp>
<verbose>true</verbose>
</show-ztp>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:31b66a2f-a6e3-4ea7-b2d1-e8053986f078">
<data xmlns="http://asterfusion.com/ns/yang/asternos-ztp">
Command: ztp status --verbose
========================================
ZTP
========================================
ZTP Admin Mode : False
ZTP Service : Inactive
ZTP Status : Not Started
ZTP Service is not running
</data>
</rpc-reply>