summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/testing/developer/testcaserequirements/index.rst14
-rw-r--r--dovetail/compliance/proposed_tests.yml6
-rw-r--r--dovetail/conf/dovetail_config.yml5
-rw-r--r--dovetail/container.py15
-rwxr-xr-xdovetail/run.py9
-rw-r--r--dovetail/testcase/sdnvpn.tc001.yml12
-rw-r--r--dovetail/testcase/sdnvpn.tc002.yml12
-rw-r--r--dovetail/testcase/sdnvpn.tc003.yml12
-rw-r--r--dovetail/testcase/sdnvpn.tc004.yml12
-rw-r--r--dovetail/testcase/sdnvpn.tc008.yml12
-rw-r--r--dovetail/utils/dovetail_utils.py4
-rw-r--r--userconfig/sdnvpn_config_testcase1.yaml33
-rw-r--r--userconfig/sdnvpn_config_testcase2.yaml43
-rw-r--r--userconfig/sdnvpn_config_testcase3.yaml32
-rw-r--r--userconfig/sdnvpn_config_testcase4.yaml33
-rw-r--r--userconfig/sdnvpn_config_testcase8.yaml29
16 files changed, 262 insertions, 21 deletions
diff --git a/docs/testing/developer/testcaserequirements/index.rst b/docs/testing/developer/testcaserequirements/index.rst
index 5dc87713..38eb93a1 100644
--- a/docs/testing/developer/testcaserequirements/index.rst
+++ b/docs/testing/developer/testcaserequirements/index.rst
@@ -9,17 +9,6 @@ Compliance and Verification program test case requirements
.. toctree::
:maxdepth: 2
-Version history
-===============
-
-+------------+----------+------------------+----------------------------------+
-| **Date** | **Ver.** | **Author** | **Comment** |
-| | | | |
-+------------+----------+------------------+----------------------------------+
-| 2017-03-15 | 0.0.1 | Chris Price | Draft version |
-| | | | |
-+------------+----------+------------------+----------------------------------+
-
CVP Test Suite Purpose and Goals
================================
@@ -69,12 +58,13 @@ The following requirements are mandatory for test to be submitted for considerat
- Use case specification
- Test preconditions
- Basic test flow execution descriptor
- - Post conditions and pass fail criteria
+ - Pass fail criteria
- The following things may be documented for the test case:
- Parameter border test cases descriptions
- Fault/Error test case descriptions
+ - Post conditions where the system state may be left changed after completion
New test case proposals should complete a CVP test case worksheet to ensure that all
of these considerations are met before the test case is approved for inclusion in the
diff --git a/dovetail/compliance/proposed_tests.yml b/dovetail/compliance/proposed_tests.yml
index aaaa2023..cc4bfa8c 100644
--- a/dovetail/compliance/proposed_tests.yml
+++ b/dovetail/compliance/proposed_tests.yml
@@ -45,3 +45,9 @@ proposed_tests:
- dovetail.ha.tc009
# - dovetail.ha.tc010
# - dovetail.ha.tc011
+ # sdnvpn
+ - dovetail.sdnvpn.tc001
+ - dovetail.sdnvpn.tc002
+ - dovetail.sdnvpn.tc003
+ - dovetail.sdnvpn.tc004
+ - dovetail.sdnvpn.tc008
diff --git a/dovetail/conf/dovetail_config.yml b/dovetail/conf/dovetail_config.yml
index 332628a2..934ff6a6 100644
--- a/dovetail/conf/dovetail_config.yml
+++ b/dovetail/conf/dovetail_config.yml
@@ -1,7 +1,8 @@
---
-report_file: 'dovetail_report.txt'
+# report_file: 'dovetail_report.txt'
cli_file_name: 'cmd_config.yml'
report_dest: 'file'
+result_file: 'results.json'
# OPENSTACK Credential file
openrc: '/home/opnfv/dovetail/openrc.sh'
@@ -20,6 +21,7 @@ testarea_supported:
- ha
- ipv6
- nfvi
+ - sdnvpn
- vimops
functest_testsuite:
@@ -31,6 +33,7 @@ functest_testsuite:
- promise
functest_testcase:
+ - bgpvpn
- connection_check
- api_check
- snaps_health_check
diff --git a/dovetail/container.py b/dovetail/container.py
index 5c128c0b..ae7c8e2e 100644
--- a/dovetail/container.py
+++ b/dovetail/container.py
@@ -59,12 +59,19 @@ class Container(object):
# set functest envs and TEST_DB_URL for creating functest container
@staticmethod
- def set_functest_config():
+ def set_functest_config(testcase_name):
# These are all just used by Functest's function push_results_to_db.
# And has nothing to do with DoveTail running test cases.
- ins_type = " -e INSTALLER_TYPE=unknown"
- scenario = " -e DEPLOY_SCENARIO=unknown"
+ ins_type = os.getenv('INSTALLER_TYPE', "unknown")
+ scenario = os.getenv('DEPLOY_SCENARIO', "unknown")
+ ins_type = ''.join([" -e INSTALLER_TYPE=", ins_type])
+ scenario = ''.join([" -e DEPLOY_SCENARIO=", scenario])
+ # vpn testcase only runs when scenario name includes bgpvpn
+ # functest requirements
+ if 'sdnvpn' in testcase_name:
+ ins_type = "-e INSTALLER_TYPE=netvirt"
+ scenario = " -e DEPLOY_SCENARIO=bgpvpn"
node = " -e NODE_NAME=master"
envs = "%s %s %s" % (ins_type, scenario, node)
@@ -122,7 +129,7 @@ class Container(object):
config = ""
if type.lower() == "functest":
- config = cls.set_functest_config()
+ config = cls.set_functest_config(testcase_name)
if type.lower() == "yardstick":
config = cls.set_yardstick_config()
if not config:
diff --git a/dovetail/run.py b/dovetail/run.py
index 4bea9b53..5b4dca8e 100755
--- a/dovetail/run.py
+++ b/dovetail/run.py
@@ -74,17 +74,20 @@ def check_tc_result(testcase, logger):
result_dir = dt_cfg.dovetail_config['result_dir']
validate_type = testcase.validate_type()
functest_result = dt_cfg.dovetail_config['functest']['result']['file_path']
+ dovetail_result = os.path.join(result_dir,
+ dt_cfg.dovetail_config['result_file'])
if dt_cfg.dovetail_config['report_dest'].startswith("http"):
if validate_type.lower() == 'yardstick':
logger.info("Results have been stored with file %s.",
os.path.join(result_dir,
testcase.validate_testcase() + '.out'))
else:
- if dt_utils.check_db_results(dt_cfg.dovetail_config['report_dest'],
+ if dt_utils.store_db_results(dt_cfg.dovetail_config['report_dest'],
dt_cfg.dovetail_config['build_tag'],
- testcase.name(),
+ testcase.name(), dovetail_result,
logger):
- logger.info("Results have been pushed to database.")
+ logger.info("Results have been pushed to database and stored "
+ "with local file %s.", dovetail_result)
else:
logger.error("Fail to push results to database.")
if dt_cfg.dovetail_config['report_dest'] == "file":
diff --git a/dovetail/testcase/sdnvpn.tc001.yml b/dovetail/testcase/sdnvpn.tc001.yml
new file mode 100644
index 00000000..a453838a
--- /dev/null
+++ b/dovetail/testcase/sdnvpn.tc001.yml
@@ -0,0 +1,12 @@
+---
+dovetail.sdnvpn.tc001:
+ name: dovetail.sdnvpn.tc001
+ objective: Connectivity between Neutron subnets through association of Neutron Networks to VPNs
+ validate:
+ type: functest
+ testcase: bgpvpn
+ pre_copy:
+ 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
new file mode 100644
index 00000000..0e4cb51e
--- /dev/null
+++ b/dovetail/testcase/sdnvpn.tc002.yml
@@ -0,0 +1,12 @@
+---
+dovetail.sdnvpn.tc002:
+ name: dovetail.sdnvpn.tc002
+ objective: Separation of tenant networks through association to different VPNs
+ validate:
+ type: functest
+ testcase: bgpvpn
+ pre_copy:
+ 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
new file mode 100644
index 00000000..3da7ccd1
--- /dev/null
+++ b/dovetail/testcase/sdnvpn.tc003.yml
@@ -0,0 +1,12 @@
+---
+dovetail.sdnvpn.tc003:
+ name: dovetail.sdnvpn.tc003
+ objective: Data center gateway integration through BGP peering
+ validate:
+ type: functest
+ testcase: bgpvpn
+ pre_copy:
+ 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
new file mode 100644
index 00000000..6e6727d2
--- /dev/null
+++ b/dovetail/testcase/sdnvpn.tc004.yml
@@ -0,0 +1,12 @@
+---
+dovetail.sdnvpn.tc004:
+ name: dovetail.sdnvpn.tc004
+ objective: VPN provides connectivity between subnets using association of Neutron Router to VPNs
+ validate:
+ type: functest
+ testcase: bgpvpn
+ pre_copy:
+ 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
new file mode 100644
index 00000000..80b01d7b
--- /dev/null
+++ b/dovetail/testcase/sdnvpn.tc008.yml
@@ -0,0 +1,12 @@
+---
+dovetail.sdnvpn.tc008:
+ name: dovetail.sdnvpn.tc008
+ objective: associate Neutron Router with an attached subnet to a VPN and verify reachability of the Floating IP
+ validate:
+ type: functest
+ testcase: bgpvpn
+ pre_copy:
+ 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/dovetail_utils.py b/dovetail/utils/dovetail_utils.py
index 83390e9d..e6a775f1 100644
--- a/dovetail/utils/dovetail_utils.py
+++ b/dovetail/utils/dovetail_utils.py
@@ -132,12 +132,14 @@ def get_ext_net_name(env_file, logger=None):
return None
-def check_db_results(db_url, build_tag, testcase, logger):
+def store_db_results(db_url, build_tag, testcase, dest_file, logger):
url = "%s?build_tag=%s-%s" % (db_url, build_tag, testcase)
logger.debug("Query to rest api: %s", url)
try:
data = json.load(urllib2.urlopen(url))
if data['results']:
+ with open(dest_file, 'a') as f:
+ f.write(json.dumps(data['results'][0]) + '\n')
return True
else:
return False
diff --git a/userconfig/sdnvpn_config_testcase1.yaml b/userconfig/sdnvpn_config_testcase1.yaml
new file mode 100644
index 00000000..d9e4a1b4
--- /dev/null
+++ b/userconfig/sdnvpn_config_testcase1.yaml
@@ -0,0 +1,33 @@
+defaults:
+ flavor: m1.tiny # adapt to your environment
+
+testcases:
+ tempest:
+ enabled: true
+ description: Neutron BGPVPN tests in tempest
+ testname_db: functest_tempest # declared name in the test api
+ # http://testresults.opnfv.org/test/api/v1/projects/sdnvpn/cases
+
+ testcase_1:
+ enabled: true
+ description: VPN provides connectivity between subnets
+ testname_db: functest_testcase_1
+ instance_1_name: sdnvpn-1-1
+ instance_2_name: sdnvpn-1-2
+ instance_3_name: sdnvpn-1-3
+ instance_4_name: sdnvpn-1-4
+ instance_5_name: sdnvpn-1-5
+ image_name: sdnvpn-image
+ net_1_name: sdnvpn-1-1-net
+ subnet_1_name: sdnvpn-1-1-subnet
+ subnet_1_cidr: 10.10.10.0/24
+ router_1_name: sdnvpn-1-1-router
+ net_2_name: sdnvpn-1-2-net
+ subnet_2_name: sdnvpn-1-2-subnet
+ subnet_2_cidr: 10.10.11.0/24
+ router_2_name: sdnvpn-1-2-router
+ secgroup_name: sdnvpn-sg
+ secgroup_descr: Security group for SDNVPN test cases
+ targets1: '88:88'
+ targets2: '55:55'
+ route_distinguishers: '11:11'
diff --git a/userconfig/sdnvpn_config_testcase2.yaml b/userconfig/sdnvpn_config_testcase2.yaml
new file mode 100644
index 00000000..07b0adfa
--- /dev/null
+++ b/userconfig/sdnvpn_config_testcase2.yaml
@@ -0,0 +1,43 @@
+defaults:
+ flavor: m1.tiny # adapt to your environment
+
+testcases:
+ tempest:
+ enabled: true
+ description: Neutron BGPVPN tests in tempest
+ testname_db: functest_tempest # declared name in the test api
+ # http://testresults.opnfv.org/test/api/v1/projects/sdnvpn/cases
+
+ testcase_2:
+ enabled: true
+ description: Tenant separation
+ testname_db: functest_testcase_2
+ instance_1_name: sdnvpn-2-1
+ instance_2_name: sdnvpn-2-2
+ instance_3_name: sdnvpn-2-3
+ instance_4_name: sdnvpn-2-4
+ instance_5_name: sdnvpn-2-5
+ instance_1_ip: 10.10.10.11
+ instance_2_ip: 10.10.10.12
+ instance_3_ip: 10.10.11.13
+ instance_4_ip: 10.10.10.12
+ instance_5_ip: 10.10.11.13
+ image_name: sdnvpn-image
+ net_1_name: sdnvpn-2-1-net
+ subnet_1a_name: sdnvpn-2-1a-subnet
+ subnet_1a_cidr: 10.10.10.0/24
+ subnet_1b_name: sdnvpn-2-1b-subnet
+ subnet_1b_cidr: 10.10.11.0/24
+ router_1_name: sdnvpn-2-1-router
+ net_2_name: sdnvpn-2-2-net
+ subnet_2a_name: sdnvpn-2-2a-subnet
+ subnet_2a_cidr: 10.10.11.0/24
+ subnet_2b_name: sdnvpn-2-2b-subnet
+ subnet_2b_cidr: 10.10.10.0/24
+ router_2_name: sdnvpn-2-2-router
+ secgroup_name: sdnvpn-sg
+ secgroup_descr: Security group for SDNVPN test cases
+ targets1: '88:88'
+ targets2: '55:55'
+ route_distinguishers1: '111:111'
+ route_distinguishers2: '222:222'
diff --git a/userconfig/sdnvpn_config_testcase3.yaml b/userconfig/sdnvpn_config_testcase3.yaml
new file mode 100644
index 00000000..60592cbb
--- /dev/null
+++ b/userconfig/sdnvpn_config_testcase3.yaml
@@ -0,0 +1,32 @@
+defaults:
+ flavor: m1.tiny # adapt to your environment
+
+testcases:
+ tempest:
+ enabled: true
+ description: Neutron BGPVPN tests in tempest
+ testname_db: functest_tempest # declared name in the test api
+ # http://testresults.opnfv.org/test/api/v1/projects/sdnvpn/cases
+
+ testcase_3:
+ enabled: true
+ description: Data center gateway integration
+ testname_db: functest_testcase_3
+ secgroup_name: sdnvpn-sg
+ secgroup_descr: Security group for SDNVPN test cases
+ image_name: sdnvpn-image
+ ubuntu_image_name: sdnvpn-ubuntu-image
+ net_1_name: sdnvpn-3-1-net
+ subnet_1_name: sdnvpn-3-1-subnet
+ subnet_1_cidr: 10.10.10.0/24
+ router_1_name: sdnvpn-3-1-router
+ quagga_net_name: sdnvpn-3-2-quagga-net
+ quagga_subnet_name: sdnvpn-3-2-quagga-subnet
+ quagga_subnet_cidr: 10.10.11.0/24
+ quagga_router_name: sdnvpn-3-2-quagga-router
+ quagga_instance_name: sdnvpn-3-2-quagga
+ quagga_instance_ip: 10.10.11.5
+ instance_1_name: sdnvpn-3-1
+ instance_1_ip: 10.10.10.5
+ import_targets: '31:31'
+ export_targets: '32:32'
diff --git a/userconfig/sdnvpn_config_testcase4.yaml b/userconfig/sdnvpn_config_testcase4.yaml
new file mode 100644
index 00000000..1e221354
--- /dev/null
+++ b/userconfig/sdnvpn_config_testcase4.yaml
@@ -0,0 +1,33 @@
+defaults:
+ flavor: m1.tiny # adapt to your environment
+
+testcases:
+ tempest:
+ enabled: true
+ description: Neutron BGPVPN tests in tempest
+ testname_db: functest_tempest # declared name in the test api
+ # http://testresults.opnfv.org/test/api/v1/projects/sdnvpn/cases
+
+ testcase_4:
+ enabled: true
+ description: VPN provides connectivity between subnets using router association
+ testname_db: functest_testcase_4
+ instance_1_name: sdnvpn-4-1
+ instance_2_name: sdnvpn-4-2
+ instance_3_name: sdnvpn-4-3
+ instance_4_name: sdnvpn-4-4
+ instance_5_name: sdnvpn-4-5
+ image_name: sdnvpn-image
+ net_1_name: sdnvpn-4-1-net
+ subnet_1_name: sdnvpn-4-1-subnet
+ subnet_1_cidr: 10.10.10.0/24
+ router_1_name: sdnvpn-4-1-router
+ net_2_name: sdnvpn-4-2-net
+ subnet_2_name: sdnvpn-4-2-subnet
+ subnet_2_cidr: 10.10.11.0/24
+ router_2_name: sdnvpn-4-2-router
+ secgroup_name: sdnvpn-sg
+ secgroup_descr: Security group for SDNVPN test cases
+ targets1: '88:88'
+ targets2: '55:55'
+ route_distinguishers: '12:12'
diff --git a/userconfig/sdnvpn_config_testcase8.yaml b/userconfig/sdnvpn_config_testcase8.yaml
new file mode 100644
index 00000000..c825997b
--- /dev/null
+++ b/userconfig/sdnvpn_config_testcase8.yaml
@@ -0,0 +1,29 @@
+defaults:
+ flavor: m1.tiny # adapt to your environment
+
+testcases:
+ tempest:
+ enabled: true
+ description: Neutron BGPVPN tests in tempest
+ testname_db: functest_tempest # declared name in the test api
+ # http://testresults.opnfv.org/test/api/v1/projects/sdnvpn/cases
+
+ testcase_8:
+ enabled: true
+ description: Test floating IP and router assoc coexistence
+ testname_db: functest_testcase_8
+ image_name: sdnvpn-image
+ instance_1_name: sdnvpn-8-1
+ instance_2_name: sdnvpn-8-2
+ net_1_name: sdnvpn-8-1
+ subnet_1_name: sdnvpn-8-1-subnet
+ subnet_1_cidr: 10.10.10.0/24
+ router_1_name: sdnvpn-8-1-router
+ net_2_name: sdnvpn-8-2
+ subnet_2_name: sdnvpn-8-2-subnet
+ subnet_2_cidr: 10.10.20.0/24
+ router_2_name: sdnvpn-8-2-router
+ secgroup_name: sdnvpn-sg
+ secgroup_descr: Security group for SDNVPN test cases
+ targets: '88:88'
+ route_distinguishers: '18:18'