Sha256: 4069062c2415a60b7f16396b8ea7c4a60ee8d98721bbb23884ba89a21469620a

Contents?: true

Size: 609 Bytes

Versions: 6

Compression:

Stored size: 609 Bytes

Contents

module Actions
  module Pulp3
    module Repository
      class SavePublication < Pulp3::Abstract
        def plan(repository, tasks)
          plan_self(:repository_id => repository.id, :tasks => tasks)
        end

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
katello-3.12.3 app/lib/actions/pulp3/repository/save_publication.rb
katello-3.12.2 app/lib/actions/pulp3/repository/save_publication.rb
katello-3.12.1 app/lib/actions/pulp3/repository/save_publication.rb
katello-3.12.0 app/lib/actions/pulp3/repository/save_publication.rb
katello-3.12.0.rc2 app/lib/actions/pulp3/repository/save_publication.rb
katello-3.12.0.rc1 app/lib/actions/pulp3/repository/save_publication.rb