Class: Actions::Katello::ContentViewVersion::RepublishRepositories
- Inherits:
-
EntryAction
- Object
- EntryAction
- Actions::Katello::ContentViewVersion::RepublishRepositories
- Defined in:
- app/lib/actions/katello/content_view_version/republish_repositories.rb
Instance Method Summary collapse
- #humanized_name ⇒ Object
- #plan(content_view_version, options = {force: false}) ⇒ Object
- #resource_locks ⇒ Object
- #run ⇒ Object
Instance Method Details
#humanized_name ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 |
# File 'app/lib/actions/katello/content_view_version/republish_repositories.rb', line 25 def humanized_name if input && input[:version_id] version = ::Katello::ContentViewVersion.find_by(:id => input[:version_id]) end if version _("Republish Repositories of %{name} %{version}") % {:name => version.content_view.name, :version => version.version} else _("Republish Version Repositories") end end |
#plan(content_view_version, options = {force: false}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/lib/actions/katello/content_view_version/republish_repositories.rb', line 5 def plan(content_view_version, = {force: false}) force = [:force] action_subject(content_view_version.content_view) plan_self(:version_id => content_view_version.id) repositories = if force content_view_version.repositories else content_view_version.repositories.joins(:root).where.not(root: { mirroring_policy: ::Katello::RootRepository::MIRRORING_POLICY_COMPLETE }) end plan_action(::Actions::Katello::Repository::BulkMetadataGenerate, repositories) end |
#resource_locks ⇒ Object
21 22 23 |
# File 'app/lib/actions/katello/content_view_version/republish_repositories.rb', line 21 def resource_locks :link end |
#run ⇒ Object
17 18 19 |
# File 'app/lib/actions/katello/content_view_version/republish_repositories.rb', line 17 def run #dummy run phase to save input end |