Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance Network "get_next" methods to optionally allocate/reserve at the same time #223

Open
jathanism opened this issue Oct 12, 2016 · 1 comment

Comments

@jathanism
Copy link
Contributor

Yet another IPAM-related Network enhancement. Currently calling the next_network or next_address methods on a Network object will only show you eligible network objects, but will not actually create them.

Let's think about implementing an object flag or alternative endpoint that will allocate or reserve the networks in the same call.

Maybe it could be as simple as implementing support for POST to allocate/reserve, where GET only shows you what is available?

For example:

See the next two (2) available /28 networks:

GET /api/networks/1/next_network/?prefix_length=28&num=2

Automatically allocate the next two (2) available /28 networks:

POST /api/networks/1/next_network/?prefix_length=28
@rmhasan
Copy link
Contributor

rmhasan commented Feb 19, 2017

Hi @jathanism and @nickpegg PR #266 fixes this issue. Can someone review it.

nickpegg pushed a commit that referenced this issue Sep 20, 2017
User can send a post request to next_network and next_address
actions. If it is a post request, then the action will
get the networks or addresses and then save them in as network
objects in the db
nickpegg pushed a commit that referenced this issue Sep 21, 2017
User can send a post request to next_network and next_address
actions. If it is a post request, then the action will
get the networks or addresses and then save them in as network
objects in the db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants