2 of 2 people found this helpful
countUnique is not what you need at all.
The reason you get the None values is that the first hop of traversals finds all the NetworkInterfaces for the host, then then next hop finds the connected switch NetworkInterface for each one. Not all the Host interfaces have a link to a switch interface, so for those that don't, you get None. You then have a final hop from switch NetworkInterface to the switch NetworkDevice, but that is also None of course if there is no switch NetworkInterface.
In BMC Discovery 11.2, you can use a new feature of the search language to filter the data the way you want:
with (traverse DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface as ni where #ndni
traverse EdgeClient:NetworkLink:EdgeDevice:NetworkInterface as ndni
traverse InterfaceOfDevice:DeviceInterface:DeviceWithInterface:NetworkDevice as nd)
order by name
show name, single(#ni.__interface_id) as "Host Interface", single(#nd.name) as "ND Name"
What that does is the same traversals as your key expressions, giving them names along the way. The first hop to all the Host's NetworkInterfaces is filtered to only include ones that have a relationship to a switch NetworkInterface.