Yes, you are correct. The procedures have not been enhanced to support a version neutral IP. Here is some information I found from one of our previous developers who sent internal mail awhile back. Looks like it would technically be an enhancement request for it to support the InternetAddress attribute.
Cheers
Jay
the problem is that they are using the new network address attribute (0x12d7f), which is of type 'InternetAddress'. This type holds a version neutral IP address (so could be v4 or v6). Procedures do not yet support that type, unfortunately. The ToIpAddr() proc just returns the old v4 only IP address (IP Address, or often also 'Agent ID' in Spectrum).
They could use the original, now called 'Legacy Network Address' attribute (0x1027f) instead, that should get them working. The attribute contains (for v4 devices) a copy of the new, general address attribute.
Lastly, one tip, which might be useful...? They could use a variable to store the results of the GetModelsByAttrValue() call, and access it later using the 'V' tag. That way only one such search call (which is expensive) is needed.
Example on how to use variables:
Set variable 'nameVariable' to result of the regexp extraction.
Then check if variable matches empty string, if it does, return varbind 1, otherwise return the variable itself.
....
SetVariable( \
{ V nameVariable }, \
GetRegexp(\
GetEventAttribute( { U 1 } ), \
{ S \"(.*?)/\" }, \
{ U 1 } ), \
If( \
Equals( \
{ V nameVariable }, \
{ S \"\" } ), \
GetEventAttribute( { U 1 } ), \
{ V nameVariable } ) ) ) )"