Adds RPC api for export action
Adds RPC client api for export action and test cases. RPC_VERSION = 1.22 Partial-Bug: #1353670 Co-Authored-By: Jason Dunsmore <jasondunsmore@gmail.com> Change-Id: I88ef9bba073bf4e730e1dae114a9c5d3b856ca13
This commit is contained in:
parent
9f6a0f610d
commit
47d59f2b1e
|
@ -40,6 +40,7 @@ class EngineClient(object):
|
||||||
1.19 - Add show_output and list_outputs for returning stack outputs
|
1.19 - Add show_output and list_outputs for returning stack outputs
|
||||||
1.20 - Add resolve_outputs to stack show
|
1.20 - Add resolve_outputs to stack show
|
||||||
1.21 - Add deployment_id to create_software_deployment
|
1.21 - Add deployment_id to create_software_deployment
|
||||||
|
1.22 - Add support for stack export
|
||||||
"""
|
"""
|
||||||
|
|
||||||
BASE_RPC_API_VERSION = '1.0'
|
BASE_RPC_API_VERSION = '1.0'
|
||||||
|
@ -705,3 +706,14 @@ class EngineClient(object):
|
||||||
stack_identity=stack_identity,
|
stack_identity=stack_identity,
|
||||||
output_key=output_key),
|
output_key=output_key),
|
||||||
version='1.19')
|
version='1.19')
|
||||||
|
|
||||||
|
def export_stack(self, ctxt, stack_identity):
|
||||||
|
"""Exports the stack data in JSON format.
|
||||||
|
|
||||||
|
:param ctxt: RPC context.
|
||||||
|
:param stack_identity: Name of the stack you want to export.
|
||||||
|
"""
|
||||||
|
return self.call(ctxt,
|
||||||
|
self.make_msg('export_stack',
|
||||||
|
stack_identity=stack_identity),
|
||||||
|
version='1.22')
|
||||||
|
|
|
@ -376,3 +376,9 @@ class EngineRpcAPITestCase(common.HeatTestCase):
|
||||||
self._test_engine_api(
|
self._test_engine_api(
|
||||||
'show_output', 'call', stack_identity=self.identity,
|
'show_output', 'call', stack_identity=self.identity,
|
||||||
output_key='test', version='1.19')
|
output_key='test', version='1.19')
|
||||||
|
|
||||||
|
def test_export_stack(self):
|
||||||
|
self._test_engine_api('export_stack',
|
||||||
|
'call',
|
||||||
|
stack_identity=self.identity,
|
||||||
|
version='1.22')
|
||||||
|
|
Loading…
Reference in New Issue