Sha256: 10b4b92274c9749356f92f12aa0f679ef9003139698bbe159f03f97372ed290f

Contents?: true

Size: 568 Bytes

Versions: 51

Compression:

Stored size: 568 Bytes

Contents

module ForemanDiscovery
  class ImportHookService
    HOOKS = [
      ForemanDiscovery::ImportHooks::DiscoveryAttribute,
      ForemanDiscovery::ImportHooks::LldpNeighbor,
      ForemanDiscovery::ImportHooks::SubnetAndTaxonomy,
      ForemanDiscovery::ImportHooks::LockTemplates
    ]

    attr_reader :host, :facts

    def initialize(host:, facts:)
      @host = host
      @facts = facts
    end

    def after_populate
      HOOKS.each do |hook_class|
        hook = hook_class.new(host: host, facts: facts)
        hook.after_populate
      end
    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
foreman_discovery-20.0.0 app/services/foreman_discovery/import_hook_service.rb
foreman_discovery-19.0.1 app/services/foreman_discovery/import_hook_service.rb
foreman_discovery-19.0.0 app/services/foreman_discovery/import_hook_service.rb
foreman_discovery-18.0.5 app/services/foreman_discovery/import_hook_service.rb
foreman_discovery-18.0.4 app/services/foreman_discovery/import_hook_service.rb
foreman_discovery-18.0.3 app/services/foreman_discovery/import_hook_service.rb
foreman_discovery-17.0.5 app/services/foreman_discovery/import_hook_service.rb
foreman_discovery-18.0.2 app/services/foreman_discovery/import_hook_service.rb
foreman_discovery-17.0.4 app/services/foreman_discovery/import_hook_service.rb
foreman_discovery-17.0.3 app/services/foreman_discovery/import_hook_service.rb
foreman_discovery-17.0.2 app/services/foreman_discovery/import_hook_service.rb
foreman_discovery-18.0.0 app/services/foreman_discovery/import_hook_service.rb
foreman_discovery-17.0.1 app/services/foreman_discovery/import_hook_service.rb
foreman_discovery-16.3.6 app/services/foreman_discovery/import_hook_service.rb
foreman_discovery-17.0.0 app/services/foreman_discovery/import_hook_service.rb
foreman_discovery-16.3.5 app/services/foreman_discovery/import_hook_service.rb
foreman_discovery-16.1.4 app/services/foreman_discovery/import_hook_service.rb
foreman_discovery-16.1.3 app/services/foreman_discovery/import_hook_service.rb
foreman_discovery-16.3.4 app/services/foreman_discovery/import_hook_service.rb
foreman_discovery-16.3.1 app/services/foreman_discovery/import_hook_service.rb