Return error message if validate fail when clearing hook
There are some situations:
1. User can run the command "heat hook-clear" on any
resource in the stack, even if there is no hook
defined on it, and no error or warning message is returned.
2. User run the command "heat hook-clear" on resource
to clear the hook which resource unset, and no error or
warning message is returned.
3. User run the command "heat hook-clear" on resource
even if the resource's action is not support to signal, and
no error or warning message is returned.
4. User run the command "heat hook-clear" to clear invalid
hooks, and no error or warnning message is returned.
This patch will check the situations above before call
resource.signal, and will return error messages to user.
Reviewed: https:/ /review. openstack. org/199918 /git.openstack. org/cgit/ openstack/ heat/commit/ ?id=18ded430d0e 256ce5f9eec3ef6 1b5337596f914a
Committed: https:/
Submitter: Jenkins
Branch: master
commit 18ded430d0e256c e5f9eec3ef61b53 37596f914a
Author: huangtianhua <email address hidden>
Date: Thu Jul 9 09:15:10 2015 +0800
Return error message if validate fail when clearing hook
There are some situations:
1. User can run the command "heat hook-clear" on any
resource in the stack, even if there is no hook
defined on it, and no error or warning message is returned.
2. User run the command "heat hook-clear" on resource
to clear the hook which resource unset, and no error or
warning message is returned.
3. User run the command "heat hook-clear" on resource
even if the resource's action is not support to signal, and
no error or warning message is returned.
4. User run the command "heat hook-clear" to clear invalid
hooks, and no error or warnning message is returned.
This patch will check the situations above before call signal, and will return error messages to user.
resource.
Change-Id: Ifb9befad864ebe 1bb5f8b419b95d1 b3a95530573
Closes-Bug: #1472515