-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Set a flag in the /dcim/interfaces/ to show that an address has been assigned #1931
Comments
I've been playing around with this some today and I think I may have found an alternative to setting a As far as I can gather, the only instance where an interface carries specific vlans ( If some type of check were created to ensure that interfaces can only be assigned VLANs OR IP addresses (similar to how you cannot have Can anyone think of why this would not be do-able? |
On Linux, it is possible to set an ip directly to an interface, and then also have tagged vlans on that interface as well. |
Thanks for the information, that is interesting. When you say something is impossible, leave it to Linux to prove otherwise. 😄 |
Issue type
[X] Feature request
Environment
Description
This came up in the NetworkToCode Slack channel today and while I have a basic understanding of why it isn't currently implemented, I'm just posing the question here just to see if it was at all possible and if so, what performance hits would occur.
The question came up when I discovered that you could see the relationship between
address
andinterface
at the endpoint/ipam/ip-address/
, but not the other way around (i.e. no way to see if aninterface
even has anaddress
assigned at/dcim/interfaces/
).What I'm trying to accomplish is to be able to look at
/dcim/interfaces
/ and immediately tell if I should use a Layer2 interface template (no assignedaddress
) or a Layer3 interface template (an address IS assigned).If there is an address, I don't even care it is, as I've already coded the logic to loop through the addresses assigned to a device.
Perhaps this is just a simple mind thinking out loud here, but wouldn't it be possible to set a flag on the
/dcim/interfaces/
model when an address is assigned and then clear that flag if the address assignment was removed?While I don't really understand the intricate details of the Django ORM, this example came up:
Thoughts one way or another?
The text was updated successfully, but these errors were encountered: