ZTP

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')

Configure ZTP

In order to enable or disable ZTP, the API, configZTP(), must be invoked with dictionary input within the object, 'dt'.

node.configZTP(dt = {"ztp_status":"enable | disable"})

Get/Show ZTP server

Retrieves ZTP status

node.execute(['show ztp status'])

Output

This is an example of the output of the above command:

b'{{"ztp-status": "disabled"}}

The below table lists and describes input and output attributes:

Attribute Values Description
"ztp_status" "enable|disable" indicates whether ztp enable or disable on the system