Sha256: 0e6befba5cdeeb0e5b35690eb7e4cd4196cd3222f855d8c8b19bbb7996787d0c

Contents?: true

Size: 918 Bytes

Versions: 8

Compression:

Stored size: 918 Bytes

Contents

module Actions
  module Pulp3
    module Repository
      class CreatePublication < Pulp3::AbstractAsyncTask
        middleware.use Actions::Middleware::ExecuteIfContentsChanged
        def plan(repository, smart_proxy, options)
          sequence do
            action = plan_self(:repository_id => repository.id, :smart_proxy_id => smart_proxy.id, :contents_changed => options[:contents_changed], :options => options)
            plan_action(SavePublication, repository, action.output, :contents_changed => options[:contents_changed])
          end
        end

        def invoke_external_task
          repository = ::Katello::Repository.find(input[:repository_id])
          if repository.publication_href.nil? || input[:options][:force]
            output[:response] = repository.backend_service(smart_proxy).create_publication
          else
            []
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
katello-3.13.4 app/lib/actions/pulp3/repository/create_publication.rb
katello-3.13.3 app/lib/actions/pulp3/repository/create_publication.rb
katello-3.13.2 app/lib/actions/pulp3/repository/create_publication.rb
katello-3.13.1 app/lib/actions/pulp3/repository/create_publication.rb
katello-3.13.0 app/lib/actions/pulp3/repository/create_publication.rb
katello-3.13.0.rc2.1 app/lib/actions/pulp3/repository/create_publication.rb
katello-3.13.0.rc2 app/lib/actions/pulp3/repository/create_publication.rb
katello-3.13.0.rc1 app/lib/actions/pulp3/repository/create_publication.rb