-
Notifications
You must be signed in to change notification settings - Fork 103
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
How to get the next available network in a network container? #358
Comments
|
Hi @ljluestc , Thanks for the response, but I have tried tested that code, this is failing to get the next available network.
Hi @napstercc , I have updated the code mention, Please check and try above code , this will work. |
You can actually call this function on the container object, there's no need to use cont = objects.NetworkContainer.search(....)
nxt = cont.next_available_network(payload={"cidr":netmask})
net = nxt['networks'][0] |
Question I'm only able to get this to return the very first container found, I am specifying a target container but it appears to only be returning the first container. Example would be targetSub=10.200.0.0/16 but script is returning 10.30.0.0/16 Disregard solved it by doing the below,
|
Both of these don't work:
network = conn.get_object('networkcontainer', {'network_container': '10.88.0.0/13', 'network_view':'default'})
and
network = objects.IPAllocation.next_available_ip_from_cidr('default', '10.88.0.0/13')
not sure how to find the next /24 network in this container.
The text was updated successfully, but these errors were encountered: