--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to netbox-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/etPan.592d31ab.2469fa9c.158a0%40nine.ch.
For more options, visit https://groups.google.com/d/optout.
So when I determine an IP from a prefix I have to check with Netbox that it's not already taken, don't I?
On 30 May 2017 at 16:00:07, 'Jeremy Stretch' via NetBox (netbox-discuss@googlegroups.com) wrote:
> Can I do this via the API?
The API only returns existing objects, but you can use something like the netaddr library to determine free IP addresses from a prefix.
> Would it also be possible to fetch a certain number of available IPs?
You can use the limit and offset query parameters to control how many objects are returned by any API request.
On Tue, May 30, 2017 at 4:47 AM, Christian Mäder <c...@nine.ch> wrote:
--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to netbox-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/etPan.592d31ab.2469fa9c.158a0%40nine.ch.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "NetBox" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/netbox-discuss/1qj4x3H0iiw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to netbox-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to netbox-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/CADvjYzoTSfUsS2A3aOJgpSs_cwhN2qsPT%2BDWAtqNOxq%3D%2BsUwUQ%40mail.gmail.com.
On 30 May 2017 at 16:07:02, 'Jeremy Stretch' via NetBox (netbox-...@googlegroups.com) wrote:
Are you trying to get a list of available IPs, or check whether a particular IP is available?
On Tue, May 30, 2017 at 10:03 AM, Christian Mäder <c...@nine.ch> wrote:
So when I determine an IP from a prefix I have to check with Netbox that it's not already taken, don't I?
On 30 May 2017 at 16:00:07, 'Jeremy Stretch' via NetBox (netbox-discuss@googlegroups.com) wrote:
> Can I do this via the API?
The API only returns existing objects, but you can use something like the netaddr library to determine free IP addresses from a prefix.
> Would it also be possible to fetch a certain number of available IPs?
You can use the limit and offset query parameters to control how many objects are returned by any API request.
On Tue, May 30, 2017 at 4:47 AM, Christian Mäder <c...@nine.ch> wrote:
--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to netbox-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/etPan.592d31ab.2469fa9c.158a0%40nine.ch.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "NetBox" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/netbox-discuss/1qj4x3H0iiw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to netbox-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to netbox-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/CADvjYzoTSfUsS2A3aOJgpSs_cwhN2qsPT%2BDWAtqNOxq%3D%2BsUwUQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "NetBox" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/netbox-discuss/1qj4x3H0iiw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to netbox-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/CADvjYzp-nGqOgEEiMPSfqOwX_pvvTKOf%2BvfqOcKhqdyZhS%3DX5Q%40mail.gmail.com.
By available I meant 'unused', i.e. an IP that isn't already marked as active, reserved, deprecated or dhcp.The aim is to get one or more currently un-used IPs that can be assigned to a new server.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/CADvjYzoTSfUsS2A3aOJgpSs_cwhN2qsPT%2BDWAtqNOxq%3D%2BsUwUQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "NetBox" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/netbox-discuss/1qj4x3H0iiw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to netbox-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to netbox-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/CADvjYzp-nGqOgEEiMPSfqOwX_pvvTKOf%2BvfqOcKhqdyZhS%3DX5Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to netbox-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/etPan.592d7ded.2c9e24c5.158a0%40nine.ch.
I've built the request within my python script. That essentially does a for loop in range and does requests against Netbox. A colleague on the infrastructure side duplicated this in Power Shell, and the script takes about 7 seconds to get through to the next available IP in a /24. This is also doing a check to see if the response is 0 I believe? It was some trial and error to get the results we were looking to get right.
On Tue, May 30, 2017 at 9:13 AM, Christian Mäder <c...@nine.ch> wrote:
By available I meant 'unused', i.e. an IP that isn't already marked as active, reserved, deprecated or dhcp.The aim is to get one or more currently un-used IPs that can be assigned to a new server.
On 30 May 2017 at 16:07:02, 'Jeremy Stretch' via NetBox (netbox-...@googlegroups.com) wrote:
Are you trying to get a list of available IPs, or check whether a particular IP is available?
On Tue, May 30, 2017 at 10:03 AM, Christian Mäder <c...@nine.ch> wrote:
So when I determine an IP from a prefix I have to check with Netbox that it's not already taken, don't I?
On 30 May 2017 at 16:00:07, 'Jeremy Stretch' via NetBox (netbox-...@googlegroups.com) wrote:
You can use the limit and offset query parameters to control how many objects are returned by any API request.> Can I do this via the API?The API only returns existing objects, but you can use something like the netaddr library to determine free IP addresses from a prefix.
> Would it also be possible to fetch a certain number of available IPs?
On Tue, May 30, 2017 at 4:47 AM, Christian Mäder <c...@nine.ch> wrote:
I'd like Netbox to tell me which IP, given a certain prefix, is the next available IP.Can I do this via the API?Would it also be possible to fetch a certain number of available IPs?~Chris
--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discus...@googlegroups.com.
To post to this group, send email to netbox-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/etPan.592d31ab.2469fa9c.158a0%40nine.ch.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "NetBox" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/netbox-discuss/1qj4x3H0iiw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to netbox-discus...@googlegroups.com.
To post to this group, send email to netbox-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/CADvjYzoTSfUsS2A3aOJgpSs_cwhN2qsPT%2BDWAtqNOxq%3D%2BsUwUQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "NetBox" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/netbox-discuss/1qj4x3H0iiw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to netbox-discus...@googlegroups.com.
To post to this group, send email to netbox-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/CADvjYzp-nGqOgEEiMPSfqOwX_pvvTKOf%2BvfqOcKhqdyZhS%3DX5Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discus...@googlegroups.com.
To post to this group, send email to netbox-...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to netbox-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/279c4874-557a-49ce-8780-0b220c805533%40googlegroups.com.