Sha256: 91bab1c6279cc10b11a0fe33536f913830a6ecc08184f201dac60300e973c908

Contents?: true

Size: 1.05 KB

Versions: 13

Compression:

Stored size: 1.05 KB

Contents

module Actions
  module Katello
    module ContentViewPuppetEnvironment
      class Create < Actions::EntryAction
        def plan(puppet_environment, clone = false)
          puppet_environment.save!
          action_subject(puppet_environment)
          plan_self

          puppet_path = puppet_environment.generate_puppet_path

          sequence do
            plan_action(Pulp::Repository::Create,
                        content_type: ::Katello::Repository::PUPPET_TYPE,
                        pulp_id: puppet_environment.pulp_id,
                        name: puppet_environment.name,
                        with_importer: true,
                        path: puppet_path)

            # when creating a clone, the following actions are handled by the
            # publish/promote process
            unless clone
              plan_action(Katello::Repository::MetadataGenerate, puppet_environment) if puppet_environment.environment
            end
          end
        end

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

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
katello-3.1.0.1 app/lib/actions/katello/content_view_puppet_environment/create.rb
katello-3.1.0 app/lib/actions/katello/content_view_puppet_environment/create.rb
katello-3.1.0.rc2.1 app/lib/actions/katello/content_view_puppet_environment/create.rb
katello-3.0.2 app/lib/actions/katello/content_view_puppet_environment/create.rb
katello-3.1.0.rc1 app/lib/actions/katello/content_view_puppet_environment/create.rb
katello-3.0.1 app/lib/actions/katello/content_view_puppet_environment/create.rb
katello-3.0.0 app/lib/actions/katello/content_view_puppet_environment/create.rb
katello-3.0.0.rc7 app/lib/actions/katello/content_view_puppet_environment/create.rb
katello-3.0.0.rc5 app/lib/actions/katello/content_view_puppet_environment/create.rb
katello-3.0.0.rc4 app/lib/actions/katello/content_view_puppet_environment/create.rb
katello-3.0.0.rc3 app/lib/actions/katello/content_view_puppet_environment/create.rb
katello-3.0.0.rc2 app/lib/actions/katello/content_view_puppet_environment/create.rb
katello-3.0.0.rc1 app/lib/actions/katello/content_view_puppet_environment/create.rb