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.2.0.rc2 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.1.3 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.2.0.rc1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.0.2.1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.1.2.1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.0.2 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.1.2 app/lib/actions/pulp3/repository/save_publication.rb
katello-3.18.4 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.1.1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.1.0 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.0.1.2 app/lib/actions/pulp3/repository/save_publication.rb
katello-3.18.3.1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.1.0.rc2.2 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.1.0.rc2.1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.0.1.1 app/lib/actions/pulp3/repository/save_publication.rb
katello-3.18.3 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.1.0.rc2 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.0.1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.1.0.rc1.1 app/lib/actions/pulp3/repository/save_publication.rb
katello-4.1.0.rc1 app/lib/actions/pulp3/repository/save_publication.rb