From 8dbe371d628bb95c423ac91b0dc907234665b5a8 Mon Sep 17 00:00:00 2001 From: Frode Nordahl Date: Wed, 8 Aug 2018 11:34:18 +0200 Subject: [PATCH 1/2] Make it possible to call run_action() without passing action_params Fixes #94 --- zaza/model.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zaza/model.py b/zaza/model.py index b5c49cc..40faad4 100644 --- a/zaza/model.py +++ b/zaza/model.py @@ -434,15 +434,15 @@ get_status = sync_wrapper(async_get_status) async def async_run_action(unit_name, action_name, model_name=None, - action_params=None): + action_params={}): """Run action on given unit. - :param model_name: Name of model to query. - :type model_name: str :param unit_name: Name of unit to run action on :type unit_name: str :param action_name: Name of action to run :type action_name: str + :param model_name: Name of model to query. + :type model_name: str :param action_params: Dictionary of config options for action :type action_params: dict :returns: Action object From 7d56d781c5d0a59148d4a1e009d52e8993850b98 Mon Sep 17 00:00:00 2001 From: Frode Nordahl Date: Wed, 8 Aug 2018 11:36:55 +0200 Subject: [PATCH 2/2] Fix order of arguments passed to model.run_action() Fixes #95 --- zaza/charm_tests/test_utils.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/zaza/charm_tests/test_utils.py b/zaza/charm_tests/test_utils.py index 7e7e482..8235c42 100644 --- a/zaza/charm_tests/test_utils.py +++ b/zaza/charm_tests/test_utils.py @@ -142,7 +142,6 @@ class OpenStackBaseTest(unittest.TestCase): model.run_action( self.first_unit, 'pause', - {}, model_name=self.model_name) model.block_until_unit_wl_status( self.first_unit, @@ -157,7 +156,6 @@ class OpenStackBaseTest(unittest.TestCase): model.run_action( self.first_unit, 'resume', - {}, model_name=self.model_name) model.block_until_unit_wl_status( self.first_unit,