Sha256: 12c960f1b5931284c639e0790a244ca1d7a6333f57146886d45db51619ddd259

Contents?: true

Size: 1.05 KB

Versions: 53

Compression:

Stored size: 1.05 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
            plan_action(Actions::Katello::Host::Update, host)
          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

53 entries across 53 versions & 1 rubygems

Version Path
katello-3.14.1 app/lib/actions/katello/host/update_release_version.rb
katello-3.13.4 app/lib/actions/katello/host/update_release_version.rb
katello-3.14.0 app/lib/actions/katello/host/update_release_version.rb
katello-3.13.3 app/lib/actions/katello/host/update_release_version.rb
katello-3.14.0.rc2 app/lib/actions/katello/host/update_release_version.rb
katello-3.13.2 app/lib/actions/katello/host/update_release_version.rb
katello-3.14.0.rc1 app/lib/actions/katello/host/update_release_version.rb
katello-3.13.1 app/lib/actions/katello/host/update_release_version.rb
katello-3.13.0 app/lib/actions/katello/host/update_release_version.rb
katello-3.13.0.rc2.1 app/lib/actions/katello/host/update_release_version.rb
katello-3.13.0.rc2 app/lib/actions/katello/host/update_release_version.rb
katello-3.12.3 app/lib/actions/katello/host/update_release_version.rb
katello-3.12.2 app/lib/actions/katello/host/update_release_version.rb
katello-3.13.0.rc1 app/lib/actions/katello/host/update_release_version.rb
katello-3.12.1 app/lib/actions/katello/host/update_release_version.rb
katello-3.11.2 app/lib/actions/katello/host/update_release_version.rb
katello-3.10.2 app/lib/actions/katello/host/update_release_version.rb
katello-3.12.0 app/lib/actions/katello/host/update_release_version.rb
katello-3.12.0.rc2 app/lib/actions/katello/host/update_release_version.rb
katello-3.10.1.1 app/lib/actions/katello/host/update_release_version.rb