Sha256: da2b56abf7fc97c46a6cc49ae2c280fc9e6894ed62a7daa5231baf11af34c4cc

Contents?: true

Size: 1.09 KB

Versions: 6

Compression:

Stored size: 1.09 KB

Contents

module Actions
  module Katello
    module Organization
      module SimpleContentAccess
        class PrepareContentOverrides < Actions::Base
          def plan(organization_id)
            Rails.logger.info "PrepareContentOverrides plan: #{organization_id.inspect}"
            organization = ::Organization.find(organization_id.to_i)
            org_name = organization.name

            plan_self(organization_id: organization_id, organization_name: org_name)
          end

          def run
            organization = ::Organization.find(input[:organization_id].to_i)
            migrator = ::Katello::Util::ContentOverridesMigrator.new(organization: organization)

            output[:migrator_result] = migrator.execute_non_sca_overrides!
          end

          def rescue_strategy
            Dynflow::Action::Rescue::Skip
          end

          def humanized_name
            N_("Prepare content overrides for Simple Content Access")
          end

          def humanized_input
            _("for organization %s") % input[:organization_name]
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
katello-4.8.4 app/lib/actions/katello/organization/simple_content_access/prepare_content_overrides.rb
katello-4.8.3 app/lib/actions/katello/organization/simple_content_access/prepare_content_overrides.rb
katello-4.7.6 app/lib/actions/katello/organization/simple_content_access/prepare_content_overrides.rb
katello-4.8.2 app/lib/actions/katello/organization/simple_content_access/prepare_content_overrides.rb
katello-4.8.1 app/lib/actions/katello/organization/simple_content_access/prepare_content_overrides.rb
katello-4.7.5 app/lib/actions/katello/organization/simple_content_access/prepare_content_overrides.rb