aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks/mass-pnf-sim/MassPnfSim.py
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-06-04 12:18:41 +0200
committerMorgan Richomme <morgan.richomme@orange.com>2020-06-05 13:47:18 +0000
commit33a15ff45fdd97aac87f73f24b7af65948753640 (patch)
tree4fc5b56a16f930ce0f8f51fa798ac2989f74dd7c /test/mocks/mass-pnf-sim/MassPnfSim.py
parent626f28619bbfb16fd5a2c23bb7002225886b39ae (diff)
Drop shell wrapper for 'trigger_custom' action as well
Change-Id: I388038656505c6937e10ba9f65d70d0e6514e17b Issue-ID: INT-1611 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'test/mocks/mass-pnf-sim/MassPnfSim.py')
-rwxr-xr-xtest/mocks/mass-pnf-sim/MassPnfSim.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/test/mocks/mass-pnf-sim/MassPnfSim.py b/test/mocks/mass-pnf-sim/MassPnfSim.py
index 19aee6b15..77076a6e2 100755
--- a/test/mocks/mass-pnf-sim/MassPnfSim.py
+++ b/test/mocks/mass-pnf-sim/MassPnfSim.py
@@ -177,10 +177,15 @@ class MassPnfSim:
def _get_iter_range(self):
'''Helper routine to get the iteration range
for the lifecycle commands'''
- if not self.args.count:
- return [self.existing_sim_instances]
+ if hasattr(self.args, 'count'):
+ if not self.args.count:
+ return [self.existing_sim_instances]
+ else:
+ return [self.args.count]
+ elif hasattr(self.args, 'triggerstart'):
+ return [self.args.triggerstart, self.args.triggerend + 1]
else:
- return [self.args.count]
+ return [self.existing_sim_instances]
def bootstrap(self):
self.logger.info("Bootstrapping PNF instances")
@@ -338,6 +343,5 @@ class MassPnfSim:
except TypeError:
self.logger.error(f' Could not load JSON data from {self.sim_dirname_pattern}{i}/{self.sim_msg_config}')
- @_MassPnfSim_Decorators.do_action('Triggering', './simulator.sh trigger-simulator')
- def trigger_custom(self):
- self.logger.info("Triggering VES sending by a range of simulators:")
+ # Make the 'trigger_custom' an alias to the 'trigger' method
+ trigger_custom = trigger