Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

[admin/models] Implement nested subnets #21

Closed
nemesifier opened this issue Jun 13, 2018 · 10 comments
Closed

[admin/models] Implement nested subnets #21

nemesifier opened this issue Jun 13, 2018 · 10 comments

Comments

@nemesifier
Copy link
Member

@hispanico what is the purpose of the master subnet field?

Right now I think the current implementation doesn't really do much with it, infact I can select pretty much any rubbish value and the system will accept it. Implementing this correctly will take effort because we'll also probably need to have any subnet which is flagged as master (by another subnet) to show part of its address space occupied.

I suggest removing it temporarily and discuss of how it should be properly implemented.

@nemesifier nemesifier added the help wanted Extra attention is needed label Jun 13, 2018
@nemesifier nemesifier added this to To do in [GSOC-18] openwisp-ipam via automation Jun 13, 2018
@nemesifier
Copy link
Member Author

I'd say just remove master_subnet and all its related logic because we don't have time to implement this right now, we need to hurry up to implement #19, #17 and #10 and move on to integrate this module with the rest of OpenWISP 2.

@hispanico
Copy link
Member

I'm totally agree, the master subnet with nested subnets cloud be implemented in the future.

@nemesifier
Copy link
Member Author

@hispanico shall we start defining how to implement this feature?

  • what happens if a user tries to create a new subnet which is part of an existing subnet? Does the system propose to make the new subnet a child of the parent subnet?
  • how does the visualization of address allocation take master subnets into account?
  • how does the visualization of address allocation take children subnets into account?

@anurag-ks
Copy link
Contributor

The python's ipaddress module provides some helpful functions, like subnet_of, supernet, etc. which we can use while implementing nested subnet feature.
Source - https://docs.python.org/3/library/ipaddress.html#ip-network-definitions

@hispanico
Copy link
Member

what happens if a user tries to create a new subnet which is part of an existing subnet? Does the system propose to make the new subnet a child of the parent subnet?

The system should be show a message to explain the issue:

  • Subnet overlaps
    image
  • Nested subnet not in root subnet
    image

how does the visualization of address allocation take master subnets into account?

When a subnet has at least one nested subnet, the visualization should be only the nested subnets, because we cannot add IP address into the master subnet .
image

If a nested subnet has been created in a master subnet with IP address already the visualization should be somting like this:
image

how does the visualization of address allocation take children subnets into account?

Linke the current one for the IP address with a Hierarchy field
image

Maybe we can create a drop-down menu with the availeble nested subnets up to the prefix /24:
image

@nemesifier nemesifier changed the title [admin/models] Master subnet improvements [admin/models] Implement nested subnets Jul 29, 2018
@anurag-ks
Copy link
Contributor

@nemesisdesign @hispanico the subnet and master subnet validation checks are done on my local branch, but I am not sure about the visualizations, how do they work in case of master subnet and subnets, could explain a bit more?

@hispanico
Copy link
Member

The master subnet view, in case of nested subnets, shows the child subnets instead of the ip address.
See the following image:
image

@nemesifier nemesifier added this to To do in OpenWISP Priorities for next releases via automation Dec 9, 2018
@nemesifier nemesifier added this to To do (general) in OpenWISP Contributor's Board via automation Dec 9, 2018
@atb00ker atb00ker moved this from To do to In progress in OpenWISP Priorities for next releases Dec 30, 2018
@atb00ker atb00ker moved this from To do (general) to To do (python & django) in OpenWISP Contributor's Board Jan 1, 2019
@atb00ker
Copy link
Member

atb00ker commented Jan 3, 2019

Update:
Implemented the hierarchical network view for subnets.
Implementing the same for IPv6, please review and suggest accordingly. 😄
yay

@atb00ker atb00ker moved this from In progress to Needs review in OpenWISP Priorities for next releases Jan 3, 2019
@nemesifier
Copy link
Member Author

@atb00ker that looks great! Is a PR already open for that?

@nemesifier
Copy link
Member Author

AFAIK this can be closed.

OpenWISP Contributor's Board automation moved this from To do (Python & Django) to Done Feb 23, 2020
OpenWISP Priorities for next releases automation moved this from Needs review to Done Feb 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Development

No branches or pull requests

4 participants