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.14.2 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.15.0 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.15.0.rc2 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.15.0.rc1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.14.1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.14.0 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.14.0.rc3 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.14.0.rc2 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.14.0.rc1.1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.14.0.rc1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.13.1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.13.0 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.12.1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.13.0.rc1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.12.0 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.12.0.rc3 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.12.0.rc2 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.12.0.rc1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.11.1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.11.0 app/lib/actions/pulp3/repository/save_publication.rb