summaryrefslogtreecommitdiffstats
path: root/testcases/VIM/OpenStack
diff options
context:
space:
mode:
authorJose Lausuch <jose.lausuch@ericsson.com>2016-02-12 16:26:01 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-02-12 16:26:01 +0000
commitb7202df496d31d19bf8dcff0fbcb2facfb988c76 (patch)
tree9f175e0f0855f88937e0fffab8f8a1a04213df92 /testcases/VIM/OpenStack
parent89532e640af1540ac118b00383ff801062fd8fdd (diff)
parent1d62586d396d948c523fb0b0e351ae162e7fdc6b (diff)
Merge "Rally live migration case selection"
Diffstat (limited to 'testcases/VIM/OpenStack')
-rwxr-xr-xtestcases/VIM/OpenStack/CI/libraries/run_rally-cert.py14
-rw-r--r--testcases/VIM/OpenStack/CI/rally_cert/scenario/opnfv-nova.yaml90
-rw-r--r--testcases/VIM/OpenStack/CI/rally_cert/task.yaml1
3 files changed, 61 insertions, 44 deletions
diff --git a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py
index 0d1992604..5f5cd62f1 100755
--- a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py
+++ b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py
@@ -14,6 +14,7 @@
# and push result into test DB
#
import argparse
+import iniparse
import json
import logging
import os
@@ -111,6 +112,8 @@ CONCURRENCY = 4
###
RESULTS_DIR = functest_yaml.get("general").get("directories"). \
get("dir_rally_res")
+TEMPEST_CONF_FILE = functest_yaml.get("general").get("directories"). \
+ get("dir_results") + '/tempest/tempest.conf'
TEST_DB = functest_yaml.get("results").get("test_db_url")
PRIVATE_NETWORK = functest_yaml.get("general"). \
get("openstack").get("neutron_private_net_name")
@@ -179,6 +182,16 @@ def task_succeed(json_raw):
return True
+def live_migration_supported():
+ config = iniparse.ConfigParser()
+ if config.read(TEMPEST_CONF_FILE) and \
+ config.has_section('compute-feature-enabled') and \
+ config.has_option('compute-feature-enabled', 'live_migration'):
+ return config.getboolean('compute-feature-enabled', 'live_migration')
+
+ return False
+
+
def build_task_args(test_file_name):
task_args = {'service_list': [test_file_name]}
task_args['smoke'] = args.smoke
@@ -201,6 +214,7 @@ def build_task_args(test_file_name):
net_id = functest_utils.get_network_id(client_dict['neutron'],
PRIVATE_NETWORK)
task_args['netid'] = str(net_id)
+ task_args['live_migration'] = live_migration_supported()
return task_args
diff --git a/testcases/VIM/OpenStack/CI/rally_cert/scenario/opnfv-nova.yaml b/testcases/VIM/OpenStack/CI/rally_cert/scenario/opnfv-nova.yaml
index 006491293..823cd44bc 100644
--- a/testcases/VIM/OpenStack/CI/rally_cert/scenario/opnfv-nova.yaml
+++ b/testcases/VIM/OpenStack/CI/rally_cert/scenario/opnfv-nova.yaml
@@ -221,19 +221,6 @@
sla:
{{ no_failures_sla() }}
- NovaServers.boot_and_live_migrate_server:
- - args:
- {{ vm_params(image_name, flavor_name) }}
- block_migration: false
- nics:
- - net-id: {{ netid }}
- context:
- {{ user_context(tenants_amount, users_amount, use_existing_users) }}
- runner:
- {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }}
- sla:
- {{ no_failures_sla() }}
-
NovaServers.boot_and_migrate_server:
- args:
{{ vm_params(image_name, flavor_name) }}
@@ -273,37 +260,6 @@
sla:
{{ no_failures_sla() }}
- NovaServers.boot_server_attach_created_volume_and_live_migrate:
- -
- args:
- {{ vm_params(image_name, flavor_name) }}
- size: 10
- block_migration: false
- boot_server_kwargs:
- nics:
- - net-id: {{ netid }}
- context:
- {{ user_context(tenants_amount, users_amount, use_existing_users) }}
- runner:
- {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }}
- sla:
- {{ no_failures_sla() }}
-
- NovaServers.boot_server_from_volume_and_live_migrate:
- - args:
- {{ vm_params(image_name, flavor_name) }}
- block_migration: false
- volume_size: 10
- force_delete: false
- nics:
- - net-id: {{ netid }}
- context:
- {{ user_context(tenants_amount, users_amount, use_existing_users) }}
- runner:
- {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }}
- sla:
- {{ no_failures_sla() }}
-
NovaSecGroup.create_and_delete_secgroups:
-
args:
@@ -367,3 +323,49 @@
{{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }}
sla:
{{ no_failures_sla() }}
+
+{% if live_migration %}
+ NovaServers.boot_and_live_migrate_server:
+ - args:
+ {{ vm_params(image_name, flavor_name) }}
+ block_migration: false
+ nics:
+ - net-id: {{ netid }}
+ context:
+ {{ user_context(tenants_amount, users_amount, use_existing_users) }}
+ runner:
+ {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }}
+ sla:
+ {{ no_failures_sla() }}
+
+ NovaServers.boot_server_attach_created_volume_and_live_migrate:
+ -
+ args:
+ {{ vm_params(image_name, flavor_name) }}
+ size: 10
+ block_migration: false
+ boot_server_kwargs:
+ nics:
+ - net-id: {{ netid }}
+ context:
+ {{ user_context(tenants_amount, users_amount, use_existing_users) }}
+ runner:
+ {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }}
+ sla:
+ {{ no_failures_sla() }}
+
+ NovaServers.boot_server_from_volume_and_live_migrate:
+ - args:
+ {{ vm_params(image_name, flavor_name) }}
+ block_migration: false
+ volume_size: 10
+ force_delete: false
+ nics:
+ - net-id: {{ netid }}
+ context:
+ {{ user_context(tenants_amount, users_amount, use_existing_users) }}
+ runner:
+ {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }}
+ sla:
+ {{ no_failures_sla() }}
+{% endif %}
diff --git a/testcases/VIM/OpenStack/CI/rally_cert/task.yaml b/testcases/VIM/OpenStack/CI/rally_cert/task.yaml
index 299421ac5..b67891664 100644
--- a/testcases/VIM/OpenStack/CI/rally_cert/task.yaml
+++ b/testcases/VIM/OpenStack/CI/rally_cert/task.yaml
@@ -3,6 +3,7 @@
{%- set flavor_name = flavor_name|default("m1.tiny") %}
{%- set use_existing_users = use_existing_users|default(false) %}
{%- set service_list = service_list|default(["authenticate", "cinder", "keystone", "nova", "glance", "neutron", "quotas", "requests", "heat", "vm"]) %}
+{%- set live_migration = live_migration|default(false) %}
{%- set smoke = smoke|default(true) %}
{%- set floating_network = floating_network|default("net04_ext") %}
{%- set controllers_amount = controllers_amount|default(1) %}