Class: Actions::Katello::ContentViewVersion::RepublishRepositories

Inherits:
EntryAction
  • Object
show all
Defined in:
app/lib/actions/katello/content_view_version/republish_repositories.rb

Instance Method Summary collapse

Instance Method Details

#humanized_nameObject



19
20
21
22
23
24
25
26
27
28
29
# File 'app/lib/actions/katello/content_view_version/republish_repositories.rb', line 19

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) ⇒ Object



5
6
7
8
9
# File 'app/lib/actions/katello/content_view_version/republish_repositories.rb', line 5

def plan(content_view_version)
  action_subject(content_view_version.content_view)
  plan_self(:version_id => content_view_version.id)
  plan_action(::Actions::Katello::Repository::BulkMetadataGenerate, content_view_version.repositories)
end

#resource_locksObject



15
16
17
# File 'app/lib/actions/katello/content_view_version/republish_repositories.rb', line 15

def resource_locks
  :link
end

#runObject



11
12
13
# File 'app/lib/actions/katello/content_view_version/republish_repositories.rb', line 11

def run
  #dummy run phase to save input
end