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-3.18.1 app/lib/actions/katello/environment/library_create.rb
katello-3.18.0 app/lib/actions/katello/environment/library_create.rb
katello-3.17.1 app/lib/actions/katello/environment/library_create.rb
katello-3.16.2 app/lib/actions/katello/environment/library_create.rb
katello-3.18.0.rc2.1 app/lib/actions/katello/environment/library_create.rb
katello-3.18.0.rc2 app/lib/actions/katello/environment/library_create.rb
katello-3.17.0 app/lib/actions/katello/environment/library_create.rb
katello-3.18.0.rc1 app/lib/actions/katello/environment/library_create.rb
katello-3.17.0.rc2.2 app/lib/actions/katello/environment/library_create.rb
katello-3.17.0.rc2.1 app/lib/actions/katello/environment/library_create.rb
katello-3.16.1.2 app/lib/actions/katello/environment/library_create.rb
katello-3.16.1.1 app/lib/actions/katello/environment/library_create.rb
katello-3.17.0.rc2 app/lib/actions/katello/environment/library_create.rb
katello-3.16.1 app/lib/actions/katello/environment/library_create.rb
katello-3.17.0.rc1 app/lib/actions/katello/environment/library_create.rb
katello-3.16.0 app/lib/actions/katello/environment/library_create.rb
katello-3.16.0.rc5.1 app/lib/actions/katello/environment/library_create.rb
katello-3.16.0.rc5 app/lib/actions/katello/environment/library_create.rb
katello-3.16.0.rc4.1 app/lib/actions/katello/environment/library_create.rb
katello-3.15.3.1 app/lib/actions/katello/environment/library_create.rb