3 Replies Latest reply on Jan 29, 2020 9:25 AM by Amar Achmedan

    Location name as attribute in ComputerSystem

    Amar Achmedan
      Share This:

      Hi,

       

      I'm trying to retreive the location of host from BMC Discovery and push it into an attribute of the ComputerSystem class of the CMDB.

      But I get an error when I try to retreive the name of the location related to the host.

      error from the log file "tw_svc_cmdbsync_transformer"  :

       

      W13-139820627515200: 2020-01-29 13:11:51,232: cmdb_sync.handler: DEBUG: CMDB-DEV: Transform subgraph with syncmapping CMDB.Host_ComputerSystem.Host_ComputerSystem

      W13-139820627515200: 2020-01-29 13:11:51,232: syncmapping.CMDB.Host_ComputerSystem.Host_ComputerSystem: INFO: Map host usstexvi02

      W13-139820627515200: 2020-01-29 13:11:51,232: cmdb_sync.handler: ERROR: CMDB-DEV: Mapping error in sync of Host node be42935c484469aa66349cba6e486f7374: CMDB.Host_ComputerSystem.Host_ComputerSystem:237: 'loc' not set

      W13-139820627515200: 2020-01-29 13:11:51,233: cmdb_sync.target: ERROR: CMDB-DEV: CMDB.Host_ComputerSystem.Host_ComputerSystem:237: 'loc' not set

       

       

       

      Here is the part of the TPL file used for the sync :

       

      syncmapping Host_ComputerSystem 2.3

          """

          Host mapped to BMC_ComputerSystem.

          """

          overview

              tags CMDB, Core_Mapping;

              datamodel 0, 1, 2, 3, 4, 5, 6;

          end overview;

       

          mapping on Host as host

              computersystem -> BMC_ComputerSystem;

                  // ACH : Get location

                  traverse ElementInLocation:Location:Location:Location as loc

                  end traverse;

          end mapping;

             

          body

              log.info("Map host %host.name%");

              log.info("location %loc.name%");

       

      The first log.info is passing but not the second. Is something missing in my script?

      I'm on BMC Discovery  11.3.0.4

       

      Thank you