[openstack-keystone] add Swift endpoint in sample data

Alan Pevec apevec at fedoraproject.org
Mon Sep 17 22:56:47 UTC 2012


commit 1a947d4cbe8f7e777d9f32c66d344102015deaf2
Author: Alan Pevec <apevec at redhat.com>
Date:   Tue Sep 18 00:30:44 2012 +0200

    add Swift endpoint in sample data

 0003-add-Swift-endpoint-in-sample-data.patch |   39 ++++++++++++++++++++++++++
 openstack-keystone.spec                      |    2 +
 2 files changed, 41 insertions(+), 0 deletions(-)
---
diff --git a/0003-add-Swift-endpoint-in-sample-data.patch b/0003-add-Swift-endpoint-in-sample-data.patch
new file mode 100644
index 0000000..8a261c7
--- /dev/null
+++ b/0003-add-Swift-endpoint-in-sample-data.patch
@@ -0,0 +1,39 @@
+From 877a4656a861b9f6b3d9c178ec1ffe81aed10ff1 Mon Sep 17 00:00:00 2001
+From: Alan Pevec <apevec at redhat.com>
+Date: Mon, 17 Sep 2012 20:51:49 +0200
+Subject: [PATCH] add Swift endpoint in sample data
+
+Change-Id: Idb1274adbcc28ccddc737d900062f5b8a5f81791
+---
+ tools/sample_data.sh |    9 ++++++++-
+ 1 files changed, 8 insertions(+), 1 deletions(-)
+
+diff --git a/tools/sample_data.sh b/tools/sample_data.sh
+index 18419a8..ced89dc 100755
+--- a/tools/sample_data.sh
++++ b/tools/sample_data.sh
+@@ -207,9 +207,10 @@ keystone service-create --name="horizon" \
+ 						--description="OpenStack Dashboard"
+ 
+ if [[ -n "$ENABLE_SWIFT" ]]; then
++    SWIFT_SERVICE=$(get_id \
+     keystone service-create --name=swift \
+                             --type="object-store" \
+-                            --description="Swift Service"
++                            --description="Swift Service")
+     SWIFT_USER=$(get_id keystone user-create --name=swift \
+                                              --pass="$SERVICE_PASSWORD" \
+                                              --tenant_id $SERVICE_TENANT \
+@@ -217,6 +218,12 @@ if [[ -n "$ENABLE_SWIFT" ]]; then
+     keystone user-role-add --tenant_id $SERVICE_TENANT \
+                            --user_id $SWIFT_USER \
+                            --role_id $ADMIN_ROLE
++    if [[ -n "$ENABLE_ENDPOINTS" ]]; then
++        keystone endpoint-create --region RegionOne --service_id $SWIFT_SERVICE \
++            --publicurl   'http://localhost:8080/v1/AUTH_$(tenant_id)s' \
++            --adminurl    'http://localhost:8080/v1/AUTH_$(tenant_id)s' \
++            --internalurl 'http://localhost:8080/v1/AUTH_$(tenant_id)s'
++    fi
+ fi
+ 
+ if [[ -n "$ENABLE_QUANTUM" ]]; then
diff --git a/openstack-keystone.spec b/openstack-keystone.spec
index f57fef1..d181d88 100644
--- a/openstack-keystone.spec
+++ b/openstack-keystone.spec
@@ -30,6 +30,7 @@ Source5:        openstack-keystone-sample-data
 #
 Patch0001: 0001-match-egg-and-spec-requires.patch
 Patch0002: 0002-add-Quantum-endpoint-in-sample-data.patch
+Patch0003: 0003-add-Swift-endpoint-in-sample-data.patch
 
 BuildArch:      noarch
 BuildRequires:  python2-devel
@@ -113,6 +114,7 @@ This package contains documentation for Keystone.
 
 %patch0001 -p1
 %patch0002 -p1
+%patch0003 -p1
 
 find . \( -name .gitignore -o -name .placeholder \) -delete
 find keystone -name \*.py -exec sed -i '/\/usr\/bin\/env python/d' {} \;


More information about the scm-commits mailing list