Sha256: 0248e2968a0e3c52c53e246725ca9c87614e3669da24027b2ca90431cdcc910f

Contents?: true

Size: 1.03 KB

Versions: 146

Compression:

Stored size: 1.03 KB

Contents

module Actions
  module Katello
    module Host
      class UpdateReleaseVersion < Actions::EntryAction
        def plan(host, release_version)
          plan_self(:hostname => host.name)
          if host.content_facet && host.subscription_facet
            if release_version.present? && !host.content_facet.available_releases.include?(release_version)
              fail _("Host %{name} cannot be assigned release version %{release_version}.") % { :name => host.name, :release_version => release_version }
            else
              host.subscription_facet.release_version = release_version
            end
            host.update_candlepin_associations
          else
            fail _("Host %s has not been registered with subscription-manager.") % host.name
          end
        end

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

Version data entries

146 entries across 146 versions & 1 rubygems

Version Path
katello-4.3.1 app/lib/actions/katello/host/update_release_version.rb
katello-4.4.0 app/lib/actions/katello/host/update_release_version.rb
katello-4.4.0.rc2 app/lib/actions/katello/host/update_release_version.rb
katello-4.4.0.rc1 app/lib/actions/katello/host/update_release_version.rb
katello-4.2.2 app/lib/actions/katello/host/update_release_version.rb
katello-4.3.0 app/lib/actions/katello/host/update_release_version.rb
katello-4.3.0.rc4 app/lib/actions/katello/host/update_release_version.rb
katello-4.3.0.rc3 app/lib/actions/katello/host/update_release_version.rb
katello-4.3.0.rc2.1 app/lib/actions/katello/host/update_release_version.rb
katello-4.3.0.rc2 app/lib/actions/katello/host/update_release_version.rb
katello-4.3.0.rc1 app/lib/actions/katello/host/update_release_version.rb
katello-4.2.1 app/lib/actions/katello/host/update_release_version.rb
katello-4.2.0.1 app/lib/actions/katello/host/update_release_version.rb
katello-4.1.4 app/lib/actions/katello/host/update_release_version.rb
katello-4.0.3 app/lib/actions/katello/host/update_release_version.rb
katello-4.2.0.1.rc3 app/lib/actions/katello/host/update_release_version.rb
katello-3.18.5 app/lib/actions/katello/host/update_release_version.rb
katello-4.2.0.1.rc2 app/lib/actions/katello/host/update_release_version.rb
katello-4.2.0.rc2 app/lib/actions/katello/host/update_release_version.rb
katello-4.1.3 app/lib/actions/katello/host/update_release_version.rb