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_string) ⇒ Object
- #queue ⇒ Object
- #rescue_strategy ⇒ Object
- #resource_locks ⇒ Object
- #run ⇒ Object
Instance Method Details
#humanized_name ⇒ Object
17 18 19 20 21 22 23 |
# File 'app/lib/actions/katello/host/upload_package_profile.rb', line 17 def humanized_name if input.try(:[], :hostname) _("Package Profile Update for %s") % input[:hostname] else _('Package Profile Update') end end |
#plan(host, profile_string) ⇒ Object
9 10 11 12 13 14 15 |
# File 'app/lib/actions/katello/host/upload_package_profile.rb', line 9 def plan(host, profile_string) action_subject host sequence do plan_self(:host_id => host.id, :hostname => host.name, :profile_string => profile_string) end end |
#queue ⇒ Object
5 6 7 |
# File 'app/lib/actions/katello/host/upload_package_profile.rb', line 5 def queue ::Katello::HOST_TASKS_QUEUE end |
#rescue_strategy ⇒ Object
29 30 31 |
# File 'app/lib/actions/katello/host/upload_package_profile.rb', line 29 def rescue_strategy Dynflow::Action::Rescue::Skip end |
#resource_locks ⇒ Object
25 26 27 |
# File 'app/lib/actions/katello/host/upload_package_profile.rb', line 25 def resource_locks :link end |
#run ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'app/lib/actions/katello/host/upload_package_profile.rb', line 33 def run host = ::Host.find_by(:id => input[:host_id]) uploader = ::Katello::Host::PackageProfileUploader.new( host: host, profile_string: input[:profile_string] ) uploader.upload uploader.trigger_applicability_generation end |