8 Replies Latest reply on Mar 11, 2019 6:42 AM by Michael D

    Can't change value for SystemType with sync mapping extension

    Michael D
      Share This:



      I am trying to change the value of some attributes in BMC_ComputerSystem CI:s with sync mapping extension.


      I can change values for Domain, ResetCapability and TotalPhysicalMemory. But not for SystemType.


      I have tried with:


      cs.SystemType := "Unknown";

      cs.SystemType := "SH-x PC";

      cs.SystemType := "8";

      cs.SystemType := 8;


      but nothing happens. The value is always X86-based PC


      I can change ResetCapability that also is an enumeration attribute. So that is a little bit strange.


      Do you know why this happens?


      My sync mapping extension looks like this:


      // This is a pattern module containing a CMDB syncmapping

      // that overrides the Domain, ResetCapability, SystemType and TotalPhyscialMemory attributes

      // of BMC_ComputerSystem so the real values are not shown.


      // Domain will always be assigned an empty string.

      // ResetCapability will always be assigned Non-recoverable.

      // SystemType will always be assigned Unknown.

      // TotalPhysicalMemory will always be assigned 0.


      // If you want to know more about BMC_ComputerSystem attributes: https://discovery.bmc.com/r/docs_bmc_com/cdm/BMC.CORE/class/BMC_ComputerSystem.html


      // This pattern is in the public domain.


      tpl 1.15 module CMDB.ComputerSystem_Attributes_Override;



         urls := "https://discovery.bmc.com/r/docs_bmc_com/cdm/BMC.CORE/class/BMC_ComputerSystem.html";

      end metadata;


      from CMDB.Host_ComputerSystem import Host_ComputerSystem 2.2;


      syncmapping Attribute_Override 1.0


          Override the default ComputerSystem Domain, ResetCapability, SystemType and TotalPhyscialMemory attributes in Atrium Core CMDB.




              tags CMDB, Extension;

          end overview;


          mapping from Host_ComputerSystem.host as host

              // No additional structure -- we are just modifying the existing ComputerSystem CI.

          end mapping;



              cs := Host_ComputerSystem.computersystem;


              cs.Domain := "";

              cs.ResetCapability := "Non-recoverable";

              cs.SystemType := "Unknown";

              cs.TotalPhysicalMemory := "0";        

          end body;

      end syncmapping;


      With kind regards