How to augment ADDM CMDB Sync mapping for class BMC_ComputerSystem?

Version 2
    Share This:

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    PRODUCT:

    BMC Discovery


    APPLIES TO:

    BMC Atrium Discovery and Dependency Mapping



    QUESTION:

    How to augment ADDM CMDB Sync mapping for class BMC_ComputerSystem?

    LP: BMC Atrium Discovery and Dependency Mapping



     


    ANSWER:

     

    Legacy ID:KA417065

      

    Problem:

      

    We need to add informaton to the HostContainer, for example reference host name from the contained hosts. How do we write a custom TPL to do this?

      

    Solution:

      

    See the sample TPL below:

    tpl 1.5 module CMDB.HostContainer_ComputerSystem_augment;

    from CMDB.HostContainer_ComputerSystem import HostContainer_ComputerSystem 1.0;

    syncmapping HostContainer_augment 1.0
    '''
    Add one or more new attributes to the BMC_ComputerSystem CI, based
    on attributes in the ADDM HostContainer node.
    '''
    overview
    tags CMDB, Extension;
    end overview;

    mapping from HostContainer_ComputerSystem.host_container as host_container
    traverse HostContainer:HostContainment:ContainedHost:Host as addm_host
    end traverse;
    end mapping;

    body
    container_cs := HostContainer_ComputerSystem.container_cs;

    names_of_hosts := '';
    for each addm_host do
    names_of_hosts := '%names_of_hosts%%addm_host.name% ';
    end for;

    log.info('>>> Contained Host Names: %names_of_hosts%');

    // container_cs.SomeNewData := names_of_hosts;
    end body;
    end syncmapping;

      
    Related Products:  
       
    1. BMC Atrium Discovery and Dependency Mapping

     


    Article Number:

    000024625


    Article Type:

    FAQ/Procedural



      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles