Class: Actions::Pulp3::Repository::SavePublication
- Defined in:
- app/lib/actions/pulp3/repository/save_publication.rb
Instance Method Summary collapse
Methods inherited from Abstract
Instance Method Details
#plan(repository, tasks, options = {}) ⇒ Object
6 7 8 |
# File 'app/lib/actions/pulp3/repository/save_publication.rb', line 6 def plan(repository, tasks, = {}) plan_self(:repository_id => repository.id, :tasks => tasks, :contents_changed => [:contents_changed]) end |
#run ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'app/lib/actions/pulp3/repository/save_publication.rb', line 10 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 |