summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--INFO8
-rw-r--r--docker/Dockerfile2
-rw-r--r--docker/Dockerfile.aarch64.patch23
-rw-r--r--dovetail/compliance/proposed_tests.yml16
-rw-r--r--dovetail/conf/cmd_config.yml7
-rw-r--r--dovetail/conf/dovetail_config.yml12
-rw-r--r--dovetail/conf/yardstick_config.yml4
-rw-r--r--dovetail/container.py63
-rw-r--r--dovetail/report.py4
-rwxr-xr-xdovetail/run.py44
-rw-r--r--dovetail/test_runner.py43
-rw-r--r--dovetail/testcase.py28
-rw-r--r--dovetail/testcase/ha.tc002.yml6
-rw-r--r--dovetail/testcase/ha.tc003.yml4
-rw-r--r--dovetail/testcase/ha.tc004.yml4
-rw-r--r--dovetail/testcase/ha.tc005.yml4
-rw-r--r--dovetail/testcase/ha.tc006.yml9
-rw-r--r--dovetail/testcase/ha.tc007.yml8
-rw-r--r--dovetail/testcase/ha.tc008.yml12
-rw-r--r--dovetail/testcase/ha.tc009.yml13
-rw-r--r--dovetail/testcase/ha.tc010.yml12
-rw-r--r--dovetail/testcase/ha.tc011.yml13
-rw-r--r--dovetail/testcase/ha.tc012.yml11
-rw-r--r--dovetail/testcase/ipv6.tc023.yml2
-rw-r--r--dovetail/testcase/sdnvpn.tc001.yml2
-rw-r--r--dovetail/testcase/sdnvpn.tc002.yml2
-rw-r--r--dovetail/testcase/sdnvpn.tc003.yml2
-rw-r--r--dovetail/testcase/sdnvpn.tc004.yml2
-rw-r--r--dovetail/testcase/sdnvpn.tc008.yml2
-rw-r--r--dovetail/utils/local_db/init_db.py10
-rw-r--r--dovetail/utils/offline/config.yaml28
-rwxr-xr-xdovetail/utils/offline/download.py55
-rwxr-xr-xdovetail/utils/offline/load.py55
-rw-r--r--userconfig/hosts.yaml2
-rw-r--r--userconfig/pod.yaml.sample (renamed from userconfig/sample_pod.yaml)0
36 files changed, 347 insertions, 166 deletions
diff --git a/.gitignore b/.gitignore
index 82b83ef8..9ae58f1e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,3 +34,4 @@ unittest_results.log
docs_build/
docs_output/
results/
+pre_config/
diff --git a/INFO b/INFO
index 0a6c5ff1..ad996d4f 100644
--- a/INFO
+++ b/INFO
@@ -7,7 +7,7 @@ Project Lead: Hongbo (hongbo.tianhongbo@huawei.com)
Jira Project Name: OPNFV qualification testing
Jira Project Prefix: dovetail
Mailing list tag: [dovetail]
-IRC: Server:freenode.net Channel:#opnfv-testperf
+IRC: Server:freenode.net Channel:#opnfv-meeting
Repository: dovetail
Committers:
@@ -15,6 +15,12 @@ christopher.price@ericsson.com
wenjing.chu@huawei.com
hongbo.tianhongbo@huawei.com
dneary@redhat.com
+georg.kunz@ericsson.com
+trevor.cooper@intel.com
+zshi@redhat.com
+lylavoie@iol.unh.edu
+grakiss.wanglei@huawei.com
+fuqiao@chinamobile.com
Link to TSC approval of the project: http://meetbot.opnfv.org/meetings/opnfv-meeting/2015/opnfv-meeting.2015-09-01-13.59.html
Link(s) to approval of additional committers:
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 499624f8..0401af71 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -29,8 +29,6 @@ RUN \
&& \
git clone https://git.opnfv.org/dovetail ${REPOS_DIR} \
&& \
- mkdir -p ${REPOS_DIR}/results \
-&& \
pip install -U pip \
&& \
pip install -r ${REPOS_DIR}/requirements.txt \
diff --git a/docker/Dockerfile.aarch64.patch b/docker/Dockerfile.aarch64.patch
index b96b619f..50fdc75c 100644
--- a/docker/Dockerfile.aarch64.patch
+++ b/docker/Dockerfile.aarch64.patch
@@ -1,14 +1,14 @@
From: Alexandru Nemes <alexandru.nemes@enea.com>
-Date: Mon, 24 Apr 2017 11:53:42 +0300
+Date: Mon, 8 May 2017 19:04:37 +0300
Subject: [PATCH] Add AArch64 support for Dovetail docker file
Signed-off-by: Alexandru Nemes <alexandru.nemes@enea.com>
---
- docker/Dockerfile | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
+ docker/Dockerfile | 18 ++++++------------
+ 1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/docker/Dockerfile b/docker/Dockerfile
-index 8cc15e0..bbab012 100644
+index 499624f..bbab012 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -1,6 +1,6 @@
@@ -21,7 +21,18 @@ index 8cc15e0..bbab012 100644
RUN \
apt-get update \
-@@ -28,6 +28,8 @@ RUN \
+@@ -16,9 +16,7 @@ RUN \
+ wget \
+ --no-install-recommends \
+ && \
+- apt-get update
+-
+-RUN wget -qO- https://get.docker.com/ | sh
++ apt-get update && apt-get -y install docker.io
+
+ ENV HOME /home/opnfv
+ ENV REPOS_DIR ${HOME}/dovetail
+@@ -31,6 +29,8 @@ RUN \
&& \
mkdir -p ${REPOS_DIR}/results \
&& \
@@ -29,4 +40,4 @@ index 8cc15e0..bbab012 100644
+&& \
pip install -U pip \
&& \
- pip install -r ${REPOS_DIR}/requirements.txt \
+ pip install -r ${REPOS_DIR}/requirements.txt \ \ No newline at end of file
diff --git a/dovetail/compliance/proposed_tests.yml b/dovetail/compliance/proposed_tests.yml
index cc4bfa8c..9d63cb2a 100644
--- a/dovetail/compliance/proposed_tests.yml
+++ b/dovetail/compliance/proposed_tests.yml
@@ -31,23 +31,17 @@ proposed_tests:
- dovetail.ipv6.tc023
- dovetail.ipv6.tc024
- dovetail.ipv6.tc025
- # nfvi, vping_ssh, vping_userdata
- - dovetail.nfvi.tc001
- - dovetail.nfvi.tc002
- # HA, ha.tc002, ha.tc012, will kill the host and can't restart, not ready yet, skip.
+ # HA
- dovetail.ha.tc001
+ - dovetail.ha.tc002
- dovetail.ha.tc003
- # - dovetail.ha.tc004
+ - dovetail.ha.tc004
- dovetail.ha.tc005
- dovetail.ha.tc006
- # - dovetail.ha.tc007
- # - dovetail.ha.tc008
- - dovetail.ha.tc009
- # - dovetail.ha.tc010
- # - dovetail.ha.tc011
+ - dovetail.ha.tc007
+ - dovetail.ha.tc008
# sdnvpn
- dovetail.sdnvpn.tc001
- dovetail.sdnvpn.tc002
- - dovetail.sdnvpn.tc003
- dovetail.sdnvpn.tc004
- dovetail.sdnvpn.tc008
diff --git a/dovetail/conf/cmd_config.yml b/dovetail/conf/cmd_config.yml
index da8c4732..aa27f293 100644
--- a/dovetail/conf/cmd_config.yml
+++ b/dovetail/conf/cmd_config.yml
@@ -29,13 +29,6 @@ cli:
path:
- 'functest/docker_tag'
help: 'Overwrite tag for functest docker container (e.g. stable or latest)'
- openrc:
- flags:
- - '--openrc'
- - '-o'
- path:
- - 'openrc'
- help: 'Openstack Credential file location'
control:
testsuite:
flags:
diff --git a/dovetail/conf/dovetail_config.yml b/dovetail/conf/dovetail_config.yml
index 934ff6a6..36b31401 100644
--- a/dovetail/conf/dovetail_config.yml
+++ b/dovetail/conf/dovetail_config.yml
@@ -5,7 +5,17 @@ report_dest: 'file'
result_file: 'results.json'
# OPENSTACK Credential file
-openrc: '/home/opnfv/dovetail/openrc.sh'
+env_file: 'env_config.sh'
+
+# POD info file
+pod_file: 'pod.yaml'
+
+# JUMPSERVER private key used in pod_file to login hosts
+# If use password to login hosts, there's no need to provide the private key
+pri_key: 'id_rsa'
+
+# SDNVPN offline image
+sdnvpn_image: 'ubuntu-16.04-server-cloudimg-amd64-disk1.img'
COMPLIANCE_PATH: compliance/
TESTCASE_PATH: testcase/
diff --git a/dovetail/conf/yardstick_config.yml b/dovetail/conf/yardstick_config.yml
index ae59a9ec..9f56cb11 100644
--- a/dovetail/conf/yardstick_config.yml
+++ b/dovetail/conf/yardstick_config.yml
@@ -15,8 +15,8 @@ yardstick:
- 'mkdir -p /home/opnfv/yardstick/results/'
- "cd /home/opnfv/repos/yardstick && source tests/ci/prepare_env.sh &&
yardstick -d task start tests/opnfv/test_cases/{{validate_testcase}}.yaml
- --output-file /home/opnfv/yardstick/results/{{validate_testcase}}.out
- --task-args '{'file': '/home/opnfv/userconfig/pod.yaml'}'"
+ --output-file /home/opnfv/yardstick/results/{{testcase}}.out
+ --task-args '{'file': '/home/opnfv/userconfig/pre_config/pod.yaml'}'"
post_condition:
- ''
result:
diff --git a/dovetail/container.py b/dovetail/container.py
index 67e26f66..39062c84 100644
--- a/dovetail/container.py
+++ b/dovetail/container.py
@@ -8,6 +8,7 @@
#
import os
+import yaml
import utils.dovetail_logger as dt_logger
import utils.dovetail_utils as dt_utils
@@ -48,7 +49,8 @@ class Container(object):
@classmethod
def openrc_volume(cls, type):
dovetail_config = dt_cfg.dovetail_config
- dovetail_config['openrc'] = os.path.abspath(dovetail_config['openrc'])
+ dovetail_config['openrc'] = os.path.join(dovetail_config['config_dir'],
+ dovetail_config['env_file'])
if os.path.isfile(dovetail_config['openrc']):
openrc = ' -v %s:%s ' % (dovetail_config['openrc'],
dovetail_config[type]['openrc'])
@@ -106,9 +108,22 @@ class Container(object):
log_vol = '-v %s:%s ' % (dovetail_config['result_dir'],
dovetail_config["yardstick"]['result']['log'])
- key_path = os.path.join(dovetail_config['userconfig_dir'], 'id_rsa')
- key_con_path = dovetail_config["yardstick"]['result']['key_path']
- key_vol = '-v %s:%s ' % (key_path, key_con_path)
+
+ # for yardstick, support pod.yaml configuration
+ pod_file = os.path.join(dovetail_config['config_dir'],
+ dovetail_config['pod_file'])
+ if not os.path.isfile(pod_file):
+ cls.logger.error("File %s doesn't exist.", pod_file)
+ return None
+ key_file = os.path.join(dovetail_config['config_dir'],
+ dovetail_config['pri_key'])
+ key_container_path = dovetail_config["yardstick"]['result']['key_path']
+ if not os.path.isfile(key_file):
+ cls.logger.debug("Key file %s is not found, maybe can use passwd "
+ "method in %s to do HA test.", key_file, pod_file)
+ key_vol = ''
+ else:
+ key_vol = '-v %s:%s ' % (key_file, key_container_path)
return "%s %s %s" % (envs, log_vol, key_vol)
@classmethod
@@ -137,29 +152,43 @@ class Container(object):
return None
# for refstack, support user self_defined configuration
- # for yardstick, support pod.yaml configuration
- pod_file = os.path.join(dovetail_config['userconfig_dir'], 'pod.yaml')
- if type.lower() == "yardstick" and not os.path.exists(pod_file):
- cls.logger.error("File %s doesn't exist.", pod_file)
- return None
- key_file = os.path.join(dovetail_config['userconfig_dir'], 'id_rsa')
- if type.lower() == "yardstick" and not os.path.exists(key_file):
- cls.logger.debug("File %s doesn't exist.", key_file)
- cls.logger.debug("Can just use password in %s.", pod_file)
config_volume = \
- ' -v %s:%s ' % (dovetail_config['userconfig_dir'],
- dovetail_config["functest"]['config']['dir'])
+ ' -v %s:%s ' % (os.getenv("DOVETAIL_HOME"),
+ dovetail_config[type]['config']['dir'])
+
+ hosts_config = ""
+ hosts_config_path = os.path.abspath(
+ os.path.join(os.path.dirname(__file__), os.pardir, 'userconfig'))
+ try:
+ with open(os.path.join(hosts_config_path, 'hosts.yaml')) as f:
+ hosts_info = yaml.safe_load(f)
+ if hosts_info['hosts_info']:
+ for host in hosts_info['hosts_info']:
+ hosts_config += " --add-host "
+ hosts_config += str(host)
+ cls.logger.info('get hosts info %s', hosts_config)
+ except Exception:
+ cls.logger.warn('fail to get hosts info in %s/hosts.yaml, \
+ maybe some issue with domain name resolution',
+ hosts_config_path)
result_volume = ' -v %s:%s ' % (dovetail_config['result_dir'],
dovetail_config[type]['result']['dir'])
- cmd = 'sudo docker run %s %s %s %s %s %s %s /bin/bash' % \
- (opts, envs, config, openrc, config_volume,
+ cmd = 'sudo docker run %s %s %s %s %s %s %s %s /bin/bash' % \
+ (opts, envs, config, hosts_config, openrc, config_volume,
result_volume, docker_image)
dt_utils.exec_cmd(cmd, cls.logger)
ret, container_id = \
dt_utils.exec_cmd("sudo docker ps | grep " + docker_image +
" | awk '{print $1}' | head -1", cls.logger)
cls.container_list[type] = container_id
+
+ if 'sdnvpn' in str(testcase_name):
+ prefix_path = dt_cfg.dovetail_config[type]['config']['dir']
+ file_name = dt_cfg.dovetail_config['sdnvpn_image']
+ src_path = os.path.join(prefix_path, 'pre_config', file_name)
+ dest_path = '/home/opnfv/functest/images'
+ Container.pre_copy(container_id, src_path, dest_path)
return container_id
@classmethod
diff --git a/dovetail/report.py b/dovetail/report.py
index 0d83831d..b864de98 100644
--- a/dovetail/report.py
+++ b/dovetail/report.py
@@ -264,7 +264,7 @@ class FunctestCrawler(object):
"errors": error_case,
"skipped": skipped_case}
except KeyError as e:
- self.logger.error("Key error, exception: %s", e)
+ self.logger.error("Result data don't have key %s.", e)
return None
except ValueError:
continue
@@ -313,7 +313,7 @@ class YardstickCrawler(object):
def crawl_from_file(self, testcase=None):
file_path = os.path.join(dt_cfg.dovetail_config['result_dir'],
- testcase.validate_testcase() + '.out')
+ testcase.name() + '.out')
if not os.path.exists(file_path):
self.logger.info('result file not found: %s', file_path)
return None
diff --git a/dovetail/run.py b/dovetail/run.py
index a191e399..84bd88f3 100755
--- a/dovetail/run.py
+++ b/dovetail/run.py
@@ -87,14 +87,18 @@ def check_tc_result(testcase, logger):
logger.error("Fail to push results to database.")
if dt_cfg.dovetail_config['report_dest'] == "file":
if validate_type.lower() == 'yardstick':
- logger.info("Results have been stored with file %s.",
- os.path.join(result_dir,
- testcase.validate_testcase() + '.out'))
- if validate_type.lower() == 'functest':
- logger.info("Results have been stored with file %s.",
- os.path.join(result_dir, functest_result))
- result = Report.get_result(testcase)
- Report.check_result(testcase, result)
+ result_file = os.path.join(result_dir, testcase.name() + '.out')
+ elif validate_type.lower() == 'functest':
+ result_file = os.path.join(result_dir, functest_result)
+ else:
+ logger.error("Don't support %s now.", validate_type)
+ return
+ if os.path.isfile(result_file):
+ logger.info("Results have been stored with file %s.", result_file)
+ result = Report.get_result(testcase)
+ Report.check_result(testcase, result)
+ else:
+ logger.error("Fail to store results with file %s.", result_file)
def validate_input(input_dict, check_dict, logger):
@@ -176,23 +180,36 @@ def clean_results_dir():
def get_result_path():
- dovetail_home = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+ try:
+ dovetail_home = os.environ["DOVETAIL_HOME"]
+ except Exception:
+ print("ERROR: mandatory env variable 'DOVETAIL_HOME' is not found, "
+ "please set in env_config.sh and source this file before "
+ "running.")
+ return None
result_path = os.path.join(dovetail_home, 'results')
dt_cfg.dovetail_config['result_dir'] = result_path
+ pre_config_path = os.path.join(dovetail_home, 'pre_config')
+ dt_cfg.dovetail_config['config_dir'] = pre_config_path
+ return dovetail_home
-def get_userconfig_path():
+def copy_userconfig_files(logger):
dovetail_home = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
userconfig_path = os.path.join(dovetail_home, 'userconfig')
- dt_cfg.dovetail_config['userconfig_dir'] = userconfig_path
+ pre_config_path = dt_cfg.dovetail_config['config_dir']
+ if not os.path.isdir(pre_config_path):
+ os.makedirs(pre_config_path)
+ cmd = 'sudo cp -r %s/* %s' % (userconfig_path, pre_config_path)
+ dt_utils.exec_cmd(cmd, logger, exit_on_error=False)
def main(*args, **kwargs):
"""Dovetail compliance test entry!"""
build_tag = "daily-master-%s" % str(uuid.uuid4())
dt_cfg.dovetail_config['build_tag'] = build_tag
- get_result_path()
- get_userconfig_path()
+ if not get_result_path():
+ return
clean_results_dir()
if kwargs['debug']:
os.environ['DEBUG'] = 'true'
@@ -202,6 +219,7 @@ def main(*args, **kwargs):
logger.info('Dovetail compliance: %s!', (kwargs['testsuite']))
logger.info('================================================')
logger.info('Build tag: %s', dt_cfg.dovetail_config['build_tag'])
+ copy_userconfig_files(logger)
dt_utils.check_docker_version(logger)
validate_input(kwargs, dt_cfg.dovetail_config['validate_input'], logger)
configs = filter_config(kwargs, logger)
diff --git a/dovetail/test_runner.py b/dovetail/test_runner.py
index cfc49018..6ae410c1 100644
--- a/dovetail/test_runner.py
+++ b/dovetail/test_runner.py
@@ -28,17 +28,43 @@ class DockerRunner(object):
def create_log(cls):
cls.logger = dt_logger.Logger(__name__ + '.DockerRunner').getLogger()
+ def pre_copy(self, container_id=None, dest_path=None,
+ src_file=None, exist_file=None):
+ if not dest_path:
+ self.logger.error("There has no dest_path in %s config file.",
+ self.testcase.name())
+ return None
+ if src_file:
+ self.testcase.mk_src_file()
+ file_path = dt_cfg.dovetail_config[self.type]['result']['dir']
+ src_path = os.path.join(file_path, src_file)
+ if exist_file:
+ file_path = dt_cfg.dovetail_config[self.type]['config']['dir']
+ src_path = os.path.join(file_path, 'pre_config', exist_file)
+
+ Container.pre_copy(container_id, src_path, dest_path)
+ return dest_path
+
def run(self):
if dt_cfg.dovetail_config['offline']:
exist = Container.check_image_exist(self.testcase.validate_type())
if not exist:
- self.logger.error('%s image not exist offline running',
+ self.logger.error('%s image not exist when running offline',
self.testcase.validate_type())
return
else:
if not Container.pull_image(self.testcase.validate_type()):
self.logger.error("Failed to pull the image.")
return
+ # for sdnvpn, there is a need to download needed images to config_dir
+ # in dovetail_config.yml first.
+ if 'sdnvpn' in str(self.testcase.name()):
+ img_name = dt_cfg.dovetail_config['sdnvpn_image']
+ img_file = os.path.join(dt_cfg.dovetail_config['config_dir'],
+ img_name)
+ if not os.path.isfile(img_file):
+ self.logger.error('image %s not found', img_name)
+ return
container_id = Container.create(self.testcase.validate_type(),
self.testcase.name())
if not container_id:
@@ -47,12 +73,15 @@ class DockerRunner(object):
self.logger.debug('container id:%s', container_id)
- dest_path = self.testcase.pre_copy_dest_path()
- if dest_path:
- self.testcase.mk_src_file()
- src_path = self.testcase.pre_copy_src_path(self.type)
- ret, msg = Container.pre_copy(container_id, src_path,
- dest_path)
+ dest_path = self.testcase.pre_copy_path("dest_path")
+ src_file_name = self.testcase.pre_copy_path("src_file")
+ exist_file_name = self.testcase.pre_copy_path("exist_src_file")
+
+ if src_file_name or exist_file_name:
+ if not self.pre_copy(container_id, dest_path, src_file_name,
+ exist_file_name):
+ return
+
if not self.testcase.prepared():
prepare_failed = False
cmds = self.testcase.pre_condition()
diff --git a/dovetail/testcase.py b/dovetail/testcase.py
index 408599fc..2ceb8f20 100644
--- a/dovetail/testcase.py
+++ b/dovetail/testcase.py
@@ -115,24 +115,12 @@ class Testcase(object):
self.name())
return pre_condition
- def pre_copy_src_path(self, test_type):
+ def pre_copy_path(self, key_name):
try:
- pre_copy_src_file = \
- self.testcase['validate']['pre_copy']['src_file']
- result_dir = dt_cfg.dovetail_config[test_type]['result']['dir']
- except KeyError as e:
- self.logger.error('src file Key error %s', e)
- return None
- src_path = os.path.join(result_dir, pre_copy_src_file)
- return src_path
-
- def pre_copy_dest_path(self):
- try:
- pre_copy_dest_path = \
- self.testcase['validate']['pre_copy']['dest_path']
+ path = self.testcase['validate']['pre_copy'][key_name]
except KeyError:
- pre_copy_dest_path = ''
- return pre_copy_dest_path
+ return None
+ return path
def post_condition(self):
try:
@@ -148,7 +136,7 @@ class Testcase(object):
return post_condition
def mk_src_file(self):
- testcase_src_file = self.testcase['validate']['pre_copy']['src_file']
+ testcase_src_file = self.pre_copy_path('src_file')
try:
file_path = os.path.join(dt_cfg.dovetail_config['result_dir'],
testcase_src_file)
@@ -158,12 +146,10 @@ class Testcase(object):
self.logger.debug('save testcases %s', sub_test)
src_file.write(sub_test + '\n')
self.logger.debug('save testcases to %s', file_path)
+ return file_path
except Exception:
self.logger.error('Failed to save: %s', file_path)
-
- src_file_path = os.path.join(dt_cfg.dovetail_config['result_dir'],
- testcase_src_file)
- return src_file_path
+ return None
def run(self):
runner = TestRunnerFactory.create(self)
diff --git a/dovetail/testcase/ha.tc002.yml b/dovetail/testcase/ha.tc002.yml
index 393212f6..4ca78b45 100644
--- a/dovetail/testcase/ha.tc002.yml
+++ b/dovetail/testcase/ha.tc002.yml
@@ -1,10 +1,10 @@
---
dovetail.ha.tc002:
name: dovetail.ha.tc002
- objective: > # This test case will verify the high availability of controller node.
- # When one of the controller node abnormally shutdown, the service provided by it should be OK
+ objective: > # This test case will verify the high availability of the
+ # network service provided by OpenStack (neutro-server) on control node.
validate:
type: yardstick
- testcase: opnfv_yardstick_tc025
+ testcase: opnfv_yardstick_tc045
report:
sub_testcase_list:
diff --git a/dovetail/testcase/ha.tc003.yml b/dovetail/testcase/ha.tc003.yml
index 2c012b9b..b3a0bf7b 100644
--- a/dovetail/testcase/ha.tc003.yml
+++ b/dovetail/testcase/ha.tc003.yml
@@ -2,9 +2,9 @@
dovetail.ha.tc003:
name: dovetail.ha.tc003
objective: > # This test case will verify the high availability of the
- # network service provided by OpenStack (neutro-server) on control node.
+ # user service provided by OpenStack (keystone) on control node.
validate:
type: yardstick
- testcase: opnfv_yardstick_tc045
+ testcase: opnfv_yardstick_tc046
report:
sub_testcase_list:
diff --git a/dovetail/testcase/ha.tc004.yml b/dovetail/testcase/ha.tc004.yml
index e743415e..b25af983 100644
--- a/dovetail/testcase/ha.tc004.yml
+++ b/dovetail/testcase/ha.tc004.yml
@@ -2,9 +2,9 @@
dovetail.ha.tc004:
name: dovetail.ha.tc004
objective: > # This test case will verify the high availability of the
- # user service provided by OpenStack (keystone) on control node.
+ # image service provided by OpenStack (glance-api) on control node.
validate:
type: yardstick
- testcase: opnfv_yardstick_tc046
+ testcase: opnfv_yardstick_tc047
report:
sub_testcase_list:
diff --git a/dovetail/testcase/ha.tc005.yml b/dovetail/testcase/ha.tc005.yml
index bd412e98..fd6e14d5 100644
--- a/dovetail/testcase/ha.tc005.yml
+++ b/dovetail/testcase/ha.tc005.yml
@@ -2,9 +2,9 @@
dovetail.ha.tc005:
name: dovetail.ha.tc005
objective: > # This test case will verify the high availability of the
- # image service provided by OpenStack (glance-api) on control node.
+ # volume service provided by OpenStack (cinder-api) on control node.
validate:
type: yardstick
- testcase: opnfv_yardstick_tc047
+ testcase: opnfv_yardstick_tc048
report:
sub_testcase_list:
diff --git a/dovetail/testcase/ha.tc006.yml b/dovetail/testcase/ha.tc006.yml
index 52809bb9..aecbe8b2 100644
--- a/dovetail/testcase/ha.tc006.yml
+++ b/dovetail/testcase/ha.tc006.yml
@@ -1,10 +1,13 @@
---
dovetail.ha.tc006:
name: dovetail.ha.tc006
- objective: > # This test case will verify the high availability of the
- # volume service provided by OpenStack (cinder-api) on control node.
+ objective: > # This test case will verify the high availability of control node.
+ # When the CPU usage of a specified controller node is stressed to 100%,
+ # which breaks down the Openstack services on this node. These Openstack service
+ # should able to be accessed by other controller nodes, and the services on
+ # failed controller node should be isolated.
validate:
type: yardstick
- testcase: opnfv_yardstick_tc048
+ testcase: opnfv_yardstick_tc051
report:
sub_testcase_list:
diff --git a/dovetail/testcase/ha.tc007.yml b/dovetail/testcase/ha.tc007.yml
index 8a8aff71..5d985534 100644
--- a/dovetail/testcase/ha.tc007.yml
+++ b/dovetail/testcase/ha.tc007.yml
@@ -1,10 +1,12 @@
---
dovetail.ha.tc007:
name: dovetail.ha.tc007
- objective: > # This test case will verify the high availability of the
- # storage service provided by OpenStack (swift-proxy) on control node.
+ objective: > # This test case will verify the high availability of control node.
+ # When the disk I/O of a specified disk is blocked, which breaks down the Openstack
+ # services on this node. Read and write services should still be accessed by other
+ # controller nodes, and the services on failed controller node should be isolated.
validate:
type: yardstick
- testcase: opnfv_yardstick_tc049
+ testcase: opnfv_yardstick_tc052
report:
sub_testcase_list:
diff --git a/dovetail/testcase/ha.tc008.yml b/dovetail/testcase/ha.tc008.yml
index 3ee323f4..2287b8d1 100644
--- a/dovetail/testcase/ha.tc008.yml
+++ b/dovetail/testcase/ha.tc008.yml
@@ -1,13 +1,13 @@
---
dovetail.ha.tc008:
name: dovetail.ha.tc008
- objective: > # This test case will verify the high availability of control node.
- # When one of the controller failed to connect the network, which breaks down
- # the Openstack services on this node. These Openstack service should able to
- # be accessed by other controller nodes, and the services on failed controller
- # node should be isolated
+ objective: > # This test case will verify the high availability of the load balance
+ # service(current is HAProxy) that supports OpenStack on controller node. When the
+ # load balance service of a specified controller node is killed, whether other
+ # load balancers on other controller nodes will work, and whether the controller node
+ # will restart the load balancer are checked.
validate:
type: yardstick
- testcase: opnfv_yardstick_tc050
+ testcase: opnfv_yardstick_tc053
report:
sub_testcase_list:
diff --git a/dovetail/testcase/ha.tc009.yml b/dovetail/testcase/ha.tc009.yml
deleted file mode 100644
index 2625de59..00000000
--- a/dovetail/testcase/ha.tc009.yml
+++ /dev/null
@@ -1,13 +0,0 @@
----
-dovetail.ha.tc009:
- name: dovetail.ha.tc009
- objective: > # This test case will verify the high availability of control node.
- # When the CPU usage of a specified controller node is stressed to 100%,
- # which breaks down the Openstack services on this node. These Openstack service
- # should able to be accessed by other controller nodes, and the services on
- # failed controller node should be isolated.
- validate:
- type: yardstick
- testcase: opnfv_yardstick_tc051
- report:
- sub_testcase_list:
diff --git a/dovetail/testcase/ha.tc010.yml b/dovetail/testcase/ha.tc010.yml
deleted file mode 100644
index 254fa6fd..00000000
--- a/dovetail/testcase/ha.tc010.yml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-dovetail.ha.tc010:
- name: dovetail.ha.tc010
- objective: > # This test case will verify the high availability of control node.
- # When the disk I/O of a specified disk is blocked, which breaks down the Openstack
- # services on this node. Read and write services should still be accessed by other
- # controller nodes, and the services on failed controller node should be isolated.
- validate:
- type: yardstick
- testcase: opnfv_yardstick_tc052
- report:
- sub_testcase_list:
diff --git a/dovetail/testcase/ha.tc011.yml b/dovetail/testcase/ha.tc011.yml
deleted file mode 100644
index a3a91c9b..00000000
--- a/dovetail/testcase/ha.tc011.yml
+++ /dev/null
@@ -1,13 +0,0 @@
----
-dovetail.ha.tc011:
- name: dovetail.ha.tc011
- objective: > # This test case will verify the high availability of the load balance
- # service(current is HAProxy) that supports OpenStack on controller node. When the
- # load balance service of a specified controller node is killed, whether other
- # load balancers on other controller nodes will work, and whether the controller node
- # will restart the load balancer are checked.
- validate:
- type: yardstick
- testcase: opnfv_yardstick_tc053
- report:
- sub_testcase_list:
diff --git a/dovetail/testcase/ha.tc012.yml b/dovetail/testcase/ha.tc012.yml
deleted file mode 100644
index 127bf2d0..00000000
--- a/dovetail/testcase/ha.tc012.yml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-dovetail.ha.tc012:
- name: dovetail.ha.tc012
- objective: > # This test case will verify the high availability for virtual ip in the environment.
- # When master node of virtual ip is abnormally shutdown, connection to virtual ip and the
- # services binded to the virtual IP it should be OK.
- validate:
- type: yardstick
- testcase: opnfv_yardstick_tc054
- report:
- sub_testcase_list:
diff --git a/dovetail/testcase/ipv6.tc023.yml b/dovetail/testcase/ipv6.tc023.yml
index aea1a12b..8b816252 100644
--- a/dovetail/testcase/ipv6.tc023.yml
+++ b/dovetail/testcase/ipv6.tc023.yml
@@ -10,4 +10,4 @@ dovetail.ipv6.tc023:
dest_path: /home/opnfv/repos/functest/functest/opnfv_tests/openstack/tempest/custom_tests/test_list.txt
report:
sub_testcase_list:
- - tempest.scenario.test_network_v6.TestGettingAddress.test_dualnet_dhcp6_stateless_from_os[compute,id-76f26acd-9688-42b4-bc3e-cd134c4cb09e,network,slow]
+ - tempest.scenario.test_network_v6.TestGettingAddress.test_dualnet_slaac_from_os[compute,id-b6399d76-4438-4658-bcf5-0d6c8584fde2,network,slow]
diff --git a/dovetail/testcase/sdnvpn.tc001.yml b/dovetail/testcase/sdnvpn.tc001.yml
index a453838a..25a636d3 100644
--- a/dovetail/testcase/sdnvpn.tc001.yml
+++ b/dovetail/testcase/sdnvpn.tc001.yml
@@ -6,7 +6,7 @@ dovetail.sdnvpn.tc001:
type: functest
testcase: bgpvpn
pre_copy:
- src_file: sdnvpn_config_testcase1.yaml
+ exist_src_file: sdnvpn_config_testcase1.yaml
dest_path: /home/opnfv/repos/sdnvpn/sdnvpn/test/functest/config.yaml
report:
sub_testcase_list:
diff --git a/dovetail/testcase/sdnvpn.tc002.yml b/dovetail/testcase/sdnvpn.tc002.yml
index 0e4cb51e..79846513 100644
--- a/dovetail/testcase/sdnvpn.tc002.yml
+++ b/dovetail/testcase/sdnvpn.tc002.yml
@@ -6,7 +6,7 @@ dovetail.sdnvpn.tc002:
type: functest
testcase: bgpvpn
pre_copy:
- src_file: sdnvpn_config_testcase2.yaml
+ exist_src_file: sdnvpn_config_testcase2.yaml
dest_path: /home/opnfv/repos/sdnvpn/sdnvpn/test/functest/config.yaml
report:
sub_testcase_list:
diff --git a/dovetail/testcase/sdnvpn.tc003.yml b/dovetail/testcase/sdnvpn.tc003.yml
index 3da7ccd1..4ae3926d 100644
--- a/dovetail/testcase/sdnvpn.tc003.yml
+++ b/dovetail/testcase/sdnvpn.tc003.yml
@@ -6,7 +6,7 @@ dovetail.sdnvpn.tc003:
type: functest
testcase: bgpvpn
pre_copy:
- src_file: sdnvpn_config_testcase3.yaml
+ exist_src_file: sdnvpn_config_testcase3.yaml
dest_path: /home/opnfv/repos/sdnvpn/sdnvpn/test/functest/config.yaml
report:
sub_testcase_list:
diff --git a/dovetail/testcase/sdnvpn.tc004.yml b/dovetail/testcase/sdnvpn.tc004.yml
index 6e6727d2..4c7d8d46 100644
--- a/dovetail/testcase/sdnvpn.tc004.yml
+++ b/dovetail/testcase/sdnvpn.tc004.yml
@@ -6,7 +6,7 @@ dovetail.sdnvpn.tc004:
type: functest
testcase: bgpvpn
pre_copy:
- src_file: sdnvpn_config_testcase4.yaml
+ exist_src_file: sdnvpn_config_testcase4.yaml
dest_path: /home/opnfv/repos/sdnvpn/sdnvpn/test/functest/config.yaml
report:
sub_testcase_list:
diff --git a/dovetail/testcase/sdnvpn.tc008.yml b/dovetail/testcase/sdnvpn.tc008.yml
index 80b01d7b..e8050977 100644
--- a/dovetail/testcase/sdnvpn.tc008.yml
+++ b/dovetail/testcase/sdnvpn.tc008.yml
@@ -6,7 +6,7 @@ dovetail.sdnvpn.tc008:
type: functest
testcase: bgpvpn
pre_copy:
- src_file: sdnvpn_config_testcase8.yaml
+ exist_src_file: sdnvpn_config_testcase8.yaml
dest_path: /home/opnfv/repos/sdnvpn/sdnvpn/test/functest/config.yaml
report:
sub_testcase_list:
diff --git a/dovetail/utils/local_db/init_db.py b/dovetail/utils/local_db/init_db.py
index 246139c4..2aac6fc5 100644
--- a/dovetail/utils/local_db/init_db.py
+++ b/dovetail/utils/local_db/init_db.py
@@ -60,6 +60,7 @@ def cases():
post(target, c)
except:
print("useless data")
+ add_case("functest", "tempest_custom")
def add_pod(name, mode):
@@ -74,6 +75,15 @@ def add_pod(name, mode):
post(pod_url, data)
+def add_case(project, case):
+ data = {
+ "project_name": project,
+ "name": case,
+ }
+ case_url = '{}/projects/{}/cases'.format(target_url, project)
+ post(case_url, data)
+
+
if __name__ == '__main__':
pod()
project()
diff --git a/dovetail/utils/offline/config.yaml b/dovetail/utils/offline/config.yaml
new file mode 100644
index 00000000..185686a5
--- /dev/null
+++ b/dovetail/utils/offline/config.yaml
@@ -0,0 +1,28 @@
+---
+docker_images:
+ dovetail:
+ domain: opnfv
+ tag: latest
+ store_name: image_dovetail.docker
+ functest:
+ domain: opnfv
+ tag: latest
+ store_name: image_functest.docker
+ yardstick:
+ domain: opnfv
+ tag: latest
+ store_name: image_yardstick.docker
+ testapi:
+ domain: opnfv
+ tag: latest
+ store_name: image_testapi.docker
+ mongo:
+ tag: 3.5
+ store_name: image_mongo.docker
+docker_save_path: /home/opnfv/dovetail/results/
+
+wgets:
+ sdnvpn:
+ source_url: http://artifacts.opnfv.org/sdnvpn/ubuntu-16.04-server-cloudimg-amd64-disk1.img
+ save_path: /home/opnfv/dovetail/results/
+ file_name: ubuntu-16.04-server-cloudimg-amd64-disk1.img
diff --git a/dovetail/utils/offline/download.py b/dovetail/utils/offline/download.py
new file mode 100755
index 00000000..3fb0cde2
--- /dev/null
+++ b/dovetail/utils/offline/download.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python
+
+import os
+import yaml
+
+import dovetail.utils.dovetail_utils as dt_utils
+
+
+class download(object):
+
+ def __init__(self):
+ self.curr_path = os.path.dirname(os.path.abspath(__file__))
+ with open(os.path.join(self.curr_path, 'config.yaml')) as f:
+ self.config = yaml.safe_load(f)
+
+ def main(self):
+ keys = self.config.keys()
+ if 'docker_save_path' in keys:
+ save_path = self.config['docker_save_path']
+ else:
+ save_path = self.curr_path
+ print "save files to path %s" % save_path
+ if 'docker_images' in keys:
+ for key, value in self.config['docker_images'].items():
+ if value is not None:
+ tag = str(self.config['docker_images'][key]['tag'])
+ if 'domain' in self.config['docker_images'][key]:
+ domain = self.config['docker_images'][key]['domain']
+ image_name = ''.join([domain, '/', key, ':', tag])
+ else:
+ image_name = ''.join([key, ':', tag])
+ cmd = 'sudo docker pull %s' % image_name
+ dt_utils.exec_cmd(cmd)
+ if not os.path.exists(save_path):
+ os.makedirs(save_path)
+ StoreName = self.config['docker_images'][key]['store_name']
+ image_save_path = ''.join([save_path, StoreName])
+ cmd = 'sudo docker save -o %s %s' % \
+ (image_save_path, image_name)
+ dt_utils.exec_cmd(cmd)
+ cmd = 'sudo chmod og+rw %s' % image_save_path
+ dt_utils.exec_cmd(cmd)
+
+ if 'wgets' in keys:
+ for key, value in self.config['wgets'].items():
+ if value is not None:
+ wget_url = self.config['wgets'][key]['source_url']
+ wget_path = self.config['wgets'][key]['save_path']
+ cmd = 'sudo wget -nc %s -P %s' % (wget_url, wget_path)
+ dt_utils.exec_cmd(cmd)
+
+
+if __name__ == '__main__':
+ download = download()
+ download.main()
diff --git a/dovetail/utils/offline/load.py b/dovetail/utils/offline/load.py
new file mode 100755
index 00000000..c56868a5
--- /dev/null
+++ b/dovetail/utils/offline/load.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python
+
+import os
+import sys
+import yaml
+
+import dovetail.utils.dovetail_utils as dt_utils
+
+
+class load(object):
+ def __init__(self):
+ self.curr_path = os.path.dirname(os.path.abspath(__file__))
+ with open(os.path.join(self.curr_path, 'config.yaml')) as f:
+ self.config = yaml.safe_load(f)
+
+ def main(self):
+ keys = self.config.keys()
+ if 'docker_save_path' in keys:
+ save_path = self.config['docker_save_path']
+ else:
+ save_path = self.curr_path
+ if 'docker_images' in keys:
+ for key, value in self.config['docker_images'].items():
+ if value is not None:
+ name = self.config['docker_images'][key]['store_name']
+ image_save_path = os.path.join(save_path, name)
+ if os.path.isfile(image_save_path):
+ cmd = 'sudo docker load -i %s' % (image_save_path)
+ dt_utils.exec_cmd(cmd)
+ else:
+ print "file %s not exists" % image_save_path
+ if 'wgets' in keys:
+ for key, value in self.config['wgets'].items():
+ if value is not None:
+ try:
+ dovetail_home = os.environ["DOVETAIL_HOME"]
+ except KeyError:
+ print "env variable DOVETAIL_HOME not found"
+ sys.exit(1)
+ name = self.config['wgets'][key]['file_name']
+ save_path = self.config['wgets'][key]['save_path']
+ file_path = os.path.join(save_path, name)
+ dest_path = os.path.join(dovetail_home, 'pre_config')
+ if not os.path.isdir(dest_path):
+ os.mkdir(dest_path)
+ if os.path.isfile(file_path):
+ cmd = 'sudo cp %s %s' % (file_path, dest_path)
+ dt_utils.exec_cmd(cmd)
+ else:
+ print "file %s not exists" % file_path
+
+
+if __name__ == '__main__':
+ load = load()
+ load.main()
diff --git a/userconfig/hosts.yaml b/userconfig/hosts.yaml
new file mode 100644
index 00000000..e4687dfb
--- /dev/null
+++ b/userconfig/hosts.yaml
@@ -0,0 +1,2 @@
+---
+hosts_info:
diff --git a/userconfig/sample_pod.yaml b/userconfig/pod.yaml.sample
index 26636a6b..26636a6b 100644
--- a/userconfig/sample_pod.yaml
+++ b/userconfig/pod.yaml.sample