2 Replies Latest reply on Oct 5, 2017 7:55 AM by Wislley Roque

    Unable to override attribute from Product

    Wislley Roque

      I am trying to extend the class bmc_product but for some reason when I try to sync I got error

       

      Here is my tpl:

       

      from CMDB.SoftwareInstance_Product import SoftwareInstance_Product 1.3;

      syncmapping CMDBExtendProduct 1.0

          """

          Extend product

          """

          overview

              tags CMDB, Extension;

          end overview;

          mapping from SoftwareInstance_Product.softwareinstance as softwareinstance

          end mapping;

          body

              product := SoftwareInstance_Product.product;

          end body;

      end syncmapping;

       

      And this is the error showed in tw_svc_cmdbsync_transformer.log when I sync any host

       

      W2-140316405982976: 2017-10-05 13:21:05,483: cmdb_sync.handler: DEBUG: Handle extension 'CMDB.SoftwareInstance_Product.SoftwareInstance_Product'

      W2-140316405982976: 2017-10-05 13:21:05,483: cmdb_sync.target: ERROR: CMDB homolog:

      Traceback (most recent call last):

        File "./target.py", line 592, in sync

        File "./handler.py", line 87, in transform

        File "./handler.py", line 174, in handle

        File "./handler.py", line 252, in buildSubGraph

        File "./handler.py", line 316, in _buildSubGraph

        File "./handler.py", line 272, in _buildSubGraph

        File "./handler.py", line 441, in _buildSubGraphRels

        File "./handler.py", line 316, in _buildSubGraph

        File "./handler.py", line 293, in _buildSubGraph

      AssertionError

       

      I have checked that when I upload the new tpl this INFO is showed on reasoning log

       

      140353631672064: 2017-10-05 13:33:56,270: reasoning.patternupdate: INFO: Writing pattern modules to datastore

      140353631672064: 2017-10-05 13:33:56,488: reasoning.patternmanager: INFO: Added knowledge upload "CMDB.Extension.SoftwareInstance upload 9"

      140353631672064: 2017-10-05 13:34:03,134: reasoning.patternmanager: INFO: Request to change pattern modules

      140353631672064: 2017-10-05 13:34:03,135: reasoning.patternmanager: INFO: Validate specified pattern modules

      140353631672064: 2017-10-05 13:34:03,135: reasoning.patternupdate: INFO: Finding active pattern modules

      140353631672064: 2017-10-05 13:34:03,148: reasoning.patternmanager: INFO: 1 newly activated, 0 newly deactivated, giving 2039 active pattern modules

      140353631672064: 2017-10-05 13:34:03,148: reasoning.patternmanager: INFO: Get content for all activated pattern modules

      140353631672064: 2017-10-05 13:34:03,148: reasoning.patternupdate: INFO: Checking for duplicate pattern modules

      140353631672064: 2017-10-05 13:34:03,536: reasoning.patternupdate: INFO: Finding pattern modules to process

      140353631672064: 2017-10-05 13:34:04,157: reasoning.patternupdate: INFO: Compiling 1 pattern module

      140353631672064: 2017-10-05 13:34:04,455: reasoning.patternlanguage.generaterules: INFO: Not writing imports in rules for sync mapping module: CMDB.Extension.SoftwareInstance

       

      I need help to override an attribute from this class

       

      Regards

       

      Wislley Roque