Add stack-check action to the API
Add CHECK to the list of accepted stack actions. Co-Authored-By: Richard Lee <rblee88@gmail.com> Implements: blueprint stack-check (partial) Change-Id: I38265b672090f5fcc34413cc4d8c086015af869c
This commit is contained in:
parent
87ff54290a
commit
11613af2f4
@ -27,7 +27,7 @@ class ActionController(object):
|
|||||||
# Define request scope (must match what is in policy.json)
|
# Define request scope (must match what is in policy.json)
|
||||||
REQUEST_SCOPE = 'actions'
|
REQUEST_SCOPE = 'actions'
|
||||||
|
|
||||||
ACTIONS = (SUSPEND, RESUME) = ('suspend', 'resume')
|
ACTIONS = (SUSPEND, RESUME, CHECK) = ('suspend', 'resume', 'check')
|
||||||
|
|
||||||
def __init__(self, options):
|
def __init__(self, options):
|
||||||
self.options = options
|
self.options = options
|
||||||
@ -54,6 +54,8 @@ class ActionController(object):
|
|||||||
self.rpc_client.stack_suspend(req.context, identity)
|
self.rpc_client.stack_suspend(req.context, identity)
|
||||||
elif ac == self.RESUME:
|
elif ac == self.RESUME:
|
||||||
self.rpc_client.stack_resume(req.context, identity)
|
self.rpc_client.stack_resume(req.context, identity)
|
||||||
|
elif ac == self.CHECK:
|
||||||
|
self.rpc_client.stack_check(req.context, identity)
|
||||||
else:
|
else:
|
||||||
raise exc.HTTPInternalServerError(_("Unexpected action %s") % ac)
|
raise exc.HTTPInternalServerError(_("Unexpected action %s") % ac)
|
||||||
|
|
||||||
|
@ -342,6 +342,10 @@ class EngineClient(object):
|
|||||||
return self.call(ctxt, self.make_msg('stack_resume',
|
return self.call(ctxt, self.make_msg('stack_resume',
|
||||||
stack_identity=stack_identity))
|
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):
|
def metadata_update(self, ctxt, stack_identity, resource_name, metadata):
|
||||||
"""
|
"""
|
||||||
Update the metadata for the given resource.
|
Update the metadata for the given resource.
|
||||||
|
Loading…
Reference in New Issue
Block a user