Add get_env and get_files function to heat driver
These resources are added to SDK for retrieving stack data. Change-Id: I02c89bd929330edd3a99bff8dadc0fdf17dda088 Depends-On: Ic4ea1c58b8c43b2e4217b4a96195b338a3f4310b
This commit is contained in:
parent
4151663cc5
commit
bd134d882c
|
@ -52,6 +52,14 @@ class HeatClient(base.DriverBase):
|
|||
def stack_check(self, stack_id):
|
||||
return self.conn.orchestration.check_stack(stack_id)
|
||||
|
||||
@sdk.translate_exception
|
||||
def stack_get_environment(self, stack_id):
|
||||
return self.conn.orchestration.get_stack_environment(stack_id)
|
||||
|
||||
@sdk.translate_exception
|
||||
def stack_get_files(self, stack_id):
|
||||
return self.conn.orchestration.get_stack_files(stack_id)
|
||||
|
||||
@sdk.translate_exception
|
||||
def stack_get_template(self, stack_id):
|
||||
return self.conn.orchestration.get_stack_template(stack_id)
|
||||
|
|
|
@ -72,6 +72,14 @@ class TestHeatV1(base.SenlinTestCase):
|
|||
self.hc.stack_check('stack_id')
|
||||
self.orch.check_stack.assert_called_once_with('stack_id')
|
||||
|
||||
def test_stack_get_environment(self):
|
||||
self.hc.stack_get_environment('stack_id')
|
||||
self.orch.get_stack_environment.assert_called_once_with('stack_id')
|
||||
|
||||
def test_stack_get_files(self):
|
||||
self.hc.stack_get_files('stack_id')
|
||||
self.orch.get_stack_files.assert_called_once_with('stack_id')
|
||||
|
||||
def test_stack_get_template(self):
|
||||
self.hc.stack_get_template('stack_id')
|
||||
self.orch.get_stack_template.assert_called_once_with('stack_id')
|
||||
|
|
Loading…
Reference in New Issue