I’ve been asked to modify the standard summary output of the node type Subnet by adding FQDN’s and the count of IPv4-addresses in the subnet.
So far I haven’t found much documentation on how to do this properly, but the procedure that seems to work is making a separate XML-file with only the node I want to replace, uploading this file in /usr/tideway/data/custom/taxonomy/ and then running the tw_tax_import —merge command.
For the request above I’m running into a new problem though: how can I replica the count(ip4addrs) column that’s available under the “Customize” button in a regular node list? Can I use a function like NODECOUNT in the taxonomy XML?
I got up to here:
<taxonomy>
<node description="An IP subnet" kind="Subnet">
<attr_list type="summary">
<field name="ip_address_range" type="attr" />
<field name="type" type="attr" />
<field name="#Subnet:DeviceSubnet:DeviceOnSubnet:IPAddress.fqdns" type="attr" />
<field name="NODECOUNT(#Subnet:DeviceSubnet:DeviceOnSubnet:IPAddress.ip_addr)" type="attr" />
</attr_list>
</node>
<taxonomy>
Does this have any chance of working, or is there a better way to do this?