summaryrefslogtreecommitdiffstats
path: root/meta-openstack-controller-test-config/recipes-devtools
diff options
context:
space:
mode:
authorVu Tran <vu.tran@windriver.com>2014-05-23 22:10:37 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-05-26 11:30:08 -0400
commit148c4dbfcbb5f53adafe4b0e1bd3de0b98d3a641 (patch)
tree3a0d2aefae5db62615e2f0ac0a7e026078a76a4e /meta-openstack-controller-test-config/recipes-devtools
parenta5c4f51c857fde56a86a48509b273e2cfcdcb610 (diff)
downloadmeta-cloud-services-148c4dbfcbb5f53adafe4b0e1bd3de0b98d3a641.tar.gz
cinder controller test config
Change cinder config to remove nfsdriver. For example testcase tempest.api.volume.test_volumes_snapshots.VolumesSnapshotTest.test_snapshot_create_get_list_update_delete fail because nfs volume doesn't support snapshot functions. If "cinder create" without providing volume type, cinder-scheduler will based on filter to pick out the most appropriate backend storage (which is the storage with most free space) and in our case nfs backend is chosen, and therefore this test will fail. Also to have startup script to make sure that the cinder volume types are added into Cinder Signed-off-by: Vu Tran <vu.tran@windriver.com>
Diffstat (limited to 'meta-openstack-controller-test-config/recipes-devtools')
-rw-r--r--meta-openstack-controller-test-config/recipes-devtools/python/python-cinder/cinder-test-config.init34
-rw-r--r--meta-openstack-controller-test-config/recipes-devtools/python/python-cinder_git.bbappend21
2 files changed, 55 insertions, 0 deletions
diff --git a/meta-openstack-controller-test-config/recipes-devtools/python/python-cinder/cinder-test-config.init b/meta-openstack-controller-test-config/recipes-devtools/python/python-cinder/cinder-test-config.init
new file mode 100644
index 0000000..1c6936f
--- /dev/null
+++ b/meta-openstack-controller-test-config/recipes-devtools/python/python-cinder/cinder-test-config.init
@@ -0,0 +1,34 @@
1#!/bin/sh
2
3### BEGIN INIT INFO
4# Provides:
5# Required-Start: $remote_fs $network $syslog
6# Required-Stop: $remote_fs $syslog
7# Default-Start: 2 3 4 5
8# Default-Stop: 0 1 6
9# Short-Description: Cinder Test Config
10# Description: OpenStack Cinder Test Config
11### END INIT INFO
12
13
14start()
15{
16 sleep 2
17 source /etc/nova/openrc
18 /etc/cinder/add-cinder-volume-types.sh > /dev/null 2>&1
19}
20
21case "$1" in
22 start)
23 start
24 ;;
25 stop|force-reload|restart|reload|status)
26 echo "WARNING: command $1 is not supported"
27 ;;
28 *)
29 echo "Usage: $0 {start|stop|force-reload|restart|reload|status}"
30 exit 1
31 ;;
32esac
33
34exit 0
diff --git a/meta-openstack-controller-test-config/recipes-devtools/python/python-cinder_git.bbappend b/meta-openstack-controller-test-config/recipes-devtools/python/python-cinder_git.bbappend
new file mode 100644
index 0000000..5003336
--- /dev/null
+++ b/meta-openstack-controller-test-config/recipes-devtools/python/python-cinder_git.bbappend
@@ -0,0 +1,21 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2
3SRC_URI += " file://cinder-test-config.init"
4
5do_install_prepend() {
6 # Remove nfs cinder-volume backend driver
7 sed -e "s/nfsdriver,//" -i ${WORKDIR}/cinder.conf
8}
9
10do_install_append() {
11 install -m 0755 ${WORKDIR}/cinder-test-config.init ${D}${sysconfdir}/init.d/cinder-test-config
12}
13
14PACKAGES += " ${SRCNAME}-test-config"
15FILES_${SRCNAME}-test-config = "${sysconfdir}/init.d/cinder-test-config"
16
17RDEPENDS_${SRCNAME}-tests += " ${SRCNAME}-test-config"
18
19INITSCRIPT_PACKAGES += " ${SRCNAME}-test-config"
20INITSCRIPT_NAME_${SRCNAME}-test-config = "cinder-test-config"
21INITSCRIPT_PARAMS_${SRCNAME}-test-config = "defaults 95 10"