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

Allow Prefixes to belong to many Locations #4334

Closed
2 of 12 tasks
chadell opened this issue Aug 28, 2023 · 9 comments · Fixed by #5281
Closed
2 of 12 tasks

Allow Prefixes to belong to many Locations #4334

chadell opened this issue Aug 28, 2023 · 9 comments · Fixed by #5281
Assignees
Labels
type: feature Introduction of new or enhanced functionality to the application
Milestone

Comments

@chadell
Copy link
Contributor

chadell commented Aug 28, 2023

As ...

Nelly - Network Engineer

I want ...

to have a prefix shared across many different locations.

So that ...

I could model a prefix shared across many different locations (e.g., building), a common use case for Campus Networks where a segment is spread over building on the same Campus.

I know this is done when...

I can relate a Prefix to many Locations without the current single association limit.

Optional - Feature groups this request pertains to.

  • Automation
  • Circuits
  • DCIM
  • IPAM
  • Misc (including Data Sources)
  • Organization
  • Plugins (and other Extensibility)
  • Security (Secrets, etc)
  • Image Management
  • UI/UX
  • Documentation
  • Other (not directly a platform feature)

Database Changes

  • Change type of relationship

External Dependencies

No response

@chadell chadell added type: feature Introduction of new or enhanced functionality to the application triage This issue is new and has not been reviewed. labels Aug 28, 2023
@itdependsnetworks
Copy link
Contributor

I think I misunderstood when we spoke last week, shouldn't the thing be to have a location that represents the higher level thing here? Like shouldn't there be a campus location and multiple building locations under it?

@chadell
Copy link
Contributor Author

chadell commented Aug 28, 2023

I think I misunderstood when we spoke last week, shouldn't the thing be to have a location that represents the higher level thing here? Like shouldn't there be a campus location and multiple building locations under it?

You understood me correctly. One way to solve the challenge is to create a parent location (Campus), that contains children (buildings), and use a logic that allows a building to use the prefixes from a parent.

But, this issue is to open the door for a more flexible prefix association with locations (a different way to solve it)

@lampwins
Copy link
Member

lampwins commented Aug 28, 2023

Would a compromise here be the ability to assign a prefix higher in the location hierarchy and have that context visible to child locations? I.e. You assign the prefix to the campus, and Build A is able to know that the prefix applies to it.

@chadell
Copy link
Contributor Author

chadell commented Aug 28, 2023

Yes, that would be great. It's what we are implementing to get the desired functionality, actually.
But, having it generally available, would be much better for my use case, even thought this FR could serve other mode diverse use cases.

@bryanculver bryanculver removed the triage This issue is new and has not been reviewed. label Aug 29, 2023
@gt732
Copy link

gt732 commented Dec 13, 2023

@chadell I have a use case currently that needs this. Just curious what you did in the meantime to get this working. Thanks!

@chadell
Copy link
Contributor Author

chadell commented Dec 14, 2023

@gt732 , I decided to wait until #4412 it's implemented, and leverage it.
Meanwhile, depending on the amount of data, you can leverage custom relationships or implement a custom model that creates this many to many relationship by its own (we picked this second one for our use case)

@Kircheneer
Copy link
Contributor

I don't think assigning to a higher location hierarchy level is always appropriate as a solution. Consider a scenario where a prefix is only available in 2/3 rooms in a given building, if I attach the prefix to the building I lose information.

@gsnider2195
Copy link
Contributor

gsnider2195 commented Jan 16, 2024

Overview of the work involved based on similar work in #4412

  • Add field to model / migration
  • Data migration
  • Migration to remove old field
  • Add backward compatible properties to model
  • Location view
  • Prefix view
  • Versioned serializers for Prefix
  • Prefix filter
  • Prefix form
  • Prefix filter form
  • Template updates for Prefix detail and edit views
  • Tests
  • Documentation (release overview and model docs at minimum)

@lampwins lampwins added this to the v2.2 milestone Feb 12, 2024
@glennmatthews glennmatthews self-assigned this Feb 13, 2024
@glennmatthews glennmatthews linked a pull request Feb 13, 2024 that will close this issue
6 tasks
@glennmatthews
Copy link
Contributor

Implemented for 2.2 by #5281.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Introduction of new or enhanced functionality to the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants