summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-extended/tempest/tempest_git.bb
diff options
context:
space:
mode:
authorAndy Ning <andy.ning@windriver.com>2014-07-16 11:37:37 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-07-30 00:50:59 -0400
commit0aec82d70fa032bfe616ea5058d504f860e241f8 (patch)
treecd88ce4f6c7ac88308b85d1ce66941877978cc51 /meta-openstack/recipes-extended/tempest/tempest_git.bb
parentceecd0d46de35111f4c3c1e65176e09cb2117ecb (diff)
downloadmeta-cloud-services-0aec82d70fa032bfe616ea5058d504f860e241f8.tar.gz
Keystone: package service/user additions
Instead of creating tenant/user/role and service/endpoint for all openstack services in keystone postinstall, now each of the services creates its own keystone identities by queueing them up in its postinstall to a file /etc/keystone/service-user-setup. service-user-setup script, when run as the last postinstall, calls identity.sh with keystone identity parameters to create necessary identities for the services. Signed-off-by: Andy Ning <andy.ning@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-extended/tempest/tempest_git.bb')
-rw-r--r--meta-openstack/recipes-extended/tempest/tempest_git.bb57
1 files changed, 56 insertions, 1 deletions
diff --git a/meta-openstack/recipes-extended/tempest/tempest_git.bb b/meta-openstack/recipes-extended/tempest/tempest_git.bb
index ff54f60..d03cbc1 100644
--- a/meta-openstack/recipes-extended/tempest/tempest_git.bb
+++ b/meta-openstack/recipes-extended/tempest/tempest_git.bb
@@ -18,6 +18,49 @@ SRCREV="064e965b70190c2446a9355a5f5e83de0df5250e"
18PV="2014.1+git${SRCPV}" 18PV="2014.1+git${SRCPV}"
19S = "${WORKDIR}/git" 19S = "${WORKDIR}/git"
20 20
21SERVICECREATE_PACKAGES = "${SRCNAME}-setup ${SRCNAME}-setup-altdemo ${SRCNAME}-setup-admin"
22KEYSTONE_HOST="${CONTROLLER_IP}"
23
24# USERCREATE_PARAM and SERVICECREATE_PARAM contain the list of parameters to be set.
25# If the flag for a parameter in the list is not set here, the default value will be given to that parameter.
26# Parameters not in the list will be set to empty.
27
28# create demo user
29USERCREATE_PARAM_${SRCNAME}-setup = "name pass tenant role email"
30python () {
31 flags = {'name':'demo',\
32 'pass':'password',\
33 'tenant':'demo',\
34 'role':'${MEMBER_ROLE}',\
35 'email':'demo@domain.com',\
36 }
37 d.setVarFlags("USERCREATE_PARAM_%s-setup" % d.getVar('SRCNAME',True), flags)
38}
39
40# create alt-demo user
41USERCREATE_PARAM_${SRCNAME}-setup-altdemo = "name pass tenant role email"
42python () {
43 flags = {'name':'alt_demo',\
44 'pass':'password',\
45 'tenant':'alt_demo',\
46 'role':'${MEMBER_ROLE}',\
47 'email':'alt_demo@domain.com',\
48 }
49 d.setVarFlags("USERCREATE_PARAM_%s-setup-altdemo" % d.getVar('SRCNAME',True), flags)
50}
51
52# add admin user to demo tenant as admin role
53USERCREATE_PARAM_${SRCNAME}-setup-admin = "name pass tenant role email"
54python () {
55 flags = {'name':'${ADMIN_USER}',\
56 'pass':'${ADMIN_PASSWORD}',\
57 'tenant':'demo',\
58 'role':'${ADMIN_ROLE}',\
59 'email':'${ADMIN_USER_EMAIL}',\
60 }
61 d.setVarFlags("USERCREATE_PARAM_%s-setup-admin" % d.getVar('SRCNAME',True), flags)
62}
63
21do_install_append() { 64do_install_append() {
22 TEMPLATE_CONF_DIR=${S}${sysconfdir}/ 65 TEMPLATE_CONF_DIR=${S}${sysconfdir}/
23 TEMPEST_CONF_DIR=${D}${sysconfdir}/${SRCNAME} 66 TEMPEST_CONF_DIR=${D}${sysconfdir}/${SRCNAME}
@@ -57,7 +100,11 @@ do_install_append() {
57 cp -r tools ${TEMPEST_CONF_DIR} 100 cp -r tools ${TEMPEST_CONF_DIR}
58} 101}
59 102
60PACKAGES =+ "${SRCNAME}-tests" 103PACKAGES =+ "${SRCNAME}-tests \
104 ${SRCNAME}-setup \
105 ${SRCNAME}-setup-altdemo \
106 ${SRCNAME}-setup-admin \
107 "
61 108
62FILES_${SRCNAME}-tests = "${sysconfdir}/${SRCNAME}/tests/*" 109FILES_${SRCNAME}-tests = "${sysconfdir}/${SRCNAME}/tests/*"
63 110
@@ -65,8 +112,16 @@ FILES_${PN} = "${libdir}/* \
65 ${sysconfdir}/* \ 112 ${sysconfdir}/* \
66 ${bindir}/* \ 113 ${bindir}/* \
67" 114"
115
116ALLOW_EMPTY_${SRCNAME}-setup = "1"
117ALLOW_EMPTY_${SRCNAME}-setup-altdemo = "1"
118ALLOW_EMPTY_${SRCNAME}-setup-admin = "1"
119
68RDEPENDS_${PN} += " \ 120RDEPENDS_${PN} += " \
69 ${SRCNAME}-tests \ 121 ${SRCNAME}-tests \
122 ${SRCNAME}-setup \
123 ${SRCNAME}-setup-altdemo \
124 ${SRCNAME}-setup-admin \
70 python-mox \ 125 python-mox \
71 python-mock \ 126 python-mock \
72 python-hp3parclient \ 127 python-hp3parclient \