author | Drew Fisher <drew.fisher@oracle.com> |
Wed, 11 Jun 2014 17:13:12 -0700 | |
changeset 1944 | 56ac2df1785b |
permissions | -rw-r--r-- |
1944
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
1 |
Although the following patch has been addressed in Icehouse 2014.1, it |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
2 |
still has not yet been released for Havana. It has been modified to |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
3 |
apply cleanly into our current Havana implementation |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
4 |
|
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
5 |
commit 05ba5f81c390efbb6e5eb98db62f8f2599389ddb |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
6 |
Author: Matt Fischer <[email protected]> |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
7 |
Date: Thu Jan 9 15:35:38 2014 -0700 |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
8 |
|
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
9 |
Don't reset LOCAL_PATH if it's already set |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
10 |
|
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
11 |
If LOCAL_PATH is set in local_settings, then settings should |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
12 |
not override it, even if SECRET_KEY is unset. |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
13 |
|
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
14 |
Change-Id: I6aca03f65afddffb6cdd00e4084a8ab9b2255ef1 |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
15 |
Closes-Bug: #1254694 |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
16 |
|
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
17 |
diff --git a/openstack_dashboard/settings.py b/openstack_dashboard/settings.py |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
18 |
--- horizon-2013.2.3/openstack_dashboard/settings.py.~1~ 2014-04-03 11:45:53.000000000 -0700 |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
19 |
+++ horizon-2013.2.3/openstack_dashboard/settings.py 2014-05-25 13:48:46.166574128 -0700 |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
20 |
@@ -206,6 +206,7 @@ |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
21 |
} |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
22 |
|
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
23 |
SECRET_KEY = None |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
24 |
+LOCAL_PATH = None |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
25 |
|
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
26 |
try: |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
27 |
from local.local_settings import * # noqa |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
28 |
@@ -216,9 +217,11 @@ |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
29 |
# file is present. See local_settings.py.example for full documentation on the |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
30 |
# horizon.utils.secret_key module and its use. |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
31 |
if not SECRET_KEY: |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
32 |
+ if not LOCAL_PATH: |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
33 |
+ LOCAL_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
34 |
+ 'local') |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
35 |
+ |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
36 |
from horizon.utils import secret_key |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
37 |
- LOCAL_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
38 |
- 'local') |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
39 |
SECRET_KEY = secret_key.generate_or_read_from_file(os.path.join(LOCAL_PATH, |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
40 |
'.secret_key_store')) |
56ac2df1785b
PSARC/2014/207 OpenStack Glance Update to Havana
Drew Fisher <drew.fisher@oracle.com>
parents:
diff
changeset
|
41 |