Questions tagged [netbox]
40 questions
1
vote
1 answer
Auth info fo go-netbox client
How to work with go-netbox client
Hi, i want to send data to netbox using go-netbox client.
client := netbox.NewNetboxWithAPIKey("netbox.example.org", "")
ipaddress := "192.168.0.100"
ipAddress := &models.IPAddress{
…

Data909
- 11
- 2
1
vote
1 answer
How can I print list values from FOR loop on a single line?
I am trying to get a nested list of dictionaries values printed to a single line using Jinja. I'm able to get them across multiple lines but I'm not sure how to get all values on a single line.
This is my example data Structure, trimmed for…

steele_ntwrk
- 15
- 5
1
vote
1 answer
Create site in Netbox from csv with Ansible
I'm trying to create sites in Netbox based on a CSV file. Since I'm adding an ID to the site name, I don't want the site to be created when there is no ID specified for the site. In this case, CHI and STO will be created but BER not.
I've tried to…

bluegate
- 25
- 5
1
vote
2 answers
In the netbox plugin development tutorial, where is manage.py being run from?
I am following the tutorial on plugin development at https://netbox.readthedocs.io/en/stable/plugins/development/
I have gone as far as creating the models and want to make migrations...
However, the manage.py is not found in the root of my plugin…

tread
- 10,133
- 17
- 95
- 170
1
vote
2 answers
Remove double curly braces or transform a string to raw string literal in Ansible
I imported data in Ansible from a csv file and wanted to convert the String from csv file to a raw in Ansible.
Ansible:
parent_region: "{{ parent_region }}" ansible will interpret this as "parent_region": "1933".
Is there a way to remove the curly…

user13539846
- 425
- 2
- 5
- 13
1
vote
0 answers
state is present but all of the following are missing: device_type, name in adding new power outlet to netbox
ansible , I'm having a problem with adding new power outlet with netbox . I managed to supply fields such as device type, device role and name, However I am getting the same issue over and over again . "state is present but all of the following are…

happycode
- 11
- 4
0
votes
2 answers
Five-level iteration loop in ansible for netbox
First of all thank for reading my post. I am a neewbie in Ansible and have this devices.yml file
devices:
test-device1:
name: Test Device 1
device_type: test-device-type1
device_role: router1
site: UoP
position: 12
rack:…

leijona
- 1
- 2
0
votes
0 answers
How to use Netbox API to get data from a local script?
Similar to This, I've installed NetBox via docker containers.
I wrote some python code(API) which take an IP range(local of course) as input and scan the range via Nmap python module and provide the result nice and neat as output.
What I wanna do is…

John
- 35
- 9
0
votes
1 answer
CSRF_TRUSTED_ORIGINS works only with a string, not with a list as expected
Context
I am running a Netbox instance, which uses Django. Inside of its parameters, I have to set CSRF_TRUSTED_ORIGINS to the origins I trust for Netbox to work properly.
The Netbox instance I use runs inside a Docker container…

The Coding Penguin
- 809
- 6
- 16
0
votes
0 answers
API Netbox or pynetbox: how to pass accented characters without triggering Pynetbox.RequestError?
I try to send data from a French database to Netbox but spaces and accented characters trigger an error as in the example:
Post_dept = nb.dcim.sites.create([
{
"name":"Saône et Loire",
"slug":"saône et loire",,
}
) …

Airhmine
- 1
0
votes
0 answers
Documentation build issues during upgrade netbox
I am upgrading my netbox from 2.11.12 to 3.3.10.
PYTHON=/usr/local/bin/python3.9 ./upgrade.sh
At this time, a 'utilities' module error occurs in 'mkdocstrings', and I would appreciate it if you could tell me how to solve it.
Successfully installed…

park
- 1
0
votes
0 answers
Trouble implementing Scripts into Netbox
I recently implemented Netbox and when trying to create my first script, this is the error that I received:
Here is the github as well: https://github.com/nwiecz/Netbox-ipscanner
**
name 'BooleanVar' is not defined
**
Python…
0
votes
1 answer
API call to netbox using python requests doesn't doesn't get all the VM
I need to get all the VM name that I have in the virtualization part in Netbox.
I want to use an API call using requests module in python. I can't use pynetbox module as it doesn't fit my needs at the moment.
I have approximately 5500 VM registered…

alphax
- 13
- 2
0
votes
1 answer
Getting an error while trying to create a SuperUser for Netbox thru Ubuntu, Whats my solve?
I'm trying to get an instance of Netbox setup. I'm at the step where I need to create a super user.
As per documentation, I'm running source /opt/netbox/venv/bin/activate
and confirm i'm in the venv
Followed by python3 manage.py createsuperuser
What…
0
votes
1 answer
Ansible loop on URI/URL
I'm creating a playbook where I query some NetBox child prefixes and then use the ID of each child prefix to look up the available IP's in each one (This doesn't exist in the netbox.netbox module).
To do this, I used nb_lookup to return the IDs of…

Renan Delfino
- 13
- 3