summaryrefslogtreecommitdiffstats
path: root/testcases/VIM/OpenStack/CI
diff options
context:
space:
mode:
Diffstat (limited to 'testcases/VIM/OpenStack/CI')
-rwxr-xr-xtestcases/VIM/OpenStack/CI/libraries/run_rally-cert.py18
-rwxr-xr-x[-rw-r--r--]testcases/VIM/OpenStack/CI/libraries/run_rally.py14
-rw-r--r--testcases/VIM/OpenStack/CI/libraries/run_tempest.py4
-rw-r--r--testcases/VIM/OpenStack/CI/rally_cert/scenario/opnfv-heat.yaml1
4 files changed, 23 insertions, 14 deletions
diff --git a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py
index 17a6596d3..d2128d9ac 100755
--- a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py
+++ b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py
@@ -49,12 +49,19 @@ parser.add_argument("-r", "--report",
parser.add_argument("-s", "--smoke",
help="Smoke test mode",
action="store_true")
+parser.add_argument("-v", "--verbose",
+ help="Print verbose info about the progress",
+ action="store_true")
args = parser.parse_args()
client_dict = {}
-FNULL = open(os.devnull, 'w')
+if args.verbose:
+ RALLY_STDERR = subprocess.STDOUT
+else:
+ RALLY_STDERR = open(os.devnull, 'w')
+
""" logging configuration """
logger = logging.getLogger("run_rally")
logger.setLevel(logging.DEBUG)
@@ -100,8 +107,6 @@ RESULTS_DIR = functest_yaml.get("general").get("directories"). \
TEST_DB = functest_yaml.get("results").get("test_db_url")
FLOATING_NETWORK = functest_yaml.get("general"). \
get("openstack").get("neutron_public_net_name")
-FLOATING_SUBNET_CIDR = functest_yaml.get("general"). \
- get("openstack").get("neutron_public_subnet_cidr")
PRIVATE_NETWORK = functest_yaml.get("general"). \
get("openstack").get("neutron_private_net_name")
@@ -119,12 +124,12 @@ def push_results_to_db(payload):
url = TEST_DB + "/results"
installer = functest_utils.get_installer_type(logger)
- git_version = functest_utils.get_git_branch(REPO_PATH)
+ scenario = functest_utils.get_scenario(logger)
pod_name = functest_utils.get_pod_name(logger)
# TODO pod_name hardcoded, info shall come from Jenkins
params = {"project_name": "functest", "case_name": "Rally",
"pod_name": pod_name, "installer": installer,
- "version": git_version, "details": payload}
+ "version": scenario, "details": payload}
headers = {'Content-Type': 'application/json'}
r = requests.post(url, data=json.dumps(params), headers=headers)
@@ -173,7 +178,6 @@ def build_task_args(test_file_name):
task_args['flavor_name'] = FLAVOR_NAME
task_args['glance_image_location'] = GLANCE_IMAGE_PATH
task_args['floating_network'] = FLOATING_NETWORK
- task_args['floating_subnet_cidr'] = FLOATING_SUBNET_CIDR
task_args['netid'] = functest_utils.get_network_id(client_dict['neutron'],
PRIVATE_NETWORK).encode('ascii', 'ignore')
task_args['tmpl_dir'] = TEMPLATE_DIR
@@ -211,7 +215,7 @@ def run_task(test_name):
"--task-args \"{}\" ".format(build_task_args(test_name))
logger.debug('running command line : {}'.format(cmd_line))
- p = subprocess.Popen(cmd_line, stdout=subprocess.PIPE, stderr=FNULL, shell=True)
+ p = subprocess.Popen(cmd_line, stdout=subprocess.PIPE, stderr=RALLY_STDERR, shell=True)
result = ""
while p.poll() is None:
l = p.stdout.readline()
diff --git a/testcases/VIM/OpenStack/CI/libraries/run_rally.py b/testcases/VIM/OpenStack/CI/libraries/run_rally.py
index a7f1db13a..3c70e3880 100644..100755
--- a/testcases/VIM/OpenStack/CI/libraries/run_rally.py
+++ b/testcases/VIM/OpenStack/CI/libraries/run_rally.py
@@ -44,11 +44,17 @@ parser.add_argument("-d", "--debug", help="Debug mode", action="store_true")
parser.add_argument("-r", "--report",
help="Create json result file",
action="store_true")
+parser.add_argument("-v", "--verbose",
+ help="Print verbose info about the progress",
+ action="store_true")
args = parser.parse_args()
+if args.verbose:
+ RALLY_STDERR = subprocess.STDOUT
+else:
+ RALLY_STDERR = open(os.devnull, 'w')
-FNULL = open(os.devnull, 'w')
""" logging configuration """
logger = logging.getLogger("run_rally")
logger.setLevel(logging.DEBUG)
@@ -95,12 +101,12 @@ def push_results_to_db(payload):
url = TEST_DB + "/results"
installer = functest_utils.get_installer_type(logger)
- git_version = functest_utils.get_git_branch(REPO_PATH)
+ scenario = functest_utils.get_scenario(logger)
pod_name = functest_utils.get_pod_name(logger)
# TODO pod_name hardcoded, info shall come from Jenkins
params = {"project_name": "functest", "case_name": "Rally",
"pod_name": pod_name, "installer": installer,
- "version": git_version, "details": payload}
+ "version": scenario, "details": payload}
headers = {'Content-Type': 'application/json'}
r = requests.post(url, data=json.dumps(params), headers=headers)
@@ -164,7 +170,7 @@ def run_task(test_name):
logger.debug('Scenario fetched from : {}'.format(test_file_name))
cmd_line = "rally task start --abort-on-sla-failure {}".format(test_file_name)
logger.debug('running command line : {}'.format(cmd_line))
- p = subprocess.Popen(cmd_line, stdout=subprocess.PIPE, stderr=FNULL, shell=True)
+ p = subprocess.Popen(cmd_line, stdout=subprocess.PIPE, stderr=RALLY_STDERR, shell=True)
result = ""
while p.poll() is None:
l = p.stdout.readline()
diff --git a/testcases/VIM/OpenStack/CI/libraries/run_tempest.py b/testcases/VIM/OpenStack/CI/libraries/run_tempest.py
index 1f5d34cf7..ee0a4bea8 100644
--- a/testcases/VIM/OpenStack/CI/libraries/run_tempest.py
+++ b/testcases/VIM/OpenStack/CI/libraries/run_tempest.py
@@ -104,12 +104,12 @@ def push_results_to_db(payload, module, pod_name):
# TODO move DB creds into config file
url = TEST_DB + "/results"
installer = functest_utils.get_installer_type(logger)
- git_version = functest_utils.get_git_branch(REPO_PATH)
+ scenario = functest_utils.get_scenario(logger)
logger.info("Pushing results to DB: '%s'." % url)
params = {"project_name": "functest", "case_name": "Tempest",
"pod_name": str(pod_name), 'installer': installer,
- "version": git_version, 'details': payload}
+ "version": scenario, 'details': payload}
headers = {'Content-Type': 'application/json'}
r = requests.post(url, data=json.dumps(params), headers=headers)
diff --git a/testcases/VIM/OpenStack/CI/rally_cert/scenario/opnfv-heat.yaml b/testcases/VIM/OpenStack/CI/rally_cert/scenario/opnfv-heat.yaml
index 6debb415a..dd8b282a6 100644
--- a/testcases/VIM/OpenStack/CI/rally_cert/scenario/opnfv-heat.yaml
+++ b/testcases/VIM/OpenStack/CI/rally_cert/scenario/opnfv-heat.yaml
@@ -15,7 +15,6 @@
public_net: {{ floating_network }}
image: {{ image_name }}
flavor: {{ flavor_name }}
- cidr: {{ floating_subnet_cidr }}
context:
{{ user_context(tenants_amount, users_amount, use_existing_users) }}
runner: