Class: Actions::ForemanPatch::Window::Plan

Inherits:
EntryAction
  • Object
show all
Defined in:
app/lib/actions/foreman_patch/window/plan.rb

Instance Method Summary collapse

Instance Method Details

#humanized_nameObject



22
23
24
# File 'app/lib/actions/foreman_patch/window/plan.rb', line 22

def humanized_name
  _('Plan window: %s') % input[:window_plan][:name]
end

#plan(window_plan, cycle) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'app/lib/actions/foreman_patch/window/plan.rb', line 6

def plan(window_plan, cycle)
  input.update serialize_args(window_plan: window_plan, cycle: cycle)

  sequence do
    action = plan_action(::Actions::ForemanPatch::Window::Create, window_plan, cycle)

    concurrence do
      window_plan.groups.each do |group|
        plan_action(::Actions::ForemanPatch::Round::Plan, group, action.output[:window])
      end
    end

    plan_action(::Actions::ForemanPatch::Window::Publish, action.output[:window])
  end
end