summaryrefslogtreecommitdiffstats
path: root/yardstick/vTC/apexlake/experimental_framework
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/vTC/apexlake/experimental_framework')
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/api.py4
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/benchmarks/instantiation_validation_benchmark.py8
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/benchmarks/instantiation_validation_noisy_neighbors_benchmark.py8
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/benchmarks/multi_tenancy_throughput_benchmark.py8
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/common.py21
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/constants/conf_file_sections.py4
6 files changed, 48 insertions, 5 deletions
diff --git a/yardstick/vTC/apexlake/experimental_framework/api.py b/yardstick/vTC/apexlake/experimental_framework/api.py
index 1851f1b09..e0209befd 100644
--- a/yardstick/vTC/apexlake/experimental_framework/api.py
+++ b/yardstick/vTC/apexlake/experimental_framework/api.py
@@ -118,6 +118,10 @@ class FrameworkApi(object):
credentials = openstack_credentials
msg = 'The provided heat_template does not exist'
+ if common.RELEASE == 'liberty':
+ heat_template = 'vTC_liberty.yaml'
+ else:
+ heat_template = 'vTC.yaml'
template = "{}{}".format(common.get_template_dir(), heat_template)
common.InputValidation.validate_file_exist(template, msg)
diff --git a/yardstick/vTC/apexlake/experimental_framework/benchmarks/instantiation_validation_benchmark.py b/yardstick/vTC/apexlake/experimental_framework/benchmarks/instantiation_validation_benchmark.py
index c85aff5a9..320becae5 100644
--- a/yardstick/vTC/apexlake/experimental_framework/benchmarks/instantiation_validation_benchmark.py
+++ b/yardstick/vTC/apexlake/experimental_framework/benchmarks/instantiation_validation_benchmark.py
@@ -179,7 +179,12 @@ class InstantiationValidationBenchmark(base.BenchmarkBaseClass):
self.params[VLAN_RECEIVER]
# An IP address is required for the interface to receive a multicast
# flow. The specific address is not important
- command += ' 10.254.254.254 up'
+ command += ' 10.254.254.254 up netmask 255.255.255.248'
+ common.run_command(command)
+
+ command = "sudo ifconfig "
+ command += self.interface_name + "." + self.params[VLAN_RECEIVER]
+ command += " promisc"
common.run_command(command)
# configure smcroute
@@ -193,6 +198,7 @@ class InstantiationValidationBenchmark(base.BenchmarkBaseClass):
# run smcroute on the interface
command = 'sudo smcroute -d'
common.run_command(command)
+ time.sleep(3)
# Start the packet checker
current_dir = os.path.dirname(os.path.realpath(__file__))
diff --git a/yardstick/vTC/apexlake/experimental_framework/benchmarks/instantiation_validation_noisy_neighbors_benchmark.py b/yardstick/vTC/apexlake/experimental_framework/benchmarks/instantiation_validation_noisy_neighbors_benchmark.py
index cbb4121bb..1eab70c67 100644
--- a/yardstick/vTC/apexlake/experimental_framework/benchmarks/instantiation_validation_noisy_neighbors_benchmark.py
+++ b/yardstick/vTC/apexlake/experimental_framework/benchmarks/instantiation_validation_noisy_neighbors_benchmark.py
@@ -29,8 +29,14 @@ class InstantiationValidationNoisyNeighborsBenchmark(
def __init__(self, name, params):
base.InstantiationValidationBenchmark.__init__(self, name, params)
+
+ if common.RELEASE == 'liberty':
+ temp_name = 'stress_workload_liberty.yaml'
+ else:
+ temp_name = 'stress_workload.yaml'
+
self.template_file = common.get_template_dir() + \
- 'stress_workload.yaml'
+ temp_name
self.stack_name = 'neighbour'
self.neighbor_stack_names = list()
diff --git a/yardstick/vTC/apexlake/experimental_framework/benchmarks/multi_tenancy_throughput_benchmark.py b/yardstick/vTC/apexlake/experimental_framework/benchmarks/multi_tenancy_throughput_benchmark.py
index ee02bcc93..f2a87b2b2 100644
--- a/yardstick/vTC/apexlake/experimental_framework/benchmarks/multi_tenancy_throughput_benchmark.py
+++ b/yardstick/vTC/apexlake/experimental_framework/benchmarks/multi_tenancy_throughput_benchmark.py
@@ -26,8 +26,14 @@ class MultiTenancyThroughputBenchmark(base.RFC2544ThroughputBenchmark):
def __init__(self, name, params):
base.RFC2544ThroughputBenchmark.__init__(self, name, params)
+
+ if common.RELEASE == 'liberty':
+ temp_name = 'stress_workload_liberty.yaml'
+ else:
+ temp_name = 'stress_workload.yaml'
+
self.template_file = "{}{}".format(common.get_template_dir(),
- 'stress_workload.yaml')
+ temp_name)
self.stack_name = 'neighbour'
self.neighbor_stack_names = list()
diff --git a/yardstick/vTC/apexlake/experimental_framework/common.py b/yardstick/vTC/apexlake/experimental_framework/common.py
index e86cc832c..4bacd38a6 100644
--- a/yardstick/vTC/apexlake/experimental_framework/common.py
+++ b/yardstick/vTC/apexlake/experimental_framework/common.py
@@ -25,10 +25,13 @@ from experimental_framework.constants import framework_parameters as fp
# List of common variables
# ------------------------------------------------------
+allowed_releases = ['liberty', 'kilo', 'juno']
+
LOG = None
CONF_FILE = None
DEPLOYMENT_UNIT = None
ITERATIONS = None
+RELEASE = None
BASE_DIR = None
RESULT_DIR = None
@@ -87,6 +90,7 @@ def init_general_vars(api=False):
global TEMPLATE_DIR
global RESULT_DIR
global ITERATIONS
+ global RELEASE
TEMPLATE_FILE_EXTENSION = '.yaml'
@@ -97,6 +101,12 @@ def init_general_vars(api=False):
"Section " + cf.CFS_GENERAL +
"is not present in configuration file")
+ InputValidation.\
+ validate_configuration_file_section(
+ cf.CFS_OPENSTACK,
+ "Section " + cf.CFS_OPENSTACK +
+ "is not present in configuration file")
+
TEMPLATE_DIR = '/tmp/apexlake/heat_templates/'
# if not os.path.exists(TEMPLATE_DIR):
# os.makedirs(TEMPLATE_DIR)
@@ -121,6 +131,11 @@ def init_general_vars(api=False):
if not os.path.isdir(RESULT_DIR):
os.mkdir(RESULT_DIR)
+ if cf.CFSO_RELEASE in CONF_FILE.get_variable_list(cf.CFS_OPENSTACK):
+ RELEASE = CONF_FILE.get_variable(cf.CFS_OPENSTACK, cf.CFSO_RELEASE)
+ if RELEASE not in allowed_releases:
+ raise ValueError("Release {} is not supported".format(RELEASE))
+
# Validate and assign Iterations
if cf.CFSG_ITERATIONS in CONF_FILE.get_variable_list(cf.CFS_GENERAL):
ITERATIONS = int(CONF_FILE.get_variable(cf.CFS_GENERAL,
@@ -132,7 +147,11 @@ def init_general_vars(api=False):
def init_log():
global LOG
LOG = logging.getLogger()
- LOG.setLevel(level=logging.INFO)
+ debug = CONF_FILE.get_variable(cf.CFS_GENERAL, cf.CFSG_DEBUG)
+ if debug == 'true' or debug == 'True':
+ LOG.setLevel(level=logging.DEBUG)
+ else:
+ LOG.setLevel(level=logging.INFO)
log_formatter = logging.Formatter("%(asctime)s --- %(message)s")
file_handler = logging.FileHandler("{0}/{1}.log".format("./", "benchmark"))
file_handler.setFormatter(log_formatter)
diff --git a/yardstick/vTC/apexlake/experimental_framework/constants/conf_file_sections.py b/yardstick/vTC/apexlake/experimental_framework/constants/conf_file_sections.py
index f397984e9..ce46d800a 100644
--- a/yardstick/vTC/apexlake/experimental_framework/constants/conf_file_sections.py
+++ b/yardstick/vTC/apexlake/experimental_framework/constants/conf_file_sections.py
@@ -44,7 +44,8 @@ def get_sections_api():
return [
CFS_PKTGEN,
CFS_GENERAL,
- CFS_INFLUXDB
+ CFS_INFLUXDB,
+ CFS_OPENSTACK
# Add here eventually new sections in configuration file ...
]
@@ -98,3 +99,4 @@ CFSO_USER = 'user'
CFSO_PASSWORD = 'password'
CFSO_AUTH_URI = 'auth_uri'
CFSO_PROJECT = 'project'
+CFSO_RELEASE = 'release'