Class: Katello::HostTracer
- Includes:
- Authorization::HostTracer
- Defined in:
- app/models/katello/host_tracer.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Model
Class Method Details
.helpers_for(traces) ⇒ Object
33 34 35 36 37 38 39 |
# File 'app/models/katello/host_tracer.rb', line 33 def self.helpers_for(traces) if traces.any?(&:reboot_required?) ['reboot'] else traces.map(&:restart_command).compact.uniq end end |
Instance Method Details
#reboot_required? ⇒ Boolean
18 19 20 |
# File 'app/models/katello/host_tracer.rb', line 18 def reboot_required? self.app_type == 'static' end |
#restart_command ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'app/models/katello/host_tracer.rb', line 22 def restart_command case self.app_type when 'static' 'reboot' when 'session' nil else self.helper end end |