Transform NetBox APIs into Business Ready Documents
Project description
netbox_giftwrap
Transform NetBox APIs into Business Ready formats
Installing netbox_giftwrap
To install netbox_giftwrap there are a few simple steps:
Ubuntu Linux
The following instructions are based on Windows WSL2 and Ubuntu however any flavour of Linux will work with possibly slightly different commands.
Confirm Python 3 is installed
$ python3 -V
Python 3.9.10
Create and activate a virtual environment
$ sudo apt install python3-venv
$ python3 -m venv netbox_giftwrap
$ source netbox_giftwrap/bin/activate
(netbox_giftwrap)$
Install the netbox_giftwrap
(netbox_giftwrap)$pip install netbox_giftwrap
Create an output folder
(netbox_giftwrap)$mkdir output
Windows
Download Python
Create and activate a virtual environment
C:\>python3 -m venv netbox_giftwrap
C:\>netbox_giftwrap\Scripts\activate
(netbox_giftwrap) C:\>
Install netbox_giftwrap
(message_room)$pip install netbox_giftwrap
Create an output folder
(netbox_giftwrap)$mkdir output
Using the bot
Run the bot as an interactive session
(netbox_giftwrap)$ cd output
(netbox_giftwrap)$~/output/netbox_giftwrap.py
The form questions:
Question 1 - NetBox URL:
Enter the URL of your NetBox instance (e.g. https://demo.netbox.dev):
This can be set as an environment variable
Question 2 - NetBox API Token:
Enter your NetBox API Token - you can create / retrieve one from https://URL/user/api-tokens/
This can be set as an environment variable
Question 3 - NetBox API:
The NetBox API you want to transform.
You can use "?" to list all available APIs.
You can use "all" to transform all available APIs.
The list of currently available APIs:
aggregates asns cables circuit-terminations circuit-types circuits cluster-groups cluster-types clusters console-port-templates console-ports contact-assignments contact-groups contact-roles contacts device-bay-templates device-bays device-roles device-types devices front-port-templates front-ports groups interface-templates interfaces inventory-items ip-addresses ip-ranges locations manufacturers module-bay-templates module-bays module-types modules platforms power-feeds power-outlet-templates power-outlets power-panels power-port-templates power-ports prefixes provider-networks providers rack-reservations rack-roles racks rear-port-templates rear-ports regions rirs roles route-targets service-templates services site-groups sites status tenant-groups tenants tokens users virtual-chassis virtual-interfaces virtual-machines vlan-groups vlans
Question 4 - Filetype Filetype (none, json, yaml, html, csv, markdown, mindmap, mp3, all)[none]:
If you do not select a filetype the NetBox API JSON will print to the screen.
You can select "all" to transform the NetBox API into all available filetypes.
The MindMaps require the VS Code markmap extension to render them inside the IDE.
It is recommended to use Excel Preview VS Code extension to preview the CSV output files.
Mindmap and MP3 generate 1 file-per result.
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
Built Distribution
File details
Details for the file netbox_giftwrap-2.0.0.tar.gz
.
File metadata
- Download URL: netbox_giftwrap-2.0.0.tar.gz
- Upload date:
- Size: 60.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.4 Linux/5.10.102.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fd522f6761eec2b7cd2ab5ee9ad6c93b9ba16fd517a97b3edee46efda1d638f |
|
MD5 | 0b6caac85ac9c01cfd895328da8c80f5 |
|
BLAKE2b-256 | 937bdcce2b1603fda1977479f414540eedd019f3087a8c6daa5988f51adfc549 |
File details
Details for the file netbox_giftwrap-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: netbox_giftwrap-2.0.0-py3-none-any.whl
- Upload date:
- Size: 61.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.4 Linux/5.10.102.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1f467c5ef5e60fee8af3796dc8594c772e1ec5dc669b41c40071fba189e6116 |
|
MD5 | 3c088296e1dfe09accbc297632c6a508 |
|
BLAKE2b-256 | 00d7aabc9a22947b1940bab2edc86dcd12221ba746f8ba6fcc448229697600c9 |