Commit 3bf2abaa authored by Alessio Caiazza's avatar Alessio Caiazza

More restrictive state machine transitions in Clusters::ApplicationStatus

parent f9364929
...@@ -12,20 +12,20 @@ module Clusters ...@@ -12,20 +12,20 @@ module Clusters
state :installing, value: 2 state :installing, value: 2
state :installed, value: 3 state :installed, value: 3
event :make_scheduled do
transition %i(installable errored) => :scheduled
end
event :make_installing do event :make_installing do
transition any - [:installing] => :installing transition %i(scheduled) => :installing
end end
event :make_installed do event :make_installed do
transition any - [:installed] => :installed transition %i(installing) => :installed
end end
event :make_errored do event :make_errored do
transition any - [:errored] => :errored transition any => :errored
end
event :make_scheduled do
transition %i(installable errored) => :scheduled
end end
before_transition any => [:scheduled] do |app_status, _| before_transition any => [:scheduled] do |app_status, _|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment