lib/topological_inventory/orchestrator/targeted_update.rb
def add_target(model, action, model_data)
        logger.debug("*** Received #{model}:#{action}(ID #{model_data['id']}) ***")
        target_model = model.downcase.to_sym
        target = {:target         => target_model,
                  :action         => action.to_sym,
                  :application    => nil,
                  :authentication => nil,
                  :endpoint       => nil,
                  :source         => nil,
                  :source_type    => nil,
                  :tenant         => nil}

        target[target_model] = hash_to_api_object(model_data, target_model)
        # Tenant.external_tenant value
        target[:tenant] = model_data['tenant'] # All tables/events have "tenant"

        @targets << target
      end
# Target (alias event) contains target model and target action.
#
# For every target (except with action :destroy) all related models
#   has to be loaded from Sources API ( + Topological API)
#
# @param model [String]
# @param action [String] - :create, :update, :destroy. Can be changed to :destroy, :skip
# @param model_data [Hash]
Target (alias event) contains target model and target action.
For every target (except with action :destroy) all related models
has to be loaded from Sources API ( + Topological API)
Target ( alias event ) contains target model and target action . For every target ( except with action : destroy ) all related models has to be loaded from Sources API ( + Topological API )
def add_target(model, action, model_data)
        logger.debug("*** Received #{model}:#{action}(ID #{model_data['id']}) ***")
        target_model = model.downcase.to_sym
        target = {:target         => target_model,
                  :action         => action.to_sym,
                  :application    => nil,
                  :authentication => nil,
                  :endpoint       => nil,
                  :source         => nil,
                  :source_type    => nil,
                  :tenant         => nil}
        target[target_model] = hash_to_api_object(model_data, target_model)
        target[:tenant] = model_data['tenant'] 
        @targets << target
      end
def add_target ( model , action , model_data ) logger . debug ( "*** Received #{model}:#{action}(ID #{model_data['id']}) ***" ) target_model = model . downcase . to_sym target = { :target => target_model , :action => action . to_sym , :application => nil , :authentication => nil , :endpoint => nil , :source => nil , :source_type => nil , :tenant => nil } target [ target_model ] = hash_to_api_object ( model_data , target_model ) target [ :tenant ] = model_data [ 'tenant' ] @targets << target end
Target (alias event) contains target model and target action.
Target ( alias event ) contains target model and target action .
# Tenant.external_tenant value # All tables/events have "tenant"
model
action
:create, :update, :destroy. Can be changed to :destroy, :skip
: create : update : destroy . Can be changed to : destroy : skip
model_data
None