Class: Actions::ForemanWreckingball::Host::RefreshVmwareFacet

Inherits:
EntryAction
  • Object
show all
Defined in:
app/lib/actions/foreman_wreckingball/host/refresh_vmware_facet.rb

Instance Method Summary collapse

Instance Method Details

#humanized_inputObject



28
29
30
# File 'app/lib/actions/foreman_wreckingball/host/refresh_vmware_facet.rb', line 28

def humanized_input
  input[:host] && input[:host][:name]
end

#humanized_nameObject



24
25
26
# File 'app/lib/actions/foreman_wreckingball/host/refresh_vmware_facet.rb', line 24

def humanized_name
  _('Refresh VMware data')
end

#plan(host) ⇒ Object



9
10
11
12
# File 'app/lib/actions/foreman_wreckingball/host/refresh_vmware_facet.rb', line 9

def plan(host)
  action_subject(host)
  plan_self
end

#rescue_strategyObject



20
21
22
# File 'app/lib/actions/foreman_wreckingball/host/refresh_vmware_facet.rb', line 20

def rescue_strategy
  Dynflow::Action::Rescue::Skip
end

#runObject



14
15
16
17
18
# File 'app/lib/actions/foreman_wreckingball/host/refresh_vmware_facet.rb', line 14

def run
  host = ::Host.find(input[:host][:id])
  state = host.refresh_vmware_facet!
  output[:state] = state
end