Class: Actions::Katello::Host::UploadProfiles
- Inherits:
-
EntryAction
- Object
- EntryAction
- Actions::Katello::Host::UploadProfiles
- Defined in:
- app/lib/actions/katello/host/upload_profiles.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
19 20 21 22 23 24 25 |
# File 'app/lib/actions/katello/host/upload_profiles.rb', line 19 def humanized_name if input.try(:[], :hostname) _("Combined Profile Update for %s") % input[:hostname] else _('Combined Profile Update') end end |
#plan(host, profile_string) ⇒ Object
11 12 13 14 15 16 17 |
# File 'app/lib/actions/katello/host/upload_profiles.rb', line 11 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
7 8 9 |
# File 'app/lib/actions/katello/host/upload_profiles.rb', line 7 def queue ::Katello::HOST_TASKS_QUEUE end |
#rescue_strategy ⇒ Object
31 32 33 |
# File 'app/lib/actions/katello/host/upload_profiles.rb', line 31 def rescue_strategy Dynflow::Action::Rescue::Skip end |
#resource_locks ⇒ Object
27 28 29 |
# File 'app/lib/actions/katello/host/upload_profiles.rb', line 27 def resource_locks :link end |
#run ⇒ Object
35 36 37 38 39 40 41 42 43 |
# File 'app/lib/actions/katello/host/upload_profiles.rb', line 35 def run host = ::Host.find_by(:id => input[:host_id]) uploader = ::Katello::Host::ProfilesUploader.new( host: host, profile_string: input[:profile_string] ) uploader.upload uploader.trigger_applicability_generation end |