Class: Actions::Katello::Host::UploadPackageProfile
- Inherits:
-
EntryAction
- Object
- EntryAction
- Actions::Katello::Host::UploadPackageProfile
- Defined in:
- app/lib/actions/katello/host/upload_package_profile.rb
Instance Method Summary collapse
- #humanized_name ⇒ Object
- #plan(host, profile) ⇒ Object
- #rescue_strategy ⇒ Object
- #resource_locks ⇒ Object
Instance Method Details
#humanized_name ⇒ Object
18 19 20 21 22 23 24 |
# File 'app/lib/actions/katello/host/upload_package_profile.rb', line 18 def humanized_name if input.try(:[], :hostname) _("Package Profile Update for %s") % input[:hostname] else _('Package Profile Update') end end |
#plan(host, profile) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'app/lib/actions/katello/host/upload_package_profile.rb', line 7 def plan(host, profile) action_subject host ::Katello::Pulp::Consumer.new(host.content_facet.uuid).upload_package_profile(profile) if host.content_facet.uuid simple_packages = profile.map { |item| ::Katello::Pulp::SimplePackage.new(item) } host.import_package_profile(simple_packages) plan_self(:hostname => host.name) plan_action(GenerateApplicability, [host]) end |
#rescue_strategy ⇒ Object
30 31 32 |
# File 'app/lib/actions/katello/host/upload_package_profile.rb', line 30 def rescue_strategy Dynflow::Action::Rescue::Skip end |
#resource_locks ⇒ Object
26 27 28 |
# File 'app/lib/actions/katello/host/upload_package_profile.rb', line 26 def resource_locks :link end |