summaryrefslogtreecommitdiffstats
path: root/meta-openstack
diff options
context:
space:
mode:
authorMihai Prica <prica.mihai@gmail.com>2013-07-15 15:40:18 +0300
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-08-28 18:41:58 -0400
commit01ecebcecdfa79889dee478eedea1ab48a9e3ca6 (patch)
treeb42e1932910e10e29152aced0b69a5468c950c7a /meta-openstack
parent03d9e55c4dbfb711fa949bd1885d1aeb0e5b4fa2 (diff)
downloadmeta-cloud-services-01ecebcecdfa79889dee478eedea1ab48a9e3ca6.tar.gz
python-nova: Load credentials from the identity class
Signed-off-by: Mihai Prica <prica.mihai@gmail.com>
Diffstat (limited to 'meta-openstack')
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova/api-paste.ini109
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova_2013.1.bb16
2 files changed, 10 insertions, 115 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-nova/api-paste.ini b/meta-openstack/recipes-devtools/python/python-nova/api-paste.ini
deleted file mode 100644
index 58ffbb0..0000000
--- a/meta-openstack/recipes-devtools/python/python-nova/api-paste.ini
+++ /dev/null
@@ -1,109 +0,0 @@
1############
2# Metadata #
3############
4[composite:metadata]
5use = egg:Paste#urlmap
6/: meta
7
8[pipeline:meta]
9pipeline = ec2faultwrap logrequest metaapp
10
11[app:metaapp]
12paste.app_factory = nova.api.metadata.handler:MetadataRequestHandler.factory
13
14#######
15# EC2 #
16#######
17
18[composite:ec2]
19use = egg:Paste#urlmap
20/services/Cloud: ec2cloud
21
22[composite:ec2cloud]
23use = call:nova.api.auth:pipeline_factory
24noauth = ec2faultwrap logrequest ec2noauth cloudrequest validator ec2executor
25keystone = ec2faultwrap logrequest ec2keystoneauth cloudrequest validator ec2executor
26
27[filter:ec2faultwrap]
28paste.filter_factory = nova.api.ec2:FaultWrapper.factory
29
30[filter:logrequest]
31paste.filter_factory = nova.api.ec2:RequestLogging.factory
32
33[filter:ec2lockout]
34paste.filter_factory = nova.api.ec2:Lockout.factory
35
36[filter:ec2keystoneauth]
37paste.filter_factory = nova.api.ec2:EC2KeystoneAuth.factory
38
39[filter:ec2noauth]
40paste.filter_factory = nova.api.ec2:NoAuth.factory
41
42[filter:cloudrequest]
43controller = nova.api.ec2.cloud.CloudController
44paste.filter_factory = nova.api.ec2:Requestify.factory
45
46[filter:authorizer]
47paste.filter_factory = nova.api.ec2:Authorizer.factory
48
49[filter:validator]
50paste.filter_factory = nova.api.ec2:Validator.factory
51
52[app:ec2executor]
53paste.app_factory = nova.api.ec2:Executor.factory
54
55#############
56# Openstack #
57#############
58
59[composite:osapi_compute]
60use = call:nova.api.openstack.urlmap:urlmap_factory
61/: oscomputeversions
62/v1.1: openstack_compute_api_v2
63/v2: openstack_compute_api_v2
64
65[composite:openstack_compute_api_v2]
66use = call:nova.api.auth:pipeline_factory
67noauth = faultwrap sizelimit noauth ratelimit osapi_compute_app_v2
68keystone = faultwrap sizelimit authtoken keystonecontext ratelimit osapi_compute_app_v2
69keystone_nolimit = faultwrap sizelimit authtoken keystonecontext osapi_compute_app_v2
70
71[filter:faultwrap]
72paste.filter_factory = nova.api.openstack:FaultWrapper.factory
73
74[filter:noauth]
75paste.filter_factory = nova.api.openstack.auth:NoAuthMiddleware.factory
76
77[filter:ratelimit]
78paste.filter_factory = nova.api.openstack.compute.limits:RateLimitingMiddleware.factory
79
80[filter:sizelimit]
81paste.filter_factory = nova.api.sizelimit:RequestBodySizeLimiter.factory
82
83[app:osapi_compute_app_v2]
84paste.app_factory = nova.api.openstack.compute:APIRouter.factory
85
86[pipeline:oscomputeversions]
87pipeline = faultwrap oscomputeversionapp
88
89[app:oscomputeversionapp]
90paste.app_factory = nova.api.openstack.compute.versions:Versions.factory
91
92##########
93# Shared #
94##########
95
96[filter:keystonecontext]
97paste.filter_factory = nova.api.auth:NovaKeystoneContext.factory
98
99[filter:authtoken]
100paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
101auth_host = 127.0.0.1
102auth_port = 35357
103auth_protocol = http
104admin_tenant_name = service
105admin_user = nova
106admin_password = password
107signing_dir = /tmp/keystone-signing-nova
108# Workaround for https://bugs.launchpad.net/nova/+bug/1154809
109auth_version = v2.0
diff --git a/meta-openstack/recipes-devtools/python/python-nova_2013.1.bb b/meta-openstack/recipes-devtools/python/python-nova_2013.1.bb
index 0c59c2d..5a3750a 100644
--- a/meta-openstack/recipes-devtools/python/python-nova_2013.1.bb
+++ b/meta-openstack/recipes-devtools/python/python-nova_2013.1.bb
@@ -13,18 +13,17 @@ SRC_URI = "https://launchpad.net/${SRCNAME}/grizzly/${PV}/+download/${SRCNAME}-$
13 file://nova.conf \ 13 file://nova.conf \
14 file://nova-compute \ 14 file://nova-compute \
15 file://nova-all \ 15 file://nova-all \
16 file://api-paste.ini" 16 "
17
18 17
19SRC_URI[md5sum] = "38022353c398ce38c4e220d1d18b5916" 18SRC_URI[md5sum] = "38022353c398ce38c4e220d1d18b5916"
20SRC_URI[sha256sum] = "db7f5259d848358bf14105d5833869ec145f643312e6bc0adef0050120fe3e07" 19SRC_URI[sha256sum] = "db7f5259d848358bf14105d5833869ec145f643312e6bc0adef0050120fe3e07"
21 20
22S = "${WORKDIR}/${SRCNAME}-${PV}" 21S = "${WORKDIR}/${SRCNAME}-${PV}"
23 22
24inherit setuptools useradd update-rc.d 23inherit setuptools useradd update-rc.d identity
25 24
26do_install_append() { 25do_install_append() {
27 26 TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME}
28 NOVA_CONF_DIR=${D}/${sysconfdir}/nova 27 NOVA_CONF_DIR=${D}/${sysconfdir}/nova
29 28
30 install -d ${NOVA_CONF_DIR} 29 install -d ${NOVA_CONF_DIR}
@@ -48,6 +47,13 @@ do_install_append() {
48 chown root:root ${D}${sysconfdir}/sudoers.d/nova-rootwrap 47 chown root:root ${D}${sysconfdir}/sudoers.d/nova-rootwrap
49 echo "root ALL=(root) NOPASSWD: ${bindir}/nova-rootwrap" > ${D}${sysconfdir}/sudoers.d/nova-rootwrap 48 echo "root ALL=(root) NOPASSWD: ${bindir}/nova-rootwrap" > ${D}${sysconfdir}/sudoers.d/nova-rootwrap
50 49
50 #Configuration options
51 sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \
52 ${TEMPLATE_CONF_DIR}/api-paste.ini > ${WORKDIR}/api-paste.ini
53 sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${WORKDIR}/api-paste.ini
54 sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \
55 -i ${WORKDIR}/api-paste.ini
56
51 #Copy the configuration file 57 #Copy the configuration file
52 install -m 664 ${WORKDIR}/nova.conf ${NOVA_CONF_DIR}/nova.conf 58 install -m 664 ${WORKDIR}/nova.conf ${NOVA_CONF_DIR}/nova.conf
53 install -m 664 ${WORKDIR}/api-paste.ini ${NOVA_CONF_DIR} 59 install -m 664 ${WORKDIR}/api-paste.ini ${NOVA_CONF_DIR}
@@ -64,8 +70,6 @@ do_install_append() {
64 70
65} 71}
66 72
67inherit useradd update-rc.d
68
69USERADD_PACKAGES = "${PN}" 73USERADD_PACKAGES = "${PN}"
70GROUPADD_PARAM_${PN} = "--system nova" 74GROUPADD_PARAM_${PN} = "--system nova"
71USERADD_PARAM_${PN} = "--system --home /var/lib/nova -g nova \ 75USERADD_PARAM_${PN} = "--system --home /var/lib/nova -g nova \