'Perform a transition to a new state via a specified action.
Action should be e.g self.CREATE, self.UPDATE etc, we set
status based on this, the transition is handled by calling the
corresponding handle_* and check_*_complete functions
Note pre_func is an optional function reference which will
be called before the handle_<action> function
If the resource does not declare a check_$action_complete function,
we declare COMPLETE status as soon as the handle_$action call has
finished, and if no handle_$action function is declared, then we do
nothing, useful e.g if the resource requires no action for a given
state transition'

@scheduler.wrappertask
def _do_action(self, action, pre_func=None, resource_data=None):

    assert (action in self.ACTIONS), ('Invalid    action    %s' % action)
    with self._action_recorder(action):
        if callable(pre_func):
            pre_func()
        handler_args = ([resource_data] if (resource_data is not None) else [])
        (yield self.action_handler_task(action, args=handler_args))
