From 2b7abe8e093656e88d81db3f3dbb265da695c8a1 Mon Sep 17 00:00:00 2001 From: Bartek Grzybowski Date: Mon, 8 Jun 2020 14:40:37 +0200 Subject: Drop action methods decorator It's no longer needed after implementing all lifecycle modes in module. Change-Id: Ic2b0c638172e9bb1428ac1f3a7823ce3e36ac206 Issue-ID: INT-1617 Signed-off-by: Bartek Grzybowski --- test/mocks/mass-pnf-sim/MassPnfSim.py | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'test/mocks/mass-pnf-sim') diff --git a/test/mocks/mass-pnf-sim/MassPnfSim.py b/test/mocks/mass-pnf-sim/MassPnfSim.py index c8d255fd5..b2e7f819c 100755 --- a/test/mocks/mass-pnf-sim/MassPnfSim.py +++ b/test/mocks/mass-pnf-sim/MassPnfSim.py @@ -81,30 +81,6 @@ def get_parser(): class MassPnfSim: - # MassPnfSim class actions decorator - class _MassPnfSim_Decorators: - - @staticmethod - def do_action(action_string, cmd): - def action_decorator(method): - def action_wrap(self): - # Alter looping range if action is 'tigger_custom' - if method.__name__ == 'trigger_custom': - iter_range = [self.args.triggerstart, self.args.triggerend+1] - else: - if not self.args.count: - # If no instance count set explicitly via --count - # option - iter_range = [self.existing_sim_instances] - else: - iter_range = [self.args.count] - method(self) - for i in range(*iter_range): - self.logger.info(f'{action_string} {self.sim_dirname_pattern}{i} instance:') - self._run_cmd(cmd, f"{self.sim_dirname_pattern}{i}") - return action_wrap - return action_decorator - log_lvl = logging.INFO sim_config = 'config/config.yml' sim_msg_config = 'config/config.json' -- cgit 1.2.3-korg