Revision c5a25d9f
Added by Stephen Benjamin almost 6 years ago
app/lib/actions/katello/product/update.rb | ||
---|---|---|
plan_action(::Actions::Katello::Product::RepositoriesGpgReset, product)
|
||
end
|
||
|
||
product.reload
|
||
plan_action(::Actions::Pulp::Repos::Update, product) if ::SETTINGS[:katello][:use_pulp]
|
||
end
|
||
end
|
lib/katello/tasks/repository.rake | ||
---|---|---|
end
|
||
end
|
||
|
||
desc "Refresh pulp sync schedules"
|
||
task :refresh_sync_schedule => ["environment", "check_ping"] do
|
||
User.current = User.anonymous_api_admin
|
||
Katello::Product.all.each do |product|
|
||
puts "Updating #{product}"
|
||
ForemanTasks.sync_task(::Actions::Pulp::Repos::Update, product)
|
||
end
|
||
end
|
||
|
||
def lookup_repositories
|
||
lifecycle_envs = Katello::KTEnvironment.where(:name => ENV['LIFECYCLE_ENVIRONMENT']) if ENV['LIFECYCLE_ENVIRONMENT']
|
||
content_views = Katello::ContentView.where(:name => ENV['CONTENT_VIEW']) if ENV['CONTENT_VIEW']
|
test/actions/katello/product_test.rb | ||
---|---|---|
|
||
it 'plans' do
|
||
action.expects(:action_subject).with(product)
|
||
product.expects(:reload)
|
||
plan_action action, product, :gpg_key_id => key.id
|
||
assert_action_planed_with(action,
|
||
::Actions::Katello::Product::RepositoriesGpgReset,
|
Also available in: Unified diff
fixes #24068 - correctly remove schedules for repos
Schedules are not currently correctly removed from pulp. We update the
product to disassociate the sync plan, but the object needs to be
reloaded otherwise sync_plan_id is still set when it gets sent to the
Pulp::Repos::Update action.