Merge lp:~yolanda.robla/horizon/precise-security into lp:ubuntu/precise-security/horizon
- precise-security
- Merge into precise-security
Proposed by
Yolanda Robla
Status: | Merged |
---|---|
Approved by: | James Page |
Approved revision: | 30 |
Merge reported by: | James Page |
Merged at revision: | not available |
Proposed branch: | lp:~yolanda.robla/horizon/precise-security |
Merge into: | lp:ubuntu/precise-security/horizon |
Diff against target: |
4012 lines (+794/-1547) 41 files modified
.bzrignore (+0/-12) .mailmap (+0/-8) .pc/CVE-2012-3540.patch/horizon/views/auth_forms.py (+0/-190) .pc/add_juju_settings_panel.patch/horizon/dashboards/settings/dashboard.py (+0/-31) .pc/add_juju_settings_panel.patch/openstack_dashboard/local/local_settings.py.example (+0/-117) .pc/allow_alternate_css.patch/horizon/templatetags/branding.py (+0/-62) .pc/allow_alternate_css.patch/openstack_dashboard/templates/_stylesheets.html (+0/-6) .pc/applied-patches (+0/-9) .pc/fix-coverage-binary-name.patch/run_tests.sh (+0/-403) .pc/fix-dashboard-django-wsgi.patch/openstack_dashboard/wsgi/django.wsgi (+0/-15) .pc/fix-dashboard-manage.patch/manage.py (+0/-12) .pc/juju_panel-handle_catalog_exception.patch/horizon/dashboards/settings/juju/forms.py (+0/-96) .pc/turn-off-debug.patch/openstack_dashboard/local/local_settings.py.example (+0/-123) .pc/use-memcache.patch/openstack_dashboard/local/local_settings.py.example (+0/-123) .pylintrc (+0/-42) AUTHORS (+2/-0) PKG-INFO (+126/-0) debian/changelog (+18/-0) debian/patches/CVE-2012-3540.patch (+0/-33) debian/patches/series (+0/-1) horizon.egg-info/PKG-INFO (+126/-0) horizon.egg-info/SOURCES.txt (+478/-0) horizon.egg-info/dependency_links.txt (+3/-0) horizon.egg-info/not-zip-safe (+1/-0) horizon.egg-info/requires.txt (+18/-0) horizon.egg-info/top_level.txt (+2/-0) horizon/dashboards/nova/images_and_snapshots/images/tables.py (+3/-0) horizon/dashboards/nova/instances_and_volumes/volumes/tables.py (+1/-1) horizon/dashboards/settings/juju/__init__.py (+0/-1) horizon/dashboards/settings/juju/forms.py (+0/-96) horizon/dashboards/settings/juju/panel.py (+0/-28) horizon/dashboards/settings/juju/urls.py (+0/-24) horizon/dashboards/settings/juju/views.py (+0/-28) horizon/dashboards/settings/templates/settings/juju/download_form.html (+0/-20) horizon/dashboards/settings/templates/settings/juju/environments.yaml.template (+0/-21) horizon/dashboards/settings/templates/settings/juju/index.html (+0/-11) horizon/usage/base.py (+9/-6) horizon/version.py (+1/-1) setup.cfg (+5/-0) tools/pip-requires (+1/-1) tox.ini (+0/-26) |
To merge this branch: | bzr merge lp:~yolanda.robla/horizon/precise-security |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
James Page | Approve | ||
Review via email: mp+160649@code.launchpad.net |
Commit message
Description of the change
Essex SRU
To post a comment you must log in.
- 30. By Yolanda Robla
-
updated changelog
Revision history for this message
James Page (james-page) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === removed file '.bzrignore' | |||
2 | --- .bzrignore 2012-08-24 03:27:33 +0000 | |||
3 | +++ .bzrignore 1970-01-01 00:00:00 +0000 | |||
4 | @@ -1,12 +0,0 @@ | |||
5 | 1 | horizon/.installed.cfg | ||
6 | 2 | horizon/bin | ||
7 | 3 | horizon/develop-eggs/ | ||
8 | 4 | horizon/downloads/ | ||
9 | 5 | horizon/eggs/ | ||
10 | 6 | horizon/parts/ | ||
11 | 7 | horizon/src/django_nova.egg-info | ||
12 | 8 | horizon/src/django_openstack.egg-info | ||
13 | 9 | django-nova-syspanel/src/django_nova_syspanel.egg-info | ||
14 | 10 | openstack-dashboard/.dashboard-venv | ||
15 | 11 | openstack-dashboard/local/dashboard_openstack.sqlite3 | ||
16 | 12 | openstack-dashboard/local/local_settings.py | ||
17 | 13 | 0 | ||
18 | === removed file '.mailmap' | |||
19 | --- .mailmap 2012-08-24 03:27:33 +0000 | |||
20 | +++ .mailmap 1970-01-01 00:00:00 +0000 | |||
21 | @@ -1,8 +0,0 @@ | |||
22 | 1 | # Format is: | ||
23 | 2 | # <preferred e-mail> <other e-mail 1> | ||
24 | 3 | # <preferred e-mail> <other e-mail 2> | ||
25 | 4 | <ghe@debian.org> <ghe.rivero@stackops.com> | ||
26 | 5 | <jake@ansolabs.com> <admin@jakedahn.com> | ||
27 | 6 | <launchpad@markgius.com> <mgius7096@gmail.com> | ||
28 | 7 | <yorik.sar@gmail.com> <yorik@ytaraday> | ||
29 | 8 | <jeblair@hp.com> <james.blair@rackspace.com> | ||
30 | 9 | 0 | ||
31 | === removed directory '.pc/CVE-2012-3540.patch' | |||
32 | === removed directory '.pc/CVE-2012-3540.patch/horizon' | |||
33 | === removed directory '.pc/CVE-2012-3540.patch/horizon/views' | |||
34 | === removed file '.pc/CVE-2012-3540.patch/horizon/views/auth_forms.py' | |||
35 | --- .pc/CVE-2012-3540.patch/horizon/views/auth_forms.py 2012-08-30 17:15:04 +0000 | |||
36 | +++ .pc/CVE-2012-3540.patch/horizon/views/auth_forms.py 1970-01-01 00:00:00 +0000 | |||
37 | @@ -1,190 +0,0 @@ | |||
38 | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 | ||
39 | 2 | |||
40 | 3 | # Copyright 2012 United States Government as represented by the | ||
41 | 4 | # Administrator of the National Aeronautics and Space Administration. | ||
42 | 5 | # All Rights Reserved. | ||
43 | 6 | # | ||
44 | 7 | # Copyright 2012 Nebula, Inc. | ||
45 | 8 | # | ||
46 | 9 | # Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
47 | 10 | # not use this file except in compliance with the License. You may obtain | ||
48 | 11 | # a copy of the License at | ||
49 | 12 | # | ||
50 | 13 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
51 | 14 | # | ||
52 | 15 | # Unless required by applicable law or agreed to in writing, software | ||
53 | 16 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
54 | 17 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
55 | 18 | # License for the specific language governing permissions and limitations | ||
56 | 19 | # under the License. | ||
57 | 20 | |||
58 | 21 | """ | ||
59 | 22 | Forms used for Horizon's auth mechanisms. | ||
60 | 23 | """ | ||
61 | 24 | |||
62 | 25 | import logging | ||
63 | 26 | |||
64 | 27 | from django import shortcuts | ||
65 | 28 | from django.conf import settings | ||
66 | 29 | from django.contrib import messages | ||
67 | 30 | from django.contrib.auth import REDIRECT_FIELD_NAME | ||
68 | 31 | from django.utils.translation import ugettext as _ | ||
69 | 32 | from keystoneclient import exceptions as keystone_exceptions | ||
70 | 33 | |||
71 | 34 | from horizon import api | ||
72 | 35 | from horizon import base | ||
73 | 36 | from horizon import exceptions | ||
74 | 37 | from horizon import forms | ||
75 | 38 | from horizon import users | ||
76 | 39 | |||
77 | 40 | |||
78 | 41 | LOG = logging.getLogger(__name__) | ||
79 | 42 | |||
80 | 43 | |||
81 | 44 | def _set_session_data(request, token): | ||
82 | 45 | request.session['serviceCatalog'] = token.serviceCatalog | ||
83 | 46 | request.session['tenant'] = token.tenant['name'] | ||
84 | 47 | request.session['tenant_id'] = token.tenant['id'] | ||
85 | 48 | request.session['token'] = token.id | ||
86 | 49 | request.session['user_name'] = token.user['name'] | ||
87 | 50 | request.session['user_id'] = token.user['id'] | ||
88 | 51 | request.session['roles'] = token.user['roles'] | ||
89 | 52 | |||
90 | 53 | |||
91 | 54 | class Login(forms.SelfHandlingForm): | ||
92 | 55 | """ Form used for logging in a user. | ||
93 | 56 | |||
94 | 57 | Handles authentication with Keystone, choosing a tenant, and fetching | ||
95 | 58 | a scoped token token for that tenant. Redirects to the URL returned | ||
96 | 59 | by :meth:`horizon.get_user_home` if successful. | ||
97 | 60 | |||
98 | 61 | Subclass of :class:`~horizon.forms.SelfHandlingForm`. | ||
99 | 62 | """ | ||
100 | 63 | region = forms.ChoiceField(label=_("Region"), required=False) | ||
101 | 64 | username = forms.CharField(label=_("User Name")) | ||
102 | 65 | password = forms.CharField(label=_("Password"), | ||
103 | 66 | widget=forms.PasswordInput(render_value=False)) | ||
104 | 67 | |||
105 | 68 | def __init__(self, *args, **kwargs): | ||
106 | 69 | super(Login, self).__init__(*args, **kwargs) | ||
107 | 70 | # FIXME(gabriel): When we switch to region-only settings, we can | ||
108 | 71 | # remove this default region business. | ||
109 | 72 | default_region = (settings.OPENSTACK_KEYSTONE_URL, "Default Region") | ||
110 | 73 | regions = getattr(settings, 'AVAILABLE_REGIONS', [default_region]) | ||
111 | 74 | self.fields['region'].choices = regions | ||
112 | 75 | if len(regions) == 1: | ||
113 | 76 | self.fields['region'].initial = default_region[0] | ||
114 | 77 | self.fields['region'].widget = forms.widgets.HiddenInput() | ||
115 | 78 | |||
116 | 79 | def handle(self, request, data): | ||
117 | 80 | if 'user_name' in request.session: | ||
118 | 81 | if request.session['user_name'] != data['username']: | ||
119 | 82 | # To avoid reusing another user's session, create a | ||
120 | 83 | # new, empty session if the existing session | ||
121 | 84 | # corresponds to a different authenticated user. | ||
122 | 85 | request.session.flush() | ||
123 | 86 | # Always cycle the session key when viewing the login form to | ||
124 | 87 | # prevent session fixation | ||
125 | 88 | request.session.cycle_key() | ||
126 | 89 | |||
127 | 90 | # For now we'll allow fallback to OPENSTACK_KEYSTONE_URL if the | ||
128 | 91 | # form post doesn't include a region. | ||
129 | 92 | endpoint = data.get('region', None) or settings.OPENSTACK_KEYSTONE_URL | ||
130 | 93 | region_name = dict(self.fields['region'].choices)[endpoint] | ||
131 | 94 | request.session['region_endpoint'] = endpoint | ||
132 | 95 | request.session['region_name'] = region_name | ||
133 | 96 | |||
134 | 97 | redirect_to = request.REQUEST.get(REDIRECT_FIELD_NAME, "") | ||
135 | 98 | |||
136 | 99 | if data.get('tenant', None): | ||
137 | 100 | try: | ||
138 | 101 | token = api.token_create(request, | ||
139 | 102 | data.get('tenant'), | ||
140 | 103 | data['username'], | ||
141 | 104 | data['password']) | ||
142 | 105 | tenants = api.tenant_list_for_token(request, token.id) | ||
143 | 106 | except: | ||
144 | 107 | msg = _('Unable to authenticate for that project.') | ||
145 | 108 | exceptions.handle(request, | ||
146 | 109 | message=msg, | ||
147 | 110 | escalate=True) | ||
148 | 111 | _set_session_data(request, token) | ||
149 | 112 | user = users.get_user_from_request(request) | ||
150 | 113 | redirect = redirect_to or base.Horizon.get_user_home(user) | ||
151 | 114 | return shortcuts.redirect(redirect) | ||
152 | 115 | |||
153 | 116 | elif data.get('username', None): | ||
154 | 117 | try: | ||
155 | 118 | unscoped_token = api.token_create(request, | ||
156 | 119 | '', | ||
157 | 120 | data['username'], | ||
158 | 121 | data['password']) | ||
159 | 122 | except keystone_exceptions.Unauthorized: | ||
160 | 123 | exceptions.handle(request, | ||
161 | 124 | _('Invalid user name or password.')) | ||
162 | 125 | except: | ||
163 | 126 | # If we get here we don't want to show a stack trace to the | ||
164 | 127 | # user. However, if we fail here, there may be bad session | ||
165 | 128 | # data that's been cached already. | ||
166 | 129 | request.user_logout() | ||
167 | 130 | exceptions.handle(request, | ||
168 | 131 | message=_("An error occurred authenticating." | ||
169 | 132 | " Please try again later."), | ||
170 | 133 | escalate=True) | ||
171 | 134 | |||
172 | 135 | # Unscoped token | ||
173 | 136 | request.session['unscoped_token'] = unscoped_token.id | ||
174 | 137 | request.user.username = data['username'] | ||
175 | 138 | |||
176 | 139 | # Get the tenant list, and log in using first tenant | ||
177 | 140 | # FIXME (anthony): add tenant chooser here? | ||
178 | 141 | try: | ||
179 | 142 | tenants = api.tenant_list_for_token(request, unscoped_token.id) | ||
180 | 143 | except: | ||
181 | 144 | exceptions.handle(request) | ||
182 | 145 | tenants = [] | ||
183 | 146 | |||
184 | 147 | # Abort if there are no valid tenants for this user | ||
185 | 148 | if not tenants: | ||
186 | 149 | messages.error(request, | ||
187 | 150 | _('You are not authorized for any projects.') % | ||
188 | 151 | {"user": data['username']}, | ||
189 | 152 | extra_tags="login") | ||
190 | 153 | return | ||
191 | 154 | |||
192 | 155 | # Create a token. | ||
193 | 156 | # NOTE(gabriel): Keystone can return tenants that you're | ||
194 | 157 | # authorized to administer but not to log into as a user, so in | ||
195 | 158 | # the case of an Unauthorized error we should iterate through | ||
196 | 159 | # the tenants until one succeeds or we've failed them all. | ||
197 | 160 | while tenants: | ||
198 | 161 | tenant = tenants.pop() | ||
199 | 162 | try: | ||
200 | 163 | token = api.token_create_scoped(request, | ||
201 | 164 | tenant.id, | ||
202 | 165 | unscoped_token.id) | ||
203 | 166 | break | ||
204 | 167 | except: | ||
205 | 168 | # This will continue for recognized Unauthorized | ||
206 | 169 | # exceptions from keystoneclient. | ||
207 | 170 | exceptions.handle(request, ignore=True) | ||
208 | 171 | token = None | ||
209 | 172 | if token is None: | ||
210 | 173 | raise exceptions.NotAuthorized( | ||
211 | 174 | _("You are not authorized for any available projects.")) | ||
212 | 175 | |||
213 | 176 | _set_session_data(request, token) | ||
214 | 177 | user = users.get_user_from_request(request) | ||
215 | 178 | redirect = redirect_to or base.Horizon.get_user_home(user) | ||
216 | 179 | return shortcuts.redirect(redirect) | ||
217 | 180 | |||
218 | 181 | |||
219 | 182 | class LoginWithTenant(Login): | ||
220 | 183 | """ | ||
221 | 184 | Exactly like :class:`.Login` but includes the tenant id as a field | ||
222 | 185 | so that the process of choosing a default tenant is bypassed. | ||
223 | 186 | """ | ||
224 | 187 | region = forms.ChoiceField(required=False) | ||
225 | 188 | username = forms.CharField(max_length="20", | ||
226 | 189 | widget=forms.TextInput(attrs={'readonly': 'readonly'})) | ||
227 | 190 | tenant = forms.CharField(widget=forms.HiddenInput()) | ||
228 | 191 | 0 | ||
229 | === added directory '.pc/add_juju_settings_panel.patch' | |||
230 | === removed directory '.pc/add_juju_settings_panel.patch' | |||
231 | === added file '.pc/add_juju_settings_panel.patch/.timestamp' | |||
232 | === added directory '.pc/add_juju_settings_panel.patch/horizon' | |||
233 | === removed directory '.pc/add_juju_settings_panel.patch/horizon' | |||
234 | === added directory '.pc/add_juju_settings_panel.patch/horizon/dashboards' | |||
235 | === removed directory '.pc/add_juju_settings_panel.patch/horizon/dashboards' | |||
236 | === added directory '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings' | |||
237 | === removed directory '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings' | |||
238 | === added file '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/dashboard.py' | |||
239 | --- .pc/add_juju_settings_panel.patch/horizon/dashboards/settings/dashboard.py 1970-01-01 00:00:00 +0000 | |||
240 | +++ .pc/add_juju_settings_panel.patch/horizon/dashboards/settings/dashboard.py 2013-04-24 15:22:28 +0000 | |||
241 | @@ -0,0 +1,31 @@ | |||
242 | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 | ||
243 | 2 | |||
244 | 3 | # Copyright 2012 Openstack, LLC | ||
245 | 4 | # Copyright 2012 Nebula, Inc. | ||
246 | 5 | # | ||
247 | 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
248 | 7 | # not use this file except in compliance with the License. You may obtain | ||
249 | 8 | # a copy of the License at | ||
250 | 9 | # | ||
251 | 10 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
252 | 11 | # | ||
253 | 12 | # Unless required by applicable law or agreed to in writing, software | ||
254 | 13 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
255 | 14 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
256 | 15 | # License for the specific language governing permissions and limitations | ||
257 | 16 | # under the License. | ||
258 | 17 | |||
259 | 18 | from django.utils.translation import ugettext_lazy as _ | ||
260 | 19 | |||
261 | 20 | import horizon | ||
262 | 21 | |||
263 | 22 | |||
264 | 23 | class Settings(horizon.Dashboard): | ||
265 | 24 | name = _("Settings") | ||
266 | 25 | slug = "settings" | ||
267 | 26 | panels = ('user', 'project', 'ec2') | ||
268 | 27 | default_panel = 'user' | ||
269 | 28 | nav = False | ||
270 | 29 | |||
271 | 30 | |||
272 | 31 | horizon.register(Settings) | ||
273 | 0 | 32 | ||
274 | === removed file '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/dashboard.py' | |||
275 | --- .pc/add_juju_settings_panel.patch/horizon/dashboards/settings/dashboard.py 2012-04-12 12:42:04 +0000 | |||
276 | +++ .pc/add_juju_settings_panel.patch/horizon/dashboards/settings/dashboard.py 1970-01-01 00:00:00 +0000 | |||
277 | @@ -1,31 +0,0 @@ | |||
278 | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 | ||
279 | 2 | |||
280 | 3 | # Copyright 2012 Openstack, LLC | ||
281 | 4 | # Copyright 2012 Nebula, Inc. | ||
282 | 5 | # | ||
283 | 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
284 | 7 | # not use this file except in compliance with the License. You may obtain | ||
285 | 8 | # a copy of the License at | ||
286 | 9 | # | ||
287 | 10 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
288 | 11 | # | ||
289 | 12 | # Unless required by applicable law or agreed to in writing, software | ||
290 | 13 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
291 | 14 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
292 | 15 | # License for the specific language governing permissions and limitations | ||
293 | 16 | # under the License. | ||
294 | 17 | |||
295 | 18 | from django.utils.translation import ugettext_lazy as _ | ||
296 | 19 | |||
297 | 20 | import horizon | ||
298 | 21 | |||
299 | 22 | |||
300 | 23 | class Settings(horizon.Dashboard): | ||
301 | 24 | name = _("Settings") | ||
302 | 25 | slug = "settings" | ||
303 | 26 | panels = ('user', 'project', 'ec2') | ||
304 | 27 | default_panel = 'user' | ||
305 | 28 | nav = False | ||
306 | 29 | |||
307 | 30 | |||
308 | 31 | horizon.register(Settings) | ||
309 | 32 | 0 | ||
310 | === added directory '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/juju' | |||
311 | === removed directory '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/juju' | |||
312 | === added file '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/juju/__init__.py' | |||
313 | === removed file '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/juju/__init__.py' | |||
314 | === added file '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/juju/forms.py' | |||
315 | === removed file '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/juju/forms.py' | |||
316 | === added file '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/juju/panel.py' | |||
317 | === removed file '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/juju/panel.py' | |||
318 | === added file '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/juju/urls.py' | |||
319 | === removed file '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/juju/urls.py' | |||
320 | === added file '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/juju/views.py' | |||
321 | === removed file '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/juju/views.py' | |||
322 | === added directory '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/templates' | |||
323 | === removed directory '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/templates' | |||
324 | === added directory '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/templates/settings' | |||
325 | === removed directory '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/templates/settings' | |||
326 | === added directory '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/templates/settings/juju' | |||
327 | === removed directory '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/templates/settings/juju' | |||
328 | === added file '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/templates/settings/juju/download_form.html' | |||
329 | === removed file '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/templates/settings/juju/download_form.html' | |||
330 | === added file '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/templates/settings/juju/environments.yaml.template' | |||
331 | === removed file '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/templates/settings/juju/environments.yaml.template' | |||
332 | === added file '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/templates/settings/juju/index.html' | |||
333 | === removed file '.pc/add_juju_settings_panel.patch/horizon/dashboards/settings/templates/settings/juju/index.html' | |||
334 | === added directory '.pc/add_juju_settings_panel.patch/openstack_dashboard' | |||
335 | === removed directory '.pc/add_juju_settings_panel.patch/openstack_dashboard' | |||
336 | === added directory '.pc/add_juju_settings_panel.patch/openstack_dashboard/local' | |||
337 | === removed directory '.pc/add_juju_settings_panel.patch/openstack_dashboard/local' | |||
338 | === added file '.pc/add_juju_settings_panel.patch/openstack_dashboard/local/local_settings.py.example' | |||
339 | --- .pc/add_juju_settings_panel.patch/openstack_dashboard/local/local_settings.py.example 1970-01-01 00:00:00 +0000 | |||
340 | +++ .pc/add_juju_settings_panel.patch/openstack_dashboard/local/local_settings.py.example 2013-04-24 15:22:28 +0000 | |||
341 | @@ -0,0 +1,117 @@ | |||
342 | 1 | import os | ||
343 | 2 | |||
344 | 3 | from django.utils.translation import ugettext_lazy as _ | ||
345 | 4 | |||
346 | 5 | DEBUG = True | ||
347 | 6 | TEMPLATE_DEBUG = DEBUG | ||
348 | 7 | PROD = False | ||
349 | 8 | USE_SSL = False | ||
350 | 9 | |||
351 | 10 | # Note: You should change this value | ||
352 | 11 | SECRET_KEY = 'elj1IWiLoWHgcyYxFVLj7cM5rGOOxWl0' | ||
353 | 12 | |||
354 | 13 | # Specify a regular expression to validate user passwords. | ||
355 | 14 | # HORIZON_CONFIG = { | ||
356 | 15 | # "password_validator": { | ||
357 | 16 | # "regex": '.*', | ||
358 | 17 | # "help_text": _("Your password does not meet the requirements.") | ||
359 | 18 | # } | ||
360 | 19 | # } | ||
361 | 20 | |||
362 | 21 | LOCAL_PATH = os.path.dirname(os.path.abspath(__file__)) | ||
363 | 22 | |||
364 | 23 | # We recommend you use memcached for development; otherwise after every reload | ||
365 | 24 | # of the django development server, you will have to login again. To use | ||
366 | 25 | # memcached set CACHE_BACKED to something like 'memcached://127.0.0.1:11211/' | ||
367 | 26 | CACHE_BACKEND = 'locmem://' | ||
368 | 27 | |||
369 | 28 | # Send email to the console by default | ||
370 | 29 | EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' | ||
371 | 30 | # Or send them to /dev/null | ||
372 | 31 | #EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend' | ||
373 | 32 | |||
374 | 33 | # Configure these for your outgoing email host | ||
375 | 34 | # EMAIL_HOST = 'smtp.my-company.com' | ||
376 | 35 | # EMAIL_PORT = 25 | ||
377 | 36 | # EMAIL_HOST_USER = 'djangomail' | ||
378 | 37 | # EMAIL_HOST_PASSWORD = 'top-secret!' | ||
379 | 38 | |||
380 | 39 | # For multiple regions uncomment this configuration, and add (endpoint, title). | ||
381 | 40 | # AVAILABLE_REGIONS = [ | ||
382 | 41 | # ('http://cluster1.example.com:5000/v2.0', 'cluster1'), | ||
383 | 42 | # ('http://cluster2.example.com:5000/v2.0', 'cluster2'), | ||
384 | 43 | # ] | ||
385 | 44 | |||
386 | 45 | OPENSTACK_HOST = "127.0.0.1" | ||
387 | 46 | OPENSTACK_KEYSTONE_URL = "http://%s:5000/v2.0" % OPENSTACK_HOST | ||
388 | 47 | OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member" | ||
389 | 48 | |||
390 | 49 | # The OPENSTACK_KEYSTONE_BACKEND settings can be used to identify the | ||
391 | 50 | # capabilities of the auth backend for Keystone. | ||
392 | 51 | # If Keystone has been configured to use LDAP as the auth backend then set | ||
393 | 52 | # can_edit_user to False and name to 'ldap'. | ||
394 | 53 | # | ||
395 | 54 | # TODO(tres): Remove these once Keystone has an API to identify auth backend. | ||
396 | 55 | OPENSTACK_KEYSTONE_BACKEND = { | ||
397 | 56 | 'name': 'native', | ||
398 | 57 | 'can_edit_user': True | ||
399 | 58 | } | ||
400 | 59 | |||
401 | 60 | # OPENSTACK_ENDPOINT_TYPE specifies the endpoint type to use for the endpoints | ||
402 | 61 | # in the Keystone service catalog. Use this setting when Horizon is running | ||
403 | 62 | # external to the OpenStack environment. The default is 'internalURL'. | ||
404 | 63 | #OPENSTACK_ENDPOINT_TYPE = "publicURL" | ||
405 | 64 | |||
406 | 65 | # The number of Swift containers and objects to display on a single page before | ||
407 | 66 | # providing a paging element (a "more" link) to paginate results. | ||
408 | 67 | API_RESULT_LIMIT = 1000 | ||
409 | 68 | |||
410 | 69 | # If you have external monitoring links, eg: | ||
411 | 70 | # EXTERNAL_MONITORING = [ | ||
412 | 71 | # ['Nagios','http://foo.com'], | ||
413 | 72 | # ['Ganglia','http://bar.com'], | ||
414 | 73 | # ] | ||
415 | 74 | |||
416 | 75 | LOGGING = { | ||
417 | 76 | 'version': 1, | ||
418 | 77 | # When set to True this will disable all logging except | ||
419 | 78 | # for loggers specified in this configuration dictionary. Note that | ||
420 | 79 | # if nothing is specified here and disable_existing_loggers is True, | ||
421 | 80 | # django.db.backends will still log unless it is disabled explicitly. | ||
422 | 81 | 'disable_existing_loggers': False, | ||
423 | 82 | 'handlers': { | ||
424 | 83 | 'null': { | ||
425 | 84 | 'level': 'DEBUG', | ||
426 | 85 | 'class': 'django.utils.log.NullHandler', | ||
427 | 86 | }, | ||
428 | 87 | 'console': { | ||
429 | 88 | # Set the level to "DEBUG" for verbose output logging. | ||
430 | 89 | 'level': 'INFO', | ||
431 | 90 | 'class': 'logging.StreamHandler', | ||
432 | 91 | }, | ||
433 | 92 | }, | ||
434 | 93 | 'loggers': { | ||
435 | 94 | # Logging from django.db.backends is VERY verbose, send to null | ||
436 | 95 | # by default. | ||
437 | 96 | 'django.db.backends': { | ||
438 | 97 | 'handlers': ['null'], | ||
439 | 98 | 'propagate': False, | ||
440 | 99 | }, | ||
441 | 100 | 'horizon': { | ||
442 | 101 | 'handlers': ['console'], | ||
443 | 102 | 'propagate': False, | ||
444 | 103 | }, | ||
445 | 104 | 'novaclient': { | ||
446 | 105 | 'handlers': ['console'], | ||
447 | 106 | 'propagate': False, | ||
448 | 107 | }, | ||
449 | 108 | 'keystoneclient': { | ||
450 | 109 | 'handlers': ['console'], | ||
451 | 110 | 'propagate': False, | ||
452 | 111 | }, | ||
453 | 112 | 'nose.plugins.manager': { | ||
454 | 113 | 'handlers': ['console'], | ||
455 | 114 | 'propagate': False, | ||
456 | 115 | } | ||
457 | 116 | } | ||
458 | 117 | } | ||
459 | 0 | 118 | ||
460 | === removed file '.pc/add_juju_settings_panel.patch/openstack_dashboard/local/local_settings.py.example' | |||
461 | --- .pc/add_juju_settings_panel.patch/openstack_dashboard/local/local_settings.py.example 2012-04-13 09:58:54 +0000 | |||
462 | +++ .pc/add_juju_settings_panel.patch/openstack_dashboard/local/local_settings.py.example 1970-01-01 00:00:00 +0000 | |||
463 | @@ -1,117 +0,0 @@ | |||
464 | 1 | import os | ||
465 | 2 | |||
466 | 3 | from django.utils.translation import ugettext_lazy as _ | ||
467 | 4 | |||
468 | 5 | DEBUG = True | ||
469 | 6 | TEMPLATE_DEBUG = DEBUG | ||
470 | 7 | PROD = False | ||
471 | 8 | USE_SSL = False | ||
472 | 9 | |||
473 | 10 | # Note: You should change this value | ||
474 | 11 | SECRET_KEY = 'elj1IWiLoWHgcyYxFVLj7cM5rGOOxWl0' | ||
475 | 12 | |||
476 | 13 | # Specify a regular expression to validate user passwords. | ||
477 | 14 | # HORIZON_CONFIG = { | ||
478 | 15 | # "password_validator": { | ||
479 | 16 | # "regex": '.*', | ||
480 | 17 | # "help_text": _("Your password does not meet the requirements.") | ||
481 | 18 | # } | ||
482 | 19 | # } | ||
483 | 20 | |||
484 | 21 | LOCAL_PATH = os.path.dirname(os.path.abspath(__file__)) | ||
485 | 22 | |||
486 | 23 | # We recommend you use memcached for development; otherwise after every reload | ||
487 | 24 | # of the django development server, you will have to login again. To use | ||
488 | 25 | # memcached set CACHE_BACKED to something like 'memcached://127.0.0.1:11211/' | ||
489 | 26 | CACHE_BACKEND = 'locmem://' | ||
490 | 27 | |||
491 | 28 | # Send email to the console by default | ||
492 | 29 | EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' | ||
493 | 30 | # Or send them to /dev/null | ||
494 | 31 | #EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend' | ||
495 | 32 | |||
496 | 33 | # Configure these for your outgoing email host | ||
497 | 34 | # EMAIL_HOST = 'smtp.my-company.com' | ||
498 | 35 | # EMAIL_PORT = 25 | ||
499 | 36 | # EMAIL_HOST_USER = 'djangomail' | ||
500 | 37 | # EMAIL_HOST_PASSWORD = 'top-secret!' | ||
501 | 38 | |||
502 | 39 | # For multiple regions uncomment this configuration, and add (endpoint, title). | ||
503 | 40 | # AVAILABLE_REGIONS = [ | ||
504 | 41 | # ('http://cluster1.example.com:5000/v2.0', 'cluster1'), | ||
505 | 42 | # ('http://cluster2.example.com:5000/v2.0', 'cluster2'), | ||
506 | 43 | # ] | ||
507 | 44 | |||
508 | 45 | OPENSTACK_HOST = "127.0.0.1" | ||
509 | 46 | OPENSTACK_KEYSTONE_URL = "http://%s:5000/v2.0" % OPENSTACK_HOST | ||
510 | 47 | OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member" | ||
511 | 48 | |||
512 | 49 | # The OPENSTACK_KEYSTONE_BACKEND settings can be used to identify the | ||
513 | 50 | # capabilities of the auth backend for Keystone. | ||
514 | 51 | # If Keystone has been configured to use LDAP as the auth backend then set | ||
515 | 52 | # can_edit_user to False and name to 'ldap'. | ||
516 | 53 | # | ||
517 | 54 | # TODO(tres): Remove these once Keystone has an API to identify auth backend. | ||
518 | 55 | OPENSTACK_KEYSTONE_BACKEND = { | ||
519 | 56 | 'name': 'native', | ||
520 | 57 | 'can_edit_user': True | ||
521 | 58 | } | ||
522 | 59 | |||
523 | 60 | # OPENSTACK_ENDPOINT_TYPE specifies the endpoint type to use for the endpoints | ||
524 | 61 | # in the Keystone service catalog. Use this setting when Horizon is running | ||
525 | 62 | # external to the OpenStack environment. The default is 'internalURL'. | ||
526 | 63 | #OPENSTACK_ENDPOINT_TYPE = "publicURL" | ||
527 | 64 | |||
528 | 65 | # The number of Swift containers and objects to display on a single page before | ||
529 | 66 | # providing a paging element (a "more" link) to paginate results. | ||
530 | 67 | API_RESULT_LIMIT = 1000 | ||
531 | 68 | |||
532 | 69 | # If you have external monitoring links, eg: | ||
533 | 70 | # EXTERNAL_MONITORING = [ | ||
534 | 71 | # ['Nagios','http://foo.com'], | ||
535 | 72 | # ['Ganglia','http://bar.com'], | ||
536 | 73 | # ] | ||
537 | 74 | |||
538 | 75 | LOGGING = { | ||
539 | 76 | 'version': 1, | ||
540 | 77 | # When set to True this will disable all logging except | ||
541 | 78 | # for loggers specified in this configuration dictionary. Note that | ||
542 | 79 | # if nothing is specified here and disable_existing_loggers is True, | ||
543 | 80 | # django.db.backends will still log unless it is disabled explicitly. | ||
544 | 81 | 'disable_existing_loggers': False, | ||
545 | 82 | 'handlers': { | ||
546 | 83 | 'null': { | ||
547 | 84 | 'level': 'DEBUG', | ||
548 | 85 | 'class': 'django.utils.log.NullHandler', | ||
549 | 86 | }, | ||
550 | 87 | 'console': { | ||
551 | 88 | # Set the level to "DEBUG" for verbose output logging. | ||
552 | 89 | 'level': 'INFO', | ||
553 | 90 | 'class': 'logging.StreamHandler', | ||
554 | 91 | }, | ||
555 | 92 | }, | ||
556 | 93 | 'loggers': { | ||
557 | 94 | # Logging from django.db.backends is VERY verbose, send to null | ||
558 | 95 | # by default. | ||
559 | 96 | 'django.db.backends': { | ||
560 | 97 | 'handlers': ['null'], | ||
561 | 98 | 'propagate': False, | ||
562 | 99 | }, | ||
563 | 100 | 'horizon': { | ||
564 | 101 | 'handlers': ['console'], | ||
565 | 102 | 'propagate': False, | ||
566 | 103 | }, | ||
567 | 104 | 'novaclient': { | ||
568 | 105 | 'handlers': ['console'], | ||
569 | 106 | 'propagate': False, | ||
570 | 107 | }, | ||
571 | 108 | 'keystoneclient': { | ||
572 | 109 | 'handlers': ['console'], | ||
573 | 110 | 'propagate': False, | ||
574 | 111 | }, | ||
575 | 112 | 'nose.plugins.manager': { | ||
576 | 113 | 'handlers': ['console'], | ||
577 | 114 | 'propagate': False, | ||
578 | 115 | } | ||
579 | 116 | } | ||
580 | 117 | } | ||
581 | 118 | 0 | ||
582 | === added directory '.pc/allow_alternate_css.patch' | |||
583 | === removed directory '.pc/allow_alternate_css.patch' | |||
584 | === added file '.pc/allow_alternate_css.patch/.timestamp' | |||
585 | === added directory '.pc/allow_alternate_css.patch/horizon' | |||
586 | === removed directory '.pc/allow_alternate_css.patch/horizon' | |||
587 | === added directory '.pc/allow_alternate_css.patch/horizon/templatetags' | |||
588 | === removed directory '.pc/allow_alternate_css.patch/horizon/templatetags' | |||
589 | === added file '.pc/allow_alternate_css.patch/horizon/templatetags/branding.py' | |||
590 | --- .pc/allow_alternate_css.patch/horizon/templatetags/branding.py 1970-01-01 00:00:00 +0000 | |||
591 | +++ .pc/allow_alternate_css.patch/horizon/templatetags/branding.py 2013-04-24 15:22:28 +0000 | |||
592 | @@ -0,0 +1,62 @@ | |||
593 | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 | ||
594 | 2 | |||
595 | 3 | # Copyright 2012 United States Government as represented by the | ||
596 | 4 | # Administrator of the National Aeronautics and Space Administration. | ||
597 | 5 | # All Rights Reserved. | ||
598 | 6 | # | ||
599 | 7 | # Copyright 2012 Nebula, Inc. | ||
600 | 8 | # | ||
601 | 9 | # Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
602 | 10 | # not use this file except in compliance with the License. You may obtain | ||
603 | 11 | # a copy of the License at | ||
604 | 12 | # | ||
605 | 13 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
606 | 14 | # | ||
607 | 15 | # Unless required by applicable law or agreed to in writing, software | ||
608 | 16 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
609 | 17 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
610 | 18 | # License for the specific language governing permissions and limitations | ||
611 | 19 | # under the License. | ||
612 | 20 | |||
613 | 21 | """ | ||
614 | 22 | Template tags for customizing Horizon. | ||
615 | 23 | """ | ||
616 | 24 | |||
617 | 25 | from django import template | ||
618 | 26 | from django.conf import settings | ||
619 | 27 | |||
620 | 28 | |||
621 | 29 | register = template.Library() | ||
622 | 30 | |||
623 | 31 | |||
624 | 32 | class SiteBrandingNode(template.Node): | ||
625 | 33 | def render(self, context): | ||
626 | 34 | return settings.SITE_BRANDING | ||
627 | 35 | |||
628 | 36 | |||
629 | 37 | @register.tag | ||
630 | 38 | def site_branding(parser, token): | ||
631 | 39 | return SiteBrandingNode() | ||
632 | 40 | |||
633 | 41 | |||
634 | 42 | @register.tag | ||
635 | 43 | def site_title(parser, token): | ||
636 | 44 | return settings.SITE_BRANDING | ||
637 | 45 | |||
638 | 46 | |||
639 | 47 | # TODO(jeffjapan): This is just an assignment tag version of the above, replace | ||
640 | 48 | # when the dashboard is upgraded to a django version that | ||
641 | 49 | # supports the @assignment_tag decorator syntax instead. | ||
642 | 50 | class SaveBrandingNode(template.Node): | ||
643 | 51 | def __init__(self, var_name): | ||
644 | 52 | self.var_name = var_name | ||
645 | 53 | |||
646 | 54 | def render(self, context): | ||
647 | 55 | context[self.var_name] = settings.SITE_BRANDING | ||
648 | 56 | return "" | ||
649 | 57 | |||
650 | 58 | |||
651 | 59 | @register.tag | ||
652 | 60 | def save_site_branding(parser, token): | ||
653 | 61 | tagname = token.contents.split() | ||
654 | 62 | return SaveBrandingNode(tagname[-1]) | ||
655 | 0 | 63 | ||
656 | === removed file '.pc/allow_alternate_css.patch/horizon/templatetags/branding.py' | |||
657 | --- .pc/allow_alternate_css.patch/horizon/templatetags/branding.py 2012-04-23 10:04:39 +0000 | |||
658 | +++ .pc/allow_alternate_css.patch/horizon/templatetags/branding.py 1970-01-01 00:00:00 +0000 | |||
659 | @@ -1,62 +0,0 @@ | |||
660 | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 | ||
661 | 2 | |||
662 | 3 | # Copyright 2012 United States Government as represented by the | ||
663 | 4 | # Administrator of the National Aeronautics and Space Administration. | ||
664 | 5 | # All Rights Reserved. | ||
665 | 6 | # | ||
666 | 7 | # Copyright 2012 Nebula, Inc. | ||
667 | 8 | # | ||
668 | 9 | # Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
669 | 10 | # not use this file except in compliance with the License. You may obtain | ||
670 | 11 | # a copy of the License at | ||
671 | 12 | # | ||
672 | 13 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
673 | 14 | # | ||
674 | 15 | # Unless required by applicable law or agreed to in writing, software | ||
675 | 16 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
676 | 17 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
677 | 18 | # License for the specific language governing permissions and limitations | ||
678 | 19 | # under the License. | ||
679 | 20 | |||
680 | 21 | """ | ||
681 | 22 | Template tags for customizing Horizon. | ||
682 | 23 | """ | ||
683 | 24 | |||
684 | 25 | from django import template | ||
685 | 26 | from django.conf import settings | ||
686 | 27 | |||
687 | 28 | |||
688 | 29 | register = template.Library() | ||
689 | 30 | |||
690 | 31 | |||
691 | 32 | class SiteBrandingNode(template.Node): | ||
692 | 33 | def render(self, context): | ||
693 | 34 | return settings.SITE_BRANDING | ||
694 | 35 | |||
695 | 36 | |||
696 | 37 | @register.tag | ||
697 | 38 | def site_branding(parser, token): | ||
698 | 39 | return SiteBrandingNode() | ||
699 | 40 | |||
700 | 41 | |||
701 | 42 | @register.tag | ||
702 | 43 | def site_title(parser, token): | ||
703 | 44 | return settings.SITE_BRANDING | ||
704 | 45 | |||
705 | 46 | |||
706 | 47 | # TODO(jeffjapan): This is just an assignment tag version of the above, replace | ||
707 | 48 | # when the dashboard is upgraded to a django version that | ||
708 | 49 | # supports the @assignment_tag decorator syntax instead. | ||
709 | 50 | class SaveBrandingNode(template.Node): | ||
710 | 51 | def __init__(self, var_name): | ||
711 | 52 | self.var_name = var_name | ||
712 | 53 | |||
713 | 54 | def render(self, context): | ||
714 | 55 | context[self.var_name] = settings.SITE_BRANDING | ||
715 | 56 | return "" | ||
716 | 57 | |||
717 | 58 | |||
718 | 59 | @register.tag | ||
719 | 60 | def save_site_branding(parser, token): | ||
720 | 61 | tagname = token.contents.split() | ||
721 | 62 | return SaveBrandingNode(tagname[-1]) | ||
722 | 63 | 0 | ||
723 | === added directory '.pc/allow_alternate_css.patch/openstack_dashboard' | |||
724 | === removed directory '.pc/allow_alternate_css.patch/openstack_dashboard' | |||
725 | === added directory '.pc/allow_alternate_css.patch/openstack_dashboard/templates' | |||
726 | === removed directory '.pc/allow_alternate_css.patch/openstack_dashboard/templates' | |||
727 | === added file '.pc/allow_alternate_css.patch/openstack_dashboard/templates/_stylesheets.html' | |||
728 | --- .pc/allow_alternate_css.patch/openstack_dashboard/templates/_stylesheets.html 1970-01-01 00:00:00 +0000 | |||
729 | +++ .pc/allow_alternate_css.patch/openstack_dashboard/templates/_stylesheets.html 2013-04-24 15:22:28 +0000 | |||
730 | @@ -0,0 +1,6 @@ | |||
731 | 1 | {% comment %} CSS {% endcomment %} | ||
732 | 2 | <link href='{{ STATIC_URL }}bootstrap/css/bootstrap.min.css' media='screen' rel='stylesheet' /> | ||
733 | 3 | <link href='{{ STATIC_URL }}dashboard/css/style.css' media='screen' rel='stylesheet' /> | ||
734 | 4 | |||
735 | 5 | {% comment %} Favicon {% endcomment %} | ||
736 | 6 | <link rel="shortcut icon" href="{{ STATIC_URL }}dashboard/img/favicon.ico"/> | ||
737 | 0 | 7 | ||
738 | === removed file '.pc/allow_alternate_css.patch/openstack_dashboard/templates/_stylesheets.html' | |||
739 | --- .pc/allow_alternate_css.patch/openstack_dashboard/templates/_stylesheets.html 2012-04-23 10:04:39 +0000 | |||
740 | +++ .pc/allow_alternate_css.patch/openstack_dashboard/templates/_stylesheets.html 1970-01-01 00:00:00 +0000 | |||
741 | @@ -1,6 +0,0 @@ | |||
742 | 1 | {% comment %} CSS {% endcomment %} | ||
743 | 2 | <link href='{{ STATIC_URL }}bootstrap/css/bootstrap.min.css' media='screen' rel='stylesheet' /> | ||
744 | 3 | <link href='{{ STATIC_URL }}dashboard/css/style.css' media='screen' rel='stylesheet' /> | ||
745 | 4 | |||
746 | 5 | {% comment %} Favicon {% endcomment %} | ||
747 | 6 | <link rel="shortcut icon" href="{{ STATIC_URL }}dashboard/img/favicon.ico"/> | ||
748 | 7 | 0 | ||
749 | === added file '.pc/applied-patches' | |||
750 | --- .pc/applied-patches 1970-01-01 00:00:00 +0000 | |||
751 | +++ .pc/applied-patches 2013-04-24 15:22:28 +0000 | |||
752 | @@ -0,0 +1,8 @@ | |||
753 | 1 | fix-dashboard-django-wsgi.patch | ||
754 | 2 | fix-dashboard-manage.patch | ||
755 | 3 | fix-coverage-binary-name.patch | ||
756 | 4 | add_juju_settings_panel.patch | ||
757 | 5 | turn-off-debug.patch | ||
758 | 6 | allow_alternate_css.patch | ||
759 | 7 | use-memcache.patch | ||
760 | 8 | juju_panel-handle_catalog_exception.patch | ||
761 | 0 | 9 | ||
762 | === removed file '.pc/applied-patches' | |||
763 | --- .pc/applied-patches 2012-08-30 17:15:04 +0000 | |||
764 | +++ .pc/applied-patches 1970-01-01 00:00:00 +0000 | |||
765 | @@ -1,9 +0,0 @@ | |||
766 | 1 | fix-dashboard-django-wsgi.patch | ||
767 | 2 | fix-dashboard-manage.patch | ||
768 | 3 | fix-coverage-binary-name.patch | ||
769 | 4 | add_juju_settings_panel.patch | ||
770 | 5 | turn-off-debug.patch | ||
771 | 6 | allow_alternate_css.patch | ||
772 | 7 | use-memcache.patch | ||
773 | 8 | juju_panel-handle_catalog_exception.patch | ||
774 | 9 | CVE-2012-3540.patch | ||
775 | 10 | 0 | ||
776 | === added directory '.pc/fix-coverage-binary-name.patch' | |||
777 | === removed directory '.pc/fix-coverage-binary-name.patch' | |||
778 | === added file '.pc/fix-coverage-binary-name.patch/.timestamp' | |||
779 | === added file '.pc/fix-coverage-binary-name.patch/run_tests.sh' | |||
780 | --- .pc/fix-coverage-binary-name.patch/run_tests.sh 1970-01-01 00:00:00 +0000 | |||
781 | +++ .pc/fix-coverage-binary-name.patch/run_tests.sh 2013-04-24 15:22:28 +0000 | |||
782 | @@ -0,0 +1,403 @@ | |||
783 | 1 | #!/bin/bash | ||
784 | 2 | |||
785 | 3 | set -o errexit | ||
786 | 4 | |||
787 | 5 | # ---------------UPDATE ME-------------------------------# | ||
788 | 6 | # Increment me any time the environment should be rebuilt. | ||
789 | 7 | # This includes dependncy changes, directory renames, etc. | ||
790 | 8 | # Simple integer secuence: 1, 2, 3... | ||
791 | 9 | environment_version=14 | ||
792 | 10 | #--------------------------------------------------------# | ||
793 | 11 | |||
794 | 12 | function usage { | ||
795 | 13 | echo "Usage: $0 [OPTION]..." | ||
796 | 14 | echo "Run Horizon's test suite(s)" | ||
797 | 15 | echo "" | ||
798 | 16 | echo " -V, --virtual-env Always use virtualenv. Install automatically" | ||
799 | 17 | echo " if not present" | ||
800 | 18 | echo " -N, --no-virtual-env Don't use virtualenv. Run tests in local" | ||
801 | 19 | echo " environment" | ||
802 | 20 | echo " -c, --coverage Generate reports using Coverage" | ||
803 | 21 | echo " -f, --force Force a clean re-build of the virtual" | ||
804 | 22 | echo " environment. Useful when dependencies have" | ||
805 | 23 | echo " been added." | ||
806 | 24 | echo " -m, --makemessages Update all translation files." | ||
807 | 25 | echo " -p, --pep8 Just run pep8" | ||
808 | 26 | echo " -t, --tabs Check for tab characters in files." | ||
809 | 27 | echo " -y, --pylint Just run pylint" | ||
810 | 28 | echo " -q, --quiet Run non-interactively. (Relatively) quiet." | ||
811 | 29 | echo " Implies -V if -N is not set." | ||
812 | 30 | echo " --only-selenium Run only the Selenium unit tests" | ||
813 | 31 | echo " --with-selenium Run unit tests including Selenium tests" | ||
814 | 32 | echo " --runserver Run the Django development server for" | ||
815 | 33 | echo " openstack_dashboard in the virtual" | ||
816 | 34 | echo " environment." | ||
817 | 35 | echo " --docs Just build the documentation" | ||
818 | 36 | echo " --backup-environment Make a backup of the environment on exit" | ||
819 | 37 | echo " --restore-environment Restore the environment before running" | ||
820 | 38 | echo " --destroy-environment DEstroy the environment and exit" | ||
821 | 39 | echo " -h, --help Print this usage message" | ||
822 | 40 | echo "" | ||
823 | 41 | echo "Note: with no options specified, the script will try to run the tests in" | ||
824 | 42 | echo " a virtual environment, If no virtualenv is found, the script will ask" | ||
825 | 43 | echo " if you would like to create one. If you prefer to run tests NOT in a" | ||
826 | 44 | echo " virtual environment, simply pass the -N option." | ||
827 | 45 | exit | ||
828 | 46 | } | ||
829 | 47 | |||
830 | 48 | # DEFAULTS FOR RUN_TESTS.SH | ||
831 | 49 | # | ||
832 | 50 | root=`pwd` | ||
833 | 51 | venv=$root/.venv | ||
834 | 52 | with_venv=tools/with_venv.sh | ||
835 | 53 | included_dirs="openstack_dashboard horizon" | ||
836 | 54 | |||
837 | 55 | always_venv=0 | ||
838 | 56 | backup_env=0 | ||
839 | 57 | command_wrapper="" | ||
840 | 58 | destroy=0 | ||
841 | 59 | force=0 | ||
842 | 60 | just_pep8=0 | ||
843 | 61 | just_pylint=0 | ||
844 | 62 | just_docs=0 | ||
845 | 63 | just_tabs=0 | ||
846 | 64 | never_venv=0 | ||
847 | 65 | quiet=0 | ||
848 | 66 | restore_env=0 | ||
849 | 67 | runserver=0 | ||
850 | 68 | only_selenium=0 | ||
851 | 69 | with_selenium=0 | ||
852 | 70 | testargs="" | ||
853 | 71 | with_coverage=0 | ||
854 | 72 | makemessages=0 | ||
855 | 73 | |||
856 | 74 | # Jenkins sets a "JOB_NAME" variable, if it's not set, we'll make it "default" | ||
857 | 75 | [ "$JOB_NAME" ] || JOB_NAME="default" | ||
858 | 76 | |||
859 | 77 | function process_option { | ||
860 | 78 | case "$1" in | ||
861 | 79 | -h|--help) usage;; | ||
862 | 80 | -V|--virtual-env) always_venv=1; never_venv=0;; | ||
863 | 81 | -N|--no-virtual-env) always_venv=0; never_venv=1;; | ||
864 | 82 | -p|--pep8) just_pep8=1;; | ||
865 | 83 | -y|--pylint) just_pylint=1;; | ||
866 | 84 | -f|--force) force=1;; | ||
867 | 85 | -t|--tabs) just_tabs=1;; | ||
868 | 86 | -q|--quiet) quiet=1;; | ||
869 | 87 | -c|--coverage) with_coverage=1;; | ||
870 | 88 | -m|--makemessages) makemessages=1;; | ||
871 | 89 | --only-selenium) only_selenium=1; with_selenium=1;; | ||
872 | 90 | --with-selenium) with_selenium=1;; | ||
873 | 91 | --docs) just_docs=1;; | ||
874 | 92 | --runserver) runserver=1;; | ||
875 | 93 | --backup-environment) backup_env=1;; | ||
876 | 94 | --restore-environment) restore_env=1;; | ||
877 | 95 | --destroy-environment) destroy=1;; | ||
878 | 96 | *) testargs="$testargs $1" | ||
879 | 97 | esac | ||
880 | 98 | } | ||
881 | 99 | |||
882 | 100 | function run_server { | ||
883 | 101 | echo "Starting Django development server..." | ||
884 | 102 | ${command_wrapper} python $root/manage.py runserver $testargs | ||
885 | 103 | echo "Server stopped." | ||
886 | 104 | } | ||
887 | 105 | |||
888 | 106 | function run_pylint { | ||
889 | 107 | echo "Running pylint ..." | ||
890 | 108 | PYTHONPATH=$root ${command_wrapper} pylint --rcfile=.pylintrc -f parseable $included_dirs > pylint.txt || true | ||
891 | 109 | CODE=$? | ||
892 | 110 | grep Global -A2 pylint.txt | ||
893 | 111 | if [ $CODE -lt 32 ]; then | ||
894 | 112 | echo "Completed successfully." | ||
895 | 113 | exit 0 | ||
896 | 114 | else | ||
897 | 115 | echo "Completed with problems." | ||
898 | 116 | exit $CODE | ||
899 | 117 | fi | ||
900 | 118 | } | ||
901 | 119 | |||
902 | 120 | function run_pep8 { | ||
903 | 121 | echo "Running pep8 ..." | ||
904 | 122 | rm -f pep8.txt | ||
905 | 123 | PEP8_EXCLUDE=vcsversion.py | ||
906 | 124 | PEP8_IGNORE=W602 | ||
907 | 125 | PEP8_OPTIONS="--exclude=$PEP8_EXCLUDE --ignore=$PEP8_IGNORE --repeat" | ||
908 | 126 | ${command_wrapper} pep8 $PEP8_OPTIONS $included_dirs > pep8.txt || true | ||
909 | 127 | PEP8_COUNT=`wc -l pep8.txt | awk '{ print $1 }'` | ||
910 | 128 | if [ $PEP8_COUNT -ge 1 ]; then | ||
911 | 129 | echo "PEP8 violations found ($PEP8_COUNT):" | ||
912 | 130 | cat pep8.txt | ||
913 | 131 | echo "Please fix all PEP8 violations before committing." | ||
914 | 132 | else | ||
915 | 133 | echo "No violations found. Good job!" | ||
916 | 134 | fi | ||
917 | 135 | exit $PEP8_COUNT | ||
918 | 136 | } | ||
919 | 137 | |||
920 | 138 | function run_sphinx { | ||
921 | 139 | echo "Building sphinx..." | ||
922 | 140 | export DJANGO_SETTINGS_MODULE=openstack_dashboard.settings | ||
923 | 141 | ${command_wrapper} sphinx-build -b html docs/source docs/build/html | ||
924 | 142 | echo "Build complete." | ||
925 | 143 | } | ||
926 | 144 | |||
927 | 145 | function tab_check { | ||
928 | 146 | TAB_VIOLATIONS=`find $included_dirs -type f -regex ".*\.\(css\|js\|py\|html\)" -print0 | xargs -0 awk '/\t/' | wc -l` | ||
929 | 147 | if [ $TAB_VIOLATIONS -gt 0 ]; then | ||
930 | 148 | echo "TABS! $TAB_VIOLATIONS of them! Oh no!" | ||
931 | 149 | HORIZON_FILES=`find $included_dirs -type f -regex ".*\.\(css\|js\|py|\html\)"` | ||
932 | 150 | for TABBED_FILE in $HORIZON_FILES | ||
933 | 151 | do | ||
934 | 152 | TAB_COUNT=`awk '/\t/' $TABBED_FILE | wc -l` | ||
935 | 153 | if [ $TAB_COUNT -gt 0 ]; then | ||
936 | 154 | echo "$TABBED_FILE: $TAB_COUNT" | ||
937 | 155 | fi | ||
938 | 156 | done | ||
939 | 157 | fi | ||
940 | 158 | return $TAB_VIOLATIONS; | ||
941 | 159 | } | ||
942 | 160 | |||
943 | 161 | function destroy_venv { | ||
944 | 162 | echo "Cleaning environment..." | ||
945 | 163 | echo "Removing virtualenv..." | ||
946 | 164 | rm -rf $venv | ||
947 | 165 | echo "Virtualenv removed." | ||
948 | 166 | rm -f .environment_version | ||
949 | 167 | echo "Environment cleaned." | ||
950 | 168 | } | ||
951 | 169 | |||
952 | 170 | function environment_check { | ||
953 | 171 | echo "Checking environment." | ||
954 | 172 | if [ -f .environment_version ]; then | ||
955 | 173 | ENV_VERS=`cat .environment_version` | ||
956 | 174 | if [ $ENV_VERS -eq $environment_version ]; then | ||
957 | 175 | if [ -e ${venv} ]; then | ||
958 | 176 | # If the environment exists and is up-to-date then set our variables | ||
959 | 177 | command_wrapper="${root}/${with_venv}" | ||
960 | 178 | echo "Environment is up to date." | ||
961 | 179 | return 0 | ||
962 | 180 | fi | ||
963 | 181 | fi | ||
964 | 182 | fi | ||
965 | 183 | |||
966 | 184 | if [ $always_venv -eq 1 ]; then | ||
967 | 185 | install_venv | ||
968 | 186 | else | ||
969 | 187 | if [ ! -e ${venv} ]; then | ||
970 | 188 | echo -e "Environment not found. Install? (Y/n) \c" | ||
971 | 189 | else | ||
972 | 190 | echo -e "Your environment appears to be out of date. Update? (Y/n) \c" | ||
973 | 191 | fi | ||
974 | 192 | read update_env | ||
975 | 193 | if [ "x$update_env" = "xY" -o "x$update_env" = "x" -o "x$update_env" = "xy" ]; then | ||
976 | 194 | install_venv | ||
977 | 195 | fi | ||
978 | 196 | fi | ||
979 | 197 | } | ||
980 | 198 | |||
981 | 199 | function sanity_check { | ||
982 | 200 | # Anything that should be determined prior to running the tests, server, etc. | ||
983 | 201 | # Don't sanity-check anything environment-related in -N flag is set | ||
984 | 202 | if [ $never_venv -eq 0 ]; then | ||
985 | 203 | if [ ! -e ${venv} ]; then | ||
986 | 204 | echo "Virtualenv not found at $venv. Did install_venv.py succeed?" | ||
987 | 205 | exit 1 | ||
988 | 206 | fi | ||
989 | 207 | fi | ||
990 | 208 | if [ $with_selenium -eq 1 ]; then | ||
991 | 209 | SELENIUM_JOB=`ps -elf | grep "selenium" | grep -v grep` | ||
992 | 210 | if [ $? -eq 0 ]; then | ||
993 | 211 | echo "WARNING: Selenium doesn't appear to be running. Please start a selenium server process." | ||
994 | 212 | with_selenium=0 | ||
995 | 213 | fi | ||
996 | 214 | fi | ||
997 | 215 | if [ $only_selenium -eq 1 ]; then | ||
998 | 216 | export SKIP_UNITTESTS=1 | ||
999 | 217 | fi | ||
1000 | 218 | # Remove .pyc files. This is sanity checking because they can linger | ||
1001 | 219 | # after old files are deleted. | ||
1002 | 220 | find . -name "*.pyc" -exec rm -rf {} \; | ||
1003 | 221 | } | ||
1004 | 222 | |||
1005 | 223 | function backup_environment { | ||
1006 | 224 | if [ $backup_env -eq 1 ]; then | ||
1007 | 225 | echo "Backing up environment \"$JOB_NAME\"..." | ||
1008 | 226 | if [ ! -e ${venv} ]; then | ||
1009 | 227 | echo "Environment not installed. Cannot back up." | ||
1010 | 228 | return 0 | ||
1011 | 229 | fi | ||
1012 | 230 | if [ -d /tmp/.horizon_environment/$JOB_NAME ]; then | ||
1013 | 231 | mv /tmp/.horizon_environment/$JOB_NAME /tmp/.horizon_environment/$JOB_NAME.old | ||
1014 | 232 | rm -rf /tmp/.horizon_environment/$JOB_NAME | ||
1015 | 233 | fi | ||
1016 | 234 | mkdir -p /tmp/.horizon_environment/$JOB_NAME | ||
1017 | 235 | cp -r $venv /tmp/.horizon_environment/$JOB_NAME/ | ||
1018 | 236 | cp .environment_version /tmp/.horizon_environment/$JOB_NAME/ | ||
1019 | 237 | # Remove the backup now that we've completed successfully | ||
1020 | 238 | rm -rf /tmp/.horizon_environment/$JOB_NAME.old | ||
1021 | 239 | echo "Backup completed" | ||
1022 | 240 | fi | ||
1023 | 241 | } | ||
1024 | 242 | |||
1025 | 243 | function restore_environment { | ||
1026 | 244 | if [ $restore_env -eq 1 ]; then | ||
1027 | 245 | echo "Restoring environment from backup..." | ||
1028 | 246 | if [ ! -d /tmp/.horizon_environment/$JOB_NAME ]; then | ||
1029 | 247 | echo "No backup to restore from." | ||
1030 | 248 | return 0 | ||
1031 | 249 | fi | ||
1032 | 250 | |||
1033 | 251 | cp -r /tmp/.horizon_environment/$JOB_NAME/.venv ./ || true | ||
1034 | 252 | cp -r /tmp/.horizon_environment/$JOB_NAME/.environment_version ./ || true | ||
1035 | 253 | |||
1036 | 254 | echo "Environment restored successfully." | ||
1037 | 255 | fi | ||
1038 | 256 | } | ||
1039 | 257 | |||
1040 | 258 | function install_venv { | ||
1041 | 259 | # Install with install_venv.py | ||
1042 | 260 | export PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE-/tmp/.pip_download_cache} | ||
1043 | 261 | export PIP_USE_MIRRORS=true | ||
1044 | 262 | if [ $quiet -eq 1 ]; then | ||
1045 | 263 | export PIP_NO_INPUT=true | ||
1046 | 264 | fi | ||
1047 | 265 | echo "Fetching new src packages..." | ||
1048 | 266 | rm -rf $venv/src | ||
1049 | 267 | python tools/install_venv.py | ||
1050 | 268 | command_wrapper="$root/${with_venv}" | ||
1051 | 269 | # Make sure it worked and record the environment version | ||
1052 | 270 | sanity_check | ||
1053 | 271 | chmod -R 754 $venv | ||
1054 | 272 | echo $environment_version > .environment_version | ||
1055 | 273 | } | ||
1056 | 274 | |||
1057 | 275 | function run_tests { | ||
1058 | 276 | sanity_check | ||
1059 | 277 | |||
1060 | 278 | echo "Running Horizon application tests" | ||
1061 | 279 | export NOSE_XUNIT_FILE=horizon/nosetests.xml | ||
1062 | 280 | ${command_wrapper} coverage erase | ||
1063 | 281 | ${command_wrapper} coverage run -p $root/manage.py test horizon --settings=horizon.tests.testsettings $testargs | ||
1064 | 282 | # get results of the Horizon tests | ||
1065 | 283 | HORIZON_RESULT=$? | ||
1066 | 284 | |||
1067 | 285 | echo "Running openstack_dashboard tests" | ||
1068 | 286 | export NOSE_XUNIT_FILE=openstack_dashboard/nosetests.xml | ||
1069 | 287 | if [ $with_selenium -eq 1 ]; then | ||
1070 | 288 | ${command_wrapper} coverage run -p $root/manage.py test openstack_dashboard --settings=horizon.tests.testsettings --with-selenium --with-cherrypyliveserver $testargs | ||
1071 | 289 | else | ||
1072 | 290 | ${command_wrapper} coverage run -p $root/manage.py test openstack_dashboard --settings=horizon.tests.testsettings $testargs | ||
1073 | 291 | fi | ||
1074 | 292 | # get results of the openstack_dashboard tests | ||
1075 | 293 | DASHBOARD_RESULT=$? | ||
1076 | 294 | |||
1077 | 295 | if [ $with_coverage -eq 1 ]; then | ||
1078 | 296 | echo "Generating coverage reports" | ||
1079 | 297 | ${command_wrapper} coverage combine | ||
1080 | 298 | ${command_wrapper} coverage xml -i --omit='/usr*,setup.py,*egg*,.venv/*' | ||
1081 | 299 | ${command_wrapper} coverage html -i --omit='/usr*,setup.py,*egg*,.venv/*' -d reports | ||
1082 | 300 | fi | ||
1083 | 301 | # Remove the leftover coverage files from the -p flag earlier. | ||
1084 | 302 | rm -f .coverage.* | ||
1085 | 303 | |||
1086 | 304 | if [ $(($HORIZON_RESULT || $DASHBOARD_RESULT)) -eq 0 ]; then | ||
1087 | 305 | echo "Tests completed successfully." | ||
1088 | 306 | else | ||
1089 | 307 | echo "Tests failed." | ||
1090 | 308 | fi | ||
1091 | 309 | exit $(($HORIZON_RESULT || $DASHBOARD_RESULT)) | ||
1092 | 310 | } | ||
1093 | 311 | |||
1094 | 312 | function run_makemessages { | ||
1095 | 313 | cd horizon | ||
1096 | 314 | ${command_wrapper} $root/manage.py makemessages --all | ||
1097 | 315 | HORIZON_RESULT=$? | ||
1098 | 316 | cd ../openstack_dashboard | ||
1099 | 317 | ${command_wrapper} $root/manage.py makemessages --all | ||
1100 | 318 | DASHBOARD_RESULT=$? | ||
1101 | 319 | cd .. | ||
1102 | 320 | exit $(($HORIZON_RESULT || $DASHBOARD_RESULT)) | ||
1103 | 321 | } | ||
1104 | 322 | |||
1105 | 323 | |||
1106 | 324 | # ---------PREPARE THE ENVIRONMENT------------ # | ||
1107 | 325 | |||
1108 | 326 | # PROCESS ARGUMENTS, OVERRIDE DEFAULTS | ||
1109 | 327 | for arg in "$@"; do | ||
1110 | 328 | process_option $arg | ||
1111 | 329 | done | ||
1112 | 330 | |||
1113 | 331 | if [ $quiet -eq 1 ] && [ $never_venv -eq 0 ] && [ $always_venv -eq 0 ] | ||
1114 | 332 | then | ||
1115 | 333 | always_venv=1 | ||
1116 | 334 | fi | ||
1117 | 335 | |||
1118 | 336 | # If destroy is set, just blow it away and exit. | ||
1119 | 337 | if [ $destroy -eq 1 ]; then | ||
1120 | 338 | destroy_venv | ||
1121 | 339 | exit 0 | ||
1122 | 340 | fi | ||
1123 | 341 | |||
1124 | 342 | # Ignore all of this if the -N flag was set | ||
1125 | 343 | if [ $never_venv -eq 0 ]; then | ||
1126 | 344 | |||
1127 | 345 | # Restore previous environment if desired | ||
1128 | 346 | if [ $restore_env -eq 1 ]; then | ||
1129 | 347 | restore_environment | ||
1130 | 348 | fi | ||
1131 | 349 | |||
1132 | 350 | # Remove the virtual environment if --force used | ||
1133 | 351 | if [ $force -eq 1 ]; then | ||
1134 | 352 | destroy_venv | ||
1135 | 353 | fi | ||
1136 | 354 | |||
1137 | 355 | # Then check if it's up-to-date | ||
1138 | 356 | environment_check | ||
1139 | 357 | |||
1140 | 358 | # Create a backup of the up-to-date environment if desired | ||
1141 | 359 | if [ $backup_env -eq 1 ]; then | ||
1142 | 360 | backup_environment | ||
1143 | 361 | fi | ||
1144 | 362 | fi | ||
1145 | 363 | |||
1146 | 364 | # ---------EXERCISE THE CODE------------ # | ||
1147 | 365 | |||
1148 | 366 | # Build the docs | ||
1149 | 367 | if [ $just_docs -eq 1 ]; then | ||
1150 | 368 | run_sphinx | ||
1151 | 369 | exit $? | ||
1152 | 370 | fi | ||
1153 | 371 | |||
1154 | 372 | # Update translation files | ||
1155 | 373 | if [ $makemessages -eq 1 ]; then | ||
1156 | 374 | run_makemessages | ||
1157 | 375 | exit $? | ||
1158 | 376 | fi | ||
1159 | 377 | |||
1160 | 378 | # PEP8 | ||
1161 | 379 | if [ $just_pep8 -eq 1 ]; then | ||
1162 | 380 | run_pep8 | ||
1163 | 381 | exit $? | ||
1164 | 382 | fi | ||
1165 | 383 | |||
1166 | 384 | # Pylint | ||
1167 | 385 | if [ $just_pylint -eq 1 ]; then | ||
1168 | 386 | run_pylint | ||
1169 | 387 | exit $? | ||
1170 | 388 | fi | ||
1171 | 389 | |||
1172 | 390 | # Tab checker | ||
1173 | 391 | if [ $just_tabs -eq 1 ]; then | ||
1174 | 392 | tab_check | ||
1175 | 393 | exit $? | ||
1176 | 394 | fi | ||
1177 | 395 | |||
1178 | 396 | # Django development server | ||
1179 | 397 | if [ $runserver -eq 1 ]; then | ||
1180 | 398 | run_server | ||
1181 | 399 | exit $? | ||
1182 | 400 | fi | ||
1183 | 401 | |||
1184 | 402 | # Full test suite | ||
1185 | 403 | run_tests || exit | ||
1186 | 0 | 404 | ||
1187 | === removed file '.pc/fix-coverage-binary-name.patch/run_tests.sh' | |||
1188 | --- .pc/fix-coverage-binary-name.patch/run_tests.sh 2012-08-24 03:27:33 +0000 | |||
1189 | +++ .pc/fix-coverage-binary-name.patch/run_tests.sh 1970-01-01 00:00:00 +0000 | |||
1190 | @@ -1,403 +0,0 @@ | |||
1191 | 1 | #!/bin/bash | ||
1192 | 2 | |||
1193 | 3 | set -o errexit | ||
1194 | 4 | |||
1195 | 5 | # ---------------UPDATE ME-------------------------------# | ||
1196 | 6 | # Increment me any time the environment should be rebuilt. | ||
1197 | 7 | # This includes dependncy changes, directory renames, etc. | ||
1198 | 8 | # Simple integer secuence: 1, 2, 3... | ||
1199 | 9 | environment_version=14 | ||
1200 | 10 | #--------------------------------------------------------# | ||
1201 | 11 | |||
1202 | 12 | function usage { | ||
1203 | 13 | echo "Usage: $0 [OPTION]..." | ||
1204 | 14 | echo "Run Horizon's test suite(s)" | ||
1205 | 15 | echo "" | ||
1206 | 16 | echo " -V, --virtual-env Always use virtualenv. Install automatically" | ||
1207 | 17 | echo " if not present" | ||
1208 | 18 | echo " -N, --no-virtual-env Don't use virtualenv. Run tests in local" | ||
1209 | 19 | echo " environment" | ||
1210 | 20 | echo " -c, --coverage Generate reports using Coverage" | ||
1211 | 21 | echo " -f, --force Force a clean re-build of the virtual" | ||
1212 | 22 | echo " environment. Useful when dependencies have" | ||
1213 | 23 | echo " been added." | ||
1214 | 24 | echo " -m, --makemessages Update all translation files." | ||
1215 | 25 | echo " -p, --pep8 Just run pep8" | ||
1216 | 26 | echo " -t, --tabs Check for tab characters in files." | ||
1217 | 27 | echo " -y, --pylint Just run pylint" | ||
1218 | 28 | echo " -q, --quiet Run non-interactively. (Relatively) quiet." | ||
1219 | 29 | echo " Implies -V if -N is not set." | ||
1220 | 30 | echo " --only-selenium Run only the Selenium unit tests" | ||
1221 | 31 | echo " --with-selenium Run unit tests including Selenium tests" | ||
1222 | 32 | echo " --runserver Run the Django development server for" | ||
1223 | 33 | echo " openstack_dashboard in the virtual" | ||
1224 | 34 | echo " environment." | ||
1225 | 35 | echo " --docs Just build the documentation" | ||
1226 | 36 | echo " --backup-environment Make a backup of the environment on exit" | ||
1227 | 37 | echo " --restore-environment Restore the environment before running" | ||
1228 | 38 | echo " --destroy-environment DEstroy the environment and exit" | ||
1229 | 39 | echo " -h, --help Print this usage message" | ||
1230 | 40 | echo "" | ||
1231 | 41 | echo "Note: with no options specified, the script will try to run the tests in" | ||
1232 | 42 | echo " a virtual environment, If no virtualenv is found, the script will ask" | ||
1233 | 43 | echo " if you would like to create one. If you prefer to run tests NOT in a" | ||
1234 | 44 | echo " virtual environment, simply pass the -N option." | ||
1235 | 45 | exit | ||
1236 | 46 | } | ||
1237 | 47 | |||
1238 | 48 | # DEFAULTS FOR RUN_TESTS.SH | ||
1239 | 49 | # | ||
1240 | 50 | root=`pwd` | ||
1241 | 51 | venv=$root/.venv | ||
1242 | 52 | with_venv=tools/with_venv.sh | ||
1243 | 53 | included_dirs="openstack_dashboard horizon" | ||
1244 | 54 | |||
1245 | 55 | always_venv=0 | ||
1246 | 56 | backup_env=0 | ||
1247 | 57 | command_wrapper="" | ||
1248 | 58 | destroy=0 | ||
1249 | 59 | force=0 | ||
1250 | 60 | just_pep8=0 | ||
1251 | 61 | just_pylint=0 | ||
1252 | 62 | just_docs=0 | ||
1253 | 63 | just_tabs=0 | ||
1254 | 64 | never_venv=0 | ||
1255 | 65 | quiet=0 | ||
1256 | 66 | restore_env=0 | ||
1257 | 67 | runserver=0 | ||
1258 | 68 | only_selenium=0 | ||
1259 | 69 | with_selenium=0 | ||
1260 | 70 | testargs="" | ||
1261 | 71 | with_coverage=0 | ||
1262 | 72 | makemessages=0 | ||
1263 | 73 | |||
1264 | 74 | # Jenkins sets a "JOB_NAME" variable, if it's not set, we'll make it "default" | ||
1265 | 75 | [ "$JOB_NAME" ] || JOB_NAME="default" | ||
1266 | 76 | |||
1267 | 77 | function process_option { | ||
1268 | 78 | case "$1" in | ||
1269 | 79 | -h|--help) usage;; | ||
1270 | 80 | -V|--virtual-env) always_venv=1; never_venv=0;; | ||
1271 | 81 | -N|--no-virtual-env) always_venv=0; never_venv=1;; | ||
1272 | 82 | -p|--pep8) just_pep8=1;; | ||
1273 | 83 | -y|--pylint) just_pylint=1;; | ||
1274 | 84 | -f|--force) force=1;; | ||
1275 | 85 | -t|--tabs) just_tabs=1;; | ||
1276 | 86 | -q|--quiet) quiet=1;; | ||
1277 | 87 | -c|--coverage) with_coverage=1;; | ||
1278 | 88 | -m|--makemessages) makemessages=1;; | ||
1279 | 89 | --only-selenium) only_selenium=1; with_selenium=1;; | ||
1280 | 90 | --with-selenium) with_selenium=1;; | ||
1281 | 91 | --docs) just_docs=1;; | ||
1282 | 92 | --runserver) runserver=1;; | ||
1283 | 93 | --backup-environment) backup_env=1;; | ||
1284 | 94 | --restore-environment) restore_env=1;; | ||
1285 | 95 | --destroy-environment) destroy=1;; | ||
1286 | 96 | *) testargs="$testargs $1" | ||
1287 | 97 | esac | ||
1288 | 98 | } | ||
1289 | 99 | |||
1290 | 100 | function run_server { | ||
1291 | 101 | echo "Starting Django development server..." | ||
1292 | 102 | ${command_wrapper} python $root/manage.py runserver $testargs | ||
1293 | 103 | echo "Server stopped." | ||
1294 | 104 | } | ||
1295 | 105 | |||
1296 | 106 | function run_pylint { | ||
1297 | 107 | echo "Running pylint ..." | ||
1298 | 108 | PYTHONPATH=$root ${command_wrapper} pylint --rcfile=.pylintrc -f parseable $included_dirs > pylint.txt || true | ||
1299 | 109 | CODE=$? | ||
1300 | 110 | grep Global -A2 pylint.txt | ||
1301 | 111 | if [ $CODE -lt 32 ]; then | ||
1302 | 112 | echo "Completed successfully." | ||
1303 | 113 | exit 0 | ||
1304 | 114 | else | ||
1305 | 115 | echo "Completed with problems." | ||
1306 | 116 | exit $CODE | ||
1307 | 117 | fi | ||
1308 | 118 | } | ||
1309 | 119 | |||
1310 | 120 | function run_pep8 { | ||
1311 | 121 | echo "Running pep8 ..." | ||
1312 | 122 | rm -f pep8.txt | ||
1313 | 123 | PEP8_EXCLUDE=vcsversion.py | ||
1314 | 124 | PEP8_IGNORE=W602 | ||
1315 | 125 | PEP8_OPTIONS="--exclude=$PEP8_EXCLUDE --ignore=$PEP8_IGNORE --repeat" | ||
1316 | 126 | ${command_wrapper} pep8 $PEP8_OPTIONS $included_dirs > pep8.txt || true | ||
1317 | 127 | PEP8_COUNT=`wc -l pep8.txt | awk '{ print $1 }'` | ||
1318 | 128 | if [ $PEP8_COUNT -ge 1 ]; then | ||
1319 | 129 | echo "PEP8 violations found ($PEP8_COUNT):" | ||
1320 | 130 | cat pep8.txt | ||
1321 | 131 | echo "Please fix all PEP8 violations before committing." | ||
1322 | 132 | else | ||
1323 | 133 | echo "No violations found. Good job!" | ||
1324 | 134 | fi | ||
1325 | 135 | exit $PEP8_COUNT | ||
1326 | 136 | } | ||
1327 | 137 | |||
1328 | 138 | function run_sphinx { | ||
1329 | 139 | echo "Building sphinx..." | ||
1330 | 140 | export DJANGO_SETTINGS_MODULE=openstack_dashboard.settings | ||
1331 | 141 | ${command_wrapper} sphinx-build -b html docs/source docs/build/html | ||
1332 | 142 | echo "Build complete." | ||
1333 | 143 | } | ||
1334 | 144 | |||
1335 | 145 | function tab_check { | ||
1336 | 146 | TAB_VIOLATIONS=`find $included_dirs -type f -regex ".*\.\(css\|js\|py\|html\)" -print0 | xargs -0 awk '/\t/' | wc -l` | ||
1337 | 147 | if [ $TAB_VIOLATIONS -gt 0 ]; then | ||
1338 | 148 | echo "TABS! $TAB_VIOLATIONS of them! Oh no!" | ||
1339 | 149 | HORIZON_FILES=`find $included_dirs -type f -regex ".*\.\(css\|js\|py|\html\)"` | ||
1340 | 150 | for TABBED_FILE in $HORIZON_FILES | ||
1341 | 151 | do | ||
1342 | 152 | TAB_COUNT=`awk '/\t/' $TABBED_FILE | wc -l` | ||
1343 | 153 | if [ $TAB_COUNT -gt 0 ]; then | ||
1344 | 154 | echo "$TABBED_FILE: $TAB_COUNT" | ||
1345 | 155 | fi | ||
1346 | 156 | done | ||
1347 | 157 | fi | ||
1348 | 158 | return $TAB_VIOLATIONS; | ||
1349 | 159 | } | ||
1350 | 160 | |||
1351 | 161 | function destroy_venv { | ||
1352 | 162 | echo "Cleaning environment..." | ||
1353 | 163 | echo "Removing virtualenv..." | ||
1354 | 164 | rm -rf $venv | ||
1355 | 165 | echo "Virtualenv removed." | ||
1356 | 166 | rm -f .environment_version | ||
1357 | 167 | echo "Environment cleaned." | ||
1358 | 168 | } | ||
1359 | 169 | |||
1360 | 170 | function environment_check { | ||
1361 | 171 | echo "Checking environment." | ||
1362 | 172 | if [ -f .environment_version ]; then | ||
1363 | 173 | ENV_VERS=`cat .environment_version` | ||
1364 | 174 | if [ $ENV_VERS -eq $environment_version ]; then | ||
1365 | 175 | if [ -e ${venv} ]; then | ||
1366 | 176 | # If the environment exists and is up-to-date then set our variables | ||
1367 | 177 | command_wrapper="${root}/${with_venv}" | ||
1368 | 178 | echo "Environment is up to date." | ||
1369 | 179 | return 0 | ||
1370 | 180 | fi | ||
1371 | 181 | fi | ||
1372 | 182 | fi | ||
1373 | 183 | |||
1374 | 184 | if [ $always_venv -eq 1 ]; then | ||
1375 | 185 | install_venv | ||
1376 | 186 | else | ||
1377 | 187 | if [ ! -e ${venv} ]; then | ||
1378 | 188 | echo -e "Environment not found. Install? (Y/n) \c" | ||
1379 | 189 | else | ||
1380 | 190 | echo -e "Your environment appears to be out of date. Update? (Y/n) \c" | ||
1381 | 191 | fi | ||
1382 | 192 | read update_env | ||
1383 | 193 | if [ "x$update_env" = "xY" -o "x$update_env" = "x" -o "x$update_env" = "xy" ]; then | ||
1384 | 194 | install_venv | ||
1385 | 195 | fi | ||
1386 | 196 | fi | ||
1387 | 197 | } | ||
1388 | 198 | |||
1389 | 199 | function sanity_check { | ||
1390 | 200 | # Anything that should be determined prior to running the tests, server, etc. | ||
1391 | 201 | # Don't sanity-check anything environment-related in -N flag is set | ||
1392 | 202 | if [ $never_venv -eq 0 ]; then | ||
1393 | 203 | if [ ! -e ${venv} ]; then | ||
1394 | 204 | echo "Virtualenv not found at $venv. Did install_venv.py succeed?" | ||
1395 | 205 | exit 1 | ||
1396 | 206 | fi | ||
1397 | 207 | fi | ||
1398 | 208 | if [ $with_selenium -eq 1 ]; then | ||
1399 | 209 | SELENIUM_JOB=`ps -elf | grep "selenium" | grep -v grep` | ||
1400 | 210 | if [ $? -eq 0 ]; then | ||
1401 | 211 | echo "WARNING: Selenium doesn't appear to be running. Please start a selenium server process." | ||
1402 | 212 | with_selenium=0 | ||
1403 | 213 | fi | ||
1404 | 214 | fi | ||
1405 | 215 | if [ $only_selenium -eq 1 ]; then | ||
1406 | 216 | export SKIP_UNITTESTS=1 | ||
1407 | 217 | fi | ||
1408 | 218 | # Remove .pyc files. This is sanity checking because they can linger | ||
1409 | 219 | # after old files are deleted. | ||
1410 | 220 | find . -name "*.pyc" -exec rm -rf {} \; | ||
1411 | 221 | } | ||
1412 | 222 | |||
1413 | 223 | function backup_environment { | ||
1414 | 224 | if [ $backup_env -eq 1 ]; then | ||
1415 | 225 | echo "Backing up environment \"$JOB_NAME\"..." | ||
1416 | 226 | if [ ! -e ${venv} ]; then | ||
1417 | 227 | echo "Environment not installed. Cannot back up." | ||
1418 | 228 | return 0 | ||
1419 | 229 | fi | ||
1420 | 230 | if [ -d /tmp/.horizon_environment/$JOB_NAME ]; then | ||
1421 | 231 | mv /tmp/.horizon_environment/$JOB_NAME /tmp/.horizon_environment/$JOB_NAME.old | ||
1422 | 232 | rm -rf /tmp/.horizon_environment/$JOB_NAME | ||
1423 | 233 | fi | ||
1424 | 234 | mkdir -p /tmp/.horizon_environment/$JOB_NAME | ||
1425 | 235 | cp -r $venv /tmp/.horizon_environment/$JOB_NAME/ | ||
1426 | 236 | cp .environment_version /tmp/.horizon_environment/$JOB_NAME/ | ||
1427 | 237 | # Remove the backup now that we've completed successfully | ||
1428 | 238 | rm -rf /tmp/.horizon_environment/$JOB_NAME.old | ||
1429 | 239 | echo "Backup completed" | ||
1430 | 240 | fi | ||
1431 | 241 | } | ||
1432 | 242 | |||
1433 | 243 | function restore_environment { | ||
1434 | 244 | if [ $restore_env -eq 1 ]; then | ||
1435 | 245 | echo "Restoring environment from backup..." | ||
1436 | 246 | if [ ! -d /tmp/.horizon_environment/$JOB_NAME ]; then | ||
1437 | 247 | echo "No backup to restore from." | ||
1438 | 248 | return 0 | ||
1439 | 249 | fi | ||
1440 | 250 | |||
1441 | 251 | cp -r /tmp/.horizon_environment/$JOB_NAME/.venv ./ || true | ||
1442 | 252 | cp -r /tmp/.horizon_environment/$JOB_NAME/.environment_version ./ || true | ||
1443 | 253 | |||
1444 | 254 | echo "Environment restored successfully." | ||
1445 | 255 | fi | ||
1446 | 256 | } | ||
1447 | 257 | |||
1448 | 258 | function install_venv { | ||
1449 | 259 | # Install with install_venv.py | ||
1450 | 260 | export PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE-/tmp/.pip_download_cache} | ||
1451 | 261 | export PIP_USE_MIRRORS=true | ||
1452 | 262 | if [ $quiet -eq 1 ]; then | ||
1453 | 263 | export PIP_NO_INPUT=true | ||
1454 | 264 | fi | ||
1455 | 265 | echo "Fetching new src packages..." | ||
1456 | 266 | rm -rf $venv/src | ||
1457 | 267 | python tools/install_venv.py | ||
1458 | 268 | command_wrapper="$root/${with_venv}" | ||
1459 | 269 | # Make sure it worked and record the environment version | ||
1460 | 270 | sanity_check | ||
1461 | 271 | chmod -R 754 $venv | ||
1462 | 272 | echo $environment_version > .environment_version | ||
1463 | 273 | } | ||
1464 | 274 | |||
1465 | 275 | function run_tests { | ||
1466 | 276 | sanity_check | ||
1467 | 277 | |||
1468 | 278 | echo "Running Horizon application tests" | ||
1469 | 279 | export NOSE_XUNIT_FILE=horizon/nosetests.xml | ||
1470 | 280 | ${command_wrapper} coverage erase | ||
1471 | 281 | ${command_wrapper} coverage run -p $root/manage.py test horizon --settings=horizon.tests.testsettings $testargs | ||
1472 | 282 | # get results of the Horizon tests | ||
1473 | 283 | HORIZON_RESULT=$? | ||
1474 | 284 | |||
1475 | 285 | echo "Running openstack_dashboard tests" | ||
1476 | 286 | export NOSE_XUNIT_FILE=openstack_dashboard/nosetests.xml | ||
1477 | 287 | if [ $with_selenium -eq 1 ]; then | ||
1478 | 288 | ${command_wrapper} coverage run -p $root/manage.py test openstack_dashboard --settings=horizon.tests.testsettings --with-selenium --with-cherrypyliveserver $testargs | ||
1479 | 289 | else | ||
1480 | 290 | ${command_wrapper} coverage run -p $root/manage.py test openstack_dashboard --settings=horizon.tests.testsettings $testargs | ||
1481 | 291 | fi | ||
1482 | 292 | # get results of the openstack_dashboard tests | ||
1483 | 293 | DASHBOARD_RESULT=$? | ||
1484 | 294 | |||
1485 | 295 | if [ $with_coverage -eq 1 ]; then | ||
1486 | 296 | echo "Generating coverage reports" | ||
1487 | 297 | ${command_wrapper} coverage combine | ||
1488 | 298 | ${command_wrapper} coverage xml -i --omit='/usr*,setup.py,*egg*,.venv/*' | ||
1489 | 299 | ${command_wrapper} coverage html -i --omit='/usr*,setup.py,*egg*,.venv/*' -d reports | ||
1490 | 300 | fi | ||
1491 | 301 | # Remove the leftover coverage files from the -p flag earlier. | ||
1492 | 302 | rm -f .coverage.* | ||
1493 | 303 | |||
1494 | 304 | if [ $(($HORIZON_RESULT || $DASHBOARD_RESULT)) -eq 0 ]; then | ||
1495 | 305 | echo "Tests completed successfully." | ||
1496 | 306 | else | ||
1497 | 307 | echo "Tests failed." | ||
1498 | 308 | fi | ||
1499 | 309 | exit $(($HORIZON_RESULT || $DASHBOARD_RESULT)) | ||
1500 | 310 | } | ||
1501 | 311 | |||
1502 | 312 | function run_makemessages { | ||
1503 | 313 | cd horizon | ||
1504 | 314 | ${command_wrapper} $root/manage.py makemessages --all | ||
1505 | 315 | HORIZON_RESULT=$? | ||
1506 | 316 | cd ../openstack_dashboard | ||
1507 | 317 | ${command_wrapper} $root/manage.py makemessages --all | ||
1508 | 318 | DASHBOARD_RESULT=$? | ||
1509 | 319 | cd .. | ||
1510 | 320 | exit $(($HORIZON_RESULT || $DASHBOARD_RESULT)) | ||
1511 | 321 | } | ||
1512 | 322 | |||
1513 | 323 | |||
1514 | 324 | # ---------PREPARE THE ENVIRONMENT------------ # | ||
1515 | 325 | |||
1516 | 326 | # PROCESS ARGUMENTS, OVERRIDE DEFAULTS | ||
1517 | 327 | for arg in "$@"; do | ||
1518 | 328 | process_option $arg | ||
1519 | 329 | done | ||
1520 | 330 | |||
1521 | 331 | if [ $quiet -eq 1 ] && [ $never_venv -eq 0 ] && [ $always_venv -eq 0 ] | ||
1522 | 332 | then | ||
1523 | 333 | always_venv=1 | ||
1524 | 334 | fi | ||
1525 | 335 | |||
1526 | 336 | # If destroy is set, just blow it away and exit. | ||
1527 | 337 | if [ $destroy -eq 1 ]; then | ||
1528 | 338 | destroy_venv | ||
1529 | 339 | exit 0 | ||
1530 | 340 | fi | ||
1531 | 341 | |||
1532 | 342 | # Ignore all of this if the -N flag was set | ||
1533 | 343 | if [ $never_venv -eq 0 ]; then | ||
1534 | 344 | |||
1535 | 345 | # Restore previous environment if desired | ||
1536 | 346 | if [ $restore_env -eq 1 ]; then | ||
1537 | 347 | restore_environment | ||
1538 | 348 | fi | ||
1539 | 349 | |||
1540 | 350 | # Remove the virtual environment if --force used | ||
1541 | 351 | if [ $force -eq 1 ]; then | ||
1542 | 352 | destroy_venv | ||
1543 | 353 | fi | ||
1544 | 354 | |||
1545 | 355 | # Then check if it's up-to-date | ||
1546 | 356 | environment_check | ||
1547 | 357 | |||
1548 | 358 | # Create a backup of the up-to-date environment if desired | ||
1549 | 359 | if [ $backup_env -eq 1 ]; then | ||
1550 | 360 | backup_environment | ||
1551 | 361 | fi | ||
1552 | 362 | fi | ||
1553 | 363 | |||
1554 | 364 | # ---------EXERCISE THE CODE------------ # | ||
1555 | 365 | |||
1556 | 366 | # Build the docs | ||
1557 | 367 | if [ $just_docs -eq 1 ]; then | ||
1558 | 368 | run_sphinx | ||
1559 | 369 | exit $? | ||
1560 | 370 | fi | ||
1561 | 371 | |||
1562 | 372 | # Update translation files | ||
1563 | 373 | if [ $makemessages -eq 1 ]; then | ||
1564 | 374 | run_makemessages | ||
1565 | 375 | exit $? | ||
1566 | 376 | fi | ||
1567 | 377 | |||
1568 | 378 | # PEP8 | ||
1569 | 379 | if [ $just_pep8 -eq 1 ]; then | ||
1570 | 380 | run_pep8 | ||
1571 | 381 | exit $? | ||
1572 | 382 | fi | ||
1573 | 383 | |||
1574 | 384 | # Pylint | ||
1575 | 385 | if [ $just_pylint -eq 1 ]; then | ||
1576 | 386 | run_pylint | ||
1577 | 387 | exit $? | ||
1578 | 388 | fi | ||
1579 | 389 | |||
1580 | 390 | # Tab checker | ||
1581 | 391 | if [ $just_tabs -eq 1 ]; then | ||
1582 | 392 | tab_check | ||
1583 | 393 | exit $? | ||
1584 | 394 | fi | ||
1585 | 395 | |||
1586 | 396 | # Django development server | ||
1587 | 397 | if [ $runserver -eq 1 ]; then | ||
1588 | 398 | run_server | ||
1589 | 399 | exit $? | ||
1590 | 400 | fi | ||
1591 | 401 | |||
1592 | 402 | # Full test suite | ||
1593 | 403 | run_tests || exit | ||
1594 | 404 | 0 | ||
1595 | === added directory '.pc/fix-dashboard-django-wsgi.patch' | |||
1596 | === removed directory '.pc/fix-dashboard-django-wsgi.patch' | |||
1597 | === added file '.pc/fix-dashboard-django-wsgi.patch/.timestamp' | |||
1598 | === added directory '.pc/fix-dashboard-django-wsgi.patch/openstack_dashboard' | |||
1599 | === removed directory '.pc/fix-dashboard-django-wsgi.patch/openstack_dashboard' | |||
1600 | === added directory '.pc/fix-dashboard-django-wsgi.patch/openstack_dashboard/wsgi' | |||
1601 | === removed directory '.pc/fix-dashboard-django-wsgi.patch/openstack_dashboard/wsgi' | |||
1602 | === added file '.pc/fix-dashboard-django-wsgi.patch/openstack_dashboard/wsgi/django.wsgi' | |||
1603 | --- .pc/fix-dashboard-django-wsgi.patch/openstack_dashboard/wsgi/django.wsgi 1970-01-01 00:00:00 +0000 | |||
1604 | +++ .pc/fix-dashboard-django-wsgi.patch/openstack_dashboard/wsgi/django.wsgi 2013-04-24 15:22:28 +0000 | |||
1605 | @@ -0,0 +1,15 @@ | |||
1606 | 1 | import logging | ||
1607 | 2 | import os | ||
1608 | 3 | import sys | ||
1609 | 4 | import django.core.handlers.wsgi | ||
1610 | 5 | from django.conf import settings | ||
1611 | 6 | |||
1612 | 7 | # Add this file path to sys.path in order to import settings | ||
1613 | 8 | sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '../..')) | ||
1614 | 9 | os.environ['DJANGO_SETTINGS_MODULE'] = 'openstack_dashboard.settings' | ||
1615 | 10 | sys.stdout = sys.stderr | ||
1616 | 11 | |||
1617 | 12 | DEBUG = False | ||
1618 | 13 | |||
1619 | 14 | application = django.core.handlers.wsgi.WSGIHandler() | ||
1620 | 15 | |||
1621 | 0 | 16 | ||
1622 | === removed file '.pc/fix-dashboard-django-wsgi.patch/openstack_dashboard/wsgi/django.wsgi' | |||
1623 | --- .pc/fix-dashboard-django-wsgi.patch/openstack_dashboard/wsgi/django.wsgi 2012-03-02 12:11:59 +0000 | |||
1624 | +++ .pc/fix-dashboard-django-wsgi.patch/openstack_dashboard/wsgi/django.wsgi 1970-01-01 00:00:00 +0000 | |||
1625 | @@ -1,15 +0,0 @@ | |||
1626 | 1 | import logging | ||
1627 | 2 | import os | ||
1628 | 3 | import sys | ||
1629 | 4 | import django.core.handlers.wsgi | ||
1630 | 5 | from django.conf import settings | ||
1631 | 6 | |||
1632 | 7 | # Add this file path to sys.path in order to import settings | ||
1633 | 8 | sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '../..')) | ||
1634 | 9 | os.environ['DJANGO_SETTINGS_MODULE'] = 'openstack_dashboard.settings' | ||
1635 | 10 | sys.stdout = sys.stderr | ||
1636 | 11 | |||
1637 | 12 | DEBUG = False | ||
1638 | 13 | |||
1639 | 14 | application = django.core.handlers.wsgi.WSGIHandler() | ||
1640 | 15 | |||
1641 | 16 | 0 | ||
1642 | === added directory '.pc/fix-dashboard-manage.patch' | |||
1643 | === removed directory '.pc/fix-dashboard-manage.patch' | |||
1644 | === added file '.pc/fix-dashboard-manage.patch/.timestamp' | |||
1645 | === added file '.pc/fix-dashboard-manage.patch/manage.py' | |||
1646 | --- .pc/fix-dashboard-manage.patch/manage.py 1970-01-01 00:00:00 +0000 | |||
1647 | +++ .pc/fix-dashboard-manage.patch/manage.py 2013-04-24 15:22:28 +0000 | |||
1648 | @@ -0,0 +1,12 @@ | |||
1649 | 1 | #!/usr/bin/env python | ||
1650 | 2 | |||
1651 | 3 | import os | ||
1652 | 4 | import sys | ||
1653 | 5 | |||
1654 | 6 | |||
1655 | 7 | if __name__ == "__main__": | ||
1656 | 8 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "openstack_dashboard.settings") | ||
1657 | 9 | |||
1658 | 10 | from django.core.management import execute_from_command_line | ||
1659 | 11 | |||
1660 | 12 | execute_from_command_line(sys.argv) | ||
1661 | 0 | 13 | ||
1662 | === removed file '.pc/fix-dashboard-manage.patch/manage.py' | |||
1663 | --- .pc/fix-dashboard-manage.patch/manage.py 2012-03-09 11:50:22 +0000 | |||
1664 | +++ .pc/fix-dashboard-manage.patch/manage.py 1970-01-01 00:00:00 +0000 | |||
1665 | @@ -1,12 +0,0 @@ | |||
1666 | 1 | #!/usr/bin/env python | ||
1667 | 2 | |||
1668 | 3 | import os | ||
1669 | 4 | import sys | ||
1670 | 5 | |||
1671 | 6 | |||
1672 | 7 | if __name__ == "__main__": | ||
1673 | 8 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "openstack_dashboard.settings") | ||
1674 | 9 | |||
1675 | 10 | from django.core.management import execute_from_command_line | ||
1676 | 11 | |||
1677 | 12 | execute_from_command_line(sys.argv) | ||
1678 | 13 | 0 | ||
1679 | === added directory '.pc/juju_panel-handle_catalog_exception.patch' | |||
1680 | === removed directory '.pc/juju_panel-handle_catalog_exception.patch' | |||
1681 | === added file '.pc/juju_panel-handle_catalog_exception.patch/.timestamp' | |||
1682 | === added directory '.pc/juju_panel-handle_catalog_exception.patch/horizon' | |||
1683 | === removed directory '.pc/juju_panel-handle_catalog_exception.patch/horizon' | |||
1684 | === added directory '.pc/juju_panel-handle_catalog_exception.patch/horizon/dashboards' | |||
1685 | === removed directory '.pc/juju_panel-handle_catalog_exception.patch/horizon/dashboards' | |||
1686 | === added directory '.pc/juju_panel-handle_catalog_exception.patch/horizon/dashboards/settings' | |||
1687 | === removed directory '.pc/juju_panel-handle_catalog_exception.patch/horizon/dashboards/settings' | |||
1688 | === added directory '.pc/juju_panel-handle_catalog_exception.patch/horizon/dashboards/settings/juju' | |||
1689 | === removed directory '.pc/juju_panel-handle_catalog_exception.patch/horizon/dashboards/settings/juju' | |||
1690 | === added file '.pc/juju_panel-handle_catalog_exception.patch/horizon/dashboards/settings/juju/forms.py' | |||
1691 | --- .pc/juju_panel-handle_catalog_exception.patch/horizon/dashboards/settings/juju/forms.py 1970-01-01 00:00:00 +0000 | |||
1692 | +++ .pc/juju_panel-handle_catalog_exception.patch/horizon/dashboards/settings/juju/forms.py 2013-04-24 15:22:28 +0000 | |||
1693 | @@ -0,0 +1,96 @@ | |||
1694 | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 | ||
1695 | 2 | |||
1696 | 3 | # Copyright 2012 Openstack, LLC | ||
1697 | 4 | # Copyright 2012 Canonical Ltd. | ||
1698 | 5 | # | ||
1699 | 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
1700 | 7 | # not use this file except in compliance with the License. You may obtain | ||
1701 | 8 | # a copy of the License at | ||
1702 | 9 | # | ||
1703 | 10 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
1704 | 11 | # | ||
1705 | 12 | # Unless required by applicable law or agreed to in writing, software | ||
1706 | 13 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
1707 | 14 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
1708 | 15 | # License for the specific language governing permissions and limitations | ||
1709 | 16 | # under the License. | ||
1710 | 17 | |||
1711 | 18 | import logging | ||
1712 | 19 | import tempfile | ||
1713 | 20 | import zipfile | ||
1714 | 21 | from contextlib import closing | ||
1715 | 22 | |||
1716 | 23 | from django import http, shortcuts | ||
1717 | 24 | from django.template.loader import render_to_string | ||
1718 | 25 | from django.utils.translation import ugettext_lazy as _ | ||
1719 | 26 | |||
1720 | 27 | from horizon import api | ||
1721 | 28 | from horizon import exceptions | ||
1722 | 29 | from horizon import forms | ||
1723 | 30 | |||
1724 | 31 | import boto | ||
1725 | 32 | import uuid | ||
1726 | 33 | |||
1727 | 34 | LOG = logging.getLogger(__name__) | ||
1728 | 35 | |||
1729 | 36 | |||
1730 | 37 | class DownloadJujuEnvironment(forms.SelfHandlingForm): | ||
1731 | 38 | # This is heavily based off the ec2 credentials form | ||
1732 | 39 | tenant = forms.ChoiceField(label=_("Select a Project")) | ||
1733 | 40 | @classmethod | ||
1734 | 41 | def _instantiate(cls, request, *args, **kwargs): | ||
1735 | 42 | return cls(request, *args, **kwargs) | ||
1736 | 43 | |||
1737 | 44 | def __init__(self, request, *args, **kwargs): | ||
1738 | 45 | super(DownloadJujuEnvironment, self).__init__(*args, **kwargs) | ||
1739 | 46 | tenant_choices = [] | ||
1740 | 47 | try: | ||
1741 | 48 | tenant_list = api.keystone.tenant_list(request) | ||
1742 | 49 | except: | ||
1743 | 50 | tenant_list = [] | ||
1744 | 51 | exceptions.handle(request, _("Unable to retrieve tenant list.")) | ||
1745 | 52 | |||
1746 | 53 | for tenant in tenant_list: | ||
1747 | 54 | if tenant.enabled: | ||
1748 | 55 | tenant_choices.append((tenant.id, tenant.name)) | ||
1749 | 56 | if not tenant_choices: | ||
1750 | 57 | self.fields['tenant'].choices = ('', 'No Available Tenants') | ||
1751 | 58 | else: | ||
1752 | 59 | self.fields['tenant'].choices = tenant_choices | ||
1753 | 60 | |||
1754 | 61 | def handle(self, request, data): | ||
1755 | 62 | def find_or_create_access_keys(request, tenant_id): | ||
1756 | 63 | keys = api.keystone.list_ec2_credentials(request, request.user.id) | ||
1757 | 64 | if keys: | ||
1758 | 65 | return keys[0] | ||
1759 | 66 | else: | ||
1760 | 67 | return api.keystone.create_ec2_credentials(request, | ||
1761 | 68 | request.user.id, | ||
1762 | 69 | tenant_id) | ||
1763 | 70 | try: | ||
1764 | 71 | api.keystone.token_create_scoped(request, | ||
1765 | 72 | data.get('tenant'), | ||
1766 | 73 | request.user.token) | ||
1767 | 74 | keys = find_or_create_access_keys(request, data.get('tenant')) | ||
1768 | 75 | tenant_id = data['tenant'] | ||
1769 | 76 | tenant_name = dict(self.fields['tenant'].choices)[tenant_id] | ||
1770 | 77 | control_bucket = "juju-openstack-%s-%s" % (tenant_name, str(uuid.uuid4())[19:]) | ||
1771 | 78 | context = {'ec2_access_key': keys.access, | ||
1772 | 79 | 'ec2_secret_key': keys.secret, | ||
1773 | 80 | 'ec2_url': api.url_for(request, 'ec2'), | ||
1774 | 81 | 's3_url': api.url_for(request, 's3'), | ||
1775 | 82 | 'juju_admin_secret': uuid.uuid4().hex, | ||
1776 | 83 | 'control_bucket': control_bucket | ||
1777 | 84 | } | ||
1778 | 85 | except: | ||
1779 | 86 | exceptions.handle(request, | ||
1780 | 87 | _('Unable to fetch generate Juju environment config.'), | ||
1781 | 88 | redirect=request.build_absolute_uri()) | ||
1782 | 89 | |||
1783 | 90 | response = shortcuts.render(request, | ||
1784 | 91 | 'settings/juju/environments.yaml.template', | ||
1785 | 92 | context, | ||
1786 | 93 | content_type='text/plain') | ||
1787 | 94 | response['Content-Disposition'] = 'attachment; filename=environments.yaml' | ||
1788 | 95 | response['Content-Length'] = str(len(response.content)) | ||
1789 | 96 | return response | ||
1790 | 0 | 97 | ||
1791 | === removed file '.pc/juju_panel-handle_catalog_exception.patch/horizon/dashboards/settings/juju/forms.py' | |||
1792 | --- .pc/juju_panel-handle_catalog_exception.patch/horizon/dashboards/settings/juju/forms.py 2012-08-24 03:27:33 +0000 | |||
1793 | +++ .pc/juju_panel-handle_catalog_exception.patch/horizon/dashboards/settings/juju/forms.py 1970-01-01 00:00:00 +0000 | |||
1794 | @@ -1,96 +0,0 @@ | |||
1795 | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 | ||
1796 | 2 | |||
1797 | 3 | # Copyright 2012 Openstack, LLC | ||
1798 | 4 | # Copyright 2012 Canonical Ltd. | ||
1799 | 5 | # | ||
1800 | 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
1801 | 7 | # not use this file except in compliance with the License. You may obtain | ||
1802 | 8 | # a copy of the License at | ||
1803 | 9 | # | ||
1804 | 10 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
1805 | 11 | # | ||
1806 | 12 | # Unless required by applicable law or agreed to in writing, software | ||
1807 | 13 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
1808 | 14 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
1809 | 15 | # License for the specific language governing permissions and limitations | ||
1810 | 16 | # under the License. | ||
1811 | 17 | |||
1812 | 18 | import logging | ||
1813 | 19 | import tempfile | ||
1814 | 20 | import zipfile | ||
1815 | 21 | from contextlib import closing | ||
1816 | 22 | |||
1817 | 23 | from django import http, shortcuts | ||
1818 | 24 | from django.template.loader import render_to_string | ||
1819 | 25 | from django.utils.translation import ugettext_lazy as _ | ||
1820 | 26 | |||
1821 | 27 | from horizon import api | ||
1822 | 28 | from horizon import exceptions | ||
1823 | 29 | from horizon import forms | ||
1824 | 30 | |||
1825 | 31 | import boto | ||
1826 | 32 | import uuid | ||
1827 | 33 | |||
1828 | 34 | LOG = logging.getLogger(__name__) | ||
1829 | 35 | |||
1830 | 36 | |||
1831 | 37 | class DownloadJujuEnvironment(forms.SelfHandlingForm): | ||
1832 | 38 | # This is heavily based off the ec2 credentials form | ||
1833 | 39 | tenant = forms.ChoiceField(label=_("Select a Project")) | ||
1834 | 40 | @classmethod | ||
1835 | 41 | def _instantiate(cls, request, *args, **kwargs): | ||
1836 | 42 | return cls(request, *args, **kwargs) | ||
1837 | 43 | |||
1838 | 44 | def __init__(self, request, *args, **kwargs): | ||
1839 | 45 | super(DownloadJujuEnvironment, self).__init__(*args, **kwargs) | ||
1840 | 46 | tenant_choices = [] | ||
1841 | 47 | try: | ||
1842 | 48 | tenant_list = api.keystone.tenant_list(request) | ||
1843 | 49 | except: | ||
1844 | 50 | tenant_list = [] | ||
1845 | 51 | exceptions.handle(request, _("Unable to retrieve tenant list.")) | ||
1846 | 52 | |||
1847 | 53 | for tenant in tenant_list: | ||
1848 | 54 | if tenant.enabled: | ||
1849 | 55 | tenant_choices.append((tenant.id, tenant.name)) | ||
1850 | 56 | if not tenant_choices: | ||
1851 | 57 | self.fields['tenant'].choices = ('', 'No Available Tenants') | ||
1852 | 58 | else: | ||
1853 | 59 | self.fields['tenant'].choices = tenant_choices | ||
1854 | 60 | |||
1855 | 61 | def handle(self, request, data): | ||
1856 | 62 | def find_or_create_access_keys(request, tenant_id): | ||
1857 | 63 | keys = api.keystone.list_ec2_credentials(request, request.user.id) | ||
1858 | 64 | if keys: | ||
1859 | 65 | return keys[0] | ||
1860 | 66 | else: | ||
1861 | 67 | return api.keystone.create_ec2_credentials(request, | ||
1862 | 68 | request.user.id, | ||
1863 | 69 | tenant_id) | ||
1864 | 70 | try: | ||
1865 | 71 | api.keystone.token_create_scoped(request, | ||
1866 | 72 | data.get('tenant'), | ||
1867 | 73 | request.user.token) | ||
1868 | 74 | keys = find_or_create_access_keys(request, data.get('tenant')) | ||
1869 | 75 | tenant_id = data['tenant'] | ||
1870 | 76 | tenant_name = dict(self.fields['tenant'].choices)[tenant_id] | ||
1871 | 77 | control_bucket = "juju-openstack-%s-%s" % (tenant_name, str(uuid.uuid4())[19:]) | ||
1872 | 78 | context = {'ec2_access_key': keys.access, | ||
1873 | 79 | 'ec2_secret_key': keys.secret, | ||
1874 | 80 | 'ec2_url': api.url_for(request, 'ec2'), | ||
1875 | 81 | 's3_url': api.url_for(request, 's3'), | ||
1876 | 82 | 'juju_admin_secret': uuid.uuid4().hex, | ||
1877 | 83 | 'control_bucket': control_bucket | ||
1878 | 84 | } | ||
1879 | 85 | except: | ||
1880 | 86 | exceptions.handle(request, | ||
1881 | 87 | _('Unable to fetch generate Juju environment config.'), | ||
1882 | 88 | redirect=request.build_absolute_uri()) | ||
1883 | 89 | |||
1884 | 90 | response = shortcuts.render(request, | ||
1885 | 91 | 'settings/juju/environments.yaml.template', | ||
1886 | 92 | context, | ||
1887 | 93 | content_type='text/plain') | ||
1888 | 94 | response['Content-Disposition'] = 'attachment; filename=environments.yaml' | ||
1889 | 95 | response['Content-Length'] = str(len(response.content)) | ||
1890 | 96 | return response | ||
1891 | 97 | 0 | ||
1892 | === added directory '.pc/turn-off-debug.patch' | |||
1893 | === removed directory '.pc/turn-off-debug.patch' | |||
1894 | === added file '.pc/turn-off-debug.patch/.timestamp' | |||
1895 | === added directory '.pc/turn-off-debug.patch/openstack_dashboard' | |||
1896 | === removed directory '.pc/turn-off-debug.patch/openstack_dashboard' | |||
1897 | === added directory '.pc/turn-off-debug.patch/openstack_dashboard/local' | |||
1898 | === removed directory '.pc/turn-off-debug.patch/openstack_dashboard/local' | |||
1899 | === added file '.pc/turn-off-debug.patch/openstack_dashboard/local/local_settings.py.example' | |||
1900 | --- .pc/turn-off-debug.patch/openstack_dashboard/local/local_settings.py.example 1970-01-01 00:00:00 +0000 | |||
1901 | +++ .pc/turn-off-debug.patch/openstack_dashboard/local/local_settings.py.example 2013-04-24 15:22:28 +0000 | |||
1902 | @@ -0,0 +1,123 @@ | |||
1903 | 1 | import os | ||
1904 | 2 | |||
1905 | 3 | from django.utils.translation import ugettext_lazy as _ | ||
1906 | 4 | |||
1907 | 5 | DEBUG = True | ||
1908 | 6 | TEMPLATE_DEBUG = DEBUG | ||
1909 | 7 | PROD = False | ||
1910 | 8 | USE_SSL = False | ||
1911 | 9 | |||
1912 | 10 | # Ubuntu-specific: Enables an extra panel in the 'Settings' section | ||
1913 | 11 | # that easily generates a Juju environments.yaml for download, | ||
1914 | 12 | # preconfigured with endpoints and credentails required for bootstrap | ||
1915 | 13 | # and service deployment. | ||
1916 | 14 | ENABLE_JUJU_PANEL = True | ||
1917 | 15 | |||
1918 | 16 | # Note: You should change this value | ||
1919 | 17 | SECRET_KEY = 'elj1IWiLoWHgcyYxFVLj7cM5rGOOxWl0' | ||
1920 | 18 | |||
1921 | 19 | # Specify a regular expression to validate user passwords. | ||
1922 | 20 | # HORIZON_CONFIG = { | ||
1923 | 21 | # "password_validator": { | ||
1924 | 22 | # "regex": '.*', | ||
1925 | 23 | # "help_text": _("Your password does not meet the requirements.") | ||
1926 | 24 | # } | ||
1927 | 25 | # } | ||
1928 | 26 | |||
1929 | 27 | LOCAL_PATH = os.path.dirname(os.path.abspath(__file__)) | ||
1930 | 28 | |||
1931 | 29 | # We recommend you use memcached for development; otherwise after every reload | ||
1932 | 30 | # of the django development server, you will have to login again. To use | ||
1933 | 31 | # memcached set CACHE_BACKED to something like 'memcached://127.0.0.1:11211/' | ||
1934 | 32 | CACHE_BACKEND = 'locmem://' | ||
1935 | 33 | |||
1936 | 34 | # Send email to the console by default | ||
1937 | 35 | EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' | ||
1938 | 36 | # Or send them to /dev/null | ||
1939 | 37 | #EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend' | ||
1940 | 38 | |||
1941 | 39 | # Configure these for your outgoing email host | ||
1942 | 40 | # EMAIL_HOST = 'smtp.my-company.com' | ||
1943 | 41 | # EMAIL_PORT = 25 | ||
1944 | 42 | # EMAIL_HOST_USER = 'djangomail' | ||
1945 | 43 | # EMAIL_HOST_PASSWORD = 'top-secret!' | ||
1946 | 44 | |||
1947 | 45 | # For multiple regions uncomment this configuration, and add (endpoint, title). | ||
1948 | 46 | # AVAILABLE_REGIONS = [ | ||
1949 | 47 | # ('http://cluster1.example.com:5000/v2.0', 'cluster1'), | ||
1950 | 48 | # ('http://cluster2.example.com:5000/v2.0', 'cluster2'), | ||
1951 | 49 | # ] | ||
1952 | 50 | |||
1953 | 51 | OPENSTACK_HOST = "127.0.0.1" | ||
1954 | 52 | OPENSTACK_KEYSTONE_URL = "http://%s:5000/v2.0" % OPENSTACK_HOST | ||
1955 | 53 | OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member" | ||
1956 | 54 | |||
1957 | 55 | # The OPENSTACK_KEYSTONE_BACKEND settings can be used to identify the | ||
1958 | 56 | # capabilities of the auth backend for Keystone. | ||
1959 | 57 | # If Keystone has been configured to use LDAP as the auth backend then set | ||
1960 | 58 | # can_edit_user to False and name to 'ldap'. | ||
1961 | 59 | # | ||
1962 | 60 | # TODO(tres): Remove these once Keystone has an API to identify auth backend. | ||
1963 | 61 | OPENSTACK_KEYSTONE_BACKEND = { | ||
1964 | 62 | 'name': 'native', | ||
1965 | 63 | 'can_edit_user': True | ||
1966 | 64 | } | ||
1967 | 65 | |||
1968 | 66 | # OPENSTACK_ENDPOINT_TYPE specifies the endpoint type to use for the endpoints | ||
1969 | 67 | # in the Keystone service catalog. Use this setting when Horizon is running | ||
1970 | 68 | # external to the OpenStack environment. The default is 'internalURL'. | ||
1971 | 69 | #OPENSTACK_ENDPOINT_TYPE = "publicURL" | ||
1972 | 70 | |||
1973 | 71 | # The number of Swift containers and objects to display on a single page before | ||
1974 | 72 | # providing a paging element (a "more" link) to paginate results. | ||
1975 | 73 | API_RESULT_LIMIT = 1000 | ||
1976 | 74 | |||
1977 | 75 | # If you have external monitoring links, eg: | ||
1978 | 76 | # EXTERNAL_MONITORING = [ | ||
1979 | 77 | # ['Nagios','http://foo.com'], | ||
1980 | 78 | # ['Ganglia','http://bar.com'], | ||
1981 | 79 | # ] | ||
1982 | 80 | |||
1983 | 81 | LOGGING = { | ||
1984 | 82 | 'version': 1, | ||
1985 | 83 | # When set to True this will disable all logging except | ||
1986 | 84 | # for loggers specified in this configuration dictionary. Note that | ||
1987 | 85 | # if nothing is specified here and disable_existing_loggers is True, | ||
1988 | 86 | # django.db.backends will still log unless it is disabled explicitly. | ||
1989 | 87 | 'disable_existing_loggers': False, | ||
1990 | 88 | 'handlers': { | ||
1991 | 89 | 'null': { | ||
1992 | 90 | 'level': 'DEBUG', | ||
1993 | 91 | 'class': 'django.utils.log.NullHandler', | ||
1994 | 92 | }, | ||
1995 | 93 | 'console': { | ||
1996 | 94 | # Set the level to "DEBUG" for verbose output logging. | ||
1997 | 95 | 'level': 'INFO', | ||
1998 | 96 | 'class': 'logging.StreamHandler', | ||
1999 | 97 | }, | ||
2000 | 98 | }, | ||
2001 | 99 | 'loggers': { | ||
2002 | 100 | # Logging from django.db.backends is VERY verbose, send to null | ||
2003 | 101 | # by default. | ||
2004 | 102 | 'django.db.backends': { | ||
2005 | 103 | 'handlers': ['null'], | ||
2006 | 104 | 'propagate': False, | ||
2007 | 105 | }, | ||
2008 | 106 | 'horizon': { | ||
2009 | 107 | 'handlers': ['console'], | ||
2010 | 108 | 'propagate': False, | ||
2011 | 109 | }, | ||
2012 | 110 | 'novaclient': { | ||
2013 | 111 | 'handlers': ['console'], | ||
2014 | 112 | 'propagate': False, | ||
2015 | 113 | }, | ||
2016 | 114 | 'keystoneclient': { | ||
2017 | 115 | 'handlers': ['console'], | ||
2018 | 116 | 'propagate': False, | ||
2019 | 117 | }, | ||
2020 | 118 | 'nose.plugins.manager': { | ||
2021 | 119 | 'handlers': ['console'], | ||
2022 | 120 | 'propagate': False, | ||
2023 | 121 | } | ||
2024 | 122 | } | ||
2025 | 123 | } | ||
2026 | 0 | 124 | ||
2027 | === removed file '.pc/turn-off-debug.patch/openstack_dashboard/local/local_settings.py.example' | |||
2028 | --- .pc/turn-off-debug.patch/openstack_dashboard/local/local_settings.py.example 2012-04-23 10:04:39 +0000 | |||
2029 | +++ .pc/turn-off-debug.patch/openstack_dashboard/local/local_settings.py.example 1970-01-01 00:00:00 +0000 | |||
2030 | @@ -1,123 +0,0 @@ | |||
2031 | 1 | import os | ||
2032 | 2 | |||
2033 | 3 | from django.utils.translation import ugettext_lazy as _ | ||
2034 | 4 | |||
2035 | 5 | DEBUG = True | ||
2036 | 6 | TEMPLATE_DEBUG = DEBUG | ||
2037 | 7 | PROD = False | ||
2038 | 8 | USE_SSL = False | ||
2039 | 9 | |||
2040 | 10 | # Ubuntu-specific: Enables an extra panel in the 'Settings' section | ||
2041 | 11 | # that easily generates a Juju environments.yaml for download, | ||
2042 | 12 | # preconfigured with endpoints and credentails required for bootstrap | ||
2043 | 13 | # and service deployment. | ||
2044 | 14 | ENABLE_JUJU_PANEL = True | ||
2045 | 15 | |||
2046 | 16 | # Note: You should change this value | ||
2047 | 17 | SECRET_KEY = 'elj1IWiLoWHgcyYxFVLj7cM5rGOOxWl0' | ||
2048 | 18 | |||
2049 | 19 | # Specify a regular expression to validate user passwords. | ||
2050 | 20 | # HORIZON_CONFIG = { | ||
2051 | 21 | # "password_validator": { | ||
2052 | 22 | # "regex": '.*', | ||
2053 | 23 | # "help_text": _("Your password does not meet the requirements.") | ||
2054 | 24 | # } | ||
2055 | 25 | # } | ||
2056 | 26 | |||
2057 | 27 | LOCAL_PATH = os.path.dirname(os.path.abspath(__file__)) | ||
2058 | 28 | |||
2059 | 29 | # We recommend you use memcached for development; otherwise after every reload | ||
2060 | 30 | # of the django development server, you will have to login again. To use | ||
2061 | 31 | # memcached set CACHE_BACKED to something like 'memcached://127.0.0.1:11211/' | ||
2062 | 32 | CACHE_BACKEND = 'locmem://' | ||
2063 | 33 | |||
2064 | 34 | # Send email to the console by default | ||
2065 | 35 | EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' | ||
2066 | 36 | # Or send them to /dev/null | ||
2067 | 37 | #EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend' | ||
2068 | 38 | |||
2069 | 39 | # Configure these for your outgoing email host | ||
2070 | 40 | # EMAIL_HOST = 'smtp.my-company.com' | ||
2071 | 41 | # EMAIL_PORT = 25 | ||
2072 | 42 | # EMAIL_HOST_USER = 'djangomail' | ||
2073 | 43 | # EMAIL_HOST_PASSWORD = 'top-secret!' | ||
2074 | 44 | |||
2075 | 45 | # For multiple regions uncomment this configuration, and add (endpoint, title). | ||
2076 | 46 | # AVAILABLE_REGIONS = [ | ||
2077 | 47 | # ('http://cluster1.example.com:5000/v2.0', 'cluster1'), | ||
2078 | 48 | # ('http://cluster2.example.com:5000/v2.0', 'cluster2'), | ||
2079 | 49 | # ] | ||
2080 | 50 | |||
2081 | 51 | OPENSTACK_HOST = "127.0.0.1" | ||
2082 | 52 | OPENSTACK_KEYSTONE_URL = "http://%s:5000/v2.0" % OPENSTACK_HOST | ||
2083 | 53 | OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member" | ||
2084 | 54 | |||
2085 | 55 | # The OPENSTACK_KEYSTONE_BACKEND settings can be used to identify the | ||
2086 | 56 | # capabilities of the auth backend for Keystone. | ||
2087 | 57 | # If Keystone has been configured to use LDAP as the auth backend then set | ||
2088 | 58 | # can_edit_user to False and name to 'ldap'. | ||
2089 | 59 | # | ||
2090 | 60 | # TODO(tres): Remove these once Keystone has an API to identify auth backend. | ||
2091 | 61 | OPENSTACK_KEYSTONE_BACKEND = { | ||
2092 | 62 | 'name': 'native', | ||
2093 | 63 | 'can_edit_user': True | ||
2094 | 64 | } | ||
2095 | 65 | |||
2096 | 66 | # OPENSTACK_ENDPOINT_TYPE specifies the endpoint type to use for the endpoints | ||
2097 | 67 | # in the Keystone service catalog. Use this setting when Horizon is running | ||
2098 | 68 | # external to the OpenStack environment. The default is 'internalURL'. | ||
2099 | 69 | #OPENSTACK_ENDPOINT_TYPE = "publicURL" | ||
2100 | 70 | |||
2101 | 71 | # The number of Swift containers and objects to display on a single page before | ||
2102 | 72 | # providing a paging element (a "more" link) to paginate results. | ||
2103 | 73 | API_RESULT_LIMIT = 1000 | ||
2104 | 74 | |||
2105 | 75 | # If you have external monitoring links, eg: | ||
2106 | 76 | # EXTERNAL_MONITORING = [ | ||
2107 | 77 | # ['Nagios','http://foo.com'], | ||
2108 | 78 | # ['Ganglia','http://bar.com'], | ||
2109 | 79 | # ] | ||
2110 | 80 | |||
2111 | 81 | LOGGING = { | ||
2112 | 82 | 'version': 1, | ||
2113 | 83 | # When set to True this will disable all logging except | ||
2114 | 84 | # for loggers specified in this configuration dictionary. Note that | ||
2115 | 85 | # if nothing is specified here and disable_existing_loggers is True, | ||
2116 | 86 | # django.db.backends will still log unless it is disabled explicitly. | ||
2117 | 87 | 'disable_existing_loggers': False, | ||
2118 | 88 | 'handlers': { | ||
2119 | 89 | 'null': { | ||
2120 | 90 | 'level': 'DEBUG', | ||
2121 | 91 | 'class': 'django.utils.log.NullHandler', | ||
2122 | 92 | }, | ||
2123 | 93 | 'console': { | ||
2124 | 94 | # Set the level to "DEBUG" for verbose output logging. | ||
2125 | 95 | 'level': 'INFO', | ||
2126 | 96 | 'class': 'logging.StreamHandler', | ||
2127 | 97 | }, | ||
2128 | 98 | }, | ||
2129 | 99 | 'loggers': { | ||
2130 | 100 | # Logging from django.db.backends is VERY verbose, send to null | ||
2131 | 101 | # by default. | ||
2132 | 102 | 'django.db.backends': { | ||
2133 | 103 | 'handlers': ['null'], | ||
2134 | 104 | 'propagate': False, | ||
2135 | 105 | }, | ||
2136 | 106 | 'horizon': { | ||
2137 | 107 | 'handlers': ['console'], | ||
2138 | 108 | 'propagate': False, | ||
2139 | 109 | }, | ||
2140 | 110 | 'novaclient': { | ||
2141 | 111 | 'handlers': ['console'], | ||
2142 | 112 | 'propagate': False, | ||
2143 | 113 | }, | ||
2144 | 114 | 'keystoneclient': { | ||
2145 | 115 | 'handlers': ['console'], | ||
2146 | 116 | 'propagate': False, | ||
2147 | 117 | }, | ||
2148 | 118 | 'nose.plugins.manager': { | ||
2149 | 119 | 'handlers': ['console'], | ||
2150 | 120 | 'propagate': False, | ||
2151 | 121 | } | ||
2152 | 122 | } | ||
2153 | 123 | } | ||
2154 | 124 | 0 | ||
2155 | === added directory '.pc/use-memcache.patch' | |||
2156 | === removed directory '.pc/use-memcache.patch' | |||
2157 | === added file '.pc/use-memcache.patch/.timestamp' | |||
2158 | === added directory '.pc/use-memcache.patch/openstack_dashboard' | |||
2159 | === removed directory '.pc/use-memcache.patch/openstack_dashboard' | |||
2160 | === added directory '.pc/use-memcache.patch/openstack_dashboard/local' | |||
2161 | === removed directory '.pc/use-memcache.patch/openstack_dashboard/local' | |||
2162 | === added file '.pc/use-memcache.patch/openstack_dashboard/local/local_settings.py.example' | |||
2163 | --- .pc/use-memcache.patch/openstack_dashboard/local/local_settings.py.example 1970-01-01 00:00:00 +0000 | |||
2164 | +++ .pc/use-memcache.patch/openstack_dashboard/local/local_settings.py.example 2013-04-24 15:22:28 +0000 | |||
2165 | @@ -0,0 +1,123 @@ | |||
2166 | 1 | import os | ||
2167 | 2 | |||
2168 | 3 | from django.utils.translation import ugettext_lazy as _ | ||
2169 | 4 | |||
2170 | 5 | DEBUG = False | ||
2171 | 6 | TEMPLATE_DEBUG = DEBUG | ||
2172 | 7 | PROD = False | ||
2173 | 8 | USE_SSL = False | ||
2174 | 9 | |||
2175 | 10 | # Ubuntu-specific: Enables an extra panel in the 'Settings' section | ||
2176 | 11 | # that easily generates a Juju environments.yaml for download, | ||
2177 | 12 | # preconfigured with endpoints and credentails required for bootstrap | ||
2178 | 13 | # and service deployment. | ||
2179 | 14 | ENABLE_JUJU_PANEL = True | ||
2180 | 15 | |||
2181 | 16 | # Note: You should change this value | ||
2182 | 17 | SECRET_KEY = 'elj1IWiLoWHgcyYxFVLj7cM5rGOOxWl0' | ||
2183 | 18 | |||
2184 | 19 | # Specify a regular expression to validate user passwords. | ||
2185 | 20 | # HORIZON_CONFIG = { | ||
2186 | 21 | # "password_validator": { | ||
2187 | 22 | # "regex": '.*', | ||
2188 | 23 | # "help_text": _("Your password does not meet the requirements.") | ||
2189 | 24 | # } | ||
2190 | 25 | # } | ||
2191 | 26 | |||
2192 | 27 | LOCAL_PATH = os.path.dirname(os.path.abspath(__file__)) | ||
2193 | 28 | |||
2194 | 29 | # We recommend you use memcached for development; otherwise after every reload | ||
2195 | 30 | # of the django development server, you will have to login again. To use | ||
2196 | 31 | # memcached set CACHE_BACKED to something like 'memcached://127.0.0.1:11211/' | ||
2197 | 32 | CACHE_BACKEND = 'locmem://' | ||
2198 | 33 | |||
2199 | 34 | # Send email to the console by default | ||
2200 | 35 | EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' | ||
2201 | 36 | # Or send them to /dev/null | ||
2202 | 37 | #EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend' | ||
2203 | 38 | |||
2204 | 39 | # Configure these for your outgoing email host | ||
2205 | 40 | # EMAIL_HOST = 'smtp.my-company.com' | ||
2206 | 41 | # EMAIL_PORT = 25 | ||
2207 | 42 | # EMAIL_HOST_USER = 'djangomail' | ||
2208 | 43 | # EMAIL_HOST_PASSWORD = 'top-secret!' | ||
2209 | 44 | |||
2210 | 45 | # For multiple regions uncomment this configuration, and add (endpoint, title). | ||
2211 | 46 | # AVAILABLE_REGIONS = [ | ||
2212 | 47 | # ('http://cluster1.example.com:5000/v2.0', 'cluster1'), | ||
2213 | 48 | # ('http://cluster2.example.com:5000/v2.0', 'cluster2'), | ||
2214 | 49 | # ] | ||
2215 | 50 | |||
2216 | 51 | OPENSTACK_HOST = "127.0.0.1" | ||
2217 | 52 | OPENSTACK_KEYSTONE_URL = "http://%s:5000/v2.0" % OPENSTACK_HOST | ||
2218 | 53 | OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member" | ||
2219 | 54 | |||
2220 | 55 | # The OPENSTACK_KEYSTONE_BACKEND settings can be used to identify the | ||
2221 | 56 | # capabilities of the auth backend for Keystone. | ||
2222 | 57 | # If Keystone has been configured to use LDAP as the auth backend then set | ||
2223 | 58 | # can_edit_user to False and name to 'ldap'. | ||
2224 | 59 | # | ||
2225 | 60 | # TODO(tres): Remove these once Keystone has an API to identify auth backend. | ||
2226 | 61 | OPENSTACK_KEYSTONE_BACKEND = { | ||
2227 | 62 | 'name': 'native', | ||
2228 | 63 | 'can_edit_user': True | ||
2229 | 64 | } | ||
2230 | 65 | |||
2231 | 66 | # OPENSTACK_ENDPOINT_TYPE specifies the endpoint type to use for the endpoints | ||
2232 | 67 | # in the Keystone service catalog. Use this setting when Horizon is running | ||
2233 | 68 | # external to the OpenStack environment. The default is 'internalURL'. | ||
2234 | 69 | #OPENSTACK_ENDPOINT_TYPE = "publicURL" | ||
2235 | 70 | |||
2236 | 71 | # The number of Swift containers and objects to display on a single page before | ||
2237 | 72 | # providing a paging element (a "more" link) to paginate results. | ||
2238 | 73 | API_RESULT_LIMIT = 1000 | ||
2239 | 74 | |||
2240 | 75 | # If you have external monitoring links, eg: | ||
2241 | 76 | # EXTERNAL_MONITORING = [ | ||
2242 | 77 | # ['Nagios','http://foo.com'], | ||
2243 | 78 | # ['Ganglia','http://bar.com'], | ||
2244 | 79 | # ] | ||
2245 | 80 | |||
2246 | 81 | LOGGING = { | ||
2247 | 82 | 'version': 1, | ||
2248 | 83 | # When set to True this will disable all logging except | ||
2249 | 84 | # for loggers specified in this configuration dictionary. Note that | ||
2250 | 85 | # if nothing is specified here and disable_existing_loggers is True, | ||
2251 | 86 | # django.db.backends will still log unless it is disabled explicitly. | ||
2252 | 87 | 'disable_existing_loggers': False, | ||
2253 | 88 | 'handlers': { | ||
2254 | 89 | 'null': { | ||
2255 | 90 | 'level': 'DEBUG', | ||
2256 | 91 | 'class': 'django.utils.log.NullHandler', | ||
2257 | 92 | }, | ||
2258 | 93 | 'console': { | ||
2259 | 94 | # Set the level to "DEBUG" for verbose output logging. | ||
2260 | 95 | 'level': 'INFO', | ||
2261 | 96 | 'class': 'logging.StreamHandler', | ||
2262 | 97 | }, | ||
2263 | 98 | }, | ||
2264 | 99 | 'loggers': { | ||
2265 | 100 | # Logging from django.db.backends is VERY verbose, send to null | ||
2266 | 101 | # by default. | ||
2267 | 102 | 'django.db.backends': { | ||
2268 | 103 | 'handlers': ['null'], | ||
2269 | 104 | 'propagate': False, | ||
2270 | 105 | }, | ||
2271 | 106 | 'horizon': { | ||
2272 | 107 | 'handlers': ['console'], | ||
2273 | 108 | 'propagate': False, | ||
2274 | 109 | }, | ||
2275 | 110 | 'novaclient': { | ||
2276 | 111 | 'handlers': ['console'], | ||
2277 | 112 | 'propagate': False, | ||
2278 | 113 | }, | ||
2279 | 114 | 'keystoneclient': { | ||
2280 | 115 | 'handlers': ['console'], | ||
2281 | 116 | 'propagate': False, | ||
2282 | 117 | }, | ||
2283 | 118 | 'nose.plugins.manager': { | ||
2284 | 119 | 'handlers': ['console'], | ||
2285 | 120 | 'propagate': False, | ||
2286 | 121 | } | ||
2287 | 122 | } | ||
2288 | 123 | } | ||
2289 | 0 | 124 | ||
2290 | === removed file '.pc/use-memcache.patch/openstack_dashboard/local/local_settings.py.example' | |||
2291 | --- .pc/use-memcache.patch/openstack_dashboard/local/local_settings.py.example 2012-04-25 10:55:18 +0000 | |||
2292 | +++ .pc/use-memcache.patch/openstack_dashboard/local/local_settings.py.example 1970-01-01 00:00:00 +0000 | |||
2293 | @@ -1,123 +0,0 @@ | |||
2294 | 1 | import os | ||
2295 | 2 | |||
2296 | 3 | from django.utils.translation import ugettext_lazy as _ | ||
2297 | 4 | |||
2298 | 5 | DEBUG = False | ||
2299 | 6 | TEMPLATE_DEBUG = DEBUG | ||
2300 | 7 | PROD = False | ||
2301 | 8 | USE_SSL = False | ||
2302 | 9 | |||
2303 | 10 | # Ubuntu-specific: Enables an extra panel in the 'Settings' section | ||
2304 | 11 | # that easily generates a Juju environments.yaml for download, | ||
2305 | 12 | # preconfigured with endpoints and credentails required for bootstrap | ||
2306 | 13 | # and service deployment. | ||
2307 | 14 | ENABLE_JUJU_PANEL = True | ||
2308 | 15 | |||
2309 | 16 | # Note: You should change this value | ||
2310 | 17 | SECRET_KEY = 'elj1IWiLoWHgcyYxFVLj7cM5rGOOxWl0' | ||
2311 | 18 | |||
2312 | 19 | # Specify a regular expression to validate user passwords. | ||
2313 | 20 | # HORIZON_CONFIG = { | ||
2314 | 21 | # "password_validator": { | ||
2315 | 22 | # "regex": '.*', | ||
2316 | 23 | # "help_text": _("Your password does not meet the requirements.") | ||
2317 | 24 | # } | ||
2318 | 25 | # } | ||
2319 | 26 | |||
2320 | 27 | LOCAL_PATH = os.path.dirname(os.path.abspath(__file__)) | ||
2321 | 28 | |||
2322 | 29 | # We recommend you use memcached for development; otherwise after every reload | ||
2323 | 30 | # of the django development server, you will have to login again. To use | ||
2324 | 31 | # memcached set CACHE_BACKED to something like 'memcached://127.0.0.1:11211/' | ||
2325 | 32 | CACHE_BACKEND = 'locmem://' | ||
2326 | 33 | |||
2327 | 34 | # Send email to the console by default | ||
2328 | 35 | EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' | ||
2329 | 36 | # Or send them to /dev/null | ||
2330 | 37 | #EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend' | ||
2331 | 38 | |||
2332 | 39 | # Configure these for your outgoing email host | ||
2333 | 40 | # EMAIL_HOST = 'smtp.my-company.com' | ||
2334 | 41 | # EMAIL_PORT = 25 | ||
2335 | 42 | # EMAIL_HOST_USER = 'djangomail' | ||
2336 | 43 | # EMAIL_HOST_PASSWORD = 'top-secret!' | ||
2337 | 44 | |||
2338 | 45 | # For multiple regions uncomment this configuration, and add (endpoint, title). | ||
2339 | 46 | # AVAILABLE_REGIONS = [ | ||
2340 | 47 | # ('http://cluster1.example.com:5000/v2.0', 'cluster1'), | ||
2341 | 48 | # ('http://cluster2.example.com:5000/v2.0', 'cluster2'), | ||
2342 | 49 | # ] | ||
2343 | 50 | |||
2344 | 51 | OPENSTACK_HOST = "127.0.0.1" | ||
2345 | 52 | OPENSTACK_KEYSTONE_URL = "http://%s:5000/v2.0" % OPENSTACK_HOST | ||
2346 | 53 | OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member" | ||
2347 | 54 | |||
2348 | 55 | # The OPENSTACK_KEYSTONE_BACKEND settings can be used to identify the | ||
2349 | 56 | # capabilities of the auth backend for Keystone. | ||
2350 | 57 | # If Keystone has been configured to use LDAP as the auth backend then set | ||
2351 | 58 | # can_edit_user to False and name to 'ldap'. | ||
2352 | 59 | # | ||
2353 | 60 | # TODO(tres): Remove these once Keystone has an API to identify auth backend. | ||
2354 | 61 | OPENSTACK_KEYSTONE_BACKEND = { | ||
2355 | 62 | 'name': 'native', | ||
2356 | 63 | 'can_edit_user': True | ||
2357 | 64 | } | ||
2358 | 65 | |||
2359 | 66 | # OPENSTACK_ENDPOINT_TYPE specifies the endpoint type to use for the endpoints | ||
2360 | 67 | # in the Keystone service catalog. Use this setting when Horizon is running | ||
2361 | 68 | # external to the OpenStack environment. The default is 'internalURL'. | ||
2362 | 69 | #OPENSTACK_ENDPOINT_TYPE = "publicURL" | ||
2363 | 70 | |||
2364 | 71 | # The number of Swift containers and objects to display on a single page before | ||
2365 | 72 | # providing a paging element (a "more" link) to paginate results. | ||
2366 | 73 | API_RESULT_LIMIT = 1000 | ||
2367 | 74 | |||
2368 | 75 | # If you have external monitoring links, eg: | ||
2369 | 76 | # EXTERNAL_MONITORING = [ | ||
2370 | 77 | # ['Nagios','http://foo.com'], | ||
2371 | 78 | # ['Ganglia','http://bar.com'], | ||
2372 | 79 | # ] | ||
2373 | 80 | |||
2374 | 81 | LOGGING = { | ||
2375 | 82 | 'version': 1, | ||
2376 | 83 | # When set to True this will disable all logging except | ||
2377 | 84 | # for loggers specified in this configuration dictionary. Note that | ||
2378 | 85 | # if nothing is specified here and disable_existing_loggers is True, | ||
2379 | 86 | # django.db.backends will still log unless it is disabled explicitly. | ||
2380 | 87 | 'disable_existing_loggers': False, | ||
2381 | 88 | 'handlers': { | ||
2382 | 89 | 'null': { | ||
2383 | 90 | 'level': 'DEBUG', | ||
2384 | 91 | 'class': 'django.utils.log.NullHandler', | ||
2385 | 92 | }, | ||
2386 | 93 | 'console': { | ||
2387 | 94 | # Set the level to "DEBUG" for verbose output logging. | ||
2388 | 95 | 'level': 'INFO', | ||
2389 | 96 | 'class': 'logging.StreamHandler', | ||
2390 | 97 | }, | ||
2391 | 98 | }, | ||
2392 | 99 | 'loggers': { | ||
2393 | 100 | # Logging from django.db.backends is VERY verbose, send to null | ||
2394 | 101 | # by default. | ||
2395 | 102 | 'django.db.backends': { | ||
2396 | 103 | 'handlers': ['null'], | ||
2397 | 104 | 'propagate': False, | ||
2398 | 105 | }, | ||
2399 | 106 | 'horizon': { | ||
2400 | 107 | 'handlers': ['console'], | ||
2401 | 108 | 'propagate': False, | ||
2402 | 109 | }, | ||
2403 | 110 | 'novaclient': { | ||
2404 | 111 | 'handlers': ['console'], | ||
2405 | 112 | 'propagate': False, | ||
2406 | 113 | }, | ||
2407 | 114 | 'keystoneclient': { | ||
2408 | 115 | 'handlers': ['console'], | ||
2409 | 116 | 'propagate': False, | ||
2410 | 117 | }, | ||
2411 | 118 | 'nose.plugins.manager': { | ||
2412 | 119 | 'handlers': ['console'], | ||
2413 | 120 | 'propagate': False, | ||
2414 | 121 | } | ||
2415 | 122 | } | ||
2416 | 123 | } | ||
2417 | 124 | 0 | ||
2418 | === removed file '.pylintrc' | |||
2419 | --- .pylintrc 2012-08-24 03:27:33 +0000 | |||
2420 | +++ .pylintrc 1970-01-01 00:00:00 +0000 | |||
2421 | @@ -1,42 +0,0 @@ | |||
2422 | 1 | # The format of this file isn't really documented; just use --generate-rcfile | ||
2423 | 2 | [MASTER] | ||
2424 | 3 | # Add <file or directory> to the black list. It should be a base name, not a | ||
2425 | 4 | # path. You may set this option multiple times. | ||
2426 | 5 | ignore=test | ||
2427 | 6 | |||
2428 | 7 | [Messages Control] | ||
2429 | 8 | # NOTE(justinsb): We might want to have a 2nd strict pylintrc in future | ||
2430 | 9 | # C0111: Don't require docstrings on every method | ||
2431 | 10 | # W0511: TODOs in code comments are fine. | ||
2432 | 11 | # W0142: *args and **kwargs are fine. | ||
2433 | 12 | # W0622: Redefining id is fine. | ||
2434 | 13 | disable=C0111,W0511,W0142,W0622 | ||
2435 | 14 | |||
2436 | 15 | [Basic] | ||
2437 | 16 | # Variable names can be 1 to 31 characters long, with lowercase and underscores | ||
2438 | 17 | variable-rgx=[a-z_][a-z0-9_]{0,30}$ | ||
2439 | 18 | |||
2440 | 19 | # Argument names can be 2 to 31 characters long, with lowercase and underscores | ||
2441 | 20 | argument-rgx=[a-z_][a-z0-9_]{1,30}$ | ||
2442 | 21 | |||
2443 | 22 | # Method names should be at least 3 characters long | ||
2444 | 23 | # and be lowecased with underscores | ||
2445 | 24 | method-rgx=([a-z_][a-z0-9_]{2,50}|setUp|tearDown)$ | ||
2446 | 25 | |||
2447 | 26 | # Module names matching keystone-* are ok (files in bin/) | ||
2448 | 27 | module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+)|(keystone-[a-z0-9_-]+))$ | ||
2449 | 28 | |||
2450 | 29 | # Don't require docstrings on tests. | ||
2451 | 30 | no-docstring-rgx=((__.*__)|([tT]est.*)|setUp|tearDown)$ | ||
2452 | 31 | |||
2453 | 32 | [Design] | ||
2454 | 33 | max-public-methods=100 | ||
2455 | 34 | min-public-methods=0 | ||
2456 | 35 | max-args=6 | ||
2457 | 36 | |||
2458 | 37 | [Variables] | ||
2459 | 38 | |||
2460 | 39 | # List of additional names supposed to be defined in builtins. Remember that | ||
2461 | 40 | # you should avoid to define new builtins when possible. | ||
2462 | 41 | # _ is used by our localization | ||
2463 | 42 | additional-builtins=_ | ||
2464 | 43 | 0 | ||
2465 | === modified file 'AUTHORS' | |||
2466 | --- AUTHORS 2012-08-24 03:27:33 +0000 | |||
2467 | +++ AUTHORS 2013-04-24 15:22:28 +0000 | |||
2468 | @@ -3,6 +3,7 @@ | |||
2469 | 3 | Andy Chong <andycjw@gmail.com> | 3 | Andy Chong <andycjw@gmail.com> |
2470 | 4 | Anthony Young <sleepsonthefloor@gmail.com> | 4 | Anthony Young <sleepsonthefloor@gmail.com> |
2471 | 5 | Arvind Somya <asomya@cisco.com> | 5 | Arvind Somya <asomya@cisco.com> |
2472 | 6 | Brian Waldon <bcwaldon@gmail.com> | ||
2473 | 6 | Carlo Truijllo <truijllo@crs4.it> | 7 | Carlo Truijllo <truijllo@crs4.it> |
2474 | 7 | Chuck Short <chuck.short@canonical.com> | 8 | Chuck Short <chuck.short@canonical.com> |
2475 | 8 | Cole Robinson <crobinso@redhat.com> | 9 | Cole Robinson <crobinso@redhat.com> |
2476 | @@ -47,6 +48,7 @@ | |||
2477 | 47 | Todd Willey <todd@ansolabs.com> | 48 | Todd Willey <todd@ansolabs.com> |
2478 | 48 | Tomasz 'Zen' Napierala <tomasz@napierala.org> | 49 | Tomasz 'Zen' Napierala <tomasz@napierala.org> |
2479 | 49 | Tres Henry <tres@treshenry.net> | 50 | Tres Henry <tres@treshenry.net> |
2480 | 51 | Vincent Untz <vuntz@suse.com> | ||
2481 | 50 | Vishvananda Ishaya <vishvananda@gmail.com> | 52 | Vishvananda Ishaya <vishvananda@gmail.com> |
2482 | 51 | Yuriy Taraday <yorik.sar@gmail.com> | 53 | Yuriy Taraday <yorik.sar@gmail.com> |
2483 | 52 | ZhongYue Luo <lzyeval@gmail.com> | 54 | ZhongYue Luo <lzyeval@gmail.com> |
2484 | 53 | 55 | ||
2485 | === added file 'PKG-INFO' | |||
2486 | --- PKG-INFO 1970-01-01 00:00:00 +0000 | |||
2487 | +++ PKG-INFO 2013-04-24 15:22:28 +0000 | |||
2488 | @@ -0,0 +1,126 @@ | |||
2489 | 1 | Metadata-Version: 1.1 | ||
2490 | 2 | Name: horizon | ||
2491 | 3 | Version: 2012.1.4 | ||
2492 | 4 | Summary: The OpenStack Dashboard. | ||
2493 | 5 | Home-page: https://github.com/openstack/horizon/ | ||
2494 | 6 | Author: OpenStack | ||
2495 | 7 | Author-email: horizon@lists.launchpad.net | ||
2496 | 8 | License: Apache 2.0 | ||
2497 | 9 | Description: ============================= | ||
2498 | 10 | Horizon (OpenStack Dashboard) | ||
2499 | 11 | ============================= | ||
2500 | 12 | |||
2501 | 13 | Horizon is a Django-based project aimed at providing a complete OpenStack | ||
2502 | 14 | Dashboard along with an extensible framework for building new dashboards | ||
2503 | 15 | from reusable components. The ``openstack_dashboard`` module is a reference | ||
2504 | 16 | implementation of a Django site that uses the ``horizon`` app to provide | ||
2505 | 17 | web-based interactions with the various OpenStack projects. | ||
2506 | 18 | |||
2507 | 19 | For release management: | ||
2508 | 20 | |||
2509 | 21 | * https://launchpad.net/horizon | ||
2510 | 22 | |||
2511 | 23 | For blueprints and feature specifications: | ||
2512 | 24 | |||
2513 | 25 | * https://blueprints.launchpad.net/horizon | ||
2514 | 26 | |||
2515 | 27 | For issue tracking: | ||
2516 | 28 | |||
2517 | 29 | * https://bugs.launchpad.net/horizon | ||
2518 | 30 | |||
2519 | 31 | Getting Started | ||
2520 | 32 | =============== | ||
2521 | 33 | |||
2522 | 34 | For local development, first create a virtualenv for the project. | ||
2523 | 35 | In the ``tools`` directory there is a script to create one for you: | ||
2524 | 36 | |||
2525 | 37 | $ python tools/install_venv.py | ||
2526 | 38 | |||
2527 | 39 | Alternatively, the ``run_tests.sh`` script will also install the environment | ||
2528 | 40 | for you and then run the full test suite to verify everything is installed | ||
2529 | 41 | and functioning correctly. | ||
2530 | 42 | |||
2531 | 43 | Now that the virtualenv is created, you need to configure your local | ||
2532 | 44 | environment. To do this, create a ``local_settings.py`` file in the | ||
2533 | 45 | ``openstack_dashboard/local/`` directory. There is a | ||
2534 | 46 | ``local_settings.py.example`` file there that may be used as a template. | ||
2535 | 47 | |||
2536 | 48 | If all is well you should able to run the development server locally: | ||
2537 | 49 | |||
2538 | 50 | $ tools/with_venv.sh manage.py runserver | ||
2539 | 51 | |||
2540 | 52 | or, as a shortcut:: | ||
2541 | 53 | |||
2542 | 54 | $ ./run_tests.sh --runserver | ||
2543 | 55 | |||
2544 | 56 | |||
2545 | 57 | Settings Up OpenStack | ||
2546 | 58 | ===================== | ||
2547 | 59 | |||
2548 | 60 | The recommended tool for installing and configuring the core OpenStack | ||
2549 | 61 | components is `Devstack`_. Refer to their documentation for getting | ||
2550 | 62 | Nova, Keystone, Glance, etc. up and running. | ||
2551 | 63 | |||
2552 | 64 | .. _Devstack: http://devstack.org/ | ||
2553 | 65 | |||
2554 | 66 | .. note:: | ||
2555 | 67 | |||
2556 | 68 | The minimum required set of OpenStack services running includes the | ||
2557 | 69 | following: | ||
2558 | 70 | |||
2559 | 71 | * Nova (compute, api, scheduler, network, *and* volume services) | ||
2560 | 72 | * Glance | ||
2561 | 73 | * Keystone | ||
2562 | 74 | |||
2563 | 75 | Optional support is provided for Swift. | ||
2564 | 76 | |||
2565 | 77 | |||
2566 | 78 | Development | ||
2567 | 79 | =========== | ||
2568 | 80 | |||
2569 | 81 | For development, start with the getting started instructions above. | ||
2570 | 82 | Once you have a working virtualenv and all the necessary packages, read on. | ||
2571 | 83 | |||
2572 | 84 | If dependencies are added to either ``horizon`` or ``openstack-dashboard``, | ||
2573 | 85 | they should be added to ``tools/pip-requires``. | ||
2574 | 86 | |||
2575 | 87 | The ``run_tests.sh`` script invokes tests and analyses on both of these | ||
2576 | 88 | components in its process, and it is what Jenkins uses to verify the | ||
2577 | 89 | stability of the project. If run before an environment is set up, it will | ||
2578 | 90 | ask if you wish to install one. | ||
2579 | 91 | |||
2580 | 92 | To run the unit tests:: | ||
2581 | 93 | |||
2582 | 94 | $ ./run_tests.sh | ||
2583 | 95 | |||
2584 | 96 | Building Contributor Documentation | ||
2585 | 97 | ================================== | ||
2586 | 98 | |||
2587 | 99 | This documentation is written by contributors, for contributors. | ||
2588 | 100 | |||
2589 | 101 | The source is maintained in the ``docs/source`` folder using | ||
2590 | 102 | `reStructuredText`_ and built by `Sphinx`_ | ||
2591 | 103 | |||
2592 | 104 | .. _reStructuredText: http://docutils.sourceforge.net/rst.html | ||
2593 | 105 | .. _Sphinx: http://sphinx.pocoo.org/ | ||
2594 | 106 | |||
2595 | 107 | * Building Automatically:: | ||
2596 | 108 | |||
2597 | 109 | $ ./run_tests.sh --docs | ||
2598 | 110 | |||
2599 | 111 | * Building Manually:: | ||
2600 | 112 | |||
2601 | 113 | $ export DJANGO_SETTINGS_MODULE=local.local_settings | ||
2602 | 114 | $ python doc/generate_autodoc_index.py | ||
2603 | 115 | $ sphinx-build -b html doc/source build/sphinx/html | ||
2604 | 116 | |||
2605 | 117 | Results are in the `build/sphinx/html` directory | ||
2606 | 118 | |||
2607 | 119 | Platform: UNKNOWN | ||
2608 | 120 | Classifier: Development Status :: 4 - Beta | ||
2609 | 121 | Classifier: Framework :: Django | ||
2610 | 122 | Classifier: Intended Audience :: Developers | ||
2611 | 123 | Classifier: License :: OSI Approved :: Apache Software License | ||
2612 | 124 | Classifier: Operating System :: OS Independent | ||
2613 | 125 | Classifier: Programming Language :: Python | ||
2614 | 126 | Classifier: Topic :: Internet :: WWW/HTTP | ||
2615 | 0 | 127 | ||
2616 | === modified file 'debian/changelog' | |||
2617 | --- debian/changelog 2012-08-30 17:15:04 +0000 | |||
2618 | +++ debian/changelog 2013-04-24 15:22:28 +0000 | |||
2619 | @@ -1,3 +1,21 @@ | |||
2620 | 1 | horizon (2012.1.3+stable-20130423-5ce39422-0ubuntu1) precise-proposed; urgency=low | ||
2621 | 2 | |||
2622 | 3 | * Resynchronize with stable/essex (LP: #1089488) | ||
2623 | 4 | - [7e651d7] stable/essex horizon installs unusable version of glance | ||
2624 | 5 | (LP: #1057125) | ||
2625 | 6 | - [35eada8] open redirect / phishing attack via "next" parameter | ||
2626 | 7 | (LP: #1039077) | ||
2627 | 8 | - [8889311] TypeError when trying to delete an unnamed volume via dashboard | ||
2628 | 9 | (LP: #1031291) | ||
2629 | 10 | - [f862d9e] Wrong 'Download CSV Summary' link (LP: #1020555) | ||
2630 | 11 | - [9b22d68] When adding ICMP rule, the type/code is being validated as | ||
2631 | 12 | from/to ports (LP: #997669) | ||
2632 | 13 | - [52bbba1] Added --only-selenium option in run_tests.sh | ||
2633 | 14 | * Dropped patches, superseeded by new snapshot: | ||
2634 | 15 | - debian/patches/CVE-2012-3540.patch [35eada8] | ||
2635 | 16 | |||
2636 | 17 | -- Yolanda <yolanda.robla@canonical.com> Wed, 24 Apr 2013 15:46:28 +0200 | ||
2637 | 18 | |||
2638 | 1 | horizon (2012.1.3+stable~20120815-691dd2-0ubuntu1.1) precise-security; urgency=low | 19 | horizon (2012.1.3+stable~20120815-691dd2-0ubuntu1.1) precise-security; urgency=low |
2639 | 2 | 20 | ||
2640 | 3 | * SECURITY UPDATE: open redirect / phishing attack via "next" | 21 | * SECURITY UPDATE: open redirect / phishing attack via "next" |
2641 | 4 | 22 | ||
2642 | === removed file 'debian/patches/CVE-2012-3540.patch' | |||
2643 | --- debian/patches/CVE-2012-3540.patch 2012-08-30 17:15:04 +0000 | |||
2644 | +++ debian/patches/CVE-2012-3540.patch 1970-01-01 00:00:00 +0000 | |||
2645 | @@ -1,33 +0,0 @@ | |||
2646 | 1 | Origin: https://github.com/openstack/horizon/commit/35eada8a27323c0f83c400177797927aba6bc99b | ||
2647 | 2 | Subject: Disallow login redirects to anywhere other than the same origin. | ||
2648 | 3 | Bug: https://bugs.launchpad.net/horizon/+bug/1039077 | ||
2649 | 4 | |||
2650 | 5 | CVE-2012-3540 | ||
2651 | 6 | |||
2652 | 7 | diff --git a/horizon/views/auth_forms.py b/horizon/views/auth_forms.py | ||
2653 | 8 | index 2ebecfc..abf0880 100644 | ||
2654 | 9 | --- a/horizon/views/auth_forms.py | ||
2655 | 10 | +++ b/horizon/views/auth_forms.py | ||
2656 | 11 | @@ -28,6 +28,7 @@ | ||
2657 | 12 | from django.conf import settings | ||
2658 | 13 | from django.contrib import messages | ||
2659 | 14 | from django.contrib.auth import REDIRECT_FIELD_NAME | ||
2660 | 15 | +from django.utils.http import same_origin | ||
2661 | 16 | from django.utils.translation import ugettext as _ | ||
2662 | 17 | from keystoneclient import exceptions as keystone_exceptions | ||
2663 | 18 | |||
2664 | 19 | @@ -94,7 +95,13 @@ def handle(self, request, data): | ||
2665 | 20 | request.session['region_endpoint'] = endpoint | ||
2666 | 21 | request.session['region_name'] = region_name | ||
2667 | 22 | |||
2668 | 23 | - redirect_to = request.REQUEST.get(REDIRECT_FIELD_NAME, "") | ||
2669 | 24 | + redirect_to = request.REQUEST.get(REDIRECT_FIELD_NAME, None) | ||
2670 | 25 | + # Make sure the requested redirect matches the protocol, | ||
2671 | 26 | + # domain, and port of this request | ||
2672 | 27 | + if redirect_to and not same_origin( | ||
2673 | 28 | + request.build_absolute_uri(redirect_to), | ||
2674 | 29 | + request.build_absolute_uri()): | ||
2675 | 30 | + redirect_to = None | ||
2676 | 31 | |||
2677 | 32 | if data.get('tenant', None): | ||
2678 | 33 | try: | ||
2679 | 34 | 0 | ||
2680 | === modified file 'debian/patches/series' | |||
2681 | --- debian/patches/series 2012-08-30 17:15:04 +0000 | |||
2682 | +++ debian/patches/series 2013-04-24 15:22:28 +0000 | |||
2683 | @@ -6,4 +6,3 @@ | |||
2684 | 6 | allow_alternate_css.patch | 6 | allow_alternate_css.patch |
2685 | 7 | use-memcache.patch | 7 | use-memcache.patch |
2686 | 8 | juju_panel-handle_catalog_exception.patch | 8 | juju_panel-handle_catalog_exception.patch |
2687 | 9 | CVE-2012-3540.patch | ||
2688 | 10 | 9 | ||
2689 | === removed file 'docs/source/_static/.gitignore' | |||
2690 | === added directory 'horizon.egg-info' | |||
2691 | === added file 'horizon.egg-info/PKG-INFO' | |||
2692 | --- horizon.egg-info/PKG-INFO 1970-01-01 00:00:00 +0000 | |||
2693 | +++ horizon.egg-info/PKG-INFO 2013-04-24 15:22:28 +0000 | |||
2694 | @@ -0,0 +1,126 @@ | |||
2695 | 1 | Metadata-Version: 1.1 | ||
2696 | 2 | Name: horizon | ||
2697 | 3 | Version: 2012.1.4 | ||
2698 | 4 | Summary: The OpenStack Dashboard. | ||
2699 | 5 | Home-page: https://github.com/openstack/horizon/ | ||
2700 | 6 | Author: OpenStack | ||
2701 | 7 | Author-email: horizon@lists.launchpad.net | ||
2702 | 8 | License: Apache 2.0 | ||
2703 | 9 | Description: ============================= | ||
2704 | 10 | Horizon (OpenStack Dashboard) | ||
2705 | 11 | ============================= | ||
2706 | 12 | |||
2707 | 13 | Horizon is a Django-based project aimed at providing a complete OpenStack | ||
2708 | 14 | Dashboard along with an extensible framework for building new dashboards | ||
2709 | 15 | from reusable components. The ``openstack_dashboard`` module is a reference | ||
2710 | 16 | implementation of a Django site that uses the ``horizon`` app to provide | ||
2711 | 17 | web-based interactions with the various OpenStack projects. | ||
2712 | 18 | |||
2713 | 19 | For release management: | ||
2714 | 20 | |||
2715 | 21 | * https://launchpad.net/horizon | ||
2716 | 22 | |||
2717 | 23 | For blueprints and feature specifications: | ||
2718 | 24 | |||
2719 | 25 | * https://blueprints.launchpad.net/horizon | ||
2720 | 26 | |||
2721 | 27 | For issue tracking: | ||
2722 | 28 | |||
2723 | 29 | * https://bugs.launchpad.net/horizon | ||
2724 | 30 | |||
2725 | 31 | Getting Started | ||
2726 | 32 | =============== | ||
2727 | 33 | |||
2728 | 34 | For local development, first create a virtualenv for the project. | ||
2729 | 35 | In the ``tools`` directory there is a script to create one for you: | ||
2730 | 36 | |||
2731 | 37 | $ python tools/install_venv.py | ||
2732 | 38 | |||
2733 | 39 | Alternatively, the ``run_tests.sh`` script will also install the environment | ||
2734 | 40 | for you and then run the full test suite to verify everything is installed | ||
2735 | 41 | and functioning correctly. | ||
2736 | 42 | |||
2737 | 43 | Now that the virtualenv is created, you need to configure your local | ||
2738 | 44 | environment. To do this, create a ``local_settings.py`` file in the | ||
2739 | 45 | ``openstack_dashboard/local/`` directory. There is a | ||
2740 | 46 | ``local_settings.py.example`` file there that may be used as a template. | ||
2741 | 47 | |||
2742 | 48 | If all is well you should able to run the development server locally: | ||
2743 | 49 | |||
2744 | 50 | $ tools/with_venv.sh manage.py runserver | ||
2745 | 51 | |||
2746 | 52 | or, as a shortcut:: | ||
2747 | 53 | |||
2748 | 54 | $ ./run_tests.sh --runserver | ||
2749 | 55 | |||
2750 | 56 | |||
2751 | 57 | Settings Up OpenStack | ||
2752 | 58 | ===================== | ||
2753 | 59 | |||
2754 | 60 | The recommended tool for installing and configuring the core OpenStack | ||
2755 | 61 | components is `Devstack`_. Refer to their documentation for getting | ||
2756 | 62 | Nova, Keystone, Glance, etc. up and running. | ||
2757 | 63 | |||
2758 | 64 | .. _Devstack: http://devstack.org/ | ||
2759 | 65 | |||
2760 | 66 | .. note:: | ||
2761 | 67 | |||
2762 | 68 | The minimum required set of OpenStack services running includes the | ||
2763 | 69 | following: | ||
2764 | 70 | |||
2765 | 71 | * Nova (compute, api, scheduler, network, *and* volume services) | ||
2766 | 72 | * Glance | ||
2767 | 73 | * Keystone | ||
2768 | 74 | |||
2769 | 75 | Optional support is provided for Swift. | ||
2770 | 76 | |||
2771 | 77 | |||
2772 | 78 | Development | ||
2773 | 79 | =========== | ||
2774 | 80 | |||
2775 | 81 | For development, start with the getting started instructions above. | ||
2776 | 82 | Once you have a working virtualenv and all the necessary packages, read on. | ||
2777 | 83 | |||
2778 | 84 | If dependencies are added to either ``horizon`` or ``openstack-dashboard``, | ||
2779 | 85 | they should be added to ``tools/pip-requires``. | ||
2780 | 86 | |||
2781 | 87 | The ``run_tests.sh`` script invokes tests and analyses on both of these | ||
2782 | 88 | components in its process, and it is what Jenkins uses to verify the | ||
2783 | 89 | stability of the project. If run before an environment is set up, it will | ||
2784 | 90 | ask if you wish to install one. | ||
2785 | 91 | |||
2786 | 92 | To run the unit tests:: | ||
2787 | 93 | |||
2788 | 94 | $ ./run_tests.sh | ||
2789 | 95 | |||
2790 | 96 | Building Contributor Documentation | ||
2791 | 97 | ================================== | ||
2792 | 98 | |||
2793 | 99 | This documentation is written by contributors, for contributors. | ||
2794 | 100 | |||
2795 | 101 | The source is maintained in the ``docs/source`` folder using | ||
2796 | 102 | `reStructuredText`_ and built by `Sphinx`_ | ||
2797 | 103 | |||
2798 | 104 | .. _reStructuredText: http://docutils.sourceforge.net/rst.html | ||
2799 | 105 | .. _Sphinx: http://sphinx.pocoo.org/ | ||
2800 | 106 | |||
2801 | 107 | * Building Automatically:: | ||
2802 | 108 | |||
2803 | 109 | $ ./run_tests.sh --docs | ||
2804 | 110 | |||
2805 | 111 | * Building Manually:: | ||
2806 | 112 | |||
2807 | 113 | $ export DJANGO_SETTINGS_MODULE=local.local_settings | ||
2808 | 114 | $ python doc/generate_autodoc_index.py | ||
2809 | 115 | $ sphinx-build -b html doc/source build/sphinx/html | ||
2810 | 116 | |||
2811 | 117 | Results are in the `build/sphinx/html` directory | ||
2812 | 118 | |||
2813 | 119 | Platform: UNKNOWN | ||
2814 | 120 | Classifier: Development Status :: 4 - Beta | ||
2815 | 121 | Classifier: Framework :: Django | ||
2816 | 122 | Classifier: Intended Audience :: Developers | ||
2817 | 123 | Classifier: License :: OSI Approved :: Apache Software License | ||
2818 | 124 | Classifier: Operating System :: OS Independent | ||
2819 | 125 | Classifier: Programming Language :: Python | ||
2820 | 126 | Classifier: Topic :: Internet :: WWW/HTTP | ||
2821 | 0 | 127 | ||
2822 | === added file 'horizon.egg-info/SOURCES.txt' | |||
2823 | --- horizon.egg-info/SOURCES.txt 1970-01-01 00:00:00 +0000 | |||
2824 | +++ horizon.egg-info/SOURCES.txt 2013-04-24 15:22:28 +0000 | |||
2825 | @@ -0,0 +1,478 @@ | |||
2826 | 1 | AUTHORS | ||
2827 | 2 | LICENSE | ||
2828 | 3 | MANIFEST.in | ||
2829 | 4 | Makefile | ||
2830 | 5 | README.rst | ||
2831 | 6 | manage.py | ||
2832 | 7 | run_tests.sh | ||
2833 | 8 | setup.py | ||
2834 | 9 | docs/Makefile | ||
2835 | 10 | docs/source/conf.py | ||
2836 | 11 | docs/source/contributing.rst | ||
2837 | 12 | docs/source/faq.rst | ||
2838 | 13 | docs/source/glossary.rst | ||
2839 | 14 | docs/source/index.rst | ||
2840 | 15 | docs/source/intro.rst | ||
2841 | 16 | docs/source/quickstart.rst | ||
2842 | 17 | docs/source/testing.rst | ||
2843 | 18 | docs/source/_static/basic.css | ||
2844 | 19 | docs/source/_static/default.css | ||
2845 | 20 | docs/source/_static/header-line.gif | ||
2846 | 21 | docs/source/_static/header_bg.jpg | ||
2847 | 22 | docs/source/_static/jquery.tweet.js | ||
2848 | 23 | docs/source/_static/openstack_logo.png | ||
2849 | 24 | docs/source/_static/tweaks.css | ||
2850 | 25 | docs/source/_templates/.placeholder | ||
2851 | 26 | docs/source/_theme/layout.html | ||
2852 | 27 | docs/source/_theme/nature.css_t | ||
2853 | 28 | docs/source/_theme/theme.conf | ||
2854 | 29 | docs/source/ref/context_processors.rst | ||
2855 | 30 | docs/source/ref/decorators.rst | ||
2856 | 31 | docs/source/ref/exceptions.rst | ||
2857 | 32 | docs/source/ref/forms.rst | ||
2858 | 33 | docs/source/ref/horizon.rst | ||
2859 | 34 | docs/source/ref/middleware.rst | ||
2860 | 35 | docs/source/ref/run_tests.rst | ||
2861 | 36 | docs/source/ref/tables.rst | ||
2862 | 37 | docs/source/ref/tabs.rst | ||
2863 | 38 | docs/source/ref/test.rst | ||
2864 | 39 | docs/source/ref/users.rst | ||
2865 | 40 | docs/source/ref/views.rst | ||
2866 | 41 | docs/source/topics/customizing.rst | ||
2867 | 42 | docs/source/topics/deployment.rst | ||
2868 | 43 | docs/source/topics/tables.rst | ||
2869 | 44 | docs/source/topics/testing.rst | ||
2870 | 45 | horizon/__init__.py | ||
2871 | 46 | horizon/base.py | ||
2872 | 47 | horizon/context_processors.py | ||
2873 | 48 | horizon/decorators.py | ||
2874 | 49 | horizon/exceptions.py | ||
2875 | 50 | horizon/middleware.py | ||
2876 | 51 | horizon/models.py | ||
2877 | 52 | horizon/site_urls.py | ||
2878 | 53 | horizon/test.py | ||
2879 | 54 | horizon/time.py | ||
2880 | 55 | horizon/users.py | ||
2881 | 56 | horizon/version.py | ||
2882 | 57 | horizon.egg-info/PKG-INFO | ||
2883 | 58 | horizon.egg-info/SOURCES.txt | ||
2884 | 59 | horizon.egg-info/dependency_links.txt | ||
2885 | 60 | horizon.egg-info/not-zip-safe | ||
2886 | 61 | horizon.egg-info/requires.txt | ||
2887 | 62 | horizon.egg-info/top_level.txt | ||
2888 | 63 | horizon/api/__init__.py | ||
2889 | 64 | horizon/api/base.py | ||
2890 | 65 | horizon/api/glance.py | ||
2891 | 66 | horizon/api/keystone.py | ||
2892 | 67 | horizon/api/nova.py | ||
2893 | 68 | horizon/api/swift.py | ||
2894 | 69 | horizon/dashboards/__init__.py | ||
2895 | 70 | horizon/dashboards/nova/__init__.py | ||
2896 | 71 | horizon/dashboards/nova/dashboard.py | ||
2897 | 72 | horizon/dashboards/nova/models.py | ||
2898 | 73 | horizon/dashboards/nova/access_and_security/__init__.py | ||
2899 | 74 | horizon/dashboards/nova/access_and_security/panel.py | ||
2900 | 75 | horizon/dashboards/nova/access_and_security/tests.py | ||
2901 | 76 | horizon/dashboards/nova/access_and_security/urls.py | ||
2902 | 77 | horizon/dashboards/nova/access_and_security/views.py | ||
2903 | 78 | horizon/dashboards/nova/access_and_security/floating_ips/__init__.py | ||
2904 | 79 | horizon/dashboards/nova/access_and_security/floating_ips/forms.py | ||
2905 | 80 | horizon/dashboards/nova/access_and_security/floating_ips/tables.py | ||
2906 | 81 | horizon/dashboards/nova/access_and_security/floating_ips/tests.py | ||
2907 | 82 | horizon/dashboards/nova/access_and_security/floating_ips/urls.py | ||
2908 | 83 | horizon/dashboards/nova/access_and_security/floating_ips/views.py | ||
2909 | 84 | horizon/dashboards/nova/access_and_security/keypairs/__init__.py | ||
2910 | 85 | horizon/dashboards/nova/access_and_security/keypairs/forms.py | ||
2911 | 86 | horizon/dashboards/nova/access_and_security/keypairs/tables.py | ||
2912 | 87 | horizon/dashboards/nova/access_and_security/keypairs/tests.py | ||
2913 | 88 | horizon/dashboards/nova/access_and_security/keypairs/urls.py | ||
2914 | 89 | horizon/dashboards/nova/access_and_security/keypairs/views.py | ||
2915 | 90 | horizon/dashboards/nova/access_and_security/security_groups/__init__.py | ||
2916 | 91 | horizon/dashboards/nova/access_and_security/security_groups/forms.py | ||
2917 | 92 | horizon/dashboards/nova/access_and_security/security_groups/tables.py | ||
2918 | 93 | horizon/dashboards/nova/access_and_security/security_groups/tests.py | ||
2919 | 94 | horizon/dashboards/nova/access_and_security/security_groups/urls.py | ||
2920 | 95 | horizon/dashboards/nova/access_and_security/security_groups/views.py | ||
2921 | 96 | horizon/dashboards/nova/containers/__init__.py | ||
2922 | 97 | horizon/dashboards/nova/containers/forms.py | ||
2923 | 98 | horizon/dashboards/nova/containers/panel.py | ||
2924 | 99 | horizon/dashboards/nova/containers/tables.py | ||
2925 | 100 | horizon/dashboards/nova/containers/tests.py | ||
2926 | 101 | horizon/dashboards/nova/containers/urls.py | ||
2927 | 102 | horizon/dashboards/nova/containers/views.py | ||
2928 | 103 | horizon/dashboards/nova/images_and_snapshots/__init__.py | ||
2929 | 104 | horizon/dashboards/nova/images_and_snapshots/panel.py | ||
2930 | 105 | horizon/dashboards/nova/images_and_snapshots/tests.py | ||
2931 | 106 | horizon/dashboards/nova/images_and_snapshots/urls.py | ||
2932 | 107 | horizon/dashboards/nova/images_and_snapshots/views.py | ||
2933 | 108 | horizon/dashboards/nova/images_and_snapshots/images/__init__.py | ||
2934 | 109 | horizon/dashboards/nova/images_and_snapshots/images/forms.py | ||
2935 | 110 | horizon/dashboards/nova/images_and_snapshots/images/panel.py | ||
2936 | 111 | horizon/dashboards/nova/images_and_snapshots/images/tables.py | ||
2937 | 112 | horizon/dashboards/nova/images_and_snapshots/images/tabs.py | ||
2938 | 113 | horizon/dashboards/nova/images_and_snapshots/images/tests.py | ||
2939 | 114 | horizon/dashboards/nova/images_and_snapshots/images/urls.py | ||
2940 | 115 | horizon/dashboards/nova/images_and_snapshots/images/views.py | ||
2941 | 116 | horizon/dashboards/nova/images_and_snapshots/snapshots/__init__.py | ||
2942 | 117 | horizon/dashboards/nova/images_and_snapshots/snapshots/forms.py | ||
2943 | 118 | horizon/dashboards/nova/images_and_snapshots/snapshots/panel.py | ||
2944 | 119 | horizon/dashboards/nova/images_and_snapshots/snapshots/tables.py | ||
2945 | 120 | horizon/dashboards/nova/images_and_snapshots/snapshots/tests.py | ||
2946 | 121 | horizon/dashboards/nova/images_and_snapshots/snapshots/urls.py | ||
2947 | 122 | horizon/dashboards/nova/images_and_snapshots/snapshots/views.py | ||
2948 | 123 | horizon/dashboards/nova/images_and_snapshots/volume_snapshots/__init__.py | ||
2949 | 124 | horizon/dashboards/nova/images_and_snapshots/volume_snapshots/panel.py | ||
2950 | 125 | horizon/dashboards/nova/images_and_snapshots/volume_snapshots/tables.py | ||
2951 | 126 | horizon/dashboards/nova/images_and_snapshots/volume_snapshots/tests.py | ||
2952 | 127 | horizon/dashboards/nova/instances_and_volumes/__init__.py | ||
2953 | 128 | horizon/dashboards/nova/instances_and_volumes/panel.py | ||
2954 | 129 | horizon/dashboards/nova/instances_and_volumes/tests.py | ||
2955 | 130 | horizon/dashboards/nova/instances_and_volumes/urls.py | ||
2956 | 131 | horizon/dashboards/nova/instances_and_volumes/views.py | ||
2957 | 132 | horizon/dashboards/nova/instances_and_volumes/instances/__init__.py | ||
2958 | 133 | horizon/dashboards/nova/instances_and_volumes/instances/forms.py | ||
2959 | 134 | horizon/dashboards/nova/instances_and_volumes/instances/tables.py | ||
2960 | 135 | horizon/dashboards/nova/instances_and_volumes/instances/tabs.py | ||
2961 | 136 | horizon/dashboards/nova/instances_and_volumes/instances/tests.py | ||
2962 | 137 | horizon/dashboards/nova/instances_and_volumes/instances/urls.py | ||
2963 | 138 | horizon/dashboards/nova/instances_and_volumes/instances/views.py | ||
2964 | 139 | horizon/dashboards/nova/instances_and_volumes/volumes/__init__.py | ||
2965 | 140 | horizon/dashboards/nova/instances_and_volumes/volumes/forms.py | ||
2966 | 141 | horizon/dashboards/nova/instances_and_volumes/volumes/tables.py | ||
2967 | 142 | horizon/dashboards/nova/instances_and_volumes/volumes/tabs.py | ||
2968 | 143 | horizon/dashboards/nova/instances_and_volumes/volumes/tests.py | ||
2969 | 144 | horizon/dashboards/nova/instances_and_volumes/volumes/urls.py | ||
2970 | 145 | horizon/dashboards/nova/instances_and_volumes/volumes/views.py | ||
2971 | 146 | horizon/dashboards/nova/overview/__init__.py | ||
2972 | 147 | horizon/dashboards/nova/overview/panel.py | ||
2973 | 148 | horizon/dashboards/nova/overview/tests.py | ||
2974 | 149 | horizon/dashboards/nova/overview/urls.py | ||
2975 | 150 | horizon/dashboards/nova/overview/views.py | ||
2976 | 151 | horizon/dashboards/nova/templates/nova/base.html | ||
2977 | 152 | horizon/dashboards/nova/templates/nova/access_and_security/index.html | ||
2978 | 153 | horizon/dashboards/nova/templates/nova/access_and_security/floating_ips/_allocate.html | ||
2979 | 154 | horizon/dashboards/nova/templates/nova/access_and_security/floating_ips/_associate.html | ||
2980 | 155 | horizon/dashboards/nova/templates/nova/access_and_security/floating_ips/allocate.html | ||
2981 | 156 | horizon/dashboards/nova/templates/nova/access_and_security/floating_ips/associate.html | ||
2982 | 157 | horizon/dashboards/nova/templates/nova/access_and_security/keypairs/_create.html | ||
2983 | 158 | horizon/dashboards/nova/templates/nova/access_and_security/keypairs/_import.html | ||
2984 | 159 | horizon/dashboards/nova/templates/nova/access_and_security/keypairs/create.html | ||
2985 | 160 | horizon/dashboards/nova/templates/nova/access_and_security/keypairs/download.html | ||
2986 | 161 | horizon/dashboards/nova/templates/nova/access_and_security/keypairs/import.html | ||
2987 | 162 | horizon/dashboards/nova/templates/nova/access_and_security/security_groups/_create.html | ||
2988 | 163 | horizon/dashboards/nova/templates/nova/access_and_security/security_groups/_edit_rules.html | ||
2989 | 164 | horizon/dashboards/nova/templates/nova/access_and_security/security_groups/create.html | ||
2990 | 165 | horizon/dashboards/nova/templates/nova/access_and_security/security_groups/edit_rules.html | ||
2991 | 166 | horizon/dashboards/nova/templates/nova/containers/_create.html | ||
2992 | 167 | horizon/dashboards/nova/templates/nova/containers/create.html | ||
2993 | 168 | horizon/dashboards/nova/templates/nova/containers/index.html | ||
2994 | 169 | horizon/dashboards/nova/templates/nova/images_and_snapshots/index.html | ||
2995 | 170 | horizon/dashboards/nova/templates/nova/images_and_snapshots/images/_detail_overview.html | ||
2996 | 171 | horizon/dashboards/nova/templates/nova/images_and_snapshots/images/_launch.html | ||
2997 | 172 | horizon/dashboards/nova/templates/nova/images_and_snapshots/images/_update.html | ||
2998 | 173 | horizon/dashboards/nova/templates/nova/images_and_snapshots/images/detail.html | ||
2999 | 174 | horizon/dashboards/nova/templates/nova/images_and_snapshots/images/launch.html | ||
3000 | 175 | horizon/dashboards/nova/templates/nova/images_and_snapshots/images/update.html | ||
3001 | 176 | horizon/dashboards/nova/templates/nova/images_and_snapshots/snapshots/_create.html | ||
3002 | 177 | horizon/dashboards/nova/templates/nova/images_and_snapshots/snapshots/create.html | ||
3003 | 178 | horizon/dashboards/nova/templates/nova/instances_and_volumes/index.html | ||
3004 | 179 | horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_detail_log.html | ||
3005 | 180 | horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_detail_overview.html | ||
3006 | 181 | horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_detail_vnc.html | ||
3007 | 182 | horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_instance_ips.html | ||
3008 | 183 | horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/_update.html | ||
3009 | 184 | horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/detail.html | ||
3010 | 185 | horizon/dashboards/nova/templates/nova/instances_and_volumes/instances/update.html | ||
3011 | 186 | horizon/dashboards/nova/templates/nova/instances_and_volumes/volumes/_attach.html | ||
3012 | 187 | horizon/dashboards/nova/templates/nova/instances_and_volumes/volumes/_create.html | ||
3013 | 188 | horizon/dashboards/nova/templates/nova/instances_and_volumes/volumes/_create_snapshot.html | ||
3014 | 189 | horizon/dashboards/nova/templates/nova/instances_and_volumes/volumes/_detail_overview.html | ||
3015 | 190 | horizon/dashboards/nova/templates/nova/instances_and_volumes/volumes/attach.html | ||
3016 | 191 | horizon/dashboards/nova/templates/nova/instances_and_volumes/volumes/create.html | ||
3017 | 192 | horizon/dashboards/nova/templates/nova/instances_and_volumes/volumes/create_snapshot.html | ||
3018 | 193 | horizon/dashboards/nova/templates/nova/instances_and_volumes/volumes/detail.html | ||
3019 | 194 | horizon/dashboards/nova/templates/nova/objects/_copy.html | ||
3020 | 195 | horizon/dashboards/nova/templates/nova/objects/_upload.html | ||
3021 | 196 | horizon/dashboards/nova/templates/nova/objects/copy.html | ||
3022 | 197 | horizon/dashboards/nova/templates/nova/objects/index.html | ||
3023 | 198 | horizon/dashboards/nova/templates/nova/objects/upload.html | ||
3024 | 199 | horizon/dashboards/nova/templates/nova/overview/usage.csv | ||
3025 | 200 | horizon/dashboards/nova/templates/nova/overview/usage.html | ||
3026 | 201 | horizon/dashboards/settings/__init__.py | ||
3027 | 202 | horizon/dashboards/settings/dashboard.py | ||
3028 | 203 | horizon/dashboards/settings/models.py | ||
3029 | 204 | horizon/dashboards/settings/ec2/__init__.py | ||
3030 | 205 | horizon/dashboards/settings/ec2/forms.py | ||
3031 | 206 | horizon/dashboards/settings/ec2/panel.py | ||
3032 | 207 | horizon/dashboards/settings/ec2/tests.py | ||
3033 | 208 | horizon/dashboards/settings/ec2/urls.py | ||
3034 | 209 | horizon/dashboards/settings/ec2/views.py | ||
3035 | 210 | horizon/dashboards/settings/project/__init__.py | ||
3036 | 211 | horizon/dashboards/settings/project/forms.py | ||
3037 | 212 | horizon/dashboards/settings/project/panel.py | ||
3038 | 213 | horizon/dashboards/settings/project/urls.py | ||
3039 | 214 | horizon/dashboards/settings/project/views.py | ||
3040 | 215 | horizon/dashboards/settings/templates/settings/base.html | ||
3041 | 216 | horizon/dashboards/settings/templates/settings/ec2/download_form.html | ||
3042 | 217 | horizon/dashboards/settings/templates/settings/ec2/ec2rc.sh.template | ||
3043 | 218 | horizon/dashboards/settings/templates/settings/ec2/index.html | ||
3044 | 219 | horizon/dashboards/settings/templates/settings/project/_openrc.html | ||
3045 | 220 | horizon/dashboards/settings/templates/settings/project/openrc.sh.template | ||
3046 | 221 | horizon/dashboards/settings/templates/settings/project/settings.html | ||
3047 | 222 | horizon/dashboards/settings/templates/settings/user/_language.html | ||
3048 | 223 | horizon/dashboards/settings/templates/settings/user/settings.html | ||
3049 | 224 | horizon/dashboards/settings/user/__init__.py | ||
3050 | 225 | horizon/dashboards/settings/user/panel.py | ||
3051 | 226 | horizon/dashboards/settings/user/urls.py | ||
3052 | 227 | horizon/dashboards/settings/user/views.py | ||
3053 | 228 | horizon/dashboards/syspanel/__init__.py | ||
3054 | 229 | horizon/dashboards/syspanel/dashboard.py | ||
3055 | 230 | horizon/dashboards/syspanel/models.py | ||
3056 | 231 | horizon/dashboards/syspanel/flavors/__init__.py | ||
3057 | 232 | horizon/dashboards/syspanel/flavors/forms.py | ||
3058 | 233 | horizon/dashboards/syspanel/flavors/panel.py | ||
3059 | 234 | horizon/dashboards/syspanel/flavors/tables.py | ||
3060 | 235 | horizon/dashboards/syspanel/flavors/tests.py | ||
3061 | 236 | horizon/dashboards/syspanel/flavors/urls.py | ||
3062 | 237 | horizon/dashboards/syspanel/flavors/views.py | ||
3063 | 238 | horizon/dashboards/syspanel/images/__init__.py | ||
3064 | 239 | horizon/dashboards/syspanel/images/forms.py | ||
3065 | 240 | horizon/dashboards/syspanel/images/panel.py | ||
3066 | 241 | horizon/dashboards/syspanel/images/tables.py | ||
3067 | 242 | horizon/dashboards/syspanel/images/tests.py | ||
3068 | 243 | horizon/dashboards/syspanel/images/urls.py | ||
3069 | 244 | horizon/dashboards/syspanel/images/views.py | ||
3070 | 245 | horizon/dashboards/syspanel/instances/__init__.py | ||
3071 | 246 | horizon/dashboards/syspanel/instances/panel.py | ||
3072 | 247 | horizon/dashboards/syspanel/instances/tables.py | ||
3073 | 248 | horizon/dashboards/syspanel/instances/tests.py | ||
3074 | 249 | horizon/dashboards/syspanel/instances/urls.py | ||
3075 | 250 | horizon/dashboards/syspanel/instances/views.py | ||
3076 | 251 | horizon/dashboards/syspanel/overview/__init__.py | ||
3077 | 252 | horizon/dashboards/syspanel/overview/panel.py | ||
3078 | 253 | horizon/dashboards/syspanel/overview/urls.py | ||
3079 | 254 | horizon/dashboards/syspanel/overview/views.py | ||
3080 | 255 | horizon/dashboards/syspanel/projects/__init__.py | ||
3081 | 256 | horizon/dashboards/syspanel/projects/forms.py | ||
3082 | 257 | horizon/dashboards/syspanel/projects/panel.py | ||
3083 | 258 | horizon/dashboards/syspanel/projects/tables.py | ||
3084 | 259 | horizon/dashboards/syspanel/projects/tests.py | ||
3085 | 260 | horizon/dashboards/syspanel/projects/urls.py | ||
3086 | 261 | horizon/dashboards/syspanel/projects/views.py | ||
3087 | 262 | horizon/dashboards/syspanel/quotas/__init__.py | ||
3088 | 263 | horizon/dashboards/syspanel/quotas/panel.py | ||
3089 | 264 | horizon/dashboards/syspanel/quotas/tables.py | ||
3090 | 265 | horizon/dashboards/syspanel/quotas/tests.py | ||
3091 | 266 | horizon/dashboards/syspanel/quotas/urls.py | ||
3092 | 267 | horizon/dashboards/syspanel/quotas/views.py | ||
3093 | 268 | horizon/dashboards/syspanel/services/__init__.py | ||
3094 | 269 | horizon/dashboards/syspanel/services/panel.py | ||
3095 | 270 | horizon/dashboards/syspanel/services/tables.py | ||
3096 | 271 | horizon/dashboards/syspanel/services/tests.py | ||
3097 | 272 | horizon/dashboards/syspanel/services/urls.py | ||
3098 | 273 | horizon/dashboards/syspanel/services/views.py | ||
3099 | 274 | horizon/dashboards/syspanel/templates/syspanel/base.html | ||
3100 | 275 | horizon/dashboards/syspanel/templates/syspanel/flavors/_create.html | ||
3101 | 276 | horizon/dashboards/syspanel/templates/syspanel/flavors/create.html | ||
3102 | 277 | horizon/dashboards/syspanel/templates/syspanel/flavors/index.html | ||
3103 | 278 | horizon/dashboards/syspanel/templates/syspanel/images/_update.html | ||
3104 | 279 | horizon/dashboards/syspanel/templates/syspanel/images/index.html | ||
3105 | 280 | horizon/dashboards/syspanel/templates/syspanel/images/update.html | ||
3106 | 281 | horizon/dashboards/syspanel/templates/syspanel/instances/index.html | ||
3107 | 282 | horizon/dashboards/syspanel/templates/syspanel/overview/usage.csv | ||
3108 | 283 | horizon/dashboards/syspanel/templates/syspanel/overview/usage.html | ||
3109 | 284 | horizon/dashboards/syspanel/templates/syspanel/projects/_add_user.html | ||
3110 | 285 | horizon/dashboards/syspanel/templates/syspanel/projects/_create.html | ||
3111 | 286 | horizon/dashboards/syspanel/templates/syspanel/projects/_quotas.html | ||
3112 | 287 | horizon/dashboards/syspanel/templates/syspanel/projects/_update.html | ||
3113 | 288 | horizon/dashboards/syspanel/templates/syspanel/projects/add_user.html | ||
3114 | 289 | horizon/dashboards/syspanel/templates/syspanel/projects/create.html | ||
3115 | 290 | horizon/dashboards/syspanel/templates/syspanel/projects/index.html | ||
3116 | 291 | horizon/dashboards/syspanel/templates/syspanel/projects/quotas.html | ||
3117 | 292 | horizon/dashboards/syspanel/templates/syspanel/projects/update.html | ||
3118 | 293 | horizon/dashboards/syspanel/templates/syspanel/projects/usage.csv | ||
3119 | 294 | horizon/dashboards/syspanel/templates/syspanel/projects/usage.html | ||
3120 | 295 | horizon/dashboards/syspanel/templates/syspanel/projects/users.html | ||
3121 | 296 | horizon/dashboards/syspanel/templates/syspanel/quotas/index.html | ||
3122 | 297 | horizon/dashboards/syspanel/templates/syspanel/services/index.html | ||
3123 | 298 | horizon/dashboards/syspanel/templates/syspanel/users/_create.html | ||
3124 | 299 | horizon/dashboards/syspanel/templates/syspanel/users/_update.html | ||
3125 | 300 | horizon/dashboards/syspanel/templates/syspanel/users/create.html | ||
3126 | 301 | horizon/dashboards/syspanel/templates/syspanel/users/index.html | ||
3127 | 302 | horizon/dashboards/syspanel/templates/syspanel/users/update.html | ||
3128 | 303 | horizon/dashboards/syspanel/users/__init__.py | ||
3129 | 304 | horizon/dashboards/syspanel/users/forms.py | ||
3130 | 305 | horizon/dashboards/syspanel/users/panel.py | ||
3131 | 306 | horizon/dashboards/syspanel/users/tables.py | ||
3132 | 307 | horizon/dashboards/syspanel/users/tests.py | ||
3133 | 308 | horizon/dashboards/syspanel/users/urls.py | ||
3134 | 309 | horizon/dashboards/syspanel/users/views.py | ||
3135 | 310 | horizon/forms/__init__.py | ||
3136 | 311 | horizon/forms/base.py | ||
3137 | 312 | horizon/forms/views.py | ||
3138 | 313 | horizon/locale/es/LC_MESSAGES/django.mo | ||
3139 | 314 | horizon/locale/es/LC_MESSAGES/django.po | ||
3140 | 315 | horizon/locale/fr/LC_MESSAGES/django.mo | ||
3141 | 316 | horizon/locale/fr/LC_MESSAGES/django.po | ||
3142 | 317 | horizon/locale/ja/LC_MESSAGES/django.mo | ||
3143 | 318 | horizon/locale/ja/LC_MESSAGES/django.po | ||
3144 | 319 | horizon/locale/pl/LC_MESSAGES/django.mo | ||
3145 | 320 | horizon/locale/pl/LC_MESSAGES/django.po | ||
3146 | 321 | horizon/locale/pt/LC_MESSAGES/django.mo | ||
3147 | 322 | horizon/locale/pt/LC_MESSAGES/django.po | ||
3148 | 323 | horizon/locale/zh_CN/LC_MESSAGES/django.po | ||
3149 | 324 | horizon/locale/zh_TW/LC_MESSAGES/django.mo | ||
3150 | 325 | horizon/locale/zh_TW/LC_MESSAGES/django.po | ||
3151 | 326 | horizon/static/horizon/js/form_examples.js | ||
3152 | 327 | horizon/static/horizon/js/forms.js | ||
3153 | 328 | horizon/static/horizon/js/hogan-1.0.5.min.js | ||
3154 | 329 | horizon/static/horizon/js/horizon.js | ||
3155 | 330 | horizon/static/horizon/js/json2.js | ||
3156 | 331 | horizon/static/horizon/js/modals.js | ||
3157 | 332 | horizon/static/horizon/js/plugins.js | ||
3158 | 333 | horizon/static/horizon/js/tables.js | ||
3159 | 334 | horizon/static/horizon/js/tabs.js | ||
3160 | 335 | horizon/static/horizon/js/jquery/jquery-ui.min.js | ||
3161 | 336 | horizon/static/horizon/js/jquery/jquery.cookie.js | ||
3162 | 337 | horizon/static/horizon/js/jquery/jquery.example.min.js | ||
3163 | 338 | horizon/static/horizon/js/jquery/jquery.min.js | ||
3164 | 339 | horizon/static/horizon/js/jquery/jquery.quicksearch.js | ||
3165 | 340 | horizon/static/horizon/js/jquery/jquery.table-sorter.js | ||
3166 | 341 | horizon/tables/__init__.py | ||
3167 | 342 | horizon/tables/actions.py | ||
3168 | 343 | horizon/tables/base.py | ||
3169 | 344 | horizon/tables/views.py | ||
3170 | 345 | horizon/tabs/__init__.py | ||
3171 | 346 | horizon/tabs/base.py | ||
3172 | 347 | horizon/tabs/views.py | ||
3173 | 348 | horizon/templates/horizon/_messages.html | ||
3174 | 349 | horizon/templates/horizon/_nav_list.html | ||
3175 | 350 | horizon/templates/horizon/_subnav_list.html | ||
3176 | 351 | horizon/templates/horizon/auth/_login.html | ||
3177 | 352 | horizon/templates/horizon/auth/login.html | ||
3178 | 353 | horizon/templates/horizon/client_side/_alert_message.html | ||
3179 | 354 | horizon/templates/horizon/client_side/_modal.html | ||
3180 | 355 | horizon/templates/horizon/client_side/_table_row.html | ||
3181 | 356 | horizon/templates/horizon/client_side/conf.html | ||
3182 | 357 | horizon/templates/horizon/client_side/template.html | ||
3183 | 358 | horizon/templates/horizon/client_side/templates.html | ||
3184 | 359 | horizon/templates/horizon/common/_data_table.html | ||
3185 | 360 | horizon/templates/horizon/common/_data_table_row.html | ||
3186 | 361 | horizon/templates/horizon/common/_data_table_row_action.html | ||
3187 | 362 | horizon/templates/horizon/common/_data_table_row_actions.html | ||
3188 | 363 | horizon/templates/horizon/common/_data_table_table_actions.html | ||
3189 | 364 | horizon/templates/horizon/common/_detail_table.html | ||
3190 | 365 | horizon/templates/horizon/common/_form_fields.html | ||
3191 | 366 | horizon/templates/horizon/common/_modal_form.html | ||
3192 | 367 | horizon/templates/horizon/common/_page_header.html | ||
3193 | 368 | horizon/templates/horizon/common/_progress_bar.html | ||
3194 | 369 | horizon/templates/horizon/common/_region_selector.html | ||
3195 | 370 | horizon/templates/horizon/common/_sidebar.html | ||
3196 | 371 | horizon/templates/horizon/common/_sidebar_module.html | ||
3197 | 372 | horizon/templates/horizon/common/_tab_group.html | ||
3198 | 373 | horizon/templates/horizon/common/_usage_summary.html | ||
3199 | 374 | horizon/templatetags/__init__.py | ||
3200 | 375 | horizon/templatetags/branding.py | ||
3201 | 376 | horizon/templatetags/horizon.py | ||
3202 | 377 | horizon/templatetags/parse_date.py | ||
3203 | 378 | horizon/templatetags/sizeformat.py | ||
3204 | 379 | horizon/templatetags/truncate_filter.py | ||
3205 | 380 | horizon/tests/__init__.py | ||
3206 | 381 | horizon/tests/auth_tests.py | ||
3207 | 382 | horizon/tests/authors_tests.py | ||
3208 | 383 | horizon/tests/base_tests.py | ||
3209 | 384 | horizon/tests/context_processor_tests.py | ||
3210 | 385 | horizon/tests/table_tests.py | ||
3211 | 386 | horizon/tests/tabs_tests.py | ||
3212 | 387 | horizon/tests/templatetag_tests.py | ||
3213 | 388 | horizon/tests/test_panel_urls.py | ||
3214 | 389 | horizon/tests/testsettings.py | ||
3215 | 390 | horizon/tests/testurls.py | ||
3216 | 391 | horizon/tests/utils_tests.py | ||
3217 | 392 | horizon/tests/views.py | ||
3218 | 393 | horizon/tests/api_tests/__init__.py | ||
3219 | 394 | horizon/tests/api_tests/base_tests.py | ||
3220 | 395 | horizon/tests/api_tests/glance_tests.py | ||
3221 | 396 | horizon/tests/api_tests/keystone_tests.py | ||
3222 | 397 | horizon/tests/api_tests/nova_tests.py | ||
3223 | 398 | horizon/tests/api_tests/swift_tests.py | ||
3224 | 399 | horizon/tests/templates/404.html | ||
3225 | 400 | horizon/tests/templates/_tab.html | ||
3226 | 401 | horizon/tests/templates/base-sidebar.html | ||
3227 | 402 | horizon/tests/templates/base.html | ||
3228 | 403 | horizon/tests/templates/splash.html | ||
3229 | 404 | horizon/tests/templates/switch_tenants.html | ||
3230 | 405 | horizon/tests/templates/tab_group.html | ||
3231 | 406 | horizon/tests/test_data/__init__.py | ||
3232 | 407 | horizon/tests/test_data/glance_data.py | ||
3233 | 408 | horizon/tests/test_data/keystone_data.py | ||
3234 | 409 | horizon/tests/test_data/nova_data.py | ||
3235 | 410 | horizon/tests/test_data/swift_data.py | ||
3236 | 411 | horizon/tests/test_data/utils.py | ||
3237 | 412 | horizon/usage/__init__.py | ||
3238 | 413 | horizon/usage/base.py | ||
3239 | 414 | horizon/usage/tables.py | ||
3240 | 415 | horizon/usage/views.py | ||
3241 | 416 | horizon/utils/__init__.py | ||
3242 | 417 | horizon/utils/filters.py | ||
3243 | 418 | horizon/utils/html.py | ||
3244 | 419 | horizon/utils/reverse_bugfix.py | ||
3245 | 420 | horizon/utils/validators.py | ||
3246 | 421 | horizon/views/__init__.py | ||
3247 | 422 | horizon/views/auth.py | ||
3248 | 423 | horizon/views/auth_forms.py | ||
3249 | 424 | horizon/views/base.py | ||
3250 | 425 | openstack_dashboard/__init__.py | ||
3251 | 426 | openstack_dashboard/middleware.py | ||
3252 | 427 | openstack_dashboard/settings.py | ||
3253 | 428 | openstack_dashboard/tests.py | ||
3254 | 429 | openstack_dashboard/urls.py | ||
3255 | 430 | openstack_dashboard/views.py | ||
3256 | 431 | openstack_dashboard/local/__init__.py | ||
3257 | 432 | openstack_dashboard/local/local_settings.py.example | ||
3258 | 433 | openstack_dashboard/locale/es/LC_MESSAGES/django.po | ||
3259 | 434 | openstack_dashboard/locale/fr/LC_MESSAGES/django.po | ||
3260 | 435 | openstack_dashboard/locale/ja/LC_MESSAGES/django.po | ||
3261 | 436 | openstack_dashboard/locale/pl/LC_MESSAGES/django.po | ||
3262 | 437 | openstack_dashboard/locale/pt/LC_MESSAGES/django.po | ||
3263 | 438 | openstack_dashboard/locale/zh_CN/LC_MESSAGES/django.po | ||
3264 | 439 | openstack_dashboard/locale/zh_TW/LC_MESSAGES/django.mo | ||
3265 | 440 | openstack_dashboard/locale/zh_TW/LC_MESSAGES/django.po | ||
3266 | 441 | openstack_dashboard/static/bootstrap/css/bootstrap-responsive.css | ||
3267 | 442 | openstack_dashboard/static/bootstrap/css/bootstrap-responsive.min.css | ||
3268 | 443 | openstack_dashboard/static/bootstrap/css/bootstrap.css | ||
3269 | 444 | openstack_dashboard/static/bootstrap/css/bootstrap.min.css | ||
3270 | 445 | openstack_dashboard/static/bootstrap/img/glyphicons-halflings-white.png | ||
3271 | 446 | openstack_dashboard/static/bootstrap/img/glyphicons-halflings.png | ||
3272 | 447 | openstack_dashboard/static/bootstrap/js/bootstrap.js | ||
3273 | 448 | openstack_dashboard/static/bootstrap/js/bootstrap.min.js | ||
3274 | 449 | openstack_dashboard/static/dashboard/css/style.css | ||
3275 | 450 | openstack_dashboard/static/dashboard/fonts/Anivers_Regular-webfont.eot | ||
3276 | 451 | openstack_dashboard/static/dashboard/fonts/Anivers_Regular-webfont.svg | ||
3277 | 452 | openstack_dashboard/static/dashboard/fonts/Anivers_Regular-webfont.ttf | ||
3278 | 453 | openstack_dashboard/static/dashboard/fonts/Anivers_Regular-webfont.woff | ||
3279 | 454 | openstack_dashboard/static/dashboard/img/drop_arrow.png | ||
3280 | 455 | openstack_dashboard/static/dashboard/img/favicon.ico | ||
3281 | 456 | openstack_dashboard/static/dashboard/img/logo.png | ||
3282 | 457 | openstack_dashboard/static/dashboard/img/right_droparrow.png | ||
3283 | 458 | openstack_dashboard/static/dashboard/img/search.png | ||
3284 | 459 | openstack_dashboard/static/dashboard/img/spinner.gif | ||
3285 | 460 | openstack_dashboard/static/qunit/qunit.css | ||
3286 | 461 | openstack_dashboard/static/qunit/qunit.js | ||
3287 | 462 | openstack_dashboard/templates/403.html | ||
3288 | 463 | openstack_dashboard/templates/404.html | ||
3289 | 464 | openstack_dashboard/templates/500.html | ||
3290 | 465 | openstack_dashboard/templates/_footer.html | ||
3291 | 466 | openstack_dashboard/templates/_header.html | ||
3292 | 467 | openstack_dashboard/templates/_scripts.html | ||
3293 | 468 | openstack_dashboard/templates/_stylesheets.html | ||
3294 | 469 | openstack_dashboard/templates/base.html | ||
3295 | 470 | openstack_dashboard/templates/qunit.html | ||
3296 | 471 | openstack_dashboard/templates/splash.html | ||
3297 | 472 | openstack_dashboard/templates/switch_tenants.html | ||
3298 | 473 | openstack_dashboard/wsgi/django.wsgi | ||
3299 | 474 | tools/install_venv.py | ||
3300 | 475 | tools/pip-requires | ||
3301 | 476 | tools/rfc.sh | ||
3302 | 477 | tools/test-requires | ||
3303 | 478 | tools/with_venv.sh | ||
3304 | 0 | \ No newline at end of file | 479 | \ No newline at end of file |
3305 | 1 | 480 | ||
3306 | === added file 'horizon.egg-info/dependency_links.txt' | |||
3307 | --- horizon.egg-info/dependency_links.txt 1970-01-01 00:00:00 +0000 | |||
3308 | +++ horizon.egg-info/dependency_links.txt 2013-04-24 15:22:28 +0000 | |||
3309 | @@ -0,0 +1,3 @@ | |||
3310 | 1 | http://github.com/openstack/python-novaclient/tarball/master#egg=python-novaclient | ||
3311 | 2 | http://github.com/openstack/python-keystoneclient/tarball/master#egg=python-keystoneclient | ||
3312 | 3 | http://github.com/openstack/glance@stable/essex#egg=glance | ||
3313 | 0 | 4 | ||
3314 | === added file 'horizon.egg-info/not-zip-safe' | |||
3315 | --- horizon.egg-info/not-zip-safe 1970-01-01 00:00:00 +0000 | |||
3316 | +++ horizon.egg-info/not-zip-safe 2013-04-24 15:22:28 +0000 | |||
3317 | @@ -0,0 +1,1 @@ | |||
3318 | 1 | |||
3319 | 0 | 2 | ||
3320 | === added file 'horizon.egg-info/requires.txt' | |||
3321 | --- horizon.egg-info/requires.txt 1970-01-01 00:00:00 +0000 | |||
3322 | +++ horizon.egg-info/requires.txt 2013-04-24 15:22:28 +0000 | |||
3323 | @@ -0,0 +1,18 @@ | |||
3324 | 1 | Django>=1.3 | ||
3325 | 2 | python-cloudfiles | ||
3326 | 3 | python-dateutil | ||
3327 | 4 | django-nose | ||
3328 | 5 | PasteDeploy | ||
3329 | 6 | eventlet | ||
3330 | 7 | kombu | ||
3331 | 8 | paste | ||
3332 | 9 | pycrypto==2.3 | ||
3333 | 10 | routes | ||
3334 | 11 | sqlalchemy | ||
3335 | 12 | sqlalchemy-migrate | ||
3336 | 13 | webob==1.0.8 | ||
3337 | 14 | xattr | ||
3338 | 15 | iso8601 | ||
3339 | 16 | python-novaclient | ||
3340 | 17 | python-keystoneclient | ||
3341 | 18 | glance | ||
3342 | 0 | \ No newline at end of file | 19 | \ No newline at end of file |
3343 | 1 | 20 | ||
3344 | === added file 'horizon.egg-info/top_level.txt' | |||
3345 | --- horizon.egg-info/top_level.txt 1970-01-01 00:00:00 +0000 | |||
3346 | +++ horizon.egg-info/top_level.txt 2013-04-24 15:22:28 +0000 | |||
3347 | @@ -0,0 +1,2 @@ | |||
3348 | 1 | openstack_dashboard | ||
3349 | 2 | horizon | ||
3350 | 0 | 3 | ||
3351 | === modified file 'horizon/dashboards/nova/images_and_snapshots/images/tables.py' | |||
3352 | --- horizon/dashboards/nova/images_and_snapshots/images/tables.py 2012-08-24 03:27:33 +0000 | |||
3353 | +++ horizon/dashboards/nova/images_and_snapshots/images/tables.py 2013-04-24 15:22:28 +0000 | |||
3354 | @@ -100,3 +100,6 @@ | |||
3355 | 100 | table_actions = (DeleteImage,) | 100 | table_actions = (DeleteImage,) |
3356 | 101 | row_actions = (LaunchImage, EditImage, DeleteImage) | 101 | row_actions = (LaunchImage, EditImage, DeleteImage) |
3357 | 102 | pagination_param = "image_marker" | 102 | pagination_param = "image_marker" |
3358 | 103 | |||
3359 | 104 | def get_object_display(self, obj): | ||
3360 | 105 | return obj.name or obj.id | ||
3361 | 103 | 106 | ||
3362 | === modified file 'horizon/dashboards/nova/instances_and_volumes/volumes/tables.py' | |||
3363 | --- horizon/dashboards/nova/instances_and_volumes/volumes/tables.py 2012-08-24 03:27:33 +0000 | |||
3364 | +++ horizon/dashboards/nova/instances_and_volumes/volumes/tables.py 2013-04-24 15:22:28 +0000 | |||
3365 | @@ -119,7 +119,7 @@ | |||
3366 | 119 | status_choices=STATUS_CHOICES) | 119 | status_choices=STATUS_CHOICES) |
3367 | 120 | 120 | ||
3368 | 121 | def get_object_display(self, obj): | 121 | def get_object_display(self, obj): |
3370 | 122 | return obj.display_name | 122 | return obj.display_name or obj.id |
3371 | 123 | 123 | ||
3372 | 124 | 124 | ||
3373 | 125 | class VolumesTable(VolumesTableBase): | 125 | class VolumesTable(VolumesTableBase): |
3374 | 126 | 126 | ||
3375 | === added file 'horizon/dashboards/settings/juju/__init__.py' | |||
3376 | --- horizon/dashboards/settings/juju/__init__.py 1970-01-01 00:00:00 +0000 | |||
3377 | +++ horizon/dashboards/settings/juju/__init__.py 2013-04-24 15:22:28 +0000 | |||
3378 | @@ -0,0 +1,1 @@ | |||
3379 | 1 | # Horizon Juju settings panel | ||
3380 | 0 | 2 | ||
3381 | === removed file 'horizon/dashboards/settings/juju/__init__.py' | |||
3382 | --- horizon/dashboards/settings/juju/__init__.py 2012-04-12 12:42:04 +0000 | |||
3383 | +++ horizon/dashboards/settings/juju/__init__.py 1970-01-01 00:00:00 +0000 | |||
3384 | @@ -1,1 +0,0 @@ | |||
3385 | 1 | # Horizon Juju settings panel | ||
3386 | 2 | 0 | ||
3387 | === added file 'horizon/dashboards/settings/juju/forms.py' | |||
3388 | --- horizon/dashboards/settings/juju/forms.py 1970-01-01 00:00:00 +0000 | |||
3389 | +++ horizon/dashboards/settings/juju/forms.py 2013-04-24 15:22:28 +0000 | |||
3390 | @@ -0,0 +1,96 @@ | |||
3391 | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 | ||
3392 | 2 | |||
3393 | 3 | # Copyright 2012 Openstack, LLC | ||
3394 | 4 | # Copyright 2012 Canonical Ltd. | ||
3395 | 5 | # | ||
3396 | 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
3397 | 7 | # not use this file except in compliance with the License. You may obtain | ||
3398 | 8 | # a copy of the License at | ||
3399 | 9 | # | ||
3400 | 10 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
3401 | 11 | # | ||
3402 | 12 | # Unless required by applicable law or agreed to in writing, software | ||
3403 | 13 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
3404 | 14 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
3405 | 15 | # License for the specific language governing permissions and limitations | ||
3406 | 16 | # under the License. | ||
3407 | 17 | |||
3408 | 18 | import logging | ||
3409 | 19 | import tempfile | ||
3410 | 20 | import zipfile | ||
3411 | 21 | from contextlib import closing | ||
3412 | 22 | |||
3413 | 23 | from django import http, shortcuts | ||
3414 | 24 | from django.contrib import messages | ||
3415 | 25 | from django.template.loader import render_to_string | ||
3416 | 26 | from django.utils.translation import ugettext_lazy as _ | ||
3417 | 27 | from horizon import api | ||
3418 | 28 | from horizon import exceptions | ||
3419 | 29 | from horizon import forms | ||
3420 | 30 | |||
3421 | 31 | import boto | ||
3422 | 32 | import uuid | ||
3423 | 33 | |||
3424 | 34 | LOG = logging.getLogger(__name__) | ||
3425 | 35 | |||
3426 | 36 | |||
3427 | 37 | class DownloadJujuEnvironment(forms.SelfHandlingForm): | ||
3428 | 38 | # This is heavily based off the ec2 credentials form | ||
3429 | 39 | tenant = forms.ChoiceField(label=_("Select a Project")) | ||
3430 | 40 | @classmethod | ||
3431 | 41 | def _instantiate(cls, request, *args, **kwargs): | ||
3432 | 42 | return cls(request, *args, **kwargs) | ||
3433 | 43 | |||
3434 | 44 | def __init__(self, request, *args, **kwargs): | ||
3435 | 45 | super(DownloadJujuEnvironment, self).__init__(*args, **kwargs) | ||
3436 | 46 | tenant_choices = [] | ||
3437 | 47 | try: | ||
3438 | 48 | tenant_list = api.keystone.tenant_list(request) | ||
3439 | 49 | except: | ||
3440 | 50 | tenant_list = [] | ||
3441 | 51 | exceptions.handle(request, _("Unable to retrieve tenant list.")) | ||
3442 | 52 | |||
3443 | 53 | for tenant in tenant_list: | ||
3444 | 54 | if tenant.enabled: | ||
3445 | 55 | tenant_choices.append((tenant.id, tenant.name)) | ||
3446 | 56 | if not tenant_choices: | ||
3447 | 57 | self.fields['tenant'].choices = ('', 'No Available Tenants') | ||
3448 | 58 | else: | ||
3449 | 59 | self.fields['tenant'].choices = tenant_choices | ||
3450 | 60 | |||
3451 | 61 | def handle(self, request, data): | ||
3452 | 62 | def find_or_create_access_keys(request, tenant_id): | ||
3453 | 63 | keys = api.keystone.list_ec2_credentials(request, request.user.id) | ||
3454 | 64 | if keys: | ||
3455 | 65 | return keys[0] | ||
3456 | 66 | else: | ||
3457 | 67 | return api.keystone.create_ec2_credentials(request, | ||
3458 | 68 | request.user.id, | ||
3459 | 69 | tenant_id) | ||
3460 | 70 | try: | ||
3461 | 71 | api.keystone.token_create_scoped(request, | ||
3462 | 72 | data.get('tenant'), | ||
3463 | 73 | request.user.token) | ||
3464 | 74 | keys = find_or_create_access_keys(request, data.get('tenant')) | ||
3465 | 75 | tenant_id = data['tenant'] | ||
3466 | 76 | tenant_name = dict(self.fields['tenant'].choices)[tenant_id] | ||
3467 | 77 | control_bucket = "juju-openstack-%s-%s" % (tenant_name, str(uuid.uuid4())[19:]) | ||
3468 | 78 | context = {'ec2_access_key': keys.access, | ||
3469 | 79 | 'ec2_secret_key': keys.secret, | ||
3470 | 80 | 'ec2_url': api.url_for(request, 'ec2'), | ||
3471 | 81 | 's3_url': api.url_for(request, 's3'), | ||
3472 | 82 | 'juju_admin_secret': uuid.uuid4().hex, | ||
3473 | 83 | 'control_bucket': control_bucket | ||
3474 | 84 | } | ||
3475 | 85 | except Exception, e: | ||
3476 | 86 | LOG.exception("S3 endpoint required for Juju environments.yaml creation.") | ||
3477 | 87 | messages.error(request, _('Could not generate environment config: %s') % e) | ||
3478 | 88 | return shortcuts.redirect(request.build_absolute_uri()) | ||
3479 | 89 | |||
3480 | 90 | response = shortcuts.render(request, | ||
3481 | 91 | 'settings/juju/environments.yaml.template', | ||
3482 | 92 | context, | ||
3483 | 93 | content_type='text/plain') | ||
3484 | 94 | response['Content-Disposition'] = 'attachment; filename=environments.yaml' | ||
3485 | 95 | response['Content-Length'] = str(len(response.content)) | ||
3486 | 96 | return response | ||
3487 | 0 | 97 | ||
3488 | === removed file 'horizon/dashboards/settings/juju/forms.py' | |||
3489 | --- horizon/dashboards/settings/juju/forms.py 2012-08-24 03:27:33 +0000 | |||
3490 | +++ horizon/dashboards/settings/juju/forms.py 1970-01-01 00:00:00 +0000 | |||
3491 | @@ -1,96 +0,0 @@ | |||
3492 | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 | ||
3493 | 2 | |||
3494 | 3 | # Copyright 2012 Openstack, LLC | ||
3495 | 4 | # Copyright 2012 Canonical Ltd. | ||
3496 | 5 | # | ||
3497 | 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
3498 | 7 | # not use this file except in compliance with the License. You may obtain | ||
3499 | 8 | # a copy of the License at | ||
3500 | 9 | # | ||
3501 | 10 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
3502 | 11 | # | ||
3503 | 12 | # Unless required by applicable law or agreed to in writing, software | ||
3504 | 13 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
3505 | 14 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
3506 | 15 | # License for the specific language governing permissions and limitations | ||
3507 | 16 | # under the License. | ||
3508 | 17 | |||
3509 | 18 | import logging | ||
3510 | 19 | import tempfile | ||
3511 | 20 | import zipfile | ||
3512 | 21 | from contextlib import closing | ||
3513 | 22 | |||
3514 | 23 | from django import http, shortcuts | ||
3515 | 24 | from django.contrib import messages | ||
3516 | 25 | from django.template.loader import render_to_string | ||
3517 | 26 | from django.utils.translation import ugettext_lazy as _ | ||
3518 | 27 | from horizon import api | ||
3519 | 28 | from horizon import exceptions | ||
3520 | 29 | from horizon import forms | ||
3521 | 30 | |||
3522 | 31 | import boto | ||
3523 | 32 | import uuid | ||
3524 | 33 | |||
3525 | 34 | LOG = logging.getLogger(__name__) | ||
3526 | 35 | |||
3527 | 36 | |||
3528 | 37 | class DownloadJujuEnvironment(forms.SelfHandlingForm): | ||
3529 | 38 | # This is heavily based off the ec2 credentials form | ||
3530 | 39 | tenant = forms.ChoiceField(label=_("Select a Project")) | ||
3531 | 40 | @classmethod | ||
3532 | 41 | def _instantiate(cls, request, *args, **kwargs): | ||
3533 | 42 | return cls(request, *args, **kwargs) | ||
3534 | 43 | |||
3535 | 44 | def __init__(self, request, *args, **kwargs): | ||
3536 | 45 | super(DownloadJujuEnvironment, self).__init__(*args, **kwargs) | ||
3537 | 46 | tenant_choices = [] | ||
3538 | 47 | try: | ||
3539 | 48 | tenant_list = api.keystone.tenant_list(request) | ||
3540 | 49 | except: | ||
3541 | 50 | tenant_list = [] | ||
3542 | 51 | exceptions.handle(request, _("Unable to retrieve tenant list.")) | ||
3543 | 52 | |||
3544 | 53 | for tenant in tenant_list: | ||
3545 | 54 | if tenant.enabled: | ||
3546 | 55 | tenant_choices.append((tenant.id, tenant.name)) | ||
3547 | 56 | if not tenant_choices: | ||
3548 | 57 | self.fields['tenant'].choices = ('', 'No Available Tenants') | ||
3549 | 58 | else: | ||
3550 | 59 | self.fields['tenant'].choices = tenant_choices | ||
3551 | 60 | |||
3552 | 61 | def handle(self, request, data): | ||
3553 | 62 | def find_or_create_access_keys(request, tenant_id): | ||
3554 | 63 | keys = api.keystone.list_ec2_credentials(request, request.user.id) | ||
3555 | 64 | if keys: | ||
3556 | 65 | return keys[0] | ||
3557 | 66 | else: | ||
3558 | 67 | return api.keystone.create_ec2_credentials(request, | ||
3559 | 68 | request.user.id, | ||
3560 | 69 | tenant_id) | ||
3561 | 70 | try: | ||
3562 | 71 | api.keystone.token_create_scoped(request, | ||
3563 | 72 | data.get('tenant'), | ||
3564 | 73 | request.user.token) | ||
3565 | 74 | keys = find_or_create_access_keys(request, data.get('tenant')) | ||
3566 | 75 | tenant_id = data['tenant'] | ||
3567 | 76 | tenant_name = dict(self.fields['tenant'].choices)[tenant_id] | ||
3568 | 77 | control_bucket = "juju-openstack-%s-%s" % (tenant_name, str(uuid.uuid4())[19:]) | ||
3569 | 78 | context = {'ec2_access_key': keys.access, | ||
3570 | 79 | 'ec2_secret_key': keys.secret, | ||
3571 | 80 | 'ec2_url': api.url_for(request, 'ec2'), | ||
3572 | 81 | 's3_url': api.url_for(request, 's3'), | ||
3573 | 82 | 'juju_admin_secret': uuid.uuid4().hex, | ||
3574 | 83 | 'control_bucket': control_bucket | ||
3575 | 84 | } | ||
3576 | 85 | except Exception, e: | ||
3577 | 86 | LOG.exception("S3 endpoint required for Juju environments.yaml creation.") | ||
3578 | 87 | messages.error(request, _('Could not generate environment config: %s') % e) | ||
3579 | 88 | return shortcuts.redirect(request.build_absolute_uri()) | ||
3580 | 89 | |||
3581 | 90 | response = shortcuts.render(request, | ||
3582 | 91 | 'settings/juju/environments.yaml.template', | ||
3583 | 92 | context, | ||
3584 | 93 | content_type='text/plain') | ||
3585 | 94 | response['Content-Disposition'] = 'attachment; filename=environments.yaml' | ||
3586 | 95 | response['Content-Length'] = str(len(response.content)) | ||
3587 | 96 | return response | ||
3588 | 97 | 0 | ||
3589 | === added file 'horizon/dashboards/settings/juju/panel.py' | |||
3590 | --- horizon/dashboards/settings/juju/panel.py 1970-01-01 00:00:00 +0000 | |||
3591 | +++ horizon/dashboards/settings/juju/panel.py 2013-04-24 15:22:28 +0000 | |||
3592 | @@ -0,0 +1,28 @@ | |||
3593 | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 | ||
3594 | 2 | # Copyright 2012 Openstack, LLC | ||
3595 | 3 | # Copyright 2012 Canonical Ltd. | ||
3596 | 4 | # | ||
3597 | 5 | # Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
3598 | 6 | # not use this file except in compliance with the License. You may obtain | ||
3599 | 7 | # a copy of the License at | ||
3600 | 8 | # | ||
3601 | 9 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
3602 | 10 | # | ||
3603 | 11 | # Unless required by applicable law or agreed to in writing, software | ||
3604 | 12 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
3605 | 13 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
3606 | 14 | # License for the specific language governing permissions and limitations | ||
3607 | 15 | # under the License. | ||
3608 | 16 | |||
3609 | 17 | from django.utils.translation import ugettext_lazy as _ | ||
3610 | 18 | |||
3611 | 19 | import horizon | ||
3612 | 20 | from horizon.dashboards.settings import dashboard | ||
3613 | 21 | |||
3614 | 22 | |||
3615 | 23 | class JujuPanel(horizon.Panel): | ||
3616 | 24 | name = _("Juju Environment Config") | ||
3617 | 25 | slug = 'juju' | ||
3618 | 26 | |||
3619 | 27 | |||
3620 | 28 | dashboard.Settings.register(JujuPanel) | ||
3621 | 0 | 29 | ||
3622 | === removed file 'horizon/dashboards/settings/juju/panel.py' | |||
3623 | --- horizon/dashboards/settings/juju/panel.py 2012-04-12 12:42:04 +0000 | |||
3624 | +++ horizon/dashboards/settings/juju/panel.py 1970-01-01 00:00:00 +0000 | |||
3625 | @@ -1,28 +0,0 @@ | |||
3626 | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 | ||
3627 | 2 | # Copyright 2012 Openstack, LLC | ||
3628 | 3 | # Copyright 2012 Canonical Ltd. | ||
3629 | 4 | # | ||
3630 | 5 | # Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
3631 | 6 | # not use this file except in compliance with the License. You may obtain | ||
3632 | 7 | # a copy of the License at | ||
3633 | 8 | # | ||
3634 | 9 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
3635 | 10 | # | ||
3636 | 11 | # Unless required by applicable law or agreed to in writing, software | ||
3637 | 12 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
3638 | 13 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
3639 | 14 | # License for the specific language governing permissions and limitations | ||
3640 | 15 | # under the License. | ||
3641 | 16 | |||
3642 | 17 | from django.utils.translation import ugettext_lazy as _ | ||
3643 | 18 | |||
3644 | 19 | import horizon | ||
3645 | 20 | from horizon.dashboards.settings import dashboard | ||
3646 | 21 | |||
3647 | 22 | |||
3648 | 23 | class JujuPanel(horizon.Panel): | ||
3649 | 24 | name = _("Juju Environment Config") | ||
3650 | 25 | slug = 'juju' | ||
3651 | 26 | |||
3652 | 27 | |||
3653 | 28 | dashboard.Settings.register(JujuPanel) | ||
3654 | 29 | 0 | ||
3655 | === added file 'horizon/dashboards/settings/juju/urls.py' | |||
3656 | --- horizon/dashboards/settings/juju/urls.py 1970-01-01 00:00:00 +0000 | |||
3657 | +++ horizon/dashboards/settings/juju/urls.py 2013-04-24 15:22:28 +0000 | |||
3658 | @@ -0,0 +1,24 @@ | |||
3659 | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 | ||
3660 | 2 | |||
3661 | 3 | # Copyright 2012 Openstack, LLC | ||
3662 | 4 | # Copyright 2012 Canonical Ltd. | ||
3663 | 5 | # | ||
3664 | 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
3665 | 7 | # not use this file except in compliance with the License. You may obtain | ||
3666 | 8 | # a copy of the License at | ||
3667 | 9 | # | ||
3668 | 10 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
3669 | 11 | # | ||
3670 | 12 | # Unless required by applicable law or agreed to in writing, software | ||
3671 | 13 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
3672 | 14 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
3673 | 15 | # License for the specific language governing permissions and limitations | ||
3674 | 16 | # under the License. | ||
3675 | 17 | |||
3676 | 18 | from django.conf.urls.defaults import patterns, url | ||
3677 | 19 | |||
3678 | 20 | from .views import IndexView | ||
3679 | 21 | |||
3680 | 22 | urlpatterns = patterns('horizon.dashboards.settings.juju.views', | ||
3681 | 23 | url(r'^$', IndexView.as_view(), name='index'), | ||
3682 | 24 | ) | ||
3683 | 0 | 25 | ||
3684 | === removed file 'horizon/dashboards/settings/juju/urls.py' | |||
3685 | --- horizon/dashboards/settings/juju/urls.py 2012-04-12 12:42:04 +0000 | |||
3686 | +++ horizon/dashboards/settings/juju/urls.py 1970-01-01 00:00:00 +0000 | |||
3687 | @@ -1,24 +0,0 @@ | |||
3688 | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 | ||
3689 | 2 | |||
3690 | 3 | # Copyright 2012 Openstack, LLC | ||
3691 | 4 | # Copyright 2012 Canonical Ltd. | ||
3692 | 5 | # | ||
3693 | 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
3694 | 7 | # not use this file except in compliance with the License. You may obtain | ||
3695 | 8 | # a copy of the License at | ||
3696 | 9 | # | ||
3697 | 10 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
3698 | 11 | # | ||
3699 | 12 | # Unless required by applicable law or agreed to in writing, software | ||
3700 | 13 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
3701 | 14 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
3702 | 15 | # License for the specific language governing permissions and limitations | ||
3703 | 16 | # under the License. | ||
3704 | 17 | |||
3705 | 18 | from django.conf.urls.defaults import patterns, url | ||
3706 | 19 | |||
3707 | 20 | from .views import IndexView | ||
3708 | 21 | |||
3709 | 22 | urlpatterns = patterns('horizon.dashboards.settings.juju.views', | ||
3710 | 23 | url(r'^$', IndexView.as_view(), name='index'), | ||
3711 | 24 | ) | ||
3712 | 25 | 0 | ||
3713 | === added file 'horizon/dashboards/settings/juju/views.py' | |||
3714 | --- horizon/dashboards/settings/juju/views.py 1970-01-01 00:00:00 +0000 | |||
3715 | +++ horizon/dashboards/settings/juju/views.py 2013-04-24 15:22:28 +0000 | |||
3716 | @@ -0,0 +1,28 @@ | |||
3717 | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 | ||
3718 | 2 | |||
3719 | 3 | # Copyright 2012 Openstack, LLC | ||
3720 | 4 | # | ||
3721 | 5 | # Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
3722 | 6 | # not use this file except in compliance with the License. You may obtain | ||
3723 | 7 | # a copy of the License at | ||
3724 | 8 | # | ||
3725 | 9 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
3726 | 10 | # | ||
3727 | 11 | # Unless required by applicable law or agreed to in writing, software | ||
3728 | 12 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
3729 | 13 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
3730 | 14 | # License for the specific language governing permissions and limitations | ||
3731 | 15 | # under the License. | ||
3732 | 16 | |||
3733 | 17 | import logging | ||
3734 | 18 | |||
3735 | 19 | from horizon import forms | ||
3736 | 20 | from horizon.dashboards.settings.juju.forms import DownloadJujuEnvironment | ||
3737 | 21 | |||
3738 | 22 | |||
3739 | 23 | LOG = logging.getLogger(__name__) | ||
3740 | 24 | |||
3741 | 25 | |||
3742 | 26 | class IndexView(forms.ModalFormView): | ||
3743 | 27 | form_class = DownloadJujuEnvironment | ||
3744 | 28 | template_name = 'settings/juju/index.html' | ||
3745 | 0 | 29 | ||
3746 | === removed file 'horizon/dashboards/settings/juju/views.py' | |||
3747 | --- horizon/dashboards/settings/juju/views.py 2012-04-12 12:42:04 +0000 | |||
3748 | +++ horizon/dashboards/settings/juju/views.py 1970-01-01 00:00:00 +0000 | |||
3749 | @@ -1,28 +0,0 @@ | |||
3750 | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 | ||
3751 | 2 | |||
3752 | 3 | # Copyright 2012 Openstack, LLC | ||
3753 | 4 | # | ||
3754 | 5 | # Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
3755 | 6 | # not use this file except in compliance with the License. You may obtain | ||
3756 | 7 | # a copy of the License at | ||
3757 | 8 | # | ||
3758 | 9 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
3759 | 10 | # | ||
3760 | 11 | # Unless required by applicable law or agreed to in writing, software | ||
3761 | 12 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
3762 | 13 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
3763 | 14 | # License for the specific language governing permissions and limitations | ||
3764 | 15 | # under the License. | ||
3765 | 16 | |||
3766 | 17 | import logging | ||
3767 | 18 | |||
3768 | 19 | from horizon import forms | ||
3769 | 20 | from horizon.dashboards.settings.juju.forms import DownloadJujuEnvironment | ||
3770 | 21 | |||
3771 | 22 | |||
3772 | 23 | LOG = logging.getLogger(__name__) | ||
3773 | 24 | |||
3774 | 25 | |||
3775 | 26 | class IndexView(forms.ModalFormView): | ||
3776 | 27 | form_class = DownloadJujuEnvironment | ||
3777 | 28 | template_name = 'settings/juju/index.html' | ||
3778 | 29 | 0 | ||
3779 | === added file 'horizon/dashboards/settings/templates/settings/juju/download_form.html' | |||
3780 | --- horizon/dashboards/settings/templates/settings/juju/download_form.html 1970-01-01 00:00:00 +0000 | |||
3781 | +++ horizon/dashboards/settings/templates/settings/juju/download_form.html 2013-04-24 15:22:28 +0000 | |||
3782 | @@ -0,0 +1,20 @@ | |||
3783 | 1 | {% extends "horizon/common/_modal_form.html" %} | ||
3784 | 2 | {% load i18n %} | ||
3785 | 3 | |||
3786 | 4 | |||
3787 | 5 | {% block modal-body %} | ||
3788 | 6 | <div class="left"> | ||
3789 | 7 | <fieldset> | ||
3790 | 8 | {% include "horizon/common/_form_fields.html" %} | ||
3791 | 9 | </fieldset> | ||
3792 | 10 | </div> | ||
3793 | 11 | <div class="right"> | ||
3794 | 12 | <h3>{% trans "Description:" %}</h3> | ||
3795 | 13 | <p>{% trans 'Clicking "Download Juju Environment Config" will download a file which includes a Juju environment configured for your cloud.<br><center><img src='/static/dashboard/img/juju.png'></center><br>To find out more about Juju visit <a href='http://juju.ubuntu.com'>http://juju.ubuntu.com</a>' %}</p> | ||
3796 | 14 | </div> | ||
3797 | 15 | {% endblock %} | ||
3798 | 16 | |||
3799 | 17 | {% block modal-footer %} | ||
3800 | 18 | <input class="btn btn-primary pull-right" type="submit" value="{% trans "Download Juju Environment Config" %}" /> | ||
3801 | 19 | {% if hide %}<a href="{% url horizon:settings:juju:index %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>{% endif %} | ||
3802 | 20 | {% endblock %} | ||
3803 | 0 | 21 | ||
3804 | === removed file 'horizon/dashboards/settings/templates/settings/juju/download_form.html' | |||
3805 | --- horizon/dashboards/settings/templates/settings/juju/download_form.html 2012-04-23 10:04:39 +0000 | |||
3806 | +++ horizon/dashboards/settings/templates/settings/juju/download_form.html 1970-01-01 00:00:00 +0000 | |||
3807 | @@ -1,20 +0,0 @@ | |||
3808 | 1 | {% extends "horizon/common/_modal_form.html" %} | ||
3809 | 2 | {% load i18n %} | ||
3810 | 3 | |||
3811 | 4 | |||
3812 | 5 | {% block modal-body %} | ||
3813 | 6 | <div class="left"> | ||
3814 | 7 | <fieldset> | ||
3815 | 8 | {% include "horizon/common/_form_fields.html" %} | ||
3816 | 9 | </fieldset> | ||
3817 | 10 | </div> | ||
3818 | 11 | <div class="right"> | ||
3819 | 12 | <h3>{% trans "Description:" %}</h3> | ||
3820 | 13 | <p>{% trans 'Clicking "Download Juju Environment Config" will download a file which includes a Juju environment configured for your cloud.<br><center><img src='/static/dashboard/img/juju.png'></center><br>To find out more about Juju visit <a href='http://juju.ubuntu.com'>http://juju.ubuntu.com</a>' %}</p> | ||
3821 | 14 | </div> | ||
3822 | 15 | {% endblock %} | ||
3823 | 16 | |||
3824 | 17 | {% block modal-footer %} | ||
3825 | 18 | <input class="btn btn-primary pull-right" type="submit" value="{% trans "Download Juju Environment Config" %}" /> | ||
3826 | 19 | {% if hide %}<a href="{% url horizon:settings:juju:index %}" class="btn secondary cancel close">{% trans "Cancel" %}</a>{% endif %} | ||
3827 | 20 | {% endblock %} | ||
3828 | 21 | 0 | ||
3829 | === added file 'horizon/dashboards/settings/templates/settings/juju/environments.yaml.template' | |||
3830 | --- horizon/dashboards/settings/templates/settings/juju/environments.yaml.template 1970-01-01 00:00:00 +0000 | |||
3831 | +++ horizon/dashboards/settings/templates/settings/juju/environments.yaml.template 2013-04-24 15:22:28 +0000 | |||
3832 | @@ -0,0 +1,21 @@ | |||
3833 | 1 | # To use Juju with your Openstack cloud: | ||
3834 | 2 | # 1. Run: apt-get install juju | ||
3835 | 3 | # 2. Copy this file to $HOME/.juju/environments.yaml | ||
3836 | 4 | # 3. Modify the 'default-image-id' to match an Ubuntu cloud image | ||
3837 | 5 | # AMI that has been published to your cloud. | ||
3838 | 6 | # 4. Run 'juju bootstrap' and deploy services! | ||
3839 | 7 | # | ||
3840 | 8 | # To find out more about juju visit http://juju.ubuntu.com | ||
3841 | 9 | |||
3842 | 10 | juju: environments | ||
3843 | 11 | environments: | ||
3844 | 12 | openstack: | ||
3845 | 13 | type: ec2 | ||
3846 | 14 | control-bucket: {{ control_bucket }} | ||
3847 | 15 | admin-secret: {{ juju_admin_secret }} | ||
3848 | 16 | access-key: {{ ec2_access_key }} | ||
3849 | 17 | secret-key: {{ ec2_secret_key }} | ||
3850 | 18 | ec2-uri: {{ ec2_url }} | ||
3851 | 19 | s3-uri: {{ s3_url }} | ||
3852 | 20 | default-series: precise | ||
3853 | 21 | default-image-id: ami-00000001 | ||
3854 | 0 | 22 | ||
3855 | === removed file 'horizon/dashboards/settings/templates/settings/juju/environments.yaml.template' | |||
3856 | --- horizon/dashboards/settings/templates/settings/juju/environments.yaml.template 2012-04-12 12:42:04 +0000 | |||
3857 | +++ horizon/dashboards/settings/templates/settings/juju/environments.yaml.template 1970-01-01 00:00:00 +0000 | |||
3858 | @@ -1,21 +0,0 @@ | |||
3859 | 1 | # To use Juju with your Openstack cloud: | ||
3860 | 2 | # 1. Run: apt-get install juju | ||
3861 | 3 | # 2. Copy this file to $HOME/.juju/environments.yaml | ||
3862 | 4 | # 3. Modify the 'default-image-id' to match an Ubuntu cloud image | ||
3863 | 5 | # AMI that has been published to your cloud. | ||
3864 | 6 | # 4. Run 'juju bootstrap' and deploy services! | ||
3865 | 7 | # | ||
3866 | 8 | # To find out more about juju visit http://juju.ubuntu.com | ||
3867 | 9 | |||
3868 | 10 | juju: environments | ||
3869 | 11 | environments: | ||
3870 | 12 | openstack: | ||
3871 | 13 | type: ec2 | ||
3872 | 14 | control-bucket: {{ control_bucket }} | ||
3873 | 15 | admin-secret: {{ juju_admin_secret }} | ||
3874 | 16 | access-key: {{ ec2_access_key }} | ||
3875 | 17 | secret-key: {{ ec2_secret_key }} | ||
3876 | 18 | ec2-uri: {{ ec2_url }} | ||
3877 | 19 | s3-uri: {{ s3_url }} | ||
3878 | 20 | default-series: precise | ||
3879 | 21 | default-image-id: ami-00000001 | ||
3880 | 22 | 0 | ||
3881 | === added file 'horizon/dashboards/settings/templates/settings/juju/index.html' | |||
3882 | --- horizon/dashboards/settings/templates/settings/juju/index.html 1970-01-01 00:00:00 +0000 | |||
3883 | +++ horizon/dashboards/settings/templates/settings/juju/index.html 2013-04-24 15:22:28 +0000 | |||
3884 | @@ -0,0 +1,11 @@ | |||
3885 | 1 | {% extends 'settings/base.html' %} | ||
3886 | 2 | {% load i18n %} | ||
3887 | 3 | {% block title %}{% trans "Download Juju Environment Config" %}{% endblock %} | ||
3888 | 4 | |||
3889 | 5 | {% block page_header %} | ||
3890 | 6 | {% include "horizon/common/_page_header.html" with title=_("Download Juju Environment Config") %} | ||
3891 | 7 | {% endblock page_header %} | ||
3892 | 8 | |||
3893 | 9 | {% block settings_main %} | ||
3894 | 10 | {% include "settings/juju/download_form.html" %} | ||
3895 | 11 | {% endblock %} | ||
3896 | 0 | 12 | ||
3897 | === removed file 'horizon/dashboards/settings/templates/settings/juju/index.html' | |||
3898 | --- horizon/dashboards/settings/templates/settings/juju/index.html 2012-04-12 12:42:04 +0000 | |||
3899 | +++ horizon/dashboards/settings/templates/settings/juju/index.html 1970-01-01 00:00:00 +0000 | |||
3900 | @@ -1,11 +0,0 @@ | |||
3901 | 1 | {% extends 'settings/base.html' %} | ||
3902 | 2 | {% load i18n %} | ||
3903 | 3 | {% block title %}{% trans "Download Juju Environment Config" %}{% endblock %} | ||
3904 | 4 | |||
3905 | 5 | {% block page_header %} | ||
3906 | 6 | {% include "horizon/common/_page_header.html" with title=_("Download Juju Environment Config") %} | ||
3907 | 7 | {% endblock page_header %} | ||
3908 | 8 | |||
3909 | 9 | {% block settings_main %} | ||
3910 | 10 | {% include "settings/juju/download_form.html" %} | ||
3911 | 11 | {% endblock %} | ||
3912 | 12 | 0 | ||
3913 | === modified file 'horizon/usage/base.py' | |||
3914 | --- horizon/usage/base.py 2012-03-02 12:11:59 +0000 | |||
3915 | +++ horizon/usage/base.py 2013-04-24 15:22:28 +0000 | |||
3916 | @@ -68,15 +68,13 @@ | |||
3917 | 68 | 68 | ||
3918 | 69 | def get_form(self): | 69 | def get_form(self): |
3919 | 70 | if not hasattr(self, 'form'): | 70 | if not hasattr(self, 'form'): |
3922 | 71 | if (any(key in ['month', 'year'] | 71 | if any(key in ['month', 'year'] for key in self.request.GET): |
3921 | 72 | for key in self.request.GET.keys())): | ||
3923 | 73 | # bound form | 72 | # bound form |
3924 | 74 | self.form = forms.DateForm(self.request.GET) | 73 | self.form = forms.DateForm(self.request.GET) |
3925 | 75 | else: | 74 | else: |
3926 | 76 | # non-bound form | 75 | # non-bound form |
3930 | 77 | self.form = forms.DateForm(initial={ | 76 | self.form = forms.DateForm(initial={'month': self.today.month, |
3931 | 78 | 'month': self.today.month, | 77 | 'year': self.today.year}) |
3929 | 79 | 'year': self.today.year}) | ||
3932 | 80 | return self.form | 78 | return self.form |
3933 | 81 | 79 | ||
3934 | 82 | def get_usage_list(self, start, end): | 80 | def get_usage_list(self, start, end): |
3935 | @@ -104,7 +102,12 @@ | |||
3936 | 104 | self.summary[key] += value | 102 | self.summary[key] += value |
3937 | 105 | 103 | ||
3938 | 106 | def csv_link(self): | 104 | def csv_link(self): |
3940 | 107 | return "?date_month=%s&date_year=%s&format=csv" % self.get_date_range() | 105 | form = self.get_form() |
3941 | 106 | if hasattr(form, "cleaned_data"): | ||
3942 | 107 | data = form.cleaned_data | ||
3943 | 108 | else: | ||
3944 | 109 | data = {"month": self.today.month, "year": self.today.year} | ||
3945 | 110 | return "?month=%s&year=%s&format=csv" % (data['month'], data['year']) | ||
3946 | 108 | 111 | ||
3947 | 109 | 112 | ||
3948 | 110 | class GlobalUsage(BaseUsage): | 113 | class GlobalUsage(BaseUsage): |
3949 | 111 | 114 | ||
3950 | === modified file 'horizon/version.py' | |||
3951 | --- horizon/version.py 2012-08-24 03:27:33 +0000 | |||
3952 | +++ horizon/version.py 2013-04-24 15:22:28 +0000 | |||
3953 | @@ -19,7 +19,7 @@ | |||
3954 | 19 | 'revno': 0} | 19 | 'revno': 0} |
3955 | 20 | 20 | ||
3956 | 21 | 21 | ||
3958 | 22 | HORIZON_VERSION = ['2012', '1', '3'] | 22 | HORIZON_VERSION = ['2012', '1', '4'] |
3959 | 23 | YEAR, COUNT, REVISION = HORIZON_VERSION | 23 | YEAR, COUNT, REVISION = HORIZON_VERSION |
3960 | 24 | FINAL = False # This becomes true at Release Candidate time | 24 | FINAL = False # This becomes true at Release Candidate time |
3961 | 25 | 25 | ||
3962 | 26 | 26 | ||
3963 | === added file 'setup.cfg' | |||
3964 | --- setup.cfg 1970-01-01 00:00:00 +0000 | |||
3965 | +++ setup.cfg 2013-04-24 15:22:28 +0000 | |||
3966 | @@ -0,0 +1,5 @@ | |||
3967 | 1 | [egg_info] | ||
3968 | 2 | tag_build = | ||
3969 | 3 | tag_date = 0 | ||
3970 | 4 | tag_svn_revision = 0 | ||
3971 | 5 | |||
3972 | 0 | 6 | ||
3973 | === modified file 'tools/pip-requires' | |||
3974 | --- tools/pip-requires 2012-08-24 03:27:33 +0000 | |||
3975 | +++ tools/pip-requires 2013-04-24 15:22:28 +0000 | |||
3976 | @@ -20,4 +20,4 @@ | |||
3977 | 20 | # Horizon Non-pip Requirements | 20 | # Horizon Non-pip Requirements |
3978 | 21 | -e git+https://github.com/openstack/python-novaclient.git#egg=python-novaclient | 21 | -e git+https://github.com/openstack/python-novaclient.git#egg=python-novaclient |
3979 | 22 | -e git+https://github.com/openstack/python-keystoneclient.git#egg=python-keystoneclient | 22 | -e git+https://github.com/openstack/python-keystoneclient.git#egg=python-keystoneclient |
3981 | 23 | -e git+https://github.com/openstack/glance.git#egg=glance | 23 | -e git+https://github.com/openstack/glance@stable/essex#egg=glance |
3982 | 24 | 24 | ||
3983 | === removed file 'tox.ini' | |||
3984 | --- tox.ini 2012-08-24 03:27:33 +0000 | |||
3985 | +++ tox.ini 1970-01-01 00:00:00 +0000 | |||
3986 | @@ -1,26 +0,0 @@ | |||
3987 | 1 | [tox] | ||
3988 | 2 | envlist = py26,py27,pep8 | ||
3989 | 3 | |||
3990 | 4 | [testenv] | ||
3991 | 5 | setenv = VIRTUAL_ENV={envdir} | ||
3992 | 6 | NOSE_WITH_OPENSTACK=1 | ||
3993 | 7 | NOSE_OPENSTACK_COLOR=1 | ||
3994 | 8 | NOSE_OPENSTACK_RED=0.05 | ||
3995 | 9 | NOSE_OPENSTACK_YELLOW=0.025 | ||
3996 | 10 | NOSE_OPENSTACK_SHOW_ELAPSED=1 | ||
3997 | 11 | deps = -r{toxinidir}/tools/pip-requires | ||
3998 | 12 | -r{toxinidir}/tools/test-requires | ||
3999 | 13 | commands = /bin/bash run_tests.sh -N | ||
4000 | 14 | |||
4001 | 15 | [tox:jenkins] | ||
4002 | 16 | downloadcache = ~/cache/pip | ||
4003 | 17 | |||
4004 | 18 | [testenv:pep8] | ||
4005 | 19 | deps = pep8==1.1 | ||
4006 | 20 | commands = /bin/bash run_tests.sh -N --pep8 | ||
4007 | 21 | |||
4008 | 22 | [testenv:cover] | ||
4009 | 23 | commands = /bin/bash run_tests.sh -N --coverage | ||
4010 | 24 | |||
4011 | 25 | [testenv:venv] | ||
4012 | 26 | commands = {posargs} |