Sha256: 4ef9facfd76edc543a9decfc7166243dbd42e05f05f82b33eab96efd2fd852e9

Contents?: true

Size: 939 Bytes

Versions: 2

Compression:

Stored size: 939 Bytes

Contents

module Actions
  module Katello
    module System
      class Update < Actions::EntryAction
        middleware.use ::Actions::Middleware::RemoteAction

        def plan(system, sys_params)
          system.disable_auto_reindex!
          action_subject system
          system.update_attributes!(sys_params)
          sequence do
            concurrence do
              plan_action(::Actions::Pulp::Consumer::Update, system) if !system.hypervisor? && ::SETTINGS[:katello][:use_pulp]
              plan_action(::Actions::Candlepin::Consumer::Update, system) if ::SETTINGS[:katello][:use_cp]
            end

            if sys_params[:autoheal] && ::SETTINGS[:katello][:use_cp]
              plan_action(::Actions::Candlepin::Consumer::AutoAttachSubscriptions, system)
            end
            plan_action(ElasticSearch::Reindex, system) if ::SETTINGS[:katello][:use_elasticsearch]
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
katello-2.4.0.rc2 app/lib/actions/katello/system/update.rb
katello-2.4.0.rc1 app/lib/actions/katello/system/update.rb