Sha256: cb7e333f5cf9c0e6e2f807c25286c688668c85145c3e8bdf907f32f01dbe4cef

Contents?: true

Size: 1.06 KB

Versions: 158

Compression:

Stored size: 1.06 KB

Contents

module Actions
  module Katello
    module Environment
      class LibraryCreate < Actions::Base
        def plan(library_env)
          library_env.save!
          library_view = ::Katello::ContentView.create!(:default => true,
                                                        :name => "Default Organization View",
                                                        :organization => library_env.organization)

          ::Katello::ContentViewVersion.create! do |v|
            v.content_view = library_view
            v.major = 1
          end

          version = library_view.versions.first

          plan_action(Katello::ContentView::Create, library_view)
          plan_action(Katello::ContentView::AddToEnvironment, version, library_env)
          plan_action(Katello::Foreman::ContentUpdate, library_env, library_view)
        end

        def humanized_name
          _("Create")
        end

        input_format do
          param :name, String
          param :label, String
          param :organization_label, String
        end
      end
    end
  end
end

Version data entries

158 entries across 158 versions & 1 rubygems

Version Path
katello-4.0.3 app/lib/actions/katello/environment/library_create.rb
katello-3.18.5 app/lib/actions/katello/environment/library_create.rb
katello-4.0.2.1 app/lib/actions/katello/environment/library_create.rb
katello-4.0.2 app/lib/actions/katello/environment/library_create.rb
katello-3.18.4 app/lib/actions/katello/environment/library_create.rb
katello-4.0.1.2 app/lib/actions/katello/environment/library_create.rb
katello-3.18.3.1 app/lib/actions/katello/environment/library_create.rb
katello-4.0.1.1 app/lib/actions/katello/environment/library_create.rb
katello-3.18.3 app/lib/actions/katello/environment/library_create.rb
katello-4.0.1 app/lib/actions/katello/environment/library_create.rb
katello-4.0.0 app/lib/actions/katello/environment/library_create.rb
katello-4.0.0.rc3.1 app/lib/actions/katello/environment/library_create.rb
katello-4.0.0.rc3 app/lib/actions/katello/environment/library_create.rb
katello-3.18.2.1 app/lib/actions/katello/environment/library_create.rb
katello-3.18.2 app/lib/actions/katello/environment/library_create.rb
katello-3.17.3 app/lib/actions/katello/environment/library_create.rb
katello-4.0.0.rc2 app/lib/actions/katello/environment/library_create.rb
katello-3.18.1.1 app/lib/actions/katello/environment/library_create.rb
katello-3.17.2 app/lib/actions/katello/environment/library_create.rb
katello-4.0.0.rc1 app/lib/actions/katello/environment/library_create.rb