Merge "Add stack-check action to the API"

This commit is contained in:
Jenkins 2014-08-13 07:00:17 +00:00 committed by Gerrit Code Review
commit 682b58ccf4
2 changed files with 7 additions and 1 deletions

View File

@ -27,7 +27,7 @@ class ActionController(object):
# Define request scope (must match what is in policy.json)
REQUEST_SCOPE = 'actions'
ACTIONS = (SUSPEND, RESUME) = ('suspend', 'resume')
ACTIONS = (SUSPEND, RESUME, CHECK) = ('suspend', 'resume', 'check')
def __init__(self, options):
self.options = options
@ -54,6 +54,8 @@ class ActionController(object):
self.rpc_client.stack_suspend(req.context, identity)
elif ac == self.RESUME:
self.rpc_client.stack_resume(req.context, identity)
elif ac == self.CHECK:
self.rpc_client.stack_check(req.context, identity)
else:
raise exc.HTTPInternalServerError(_("Unexpected action %s") % ac)

View File

@ -342,6 +342,10 @@ class EngineClient(object):
return self.call(ctxt, self.make_msg('stack_resume',
stack_identity=stack_identity))
def stack_check(self, ctxt, stack_identity):
return self.call(ctxt, self.make_msg('stack_check',
stack_identity=stack_identity))
def metadata_update(self, ctxt, stack_identity, resource_name, metadata):
"""
Update the metadata for the given resource.