forked from Katello/katello
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #37237 - Allow repairing content view versions (Katello#10923)
- Loading branch information
Showing
5 changed files
with
42 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
app/lib/actions/katello/content_view_version/verify_checksum.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
module Actions | ||
module Katello | ||
module ContentViewVersion | ||
class VerifyChecksum < Actions::EntryAction | ||
def plan(content_view_version) | ||
action_subject(content_view_version.content_view) | ||
plan_self(:version_id => content_view_version.id) | ||
plan_action(::Actions::BulkAction, ::Actions::Katello::Repository::VerifyChecksum, content_view_version.repositories) if content_view_version.repositories.any? | ||
end | ||
|
||
def run | ||
#dummy run phase to save input and support humanized_name | ||
end | ||
|
||
def humanized_name | ||
if input && input[:version_id] | ||
version = ::Katello::ContentViewVersion.find_by(:id => input[:version_id]) | ||
end | ||
|
||
if version | ||
_("Verify checksum of repositories in %{name} %{version}") % {:name => version.content_view.name, :version => version.version} | ||
else | ||
_("Verify checksum of version repositories") | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters