3 Replies Latest reply on Jun 3, 2020 9:31 AM by Brice-Emmanuel Loiseaux

    How to send multiple values to a single cmdb attribute?

    Lucas David Ferreira da Costa
      Share This:

      Hello, we are trying to send all the values from the Discovery 'Endpoint' column to a single attribute of the ComputerSystem class of the CMDB.

      The query is as follows:

      search Host show name, #DeviceWithAddress:DeviceAddress:IPv4Address:IPAddress.ip_addr as 'IP Address' processwith show name as 'Name', #DeviceWithAddress:DeviceAddress:IPv4Address:IPAddress.ip_addr as 'IP Address', #InferredElement:Inference:Associate:DiscoveryAccess.endpoint as 'Endpoint', #DeviceWithInterface:DeviceInterface:InterfaceOfDevice:NetworkInterface.#InterfaceWithAddress:InterfaceAddress:IPv4Address:IPAddress.ip_addr as 'IP Address'

      The syncmapping we use is as follows:


      tpl 1.5 module CMDB.Extension.ComputerSystem_Augment;

      from CMDB.Host_ComputerSystem import Host_ComputerSystem 2.0;

      syncmapping ComputerSystem_Augment 1.0


         tags CMDB, Extension;

         end overview;


         mapping from Host_ComputerSystem.host as host

      traverse InferredElement:Inference:Associate:DiscoveryAccess as IP

      end traverse;

         end mapping;



      computersystem := Host_ComputerSystem.computersystem;

      for each IP do

      computersystem.Expansion := IP.endpoint;

      end for;

         end body;


      end syncmapping;


      But when we synchronize that host to the CMDB, in the attribute where there should be multiple IP addresses, only one appears.


      How can we make that highlighted field show all the IPs (separated by commas or whatever) that correspond to the host?

      Thank you very much in advance. Best regards.