diff options
Diffstat (limited to 'heatclient/v1')
| -rw-r--r-- | heatclient/v1/actions.py | 7 | ||||
| -rw-r--r-- | heatclient/v1/shell.py | 13 |
2 files changed, 20 insertions, 0 deletions
diff --git a/heatclient/v1/actions.py b/heatclient/v1/actions.py index 9c7028f..4ecd2b6 100644 --- a/heatclient/v1/actions.py +++ b/heatclient/v1/actions.py @@ -53,3 +53,10 @@ class ActionManager(stacks.StackChildManager): resp, body = self.client.json_request('POST', '/stacks/%s/actions' % stack_id, data=body) + + def check(self, stack_id): + """Check a stack.""" + body = {'check': None} + resp, body = self.client.json_request('POST', + '/stacks/%s/actions' % stack_id, + data=body) diff --git a/heatclient/v1/shell.py b/heatclient/v1/shell.py index 3032956..fa73cd6 100644 --- a/heatclient/v1/shell.py +++ b/heatclient/v1/shell.py @@ -307,6 +307,19 @@ def do_action_resume(hc, args): @utils.arg('id', metavar='<NAME or ID>', + help='Name or ID of stack to check.') +def do_action_check(hc, args): + '''Check that stack resources are in expected states.''' + fields = {'stack_id': args.id} + try: + hc.actions.check(**fields) + except exc.HTTPNotFound: + raise exc.CommandError('Stack not found: %s' % args.id) + else: + do_stack_list(hc) + + +@utils.arg('id', metavar='<NAME or ID>', help='Name or ID of stack to describe.') def do_describe(hc, args): '''DEPRECATED! Use stack-show instead.''' |
