Reformat MAC address for custom link #15128
-
|
I'm looking for a way to preprocess data for a custom link, specifically the MAC address. The plan is to check if an object has a primary IPv4 set and then check if the corresponding interface has a MAC address. If it does, take that MAC address, let's say AA:BB:CC:DD:EE:FF and turn it into
which I can then insert into the custom link to an external FDB table
The logic and syntax for selecting the MAC in the first place I can probably figure out on my own, but transforming it so that it results in a working link isn't immediately obvious. Doesn't seem like it's possible directly in the Jinja2 template field? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
You want the jinja2 template designer documentation, especially built-in filters. Your example looks a bit weird, but I think you could do |
Beta Was this translation helpful? Give feedback.
You want the jinja2 template designer documentation, especially built-in filters.
Your example looks a bit weird, but I think you could do