9 Replies Latest reply on Nov 22, 2019 7:40 AM by Nirmal Sharma

    Synmapping pattern help

    Nirmal Sharma
      Share This:

      I have written below code to push support details to computer system class. However it does not seem to be pushing values to it. Please advice.

       

      13 tpl 1.6 module CMDB.Extension.Host_SupportDetails;

      14

      15 from CMDB.Host_ComputerSystem import Host_ComputerSystem 2.3;

      16

      17 syncmapping Host_SupportDetails 1.0

      18   """

      19   Add Support Details to Computer Object

      20   """

      21

      22   overview

      23    tags CMDB, Extension;

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

      25   end overview;

      26

      27   mapping from Host_ComputerSystem.host as host

      28    traverse ElementWithDetail:SupportDetail:HardwareDetail:SupportDetail as sp_detail

      29    end traverse;

      30   end mapping;

      31

      32   body

      33   computersystem := Host_ComputerSystem.computersystem;

      34

      35    for each sp_detail do

      36 if sp_detail.retirement_date then

      37 computersystem.ETR_EOL := sp_detail.retirement_date;

      38 end if;

      39 if sp_detail.end_support_date then

      40 computersystem.ETR_EOS := sp_detail.end_support_date;

      41 end if;

      42 if sp_detail.end_ext_support_date then

      43 computersystem.ETR_EOES := sp_detail.end_ext_support_date;

      44 end if;

      45 end for;

      46   end body;

      47

      48 end syncmapping;

        • 1. Re: Synmapping pattern help
          Lisa Keeler

          Assuming you are using default data model (6) with impact relationships, then you need to add data model 6.

          Otherwise, your syncmapping will do nothing.  You won’t even get the  log messages (if you had any).

           

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

          2 of 2 people found this helpful
          • 2. Re: Synmapping pattern help
            Nirmal Sharma

            I have modified the pattern to use data model 6 and yes, now I am able to see the errors.

             

            ERROR (120007): Class Manager system error occurred during processing.; java.lang.ClassCastException (120007)

            • 3. Re: Synmapping pattern help
              Nirmal Sharma

              Full Error Trace:

               

              RequestProcessor-4: 2019-11-22 05:38:10,697: com.tideway.integrations.cmdbsync.SyncTransaction: DEBUG: Updating BMC_ComputerSystem key:O0zRnXRi/3Yjs+zYzqJGOw==#B       MC_ComputerSystem { ETR_EOS:[Timestamp=1527206400](com.bmc.arsys.api.Timestamp)  }

              RequestProcessor-4: 2019-11-22 05:38:10,697: com.tideway.integrations.cmdbsync.SyncTransaction: DEBUG: Update 1 instances...

              RequestProcessor-4: 2019-11-22 05:38:10,699: com.bmc.cmdb.api.CMDBAPILogger: FATAL: -CMDBEndBulkEntryTransaction

              ERROR (120007): Class Manager system error occurred during processing.; java.lang.ClassCastException

                      at com.bmc.cmdb.api.CMDBProxyJRpcBase.verifyStatus(Unknown Source)

                      at com.bmc.cmdb.api.CMDBProxyJRpcBase.cmdbCall(Unknown Source)

                      at com.bmc.cmdb.api.CMDBProxyJRpcBase.cmdbCall(Unknown Source)

                      at com.bmc.cmdb.api.CMDBProxy.CMDBEndBulkEntryTransaction(Unknown Source)

                      at com.bmc.cmdb.api.CMDBProxy.CMDBSetMultipleInstances(Unknown Source)

                      at com.bmc.cmdb.api.CMDBUtil.CMDBSetMultipleInstances(Unknown Source)

                      at com.tideway.integrations.cmdbsync.SyncTransaction.commit(SyncTransaction.java:244)

                      at com.tideway.integrations.cmdbsync.SyncProvider.syncInstances(SyncProvider.java:467)

                      at com.tideway.integrations.cmdbsync.SyncProvider.syncNodes(SyncProvider.java:401)

                      at CMDBSyncCORBA.GraphSyncPOA._invoke(GraphSyncPOA.java:160)

                      at org.jacorb.poa.RequestProcessor.invokeOperation(RequestProcessor.java:297)

                      at org.jacorb.poa.RequestProcessor.process(RequestProcessor.java:591)

                      at org.jacorb.poa.RequestProcessor.run(RequestProcessor.java:734)

              • 4. Re: Synmapping pattern help
                Brice-Emmanuel Loiseaux

                This tells you that AR/CMDB complains about the data type you sent it.

                1 of 1 people found this helpful
                • 5. Re: Synmapping pattern help
                  Nirmal Sharma

                  Ok we are sending date data to it. Do we need to check for the datatype of the attributes created at CMDB end?

                  • 6. Re: Synmapping pattern help
                    Brice-Emmanuel Loiseaux

                    Of course, you need to push a data type that will be gracefully handled at CMDB end.

                    • 7. Re: Synmapping pattern help
                      Nirmal Sharma

                      Agreed but I am not sure what we are missing here as we are sending timestamp value in date field only in CMDB. See below.

                       

                      Updating BMC_ComputerSystem key:O0zRnXRi/3Yjs+zYzqJGOw==#B       MC_ComputerSystem { ETR_EOS:[Timestamp=1527206400](com.bmc.arsys.api.Timestamp)  }

                       

                      • 8. Re: Synmapping pattern help
                        Brice-Emmanuel Loiseaux

                        A simple search in the community for "EOL sync" will return very interesting posts the best being CMDB Sync Error .

                        1 of 1 people found this helpful