Sha256: 14fb604321041cb0a09a4478a4d2801aa17daf24465fdacdcd3768996a3fab79

Contents?: true

Size: 892 Bytes

Versions: 18

Compression:

Stored size: 892 Bytes

Contents

module Actions
  module Katello
    module Host
      class UpdateContentView < Actions::EntryAction
        def plan(host, content_view_id, lifecycle_environment_id)
          if host.content_facet
            host.content_facet.assign_single_environment(
              content_view_id: content_view_id,
              lifecycle_environment_id: lifecycle_environment_id
            )
            host.update_candlepin_associations
            plan_self(:hostname => host.name)
          else
            fail _("Host %s has not been registered with subscription-manager.") % host.name
          end
        end

        def humanized_name
          if input.try(:[], :hostname).nil?
            _("Update content view environments for host")
          else
            _("Update content view environments for host %s") % input[:hostname]
          end
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
katello-4.16.0 app/lib/actions/katello/host/update_content_view.rb
katello-4.15.1 app/lib/actions/katello/host/update_content_view.rb
katello-4.16.0.rc2 app/lib/actions/katello/host/update_content_view.rb
katello-4.16.0.rc1 app/lib/actions/katello/host/update_content_view.rb
katello-4.14.3 app/lib/actions/katello/host/update_content_view.rb
katello-4.14.2 app/lib/actions/katello/host/update_content_view.rb
katello-4.15.0 app/lib/actions/katello/host/update_content_view.rb
katello-4.15.0.rc2 app/lib/actions/katello/host/update_content_view.rb
katello-4.15.0.rc1 app/lib/actions/katello/host/update_content_view.rb
katello-4.14.1 app/lib/actions/katello/host/update_content_view.rb
katello-4.14.0 app/lib/actions/katello/host/update_content_view.rb
katello-4.14.0.rc3 app/lib/actions/katello/host/update_content_view.rb
katello-4.14.0.rc2 app/lib/actions/katello/host/update_content_view.rb
katello-4.14.0.rc1.1 app/lib/actions/katello/host/update_content_view.rb
katello-4.14.0.rc1 app/lib/actions/katello/host/update_content_view.rb
katello-4.13.1 app/lib/actions/katello/host/update_content_view.rb
katello-4.13.0 app/lib/actions/katello/host/update_content_view.rb
katello-4.13.0.rc1 app/lib/actions/katello/host/update_content_view.rb