You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to script a netbox installation for a demo, but i'm struggling a bit with prefixes identification.
I'm currently scanning a network with nmap and then import that data into netbox with pynetbox.
issue is that i already added some prefixes and removed them later, i found out that the id in /ipam/prefixes/3/ keeps incrementing even when i remove the last prefix and add another one(something i expected).
how do i manage this with pynetbox? how do i select one specific prefix from the complete list?
using nb.ipam.prefixes.all() just returns the prefixes without ID, so i can't get that id and insert it into this line: nb.ipam.prefixes.get(PREFIX_ID).available_ips.create("data")
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all,
I'm trying to script a netbox installation for a demo, but i'm struggling a bit with prefixes identification.
I'm currently scanning a network with nmap and then import that data into netbox with pynetbox.
issue is that i already added some prefixes and removed them later, i found out that the id in /ipam/prefixes/3/ keeps incrementing even when i remove the last prefix and add another one(something i expected).
how do i manage this with pynetbox? how do i select one specific prefix from the complete list?
using
nb.ipam.prefixes.all()
just returns the prefixes without ID, so i can't get that id and insert it into this line:nb.ipam.prefixes.get(PREFIX_ID).available_ips.create("data")
Beta Was this translation helpful? Give feedback.
All reactions