networktocode / ntc-netbox-plugin-onboarding

A plugin for NetBox to easily onboard new devices.
Other
245 stars 46 forks source link

Give an example of using the API within the docs #130

Open cdot65 opened 3 years ago

cdot65 commented 3 years ago

Environment

Help those that read the documentation by providing a working example of a POST operation, including the appropriate data model.

Also, include somewhere that using the root user on JunOS boxes will result in an error regarding NAPALM being unable to determine the driver

Proposed Functionality

To create an onboarding task through the REST API, construct your request's body in a format such as that shown below.

{
    "site": "saint-arnolds-brewery",
    "ip_address": "192.168.105.124",
    "port": 22,
    "timeout": 30,
    "role": "firewall",
    "username": "automation",
    "password": "juniper123",
    "device_type": "vSRX",
    "platform": "vsrx"
}

Please keep in mind that using the user of root on a Juniper networking device will prevent NAPALM from detecting the appropriate driver, and will fail the operation with a message such as:

OnboardException: fail-general: Onboarding for Platform None not supported, as it has no specified NAPALM driver

--

Use Case