aboutsummaryrefslogtreecommitdiffstats
path: root/functest/ci
diff options
context:
space:
mode:
Diffstat (limited to 'functest/ci')
-rwxr-xr-xfunctest/ci/check_os.sh63
-rwxr-xr-xfunctest/ci/config_functest.yaml2
-rw-r--r--functest/ci/installer_params.yaml16
-rwxr-xr-xfunctest/ci/prepare_env.py31
-rwxr-xr-xfunctest/ci/testcases.yaml35
5 files changed, 125 insertions, 22 deletions
diff --git a/functest/ci/check_os.sh b/functest/ci/check_os.sh
index b875a173..2c5c021c 100755
--- a/functest/ci/check_os.sh
+++ b/functest/ci/check_os.sh
@@ -6,6 +6,16 @@
# jose.lausuch@ericsson.com
#
+declare -A service_cmd_array
+service_cmd_array['nova']='openstack server list'
+service_cmd_array['neutron']='openstack network list'
+service_cmd_array['keystone']='openstack endpoint list'
+service_cmd_array['cinder']='openstack volume list'
+service_cmd_array['glance']='openstack image list'
+
+MANDATORY_SERVICES='nova neutron keystone glance'
+OPTIONAL_SERVICES='cinder'
+
verify_connectivity() {
for i in $(seq 0 9); do
if echo "test" | nc -v -w 10 $1 $2 &>/dev/null; then
@@ -16,6 +26,34 @@ verify_connectivity() {
return 1
}
+check_service() {
+ local service cmd
+ service=$1
+ cmd=${service_cmd_array[$service]}
+ if [ -z "$2" ]; then
+ required='false'
+ else
+ required=$2
+ fi
+ echo ">>Checking ${service} service..."
+ if ! openstack service list | grep -i ${service} > /dev/null; then
+ if [ "$required" == 'false' ]; then
+ echo "WARN: Optional Service ${service} is not enabled!"
+ return
+ else
+ echo "ERROR: Required Service ${service} is not enabled!"
+ exit 1
+ fi
+ fi
+ $cmd &>/dev/null
+ result=$?
+ if [ $result -ne 0 ]; then
+ echo "ERROR: Failed execution $cmd. The $service does not seem to be working."
+ exit 1
+ else
+ echo " ...OK"
+ fi
+}
if [ -z $OS_AUTH_URL ];then
echo "ERROR: OS_AUTH_URL environment variable missing... Have you sourced the OpenStack credentials?"
@@ -56,25 +94,16 @@ fi
echo " ...OK"
-echo "Checking OpenStack basic services:"
-commands=('openstack endpoint list' 'openstack server list' 'openstack network list' \
- 'openstack image list' 'openstack volume list')
-for cmd in "${commands[@]}"
-do
- service=$(echo $cmd | awk '{print $1, $2}')
- echo ">>Checking $service service..."
- $cmd &>/dev/null
- result=$?
- if [ $result -ne 0 ];
- then
- echo "ERROR: Failed execution $cmd. The $service does not seem to be working."
- exit 1
- else
- echo " ...OK"
- fi
+echo "Checking Required OpenStack services:"
+for service in $MANDATORY_SERVICES; do
+ check_service $service "true"
done
+echo "Required OpenStack services are OK."
-echo "OpenStack services are OK."
+echo "Checking Optional OpenStack services:"
+for service in $OPTIONAL_SERVICES; do
+ check_service $service
+done
echo "Checking External network..."
networks=($(neutron net-list -F id | tail -n +4 | head -n -1 | awk '{print $2}'))
diff --git a/functest/ci/config_functest.yaml b/functest/ci/config_functest.yaml
index d0442cf9..3bad1b8f 100755
--- a/functest/ci/config_functest.yaml
+++ b/functest/ci/config_functest.yaml
@@ -20,6 +20,8 @@ general:
repo_sfc: /home/opnfv/repos/sfc
dir_repo_onos: /home/opnfv/repos/onos
repo_promise: /home/opnfv/repos/promise
+ repo_netready: /home/opnfv/repos/netready
+ repo_barometer: /home/opnfv/repos/barometer
repo_doctor: /home/opnfv/repos/doctor
repo_copper: /home/opnfv/repos/copper
dir_repo_ovno: /home/opnfv/repos/ovno
diff --git a/functest/ci/installer_params.yaml b/functest/ci/installer_params.yaml
new file mode 100644
index 00000000..bffa894e
--- /dev/null
+++ b/functest/ci/installer_params.yaml
@@ -0,0 +1,16 @@
+apex:
+ ip: ''
+ user: 'stack'
+ pkey: '/root/.ssh/id_rsa'
+#compass:
+# ip: ''
+# user: 'root'
+# password: 'root'
+fuel:
+ ip: '10.20.0.2'
+ user: 'root'
+ password: 'r00tme'
+#joid:
+# ip: ''
+# user: ''
+# password: ''
diff --git a/functest/ci/prepare_env.py b/functest/ci/prepare_env.py
index ba34976a..86e92291 100755
--- a/functest/ci/prepare_env.py
+++ b/functest/ci/prepare_env.py
@@ -14,13 +14,15 @@ import subprocess
import sys
import yaml
-from opnfv.utils import constants as opnfv_constants
import functest.utils.functest_logger as ft_logger
import functest.utils.functest_utils as ft_utils
import functest.utils.openstack_utils as os_utils
from functest.utils.constants import CONST
+from opnfv.utils import constants as opnfv_constants
+from opnfv.deployment import factory
+
actions = ['start', 'check']
""" logging configuration """
@@ -281,6 +283,32 @@ def check_environment():
logger.info("Functest environment is installed.")
+def print_deployment_info():
+ installer_params_yaml = os.path.join(CONST.dir_repo_functest,
+ 'functest/ci/installer_params.yaml')
+ if (CONST.INSTALLER_IP and CONST.INSTALLER_TYPE and
+ CONST.INSTALLER_TYPE in opnfv_constants.INSTALLERS):
+ installer_params = ft_utils.get_parameter_from_yaml(
+ CONST.INSTALLER_TYPE, installer_params_yaml)
+
+ user = installer_params.get('user', None)
+ password = installer_params.get('password', None)
+ pkey = installer_params.get('pkey', None)
+
+ try:
+ handler = factory.Factory.get_handler(
+ installer=CONST.INSTALLER_TYPE,
+ installer_ip=CONST.INSTALLER_IP,
+ installer_user=user,
+ installer_pwd=password,
+ pkey_file=pkey)
+ if handler:
+ logger.info('\n\nDeployment information:\n%s' %
+ handler.get_deployment_info())
+ except Exception as e:
+ logger.debug("Cannot get deployment information. %s" % e)
+
+
def main(**kwargs):
try:
if not (kwargs['action'] in actions):
@@ -299,6 +327,7 @@ def main(**kwargs):
with open(CONST.env_active, "w") as env_file:
env_file.write("1")
check_environment()
+ print_deployment_info()
elif kwargs['action'] == "check":
check_environment()
except Exception as e:
diff --git a/functest/ci/testcases.yaml b/functest/ci/testcases.yaml
index 3ff503cb..a2633fcf 100755
--- a/functest/ci/testcases.yaml
+++ b/functest/ci/testcases.yaml
@@ -336,6 +336,33 @@ tiers:
run:
module: 'functest.opnfv_tests.features.orchestrator.orchestra'
class: 'OpenbatonOrchestrator'
+ -
+ name: netready
+ criteria: 'status == "PASS"'
+ blocking: false
+ description: >-
+ Test suite from Netready project.
+ dependencies:
+ installer: 'apex'
+ scenario: 'gluon'
+ run:
+ module: 'functest.opnfv_tests.features.netready'
+ class: 'GluonVping'
+ -
+ name: barometer
+ criteria: 'status == "PASS"'
+ blocking: false
+ description: >-
+ Test suite for the Barometer project. Separate tests verify the
+ proper configuration and functionality of the following
+ collectd plugins Ceilometer, Hugepages, Memory RAS (mcelog),
+ and OVS Events
+ dependencies:
+ installer: 'fuel'
+ scenario: 'kvm_ovs_dpdk_bar'
+ run:
+ module: 'functest.opnfv_tests.features.barometer'
+ class: 'BarometerCollectd'
-
name: components
order: 3
@@ -375,7 +402,7 @@ tiers:
-
name: vnf
order: 4
- ci_loop: '(daily)|(weekly)'
+ ci_loop: 'weekly'
description : >-
Collection of VNF test cases.
testcases:
@@ -388,7 +415,7 @@ tiers:
using the Cloudify orchestrator. It also runs some signaling traffic.
dependencies:
installer: ''
- scenario: 'nosdn-nofeature'
+ scenario: '(ocl)|(nosdn)|^(os-odl)((?!bgpvpn).)*$'
run:
module: 'functest.opnfv_tests.vnf.ims.cloudify_ims'
class: 'ImsVnf'
@@ -399,8 +426,8 @@ tiers:
description: >-
Test suite from Parser project.
dependencies:
- installer: 'unknown'
- scenario: 'unknown'
+ installer: ''
+ scenario: ''
run:
module: 'functest.opnfv_tests.vnf.aaa.aaa'
class: 'AaaVnf'