ntc-netbox-plugin-onboarding icon indicating copy to clipboard operation
ntc-netbox-plugin-onboarding copied to clipboard

Give an example of using the API within the docs

Open cdot65 opened this issue 4 years ago • 0 comments

Environment

  • Python version: 3.9
  • NetBox version: 2.9.8
  • ntc-netbox-plugin-onboarding version: 2.1.future

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

cdot65 avatar Feb 09 '21 14:02 cdot65