Units in Custom Field Types #1214
brotherdust
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi folks!
I work for a WISP and we want to start using Nautobot. Custom fields have been very useful in dealing with some of the extra metadata for our use-case and I'd like to extend the concept by applying units to these fields. By explicitly defining units (as opposed to just mentioning "hey this is supposed to be degrees Farenheit here" in a comment field), we gain the advantages of implicit conversion, implicit validation, and explicit definition.
Here's an example from my use-case:
I need to store the geographical coordinates of a microwave radio associated with a point to point link. I also need to store antenna and radio characteristics (I'll justify why later in this discussion). That data looks like this:
As you can see, I have a bunch of different units in my data:
All of these different units have many, many different conversions; as well as implicit bounds on range.
How does this apply to Nautobot, which is for network automation? Good question. Let me give you an example of what I'd do with such a thing:
When I on-board a new radio into Nautobot, I take the time to enter all the data above, including the operational temperature range in F. I check a box indicating that I want this radio to be monitored. When I click save, Nautobot sends a webhook to my SNMP monitoring system to build a new device profile and start collecting data. Part of the data that Nautobot sent was the rated operational temperature range of the radio. However, the SNMP OID for the radio temperature only outputs Celsius; but, because we told Nautobot about the units, it sends that along too. The SNMP monitoring system sees the unit and automatically makes the conversion.
Anyway, lots to think about here. I'm OK with Python and perhaps adding this functionality myself, but I want to make sure I'm not just bikeshedding here. What does the community say?
Beta Was this translation helpful? Give feedback.
All reactions