Sha256: 5dd3ed1619314983fab847656b43a0187b469eddc973b49185f6aa9f8ea50769

Contents?: true

Size: 1.51 KB

Versions: 19

Compression:

Stored size: 1.51 KB

Contents

module Actions
  module Pulp3
    module Orchestration
      module ContentViewVersion
        class Import < Actions::EntryAction
          def plan(content_view_version, path:, metadata:)
            action_subject(content_view_version)
            sequence do
              smart_proxy = SmartProxy.pulp_primary!
              importer_output = plan_action(
                ::Actions::Pulp3::ContentViewVersion::CreateImporter,
                content_view_version_id: content_view_version.id,
                smart_proxy_id: smart_proxy.id,
                path: path,
                metadata: metadata
              ).output

              import_output = plan_action(
                ::Actions::Pulp3::ContentViewVersion::Import,
                content_view_version_id: content_view_version.id,
                smart_proxy_id: smart_proxy.id,
                importer_data: importer_output[:importer_data],
                path: path,
                metadata: metadata
              ).output

              plan_action(Actions::Pulp3::Repository::SaveVersions, content_view_version.importable_repositories.pluck(:id),
                          tasks: import_output[:pulp_tasks])

              plan_action(::Actions::Pulp3::ContentViewVersion::DestroyImporter,
                            smart_proxy_id: smart_proxy.id,
                            importer_data: importer_output[:importer_data])
            end
          end

          def humanized_name
            _("Import")
          end
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
katello-4.0.3 app/lib/actions/pulp3/orchestration/content_view_version/import.rb
katello-3.18.5 app/lib/actions/pulp3/orchestration/content_view_version/import.rb
katello-4.0.2.1 app/lib/actions/pulp3/orchestration/content_view_version/import.rb
katello-4.0.2 app/lib/actions/pulp3/orchestration/content_view_version/import.rb
katello-3.18.4 app/lib/actions/pulp3/orchestration/content_view_version/import.rb
katello-4.0.1.2 app/lib/actions/pulp3/orchestration/content_view_version/import.rb
katello-3.18.3.1 app/lib/actions/pulp3/orchestration/content_view_version/import.rb
katello-4.0.1.1 app/lib/actions/pulp3/orchestration/content_view_version/import.rb
katello-3.18.3 app/lib/actions/pulp3/orchestration/content_view_version/import.rb
katello-4.0.1 app/lib/actions/pulp3/orchestration/content_view_version/import.rb
katello-4.0.0 app/lib/actions/pulp3/orchestration/content_view_version/import.rb
katello-4.0.0.rc3.1 app/lib/actions/pulp3/orchestration/content_view_version/import.rb
katello-4.0.0.rc3 app/lib/actions/pulp3/orchestration/content_view_version/import.rb
katello-3.18.2.1 app/lib/actions/pulp3/orchestration/content_view_version/import.rb
katello-3.18.2 app/lib/actions/pulp3/orchestration/content_view_version/import.rb
katello-4.0.0.rc2 app/lib/actions/pulp3/orchestration/content_view_version/import.rb
katello-3.18.1.1 app/lib/actions/pulp3/orchestration/content_view_version/import.rb
katello-4.0.0.rc1 app/lib/actions/pulp3/orchestration/content_view_version/import.rb
katello-3.18.1 app/lib/actions/pulp3/orchestration/content_view_version/import.rb