Sha256: 6fe1e0c229a03b01c88da1a64c86755b364b33ad2af5246e6dc4f8f5d774c997

Contents?: true

Size: 1.18 KB

Versions: 116

Compression:

Stored size: 1.18 KB

Contents

module Actions
  module Katello
    module Repository
      class UploadPackageGroup < Actions::EntryAction
        def plan(repository, params)
          action_subject(repository)
          unit_key = {"repo_id": repository.pulp_id, "id": params[:name].parameterize.underscore}

          sequence do
            upload_request = plan_action(Pulp::Repository::CreateUploadRequest)
            pkg_group_upload = plan_action(Pulp::Repository::ImportUpload,
                                           pulp_id: repository.pulp_id,
                                           unit_type_id: 'package_group',
                                           unit_key: unit_key,
                                           upload_id: upload_request.output[:upload_id],
                                           unit_metadata: params)

            plan_action(IndexPackageGroups, repository)
            plan_action(FinishUpload, repository, :dependency => pkg_group_upload.output, :generate_metadata => true)
          end
        end

        def rescue_strategy
          Dynflow::Action::Rescue::Skip
        end

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

Version data entries

116 entries across 116 versions & 1 rubygems

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