Sha256: 7eb6d7c9ec10fb0b59f5c4fcb6677f47615928294ebb444dd6f17e07c9211bdb

Contents?: true

Size: 1 KB

Versions: 29

Compression:

Stored size: 1 KB

Contents

module Actions
  module Katello
    module Organization
      class Create < Actions::EntryAction
        def plan(organization)
          organization.setup_label_from_name
          organization.create_library
          organization.create_anonymous_provider
          organization.create_redhat_provider
          cp_create = nil

          organization.save!

          sequence do
            if ::SETTINGS[:katello][:use_cp]
              cp_create = plan_action(Candlepin::Owner::Create,
                                      label:  organization.label,
                                      name: organization.name)
            end
            plan_action(Environment::LibraryCreate, organization.library)
          end
          if cp_create
            action_subject organization, label: cp_create.output[:response][:key]
          else
            action_subject organization
          end
          plan_self
        end

        def humanized_name
          _("Create")
        end
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
katello-3.2.1.1 app/lib/actions/katello/organization/create.rb
katello-3.2.1 app/lib/actions/katello/organization/create.rb
katello-3.2.0 app/lib/actions/katello/organization/create.rb
katello-3.2.0.rc3 app/lib/actions/katello/organization/create.rb
katello-3.2.0.rc2 app/lib/actions/katello/organization/create.rb
katello-3.2.0.rc1.1 app/lib/actions/katello/organization/create.rb
katello-3.2.0.rc1 app/lib/actions/katello/organization/create.rb
katello-3.1.0.1 app/lib/actions/katello/organization/create.rb
katello-3.1.0 app/lib/actions/katello/organization/create.rb
katello-3.1.0.rc2.1 app/lib/actions/katello/organization/create.rb
katello-3.0.2 app/lib/actions/katello/organization/create.rb
katello-2.4.5 app/lib/actions/katello/organization/create.rb
katello-3.1.0.rc1 app/lib/actions/katello/organization/create.rb
katello-3.0.1 app/lib/actions/katello/organization/create.rb
katello-2.4.4 app/lib/actions/katello/organization/create.rb
katello-3.0.0 app/lib/actions/katello/organization/create.rb
katello-2.4.3 app/lib/actions/katello/organization/create.rb
katello-3.0.0.rc7 app/lib/actions/katello/organization/create.rb
katello-3.0.0.rc5 app/lib/actions/katello/organization/create.rb
katello-2.4.2 app/lib/actions/katello/organization/create.rb