From f16a848db26e5b6af294e697bc648369d3ac5aa5 Mon Sep 17 00:00:00 2001 From: Alberto Villarreal Date: Thu, 3 Aug 2023 16:43:45 -0500 Subject: [PATCH] Added constraint type Simulated Users for CPS test. Additionally matching Simulated Users with client IPs. --- .../hero_scale/hero_helper/hero_helper.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/stateful_traffic_gen/hero_scale/hero_helper/hero_helper.py b/stateful_traffic_gen/hero_scale/hero_helper/hero_helper.py index 0bc4e67..1853e98 100644 --- a/stateful_traffic_gen/hero_scale/hero_helper/hero_helper.py +++ b/stateful_traffic_gen/hero_scale/hero_helper/hero_helper.py @@ -41,6 +41,8 @@ class HeroHelper: "autoMacGeneration": False }, 'userObjectiveType_cps': "connectionRate", + 'constraintType_cps': "SimulatedUserConstraint", + 'enableConstraint_cps': True, 'userObjectiveType_tcp_bg': "concurrentConnections", 'initial_objective': 15000000, 'initial_objective_tcp_bg': 15000000, @@ -511,9 +513,13 @@ def _complete_ixl_config(self): kActivityOptionsToChange = { # format: { activityName : { option : value } } "HTTPClient1": { - "userIpMapping": "1:ALL", - "userObjectiveType": self.url_patch_dict['userObjectiveType_cps'], - "userObjectiveValue": self.user_init_obj, + 'userIpMapping': "1:ALL", + 'enableConstraint': self.url_patch_dict['enableConstraint_cps'], + 'constraintType': self.url_patch_dict['constraintType_cps'], + 'constraintValue': self.url_patch_dict['ip_settings']['client']['host_count'] + * len(self.client_ip_range_settings), + 'userObjectiveType': self.url_patch_dict['userObjectiveType_cps'], + 'userObjectiveValue': self.user_init_obj, } } elif self.test_config_type == 'tcp_bg':