Sha256: 2b37f73a0575f80962ced4ce4192f551c81c4be1f12a1d69fceb925d79e94272
Contents?: true
Size: 1 KB
Versions: 64
Compression:
Stored size: 1 KB
Contents
module Actions module Katello module Provider class Update < Actions::EntryAction def plan(provider, params) action_subject(provider) update_url(provider, params[:redhat_repository_url]) if params[:redhat_repository_url] end def humanized_name _("Update") end private def update_url(provider, base_url) provider.update!(:repository_url => base_url) if provider.redhat_provider? provider.products.enabled.each do |product| update_repository_urls(product) end end end def update_repository_urls(product) product.repositories.where(:library_instance_id => nil).each do |repository| next unless repository.url root = repository.root url = root.repo_mapper.feed_url plan_action(::Actions::Katello::Repository::Update, root, :url => url) end end end end end end
Version data entries
64 entries across 64 versions & 1 rubygems