Netbox nb-robot
The nb-robot plugin extends the capabilities of NetBox by seamlessly integrating Robot Framework, a widely used open-source test automation framework. Here’s what this plugin brings to the table:
1 - Test Automation Integration:
- With the nb-robot plugin, NetBox users gain the ability to load and execute their Robot Framework test suites directly from within the NetBox web interface. This integration streamlines the process of running tests against network devices, configurations, and other critical infrastructure managed in NetBox.
- Whether you’re validating network changes, checking connectivity, or ensuring proper configurations, the plugin empowers you to automate these tasks effortlessly.
2 - Model-Based Testing:
- Leveraging NetBox’s existing data models (such as devices, interfaces, circuits, and more), the nb-robot plugin creates a vital bridge between network documentation and test automation.
- Users can associate specific test cases or entire test suites with NetBox models. For example, you can link a Robot Framework test suite to a particular switch or router model within NetBox.
- This model-based approach simplifies validation: Want to verify that a new VLAN configuration is correctly applied across all relevant devices? Associate your test suite with the VLAN model, and let the plugin handle the rest.
Compatibility
| Plugin Version | NetBox Version | Tested on |
|---|---|---|
| 1.0.0 | > 4.1.0 | 4.1.0 |
| 2.0.2 | > 4.2.0 | 4.2.2 |
Installation
The plugin is available as a Python package in pypi and can be installed with pip
pip install nb-robot
Enable the plugin in /opt/netbox/netbox/netbox/configuration.py:
PLUGINS = ['nb_robot']
Create a project folder and give netbox user read and write permissions over it
$ sudo mkdir /opt/netbox/netbox/robot_projects
$ sudo chown --recursive netbox /opt/netbox/netbox/robot_projects
Configuration
PLUGINS_CONFIG = {
"nb_robot": {
"projects_path": <custom_path> ## Path for storing Robot Framework project files
},
}
Using Variables
With NBRobot you can inject variables inside your Test Suite in two ways, as a simple variable or in a Data Driven stile with Test Template
Simple Variable
After creating the variable devices inside NBRobot plugin you can callit inside your Test Suite like above:
*** Test Cases ***
Test Case Device Iter
FOR ${device} IN @{devices}
Log ${device.site}
END
DataDriven model
In the DataDriven model NBRobot creates a Test Case based in the Test Template for each model inside your variable
*** Settings ***
Test Template Check Naming Conventions
*** Test Cases ***
Check ${device} Naming Conventions
*** Keywords ***
Check Naming Conventions
[Arguments] ${device}
Log Many ${device} ${device.site}
Roadmap
- Allow users to setup variable values before running a Project
- Allow users to compare two Project Jobs
- Create API endpoint to Run and gather Suite results
- Create Unit Tests
Screenshots
Project Views
Project Jobs
Result View
Result XML
Result Table
Resource View
Resource Source
Variable View
Metadata
Release files for nb-robot 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nb_robot-2.0.1.tar.gz | 25.8 kB | Without provenance | Details for nb_robot-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nb_robot-2.0.1-py3-none-any.whl | Python 3 | none | any | Details for nb_robot-2.0.1-py3-none-any.whl |
Total release size: 60.8 kB
Release files / nb_robot-2.0.1.tar.gz
| Download URL | nb_robot-2.0.1.tar.gz |
|---|---|
| Size | 25.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3bc3d6854ced7d370eb62d6733eb6ed57726221c084fadb32014803c5fa75609
|
|
BLAKE2b-256 checksum How to use checksums |
263f6d0b4ed37d1b48918e400ff2f4271444645e2454a6ab379b2194b58bea21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Release files / nb_robot-2.0.1-py3-none-any.whl
| Download URL | nb_robot-2.0.1-py3-none-any.whl |
|---|---|
| Size | 35.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e9ccfac0bdf4e722bebc360ba7ab2a7625cbc59693918ef1cd0a2977152e88f2
|
|
BLAKE2b-256 checksum How to use checksums |
9255d216c28cd08ee7112b650caf5f174fe3f7d5beb68bc90b8789800ebc6733
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Security for nb-robot 2.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.