Sha256: 41cf44d3cf9962cf5105e8b92ef69835180865ab16f4eb947a0747dc4fa3f544

Contents?: true

Size: 977 Bytes

Versions: 202

Compression:

Stored size: 977 Bytes

Contents

module Actions
  module Pulp
    module RepositoryGroup
      class Create < Pulp::Abstract
        include Helpers::Presenter

        input_format do
          param :id
          param :pulp_ids
        end

        def run
          pulp_resources.
            repository_group.create(input[:id],
                                    :id => input[:id],
                                    :repo_ids => input[:pulp_ids],
                                    :display_name => "temporary group for export",
                                    :distributors => [group_export_distributor])
        rescue RestClient::Conflict
          # if we get a 409 back, a previous run likely died mid-task but it
          # won't hurt this run.
          Rails.logger.info(_("Group %{id} already created.") % {:id => input[:id]})
        end

        def group_export_distributor
          Runcible::Models::GroupExportDistributor.new(false, false)
        end
      end
    end
  end
end

Version data entries

202 entries across 202 versions & 1 rubygems

Version Path
katello-3.15.1.1 app/lib/actions/pulp/repository_group/create.rb
katello-3.16.0.rc1.1 app/lib/actions/pulp/repository_group/create.rb
katello-3.15.1 app/lib/actions/pulp/repository_group/create.rb
katello-3.16.0.rc1 app/lib/actions/pulp/repository_group/create.rb
katello-3.15.0.1 app/lib/actions/pulp/repository_group/create.rb
katello-3.15.0 app/lib/actions/pulp/repository_group/create.rb
katello-3.15.0.rc2 app/lib/actions/pulp/repository_group/create.rb
katello-3.15.0.rc1.3 app/lib/actions/pulp/repository_group/create.rb
katello-3.15.0.rc1.2 app/lib/actions/pulp/repository_group/create.rb
katello-3.15.0.rc1.1 app/lib/actions/pulp/repository_group/create.rb
katello-3.15.0.rc1 app/lib/actions/pulp/repository_group/create.rb
katello-3.14.1 app/lib/actions/pulp/repository_group/create.rb
katello-3.13.4 app/lib/actions/pulp/repository_group/create.rb
katello-3.14.0 app/lib/actions/pulp/repository_group/create.rb
katello-3.13.3 app/lib/actions/pulp/repository_group/create.rb
katello-3.14.0.rc2 app/lib/actions/pulp/repository_group/create.rb
katello-3.13.2 app/lib/actions/pulp/repository_group/create.rb
katello-3.14.0.rc1 app/lib/actions/pulp/repository_group/create.rb
katello-3.13.1 app/lib/actions/pulp/repository_group/create.rb
katello-3.13.0 app/lib/actions/pulp/repository_group/create.rb