summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python
diff options
context:
space:
mode:
authorMihai Prica <prica.mihai@gmail.com>2013-07-15 13:50:33 +0300
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-08-28 18:41:58 -0400
commitf5e9ca889942455d8bfcbc49824dd475d547cd38 (patch)
tree4154c024c39fe5875e1d5d8ad0a8e66bf5dd30b4 /meta-openstack/recipes-devtools/python
parent9483378e842c07245ea1a478461621a3930b6c58 (diff)
downloadmeta-cloud-services-f5e9ca889942455d8bfcbc49824dd475d547cd38.tar.gz
python-cinder: Use the identity to get credentials
The credentials are defined in the identity bbclass and the recipe will set them in the configuration files. Signed-off-by: Mihai Prica <prica.mihai@gmail.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python')
-rw-r--r--meta-openstack/recipes-devtools/python/python-cinder/api-paste.ini62
-rw-r--r--meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb15
2 files changed, 10 insertions, 67 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-cinder/api-paste.ini b/meta-openstack/recipes-devtools/python/python-cinder/api-paste.ini
deleted file mode 100644
index 69cf346..0000000
--- a/meta-openstack/recipes-devtools/python/python-cinder/api-paste.ini
+++ /dev/null
@@ -1,62 +0,0 @@
1#############
2# OpenStack #
3#############
4
5[composite:osapi_volume]
6use = call:cinder.api:root_app_factory
7/: apiversions
8/v1: openstack_volume_api_v1
9/v2: openstack_volume_api_v2
10
11[composite:openstack_volume_api_v1]
12use = call:cinder.api.middleware.auth:pipeline_factory
13noauth = faultwrap sizelimit noauth apiv1
14keystone = faultwrap sizelimit authtoken keystonecontext apiv1
15keystone_nolimit = faultwrap sizelimit authtoken keystonecontext apiv1
16
17[composite:openstack_volume_api_v2]
18use = call:cinder.api.middleware.auth:pipeline_factory
19noauth = faultwrap sizelimit noauth apiv2
20keystone = faultwrap sizelimit authtoken keystonecontext apiv2
21keystone_nolimit = faultwrap sizelimit authtoken keystonecontext apiv2
22
23[filter:faultwrap]
24paste.filter_factory = cinder.api.middleware.fault:FaultWrapper.factory
25
26[filter:noauth]
27paste.filter_factory = cinder.api.middleware.auth:NoAuthMiddleware.factory
28
29[filter:sizelimit]
30paste.filter_factory = cinder.api.middleware.sizelimit:RequestBodySizeLimiter.factory
31
32[app:apiv1]
33paste.app_factory = cinder.api.v1.router:APIRouter.factory
34
35[app:apiv2]
36paste.app_factory = cinder.api.v2.router:APIRouter.factory
37
38[pipeline:apiversions]
39pipeline = faultwrap osvolumeversionapp
40
41[app:osvolumeversionapp]
42paste.app_factory = cinder.api.versions:Versions.factory
43
44##########
45# Shared #
46##########
47
48[filter:keystonecontext]
49paste.filter_factory = cinder.api.middleware.auth:CinderKeystoneContext.factory
50
51[filter:authtoken]
52paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
53service_protocol = http
54service_host = 127.0.0.1
55service_port = 5000
56auth_host = 127.0.0.1
57auth_port = 35357
58auth_protocol = http
59admin_tenant_name = service
60admin_user = cinder
61admin_password = password
62signing_dir = /var/lib/cinder
diff --git a/meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb b/meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb
index 90d712c..e3d2b7e 100644
--- a/meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb
+++ b/meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb
@@ -9,7 +9,6 @@ SRCNAME = "cinder"
9 9
10SRC_URI = "https://launchpad.net/${SRCNAME}/grizzly/${PV}/+download/${SRCNAME}-${PV}.tar.gz \ 10SRC_URI = "https://launchpad.net/${SRCNAME}/grizzly/${PV}/+download/${SRCNAME}-${PV}.tar.gz \
11 file://cinder.conf \ 11 file://cinder.conf \
12 file://api-paste.ini \
13 file://cinder.init \ 12 file://cinder.init \
14 " 13 "
15 14
@@ -18,17 +17,23 @@ SRC_URI[sha256sum] = "c4d7f508f404b555242abc638901a39b02d4345c2d101a0aaad52fec11
18 17
19S = "${WORKDIR}/${SRCNAME}-${PV}" 18S = "${WORKDIR}/${SRCNAME}-${PV}"
20 19
21inherit setuptools update-rc.d 20inherit setuptools update-rc.d identity
22 21
23do_install_append() { 22do_install_append() {
24 CINDER_CONF_DIR=${D}${sysconfdir}/cinder 23 TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME}
24 CINDER_CONF_DIR=${D}${sysconfdir}/${SRCNAME}
25 25
26 install -d ${CINDER_CONF_DIR} 26 sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \
27 ${TEMPLATE_CONF_DIR}/api-paste.ini > ${WORKDIR}/api-paste.ini
28 sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${WORKDIR}/api-paste.ini
29 sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \
30 -i ${WORKDIR}/api-paste.ini
27 31
32 install -d ${CINDER_CONF_DIR}
28 install -m 600 ${WORKDIR}/cinder.conf ${CINDER_CONF_DIR}/ 33 install -m 600 ${WORKDIR}/cinder.conf ${CINDER_CONF_DIR}/
29 install -m 600 ${WORKDIR}/api-paste.ini ${CINDER_CONF_DIR}/ 34 install -m 600 ${WORKDIR}/api-paste.ini ${CINDER_CONF_DIR}/
30 install -m 600 ${S}/etc/cinder/policy.json ${CINDER_CONF_DIR}/ 35 install -m 600 ${S}/etc/cinder/policy.json ${CINDER_CONF_DIR}/
31 36
32 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then 37 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
33 install -d ${D}${sysconfdir}/init.d 38 install -d ${D}${sysconfdir}/init.d
34 sed 's:@suffix@:api:' < ${WORKDIR}/cinder.init >${WORKDIR}/cinder-api.init.sh 39 sed 's:@suffix@:api:' < ${WORKDIR}/cinder.init >${WORKDIR}/cinder-api.init.sh