CLI for netbox using pynetbox module
Project description
nbcli: NetBox Command-line Client
Extensible command-line interface for Netbox using the pynetbox module.
nbcli is still in development! Syntax of commands are subject to change!
Quickstart
The full nbcli documentation can be found here.
$ pip install nbcli
$ nbcli init
Edit pynetbox 'url' and 'token' entries in user_config.yml:
~/.nbcli/user_config.yml
At the very minimum, you need to specify a url and token in the user_config.yml file
pynetbox:
url: http://localhost:8080
token: 0123456789abcdef0123456789abcdef01234567
If you need to disable SSL verification, add (or uncomment) the following to your user_config.yml file.
requests:
verify: false
Run a search of Netbox objects and show a table view of results.
$ nbcli search dmi01
Device
======
Name Status Tenant Site Rack Role Type IP Address
dmi01-akron-pdu01 Active Dunder-Mifflin, Inc. DM-Akron Comms closet PDU AP7901 -
dmi01-akron-rtr01 Active Dunder-Mifflin, Inc. DM-Akron Comms closet Router ISR 1111-8P -
dmi01-akron-sw01 Active Dunder-Mifflin, Inc. DM-Akron Comms closet Access Switch C9200-48P -
dmi01-albany-pdu01 Active Dunder-Mifflin, Inc. DM-Albany Comms closet PDU AP7901 -
dmi01-albany-rtr01 Active Dunder-Mifflin, Inc. DM-Albany Comms closet Router ISR 1111-8P -
dmi01-albany-sw01 Active Dunder-Mifflin, Inc. DM-Albany Comms closet Access Switch C9200-48P -
dmi01-binghamton-pdu01 Active Dunder-Mifflin, Inc. DM-Binghamton Comms closet PDU AP7901 -
dmi01-binghamton-rtr01 Active Dunder-Mifflin, Inc. DM-Binghamton Comms closet Router ISR 1111-8P -
dmi01-binghamton-sw01 Active Dunder-Mifflin, Inc. DM-Binghamton Comms closet Access Switch C9200-48P -
dmi01-buffalo-pdu01 Active Dunder-Mifflin, Inc. DM-Buffalo Comms closet PDU AP7901 -
dmi01-buffalo-rtr01 Active Dunder-Mifflin, Inc. DM-Buffalo Comms closet Router ISR 1111-8P -
dmi01-buffalo-sw01 Active Dunder-Mifflin, Inc. DM-Buffalo Comms closet Access Switch C9200-48P -
dmi01-camden-pdu01 Active Dunder-Mifflin, Inc. DM-Camden Comms closet PDU AP7901 -
dmi01-camden-rtr01 Active Dunder-Mifflin, Inc. DM-Camden Comms closet Router ISR 1111-8P -
dmi01-camden-sw01 Active Dunder-Mifflin, Inc. DM-Camden Comms closet Access Switch C9200-48P -
*** See all 39 results: '$ nbcli filter device dmi01 --dl' ***
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nbcli-0.10.0.dev2.tar.gz
(35.1 kB
view details)
Built Distribution
File details
Details for the file nbcli-0.10.0.dev2.tar.gz
.
File metadata
- Download URL: nbcli-0.10.0.dev2.tar.gz
- Upload date:
- Size: 35.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 480d27c691cb01fc4f748808d4d4d43bdf321e9a017bf5de3a4e6650488e44bd |
|
MD5 | d6f4abae2716384c272b2fa64430ac3d |
|
BLAKE2b-256 | dd8e8932f1607060d285bce28d51f270b5d37effc226c1b4a70dcbbb4549b7de |
File details
Details for the file nbcli-0.10.0.dev2-py3-none-any.whl
.
File metadata
- Download URL: nbcli-0.10.0.dev2-py3-none-any.whl
- Upload date:
- Size: 41.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d3f7188d3dfb5576ca8d7070e45676e009681af44c98ade716aa610a558a928 |
|
MD5 | 73f5c05c56cc7562aaac6cf75019bf22 |
|
BLAKE2b-256 | e2dc03c47b4e5732b938196bd229d12b6652860c289545228148d04f9f72dd5e |