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

IPAM Overhaul: Prefix Type #1362

Closed
3 of 4 tasks
Tracked by #1032
jvanderaa opened this issue Feb 9, 2022 · 3 comments · Fixed by #3211
Closed
3 of 4 tasks
Tracked by #1032

IPAM Overhaul: Prefix Type #1362

jvanderaa opened this issue Feb 9, 2022 · 3 comments · Fixed by #3211
Assignees
Labels
type: feature Introduction of new or enhanced functionality to the application
Milestone

Comments

@jvanderaa
Copy link
Contributor

jvanderaa commented Feb 9, 2022

Environment

  • Python version: 3.8
  • Nautobot version: 1.2.5

Proposed Functionality

Proposed to add a type field to better handle difference Prefix types, rather than holding them in the status field. Today if one wants to have a status on a prefix of active/standby/maintenance/retired or other and is also a container, then the field cannot be changed to reflect the status of the Prefix. Container and pools are "types" of prefixes, and should be it's own type.

Use Case

Proposed to add a type field to better handle difference Prefix types, rather than holding them in the status field. Today if one wants to have a status on a prefix of active/standby/maintenance/retired or other and is also a container, then the field cannot be changed to reflect the status of the Prefix. Container and pools are "types" of prefixes, and should be it's own type.

Database Changes

  • Addition of prefix_type field
  • Change of handling on code of prefix status to prefix types

Likely some more changes than just this.

External Dependencies

None

Referenced in #1309 for discussion.

TODO

  • Add enum property type of values: "Network" (the default), "Container", and "Pool"
    • "Aggregate" is a top-level "Container"
      • This will collapse the Aggregate model into a Prefix of type "Container"
    • Any existing prefix that is marked both "Container" and "Pool" in the current setup, "Pool" takes precedence
  • Update usage calculation to use the type to influence logic for calculation
    • Split out into get_prefix_utilization and get_ip_address_utilitization
  • Remove is_pool field and container status
@glennmatthews glennmatthews added group: ipam type: feature Introduction of new or enhanced functionality to the application labels Feb 15, 2022
@jvanderaa jvanderaa mentioned this issue Jul 7, 2022
12 tasks
@martin-networker
Copy link

The thing that container as a status prevents from setting real status to the prefix is one problem.

Second issue is that Nautobot can't properly determine the utilization of a prefix if it is a container.
For example, if prefix 10.1.1.0/24 is a container and has two child prefixes 10.1.1.0/25 which is utilized on 100% and 10.1.1.128/25 which is utilized on 2%, the parent prefix 10.1.1.0/24 shows utilization of 100% instead of 51%.
This leads to a problem of finding available prefix space.
As searching of free prefix is quite difficult in Nautobot we have a job to do that. Unfortunately this job does not work in all cases because of this false utilization enumeration.

@bryanculver bryanculver mentioned this issue Oct 17, 2022
6 tasks
@bryanculver bryanculver added this to the v2.0.0 milestone Nov 3, 2022
@bryanculver bryanculver changed the title FR: Prefix Type Addition Prefix Type Nov 28, 2022
@gsnider2195 gsnider2195 self-assigned this Jan 31, 2023
@gsnider2195 gsnider2195 mentioned this issue Feb 1, 2023
7 tasks
@bryanculver bryanculver linked a pull request Feb 6, 2023 that will close this issue
7 tasks
@bryanculver
Copy link
Member

Closed with #3211

@bryanculver
Copy link
Member

Closed via #3211. Aggregate collapse moved to #3302

@bryanculver bryanculver changed the title Prefix Type IPAM Overhaul: Prefix Type Mar 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature Introduction of new or enhanced functionality to the application
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants