Modify properties in custom links #13112
Replies: 1 comment
-
after a bit more reading - I found the object.primary_ip4.address.ip will display just the IP without the CIDR |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello all -
I am trying to create a custom link based on the primary IP address for SSH links to open in putty.
I have the link made, however, the address property appends the cidr notation, which doesn't work for Putty.
I tried using jinja substring to remove the / notation, but got a generator error in the URL ssh://%3Cgenerator+object+iter_iprange+at+0x7f6890475700%3E
My 'code' in the custom link is
{% set ipaddr = object.primary_ip4.address %}
ssh://{{ ipaddr[:-3]}}
Any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions