Sha256: fed9e225fac940c318000754e415ce8ba3a90c5650d7538d2d3a35e70df67f9f

Contents?: true

Size: 786 Bytes

Versions: 136

Compression:

Stored size: 786 Bytes

Contents

module Actions
  module Pulp3
    module Repository
      class SavePublication < Pulp3::Abstract
        middleware.use Actions::Middleware::ExecuteIfContentsChanged
        def plan(repository, tasks, options = {})
          plan_self(:repository_id => repository.id, :tasks => tasks, :contents_changed => options[:contents_changed])
        end

        def run
          if input[:tasks] && input[:tasks][:pulp_tasks] && input[:tasks][:pulp_tasks].first
            publication_href = input[:tasks][:pulp_tasks].first[:created_resources].first
            if publication_href
              repo = ::Katello::Repository.find(input[:repository_id])
              repo.update(:publication_href => publication_href)
            end
          end
        end
      end
    end
  end
end

Version data entries

136 entries across 136 versions & 1 rubygems

Version Path
katello-4.7.3 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.7.2 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.7.1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.6.2.1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.6.2 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.7.0 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.6.1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.7.0.rc2 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.7.0.rc1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.4.2.2 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.4.2.1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.4.2 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.5.1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.6.0 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.6.0.rc2 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.6.0.rc1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.5.0 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.5.0.rc2 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.4.1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.5.0.rc1 app/lib/actions/pulp3/repository/save_publication.rb