From d239273e9648c43283e35f21a57fb32a36b2c0a3 Mon Sep 17 00:00:00 2001 From: Ruby Loo Date: Thu, 15 Jan 2015 23:07:38 +0000 Subject: [PATCH] Remove unused state transitions This removes the following state transitions from our state machine because they aren't transitions that are implemented by our conductor or drivers. Currently, nodes in these (provision) states never transition to ERROR: -machine.add_transition(NOSTATE, ERROR, 'error') -machine.add_transition(DEPLOYING, ERROR, 'error') -machine.add_transition(ACTIVE, ERROR, 'error') Change-Id: Id7870a662f68496f9789b4b6bef0efecd68dbf68 Related-to: blueprint new-ironic-state-machine --- ironic/common/states.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ironic/common/states.py b/ironic/common/states.py index 7d121b5e4f..9bcdfb90ff 100644 --- a/ironic/common/states.py +++ b/ironic/common/states.py @@ -187,10 +187,7 @@ machine.add_transition(DEPLOYFAIL, DELETING, 'delete') # A delete may complete machine.add_transition(DELETING, NOSTATE, 'done') -# These states can also transition to error -machine.add_transition(NOSTATE, ERROR, 'error') -machine.add_transition(DEPLOYING, ERROR, 'error') -machine.add_transition(ACTIVE, ERROR, 'error') +# This state can also transition to error machine.add_transition(DELETING, ERROR, 'error') # An errored instance can be rebuilt