Merge lp:~gandelman-a/ubuntu/precise/glance/UCA_2012.2.1 into lp:~ubuntu-cloud-archive/ubuntu/precise/glance/folsom
- Precise (12.04)
- UCA_2012.2.1
- Merge into folsom
Proposed by
Adam Gandelman
Status: | Merged |
---|---|
Approved by: | Chuck Short |
Approved revision: | 64 |
Merged at revision: | 63 |
Proposed branch: | lp:~gandelman-a/ubuntu/precise/glance/UCA_2012.2.1 |
Merge into: | lp:~ubuntu-cloud-archive/ubuntu/precise/glance/folsom |
Diff against target: |
1611 lines (+763/-205) 28 files modified
.gitreview (+1/-0) .pc/disable-swift-tests.patch/glance/tests/functional/v2/test_images.py (+12/-0) .pc/disable-swift-tests.patch/glance/tests/unit/test_clients.py (+1/-1) AUTHORS (+3/-0) ChangeLog (+376/-103) PKG-INFO (+1/-1) debian/changelog (+94/-59) debian/control (+2/-1) debian/patches/sql_conn.patch (+8/-8) glance.egg-info/PKG-INFO (+1/-1) glance.egg-info/requires.txt (+1/-1) glance/api/v1/images.py (+25/-5) glance/api/v2/images.py (+18/-10) glance/common/utils.py (+17/-0) glance/openstack/common/setup.py (+4/-3) glance/store/rbd.py (+11/-1) glance/tests/functional/v2/test_images.py (+12/-0) glance/tests/stubs.py (+7/-1) glance/tests/unit/test_clients.py (+1/-1) glance/tests/unit/test_store_location.py (+30/-0) glance/tests/unit/test_utils.py (+11/-0) glance/tests/unit/v1/test_api.py (+84/-1) glance/tests/unit/v2/test_images_resource.py (+32/-0) glance/tests/utils.py (+3/-2) glance/version.py (+1/-1) glance/versioninfo (+1/-1) run_tests.sh (+5/-3) tools/pip-requires (+1/-1) |
To merge this branch: | bzr merge lp:~gandelman-a/ubuntu/precise/glance/UCA_2012.2.1 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Chuck Short | Pending | ||
Review via email: mp+142221@code.launchpad.net |
Commit message
Description of the change
Syncs the lp:~ubuntu-cloud-archive branch to current state of the package in the U.C.A., and imports current SRU pending in quantal-proposed.
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.gitreview' |
2 | --- .gitreview 2012-07-06 11:13:13 +0000 |
3 | +++ .gitreview 2013-01-08 00:34:25 +0000 |
4 | @@ -2,3 +2,4 @@ |
5 | host=review.openstack.org |
6 | port=29418 |
7 | project=openstack/glance.git |
8 | +defaultbranch=stable/folsom |
9 | |
10 | === modified file '.pc/disable-swift-tests.patch/glance/tests/functional/v2/test_images.py' |
11 | --- .pc/disable-swift-tests.patch/glance/tests/functional/v2/test_images.py 2012-09-26 12:32:50 +0000 |
12 | +++ .pc/disable-swift-tests.patch/glance/tests/functional/v2/test_images.py 2013-01-08 00:34:25 +0000 |
13 | @@ -218,6 +218,12 @@ |
14 | self.assertEqual(201, response.status_code) |
15 | image_id = json.loads(response.text)['id'] |
16 | |
17 | + # Upload some image data |
18 | + path = self._url('/v2/images/%s/file' % image_id) |
19 | + headers = self._headers({'Content-Type': 'application/octet-stream'}) |
20 | + response = requests.put(path, headers=headers, data='ZZZZZ') |
21 | + self.assertEqual(201, response.status_code) |
22 | + |
23 | # TENANT1 should see the image in their list |
24 | path = self._url('/v2/images') |
25 | response = requests.get(path, headers=self._headers()) |
26 | @@ -300,6 +306,12 @@ |
27 | response = requests.delete(path, headers=headers) |
28 | self.assertEqual(404, response.status_code) |
29 | |
30 | + # Image data should still be present after the failed delete |
31 | + path = self._url('/v2/images/%s/file' % image_id) |
32 | + response = requests.get(path, headers=self._headers()) |
33 | + self.assertEqual(200, response.status_code) |
34 | + self.assertEqual(response.text, 'ZZZZZ') |
35 | + |
36 | self.stop_servers() |
37 | |
38 | def test_tag_lifecycle(self): |
39 | |
40 | === modified file '.pc/disable-swift-tests.patch/glance/tests/unit/test_clients.py' |
41 | --- .pc/disable-swift-tests.patch/glance/tests/unit/test_clients.py 2012-09-17 07:44:11 +0000 |
42 | +++ .pc/disable-swift-tests.patch/glance/tests/unit/test_clients.py 2013-01-08 00:34:25 +0000 |
43 | @@ -39,7 +39,7 @@ |
44 | UUID2 = _gen_uuid() |
45 | |
46 | #NOTE(bcwaldon): needed to init config_dir cli opt |
47 | -config.parse_args() |
48 | +config.parse_args(args=[]) |
49 | |
50 | |
51 | class TestBadClients(test_utils.BaseTestCase): |
52 | |
53 | === modified file 'AUTHORS' |
54 | --- AUTHORS 2012-09-17 07:44:11 +0000 |
55 | +++ AUTHORS 2013-01-08 00:34:25 +0000 |
56 | @@ -28,6 +28,7 @@ |
57 | Eoghan Glynn <eglynn@redhat.com> |
58 | Ewan Mellor <ewan.mellor@citrix.com> |
59 | Gabriel Hurley <gabriel@strikeawe.com> |
60 | +Gerardo Porras <gporras@yahoo-inc.com> |
61 | Hengqing Hu <hudayou@hotmail.com> |
62 | iccha <iccha.sethi@rackspace.com> |
63 | Ionuț Arțăriși <iartarisi@suse.cz> |
64 | @@ -59,6 +60,7 @@ |
65 | Lorin Hochstein <lorin@nimbisservices.com> |
66 | lzyeval <lzyeval@gmail.com> |
67 | Major Hayden <major@mhtx.net> |
68 | +Mark J. Washenberger <mark.washenberger@markwash.net> |
69 | Mark J. Washenberger <mark.washenberger@rackspace.com> |
70 | Mark McLoughlin <markmc@redhat.com> |
71 | Mark Washenberger <mark.washenberger@rackspace.com> |
72 | @@ -94,6 +96,7 @@ |
73 | Thierry Carrez <thierry@openstack.org> |
74 | Tomas Hancock <tom.hancock@hp.com> |
75 | Tom Hancock <tom.hancock@hp.com> |
76 | +Unmesh Gurjar <unmesh.gurjar@nttdata.com> |
77 | Unmesh Gurjar <unmesh.gurjar@vertex.co.in> |
78 | Vincent Untz <vuntz@suse.com> |
79 | Vishvananda Ishaya <vishvananda@gmail.com> |
80 | |
81 | === modified file 'ChangeLog' |
82 | --- ChangeLog 2012-09-26 12:37:00 +0000 |
83 | +++ ChangeLog 2013-01-08 00:34:25 +0000 |
84 | @@ -1,3 +1,276 @@ |
85 | +commit a4062940b804f524ada38df3c62c14b9c98f82bc |
86 | +Merge: 91aaa48 49408e9 |
87 | +Author: Jenkins <jenkins@review.openstack.org> |
88 | +Date: Tue Nov 27 23:16:35 2012 +0000 |
89 | + |
90 | + Merge "Ensure strings passed to librbd are not unicode" into stable/folsom |
91 | + |
92 | +commit 49408e9f846ab08ed4f1ac32c3e4e934cd448990 |
93 | +Author: Josh Durgin <josh.durgin@inktank.com> |
94 | +Date: Fri Nov 9 09:28:19 2012 -0800 |
95 | + |
96 | + Ensure strings passed to librbd are not unicode |
97 | + |
98 | + librbd rejects unicode by throwing an exception. If the location uri |
99 | + was unicode, this would result in deletes failing. Convert all rbd |
100 | + StoreLocation properties to ascii strings to avoid this problem. |
101 | + |
102 | + Fixes bug #1075580 |
103 | + Signed-off-by: Josh Durgin <josh.durgin@inktank.com> |
104 | + |
105 | + Change-Id: I445902bb1b72b8c814585f1481e6bf9e758b4e07 |
106 | + (cherry picked from commit 3aea9320d20d0291c5b4b027a585370d8e658a95) |
107 | + |
108 | + glance/store/rbd.py | 12 +++++++++++- |
109 | + glance/tests/unit/test_store_location.py | 30 ++++++++++++++++++++++++++++++ |
110 | + 2 files changed, 41 insertions(+), 1 deletion(-) |
111 | + |
112 | +commit 91aaa487d34ed57718f0183b27e79c02ac70941e |
113 | +Author: Mark J. Washenberger <mark.washenberger@markwash.net> |
114 | +Date: Tue Nov 20 12:41:48 2012 -0800 |
115 | + |
116 | + Make cooperative reader always support read() |
117 | + |
118 | + glance.common.utils.CooperativeReader provides eventlet-friendly |
119 | + cooperation on top of backends that support either read() or __iter__(). |
120 | + However, in the case of backends that only support __iter__(), such as |
121 | + images returned by store.get(...), read() is not defined. This patch |
122 | + adds read() in all cases. |
123 | + |
124 | + Fixes bug 1057322. |
125 | + |
126 | + Change-Id: I67d9b3e4d93fbefd7eeaf7cfc947ab635fe09534 |
127 | + |
128 | + glance/common/utils.py | 17 +++++++++++++++++ |
129 | + glance/tests/unit/test_utils.py | 11 +++++++++++ |
130 | + 2 files changed, 28 insertions(+) |
131 | + |
132 | +commit a296a5b3686aeb9c337b46a5a066888e6863e7a4 |
133 | +Author: Unmesh Gurjar <unmesh.gurjar@nttdata.com> |
134 | +Date: Tue Oct 23 03:34:31 2012 -0700 |
135 | + |
136 | + Return 403 when admin deletes a deleted image |
137 | + |
138 | + 1. Returned a 403 Forbidden error when an admin user tries to delete a deleted |
139 | + image. |
140 | + 2. Added unit test coverage. |
141 | + |
142 | + Fixes LP: #1060944 |
143 | + |
144 | + Change-Id: I1a5c4ca18e2e70d8a614b3132bfcea1f56c5f59c |
145 | + |
146 | + glance/api/v1/images.py | 6 +++++ |
147 | + glance/tests/unit/v1/test_api.py | 45 ++++++++++++++++++++++++++++++++++++++ |
148 | + 2 files changed, 51 insertions(+) |
149 | + |
150 | +commit a98768169c3a7ff23987b15f32333400c41f322f |
151 | +Merge: 5dac0b1 3e58a6a |
152 | +Author: Jenkins <jenkins@review.openstack.org> |
153 | +Date: Mon Nov 19 19:06:53 2012 +0000 |
154 | + |
155 | + Merge "Disallow updating deleted images." into stable/folsom |
156 | + |
157 | +commit 5dac0b1933514c2e9380eed4625a2ece25f458a0 |
158 | +Merge: 7336c8d 26c8085 |
159 | +Author: Jenkins <jenkins@review.openstack.org> |
160 | +Date: Wed Nov 14 20:31:57 2012 +0000 |
161 | + |
162 | + Merge "Return HTTP 404 for deleted images in v2" into stable/folsom |
163 | + |
164 | +commit 7336c8d0073bff0a106530dd782c567956bbe32e |
165 | +Merge: 517e059 8321ca6 |
166 | +Author: Jenkins <jenkins@review.openstack.org> |
167 | +Date: Wed Nov 14 20:27:56 2012 +0000 |
168 | + |
169 | + Merge "Add noseopts and replace noseargs where needed to run_test.sh" into stable/folsom |
170 | + |
171 | +commit 517e059aac38c69d03ddb040ad127b14a59adced |
172 | +Merge: fc0ee76 c3bea11 |
173 | +Author: Jenkins <jenkins@review.openstack.org> |
174 | +Date: Mon Nov 12 14:18:18 2012 +0000 |
175 | + |
176 | + Merge "Pull in a versioning fix from openstack-common." into stable/folsom |
177 | + |
178 | +commit fc0ee7623ec59c87ac6fc671e95a9798d6f2e2c3 |
179 | +Author: Mark J. Washenberger <mark.washenberger@markwash.net> |
180 | +Date: Thu Nov 8 10:56:07 2012 -0800 |
181 | + |
182 | + Ensure authorization before deleting from store |
183 | + |
184 | + This fixes bug 1076506. |
185 | + |
186 | + Change-Id: I3794c14fe523a9a27e943d73dd0248489d2b91f6 |
187 | + |
188 | + glance/api/v2/images.py | 21 ++++++++++++--------- |
189 | + glance/tests/functional/v2/test_images.py | 12 ++++++++++++ |
190 | + 2 files changed, 24 insertions(+), 9 deletions(-) |
191 | + |
192 | +commit 90bcdc5a89e350a358cf320a03f5afe99795f6f6 |
193 | +Author: Mark Washenberger <mark.washenberger@rackspace.com> |
194 | +Date: Wed Nov 7 09:59:56 2012 -0500 |
195 | + |
196 | + Delete from store after registry delete. |
197 | + |
198 | + Because we rely on the registry to determine authorization in the glance |
199 | + v1 api, we must attempt a registry delete before deleting an image from |
200 | + the image store. |
201 | + |
202 | + This patch includes the test for the bug, which was posted separately |
203 | + on the bug. |
204 | + |
205 | + Fixes bug 1065187. |
206 | + |
207 | + Change-Id: I1a06b7c7421524066c684539e2f3516c4ed2c475 |
208 | + |
209 | + glance/api/v1/images.py | 16 +++++++++++----- |
210 | + glance/tests/stubs.py | 8 +++++++- |
211 | + glance/tests/unit/v1/test_api.py | 20 ++++++++++++++++++++ |
212 | + glance/tests/utils.py | 1 + |
213 | + 4 files changed, 39 insertions(+), 6 deletions(-) |
214 | + |
215 | +commit 7841cc93050fa48a1fbd8847cec887f0360be9a3 |
216 | +Author: Mark Washenberger <mark.washenberger@rackspace.com> |
217 | +Date: Sun Oct 7 02:12:52 2012 +0000 |
218 | + |
219 | + FakeAuth not always admin |
220 | + |
221 | + The FakeAuthMiddleware was defaulting to admin=True for request |
222 | + contexts. This creates a situation where it is impossible to test |
223 | + non-admin requests in some situations. |
224 | + |
225 | + Change-Id: I949f708efed9f07a43b8506870c5b38fce4b3752 |
226 | + |
227 | + glance/tests/unit/v1/test_api.py | 3 ++- |
228 | + glance/tests/utils.py | 2 +- |
229 | + 2 files changed, 3 insertions(+), 2 deletions(-) |
230 | + |
231 | +commit c3bea11ede57c6d46b7a90f932255624f549de46 |
232 | +Author: Monty Taylor <mordred@inaugust.com> |
233 | +Date: Fri Oct 26 11:09:16 2012 -0400 |
234 | + |
235 | + Pull in a versioning fix from openstack-common. |
236 | + |
237 | + Fixes bug 1059634. Related to I6cff4ee7f6c1dc970397b66fd2d15fa22b0a63a3 |
238 | + |
239 | + (Cherry-picked from 68253587f0d5a5b5f0dde63dd6036c7977e4f3d6) |
240 | + |
241 | + Change-Id: I4c8daa8bf4a57849bd8d1e512a388d982f79b7d5 |
242 | + |
243 | + glance/openstack/common/setup.py | 7 ++++--- |
244 | + 1 file changed, 4 insertions(+), 3 deletions(-) |
245 | + |
246 | +commit 26c80856620f2ac3a662028eb3d53c3196b66a82 |
247 | +Author: Mark Washenberger <mark.washenberger@rackspace.com> |
248 | +Date: Thu Oct 25 19:46:10 2012 +0000 |
249 | + |
250 | + Return HTTP 404 for deleted images in v2 |
251 | + |
252 | + For admin contexts, the db api will return deleted images. This patch |
253 | + manually checks for deleted images in the v2 controller code to treat |
254 | + these cases as if the images didn't exist. |
255 | + |
256 | + Fixes bug 1071446 |
257 | + |
258 | + Change-Id: I33075f94e9d560a279085e2afd18c8052f57d60b |
259 | + |
260 | + glance/api/v2/images.py | 7 +++++- |
261 | + glance/tests/unit/v2/test_images_resource.py | 32 ++++++++++++++++++++++++++ |
262 | + 2 files changed, 38 insertions(+), 1 deletion(-) |
263 | + |
264 | +commit 3e58a6a6658f0e9a1e1f167f8b9cec4e9f32b3e4 |
265 | +Author: Unmesh Gurjar <unmesh.gurjar@nttdata.com> |
266 | +Date: Mon Oct 22 07:38:33 2012 -0700 |
267 | + |
268 | + Disallow updating deleted images. |
269 | + |
270 | + 1. Return a 403 Forbidden error when an admin user tries to update a deleted |
271 | + image. |
272 | + 2. Also added unit test coverage. |
273 | + |
274 | + Fixes LP: #1060930 |
275 | + |
276 | + Change-Id: I8290c8c9f1bcbbfbff7d54f141bdcfa1c40aab6f |
277 | + |
278 | + glance/api/v1/images.py | 8 ++++++++ |
279 | + glance/tests/unit/v1/test_api.py | 17 +++++++++++++++++ |
280 | + 2 files changed, 25 insertions(+) |
281 | + |
282 | +commit ddad2752b3afb480f5be1352cd2ef56739d3cdad |
283 | +Author: Sean Dague <sdague@linux.vnet.ibm.com> |
284 | +Date: Wed Oct 31 11:38:47 2012 -0400 |
285 | + |
286 | + pin sqlalchemy to the 0.7.x series |
287 | + |
288 | + sqlalchemy 0.8beta is now out and has internal changes |
289 | + which mean it's not an in place seemless upgrade. This pins |
290 | + sqlalchemy to the 0.7.x series to avoid those breaks. |
291 | + |
292 | + Fixes bug #1073569 |
293 | + |
294 | + Change-Id: Ia8976843a7e0a132fe38e80f2bcb01a16e12b8de |
295 | + |
296 | + tools/pip-requires | 2 +- |
297 | + 1 file changed, 1 insertion(+), 1 deletion(-) |
298 | + |
299 | +commit 8321ca6ff4d2ab15bece70d7ff84f2e3dd3f6896 |
300 | +Author: Gerardo Porras <gporras@yahoo-inc.com> |
301 | +Date: Wed Oct 17 16:00:48 2012 -0700 |
302 | + |
303 | + Add noseopts and replace noseargs where needed to run_test.sh |
304 | + |
305 | + Add of noseopts to the run_tests script so users can be |
306 | + able to run tests adding extra options to be passed to |
307 | + nosetests. |
308 | + This option is currently in keystone but not in glance. |
309 | + Fixes bug 1065758 |
310 | + |
311 | + Change-Id: I7c78749adb90b126da5bd9580da6bfd7c9e1bf54 |
312 | + |
313 | + run_tests.sh | 8 +++++--- |
314 | + 1 file changed, 5 insertions(+), 3 deletions(-) |
315 | + |
316 | +commit 1d5c651321a87e218995821b0d148867db977988 |
317 | +Author: Mark Washenberger <mark.washenberger@rackspace.com> |
318 | +Date: Tue Sep 25 19:57:10 2012 +0000 |
319 | + |
320 | + Pass empty args to test config parser. |
321 | + |
322 | + This fixes bug 1056420, which allows users to pass nosetests options |
323 | + through run_tests.sh again. |
324 | + |
325 | + Change-Id: I03e84488a24e2552b61aa0cab842d8325e8e856f |
326 | + (cherry picked from commit ef641597dbfc0fcb856c143b213be493ab44cc65) |
327 | + |
328 | + glance/tests/unit/test_clients.py | 2 +- |
329 | + glance/tests/utils.py | 2 +- |
330 | + 2 files changed, 2 insertions(+), 2 deletions(-) |
331 | + |
332 | +commit ac223e243736ba98a0ec480d3f80e39a555d3343 |
333 | +Author: Mark McLoughlin <markmc@redhat.com> |
334 | +Date: Sat Oct 13 22:44:12 2012 +0100 |
335 | + |
336 | + Set defaultbranch in .gitreview to stable/folsom |
337 | + |
338 | + This allows people run git-review without any arguments. |
339 | + |
340 | + Change-Id: I2b2488ffffd783b64e5c760324e7d4a00d5a39db |
341 | + |
342 | + .gitreview | 1 + |
343 | + 1 file changed, 1 insertion(+) |
344 | + |
345 | +commit 6740af2f8186aa903c45afa2c2329564fce90fdf |
346 | +Author: Thierry Carrez <thierry@openstack.org> |
347 | +Date: Fri Sep 28 16:14:02 2012 +0200 |
348 | + |
349 | + Bump next version to 2012.2.1 |
350 | + |
351 | + Open stable/folsom by bumping next version to 2012.2.1. |
352 | + |
353 | + Change-Id: Ia452eaf82c873a6b19f155f21a79116d32530b5b |
354 | + |
355 | + glance/version.py | 2 +- |
356 | + 1 file changed, 1 insertion(+), 1 deletion(-) |
357 | + |
358 | commit a9f0a4c4dbac0c92c431150161915bd5459a42d0 |
359 | Author: Eoghan Glynn <eglynn@redhat.com> |
360 | Date: Tue Sep 25 22:13:56 2012 +0100 |
361 | @@ -1273,7 +1546,7 @@ |
362 | |
363 | Change-Id: I6dc2afa735fb2f82df71d58b10c1e1530fce2f89 |
364 | |
365 | - .../versions/014_add_image_tags_table.py | 5 +++++ |
366 | + .../sqlalchemy/migrate_repo/versions/014_add_image_tags_table.py | 5 +++++ |
367 | 1 file changed, 5 insertions(+) |
368 | |
369 | commit 80c099e0b41b3f2f9684b06f1f4eee8e2776969e |
370 | @@ -4074,48 +4347,48 @@ |
371 | |
372 | Change-Id: Ia1a7b5062e7f882971f2061274f6a4a44cfc8ced |
373 | |
374 | - glance/api/middleware/cache.py | 2 +- |
375 | - glance/api/middleware/cache_manage.py | 3 +-- |
376 | - glance/api/middleware/context.py | 3 ++- |
377 | - glance/api/middleware/version_negotiation.py | 3 +-- |
378 | - glance/api/policy.py | 2 +- |
379 | - glance/api/v1/controller.py | 3 +-- |
380 | - glance/api/v1/images.py | 2 +- |
381 | - glance/api/v1/members.py | 3 +-- |
382 | - glance/api/v2/images.py | 2 +- |
383 | - glance/common/auth.py | 2 +- |
384 | - glance/common/client.py | 2 +- |
385 | - glance/common/utils.py | 2 +- |
386 | - glance/common/wsgi.py | 3 ++- |
387 | - glance/db/simple/api.py | 2 +- |
388 | - glance/db/sqlalchemy/api.py | 3 ++- |
389 | - glance/db/sqlalchemy/migrate_repo/schema.py | 4 ++-- |
390 | - .../versions/015_quote_swift_credentials.py | 2 +- |
391 | - glance/db/sqlalchemy/migration.py | 2 +- |
392 | - glance/image_cache/__init__.py | 3 +-- |
393 | - glance/image_cache/drivers/base.py | 2 +- |
394 | - glance/image_cache/drivers/sqlite.py | 2 +- |
395 | - glance/image_cache/drivers/xattr.py | 2 +- |
396 | - glance/image_cache/prefetcher.py | 3 +-- |
397 | - glance/notifier/__init__.py | 2 +- |
398 | - glance/notifier/notify_kombu.py | 2 +- |
399 | - glance/notifier/notify_log.py | 4 +--- |
400 | - glance/notifier/notify_qpid.py | 2 +- |
401 | - glance/registry/__init__.py | 2 +- |
402 | - glance/registry/api/v1/images.py | 3 +-- |
403 | - glance/registry/api/v1/members.py | 3 +-- |
404 | - glance/store/__init__.py | 2 +- |
405 | - glance/store/base.py | 3 +-- |
406 | - glance/store/filesystem.py | 2 +- |
407 | - glance/store/http.py | 2 +- |
408 | - glance/store/location.py | 2 +- |
409 | - glance/store/rbd.py | 2 +- |
410 | - glance/store/s3.py | 2 +- |
411 | - glance/store/scrubber.py | 2 +- |
412 | - glance/store/swift.py | 2 +- |
413 | - glance/tests/unit/test_notifier.py | 3 +-- |
414 | - glance/tests/unit/utils.py | 3 +-- |
415 | - tools/migrate_image_owners.py | 2 +- |
416 | + glance/api/middleware/cache.py | 2 +- |
417 | + glance/api/middleware/cache_manage.py | 3 +-- |
418 | + glance/api/middleware/context.py | 3 ++- |
419 | + glance/api/middleware/version_negotiation.py | 3 +-- |
420 | + glance/api/policy.py | 2 +- |
421 | + glance/api/v1/controller.py | 3 +-- |
422 | + glance/api/v1/images.py | 2 +- |
423 | + glance/api/v1/members.py | 3 +-- |
424 | + glance/api/v2/images.py | 2 +- |
425 | + glance/common/auth.py | 2 +- |
426 | + glance/common/client.py | 2 +- |
427 | + glance/common/utils.py | 2 +- |
428 | + glance/common/wsgi.py | 3 ++- |
429 | + glance/db/simple/api.py | 2 +- |
430 | + glance/db/sqlalchemy/api.py | 3 ++- |
431 | + glance/db/sqlalchemy/migrate_repo/schema.py | 4 ++-- |
432 | + .../migrate_repo/versions/015_quote_swift_credentials.py | 2 +- |
433 | + glance/db/sqlalchemy/migration.py | 2 +- |
434 | + glance/image_cache/__init__.py | 3 +-- |
435 | + glance/image_cache/drivers/base.py | 2 +- |
436 | + glance/image_cache/drivers/sqlite.py | 2 +- |
437 | + glance/image_cache/drivers/xattr.py | 2 +- |
438 | + glance/image_cache/prefetcher.py | 3 +-- |
439 | + glance/notifier/__init__.py | 2 +- |
440 | + glance/notifier/notify_kombu.py | 2 +- |
441 | + glance/notifier/notify_log.py | 4 +--- |
442 | + glance/notifier/notify_qpid.py | 2 +- |
443 | + glance/registry/__init__.py | 2 +- |
444 | + glance/registry/api/v1/images.py | 3 +-- |
445 | + glance/registry/api/v1/members.py | 3 +-- |
446 | + glance/store/__init__.py | 2 +- |
447 | + glance/store/base.py | 3 +-- |
448 | + glance/store/filesystem.py | 2 +- |
449 | + glance/store/http.py | 2 +- |
450 | + glance/store/location.py | 2 +- |
451 | + glance/store/rbd.py | 2 +- |
452 | + glance/store/s3.py | 2 +- |
453 | + glance/store/scrubber.py | 2 +- |
454 | + glance/store/swift.py | 2 +- |
455 | + glance/tests/unit/test_notifier.py | 3 +-- |
456 | + glance/tests/unit/utils.py | 3 +-- |
457 | + tools/migrate_image_owners.py | 2 +- |
458 | 42 files changed, 46 insertions(+), 56 deletions(-) |
459 | |
460 | commit 69d3cd58b755ac6c50b1aef31131819c911e41f6 |
461 | @@ -5342,13 +5615,13 @@ |
462 | |
463 | Change-Id: I10c677cfd5186edce3ca96495eafc732168cac86 |
464 | |
465 | - .../migrate_repo/versions/003_add_disk_format.py | 1 - |
466 | - .../migrate_repo/versions/004_add_checksum.py | 1 - |
467 | - .../migrate_repo/versions/006_key_to_name.py | 1 - |
468 | - .../migrate_repo/versions/007_add_owner.py | 1 - |
469 | - .../versions/008_add_image_members_table.py | 4 ++-- |
470 | - .../versions/009_add_mindisk_and_minram.py | 1 - |
471 | - .../migrate_repo/versions/012_id_to_uuid.py | 1 - |
472 | + glance/db/sqlalchemy/migrate_repo/versions/003_add_disk_format.py | 1 - |
473 | + glance/db/sqlalchemy/migrate_repo/versions/004_add_checksum.py | 1 - |
474 | + glance/db/sqlalchemy/migrate_repo/versions/006_key_to_name.py | 1 - |
475 | + glance/db/sqlalchemy/migrate_repo/versions/007_add_owner.py | 1 - |
476 | + .../migrate_repo/versions/008_add_image_members_table.py | 4 ++-- |
477 | + .../sqlalchemy/migrate_repo/versions/009_add_mindisk_and_minram.py | 1 - |
478 | + glance/db/sqlalchemy/migrate_repo/versions/012_id_to_uuid.py | 1 - |
479 | 7 files changed, 2 insertions(+), 8 deletions(-) |
480 | |
481 | commit 9c8c630d53877c5a9b0dda856b207468fdb4062c |
482 | @@ -5472,13 +5745,13 @@ |
483 | |
484 | Change-Id: I3c4d98c81dee6676916c60e71a749037ae1edc81 |
485 | |
486 | - glance/common/exception.py | 2 +- |
487 | - .../versions/015_quote_swift_credentials.py | 15 +++++++++++---- |
488 | - glance/store/filesystem.py | 5 +++-- |
489 | - glance/store/http.py | 9 +++++++-- |
490 | - glance/store/rbd.py | 5 +++-- |
491 | - glance/store/s3.py | 13 ++++++++----- |
492 | - glance/store/swift.py | 14 +++++++++----- |
493 | + glance/common/exception.py | 2 +- |
494 | + .../versions/015_quote_swift_credentials.py | 15 +++++++++++---- |
495 | + glance/store/filesystem.py | 5 +++-- |
496 | + glance/store/http.py | 9 +++++++-- |
497 | + glance/store/rbd.py | 5 +++-- |
498 | + glance/store/s3.py | 13 ++++++++----- |
499 | + glance/store/swift.py | 14 +++++++++----- |
500 | 7 files changed, 42 insertions(+), 21 deletions(-) |
501 | |
502 | commit b3b4d64ae23fd3a662e6ebc98642c42fe6631cad |
503 | @@ -5502,13 +5775,13 @@ |
504 | |
505 | Change-Id: I68c6f1735e5001641994ed4f84ad879397ba8713 |
506 | |
507 | - glance/tests/functional/store_utils.py | 3 ++- |
508 | - glance/tests/functional/test_bin_glance.py | 10 +++++++--- |
509 | - .../tests/functional/v1/test_cache_middleware.py | 4 +++- |
510 | - glance/tests/functional/v1/test_copy_to_file.py | 4 +++- |
511 | - glance/tests/functional/v1/test_s3.py | 4 +++- |
512 | - glance/tests/functional/v1/test_swift.py | 4 +++- |
513 | - glance/tests/utils.py | 5 +++-- |
514 | + glance/tests/functional/store_utils.py | 3 ++- |
515 | + glance/tests/functional/test_bin_glance.py | 10 +++++++--- |
516 | + glance/tests/functional/v1/test_cache_middleware.py | 4 +++- |
517 | + glance/tests/functional/v1/test_copy_to_file.py | 4 +++- |
518 | + glance/tests/functional/v1/test_s3.py | 4 +++- |
519 | + glance/tests/functional/v1/test_swift.py | 4 +++- |
520 | + glance/tests/utils.py | 5 +++-- |
521 | 7 files changed, 24 insertions(+), 10 deletions(-) |
522 | |
523 | commit c44e16a538113293c7e73eea22c2ebc0f84c365f |
524 | @@ -8228,9 +8501,9 @@ |
525 | |
526 | Change-Id: Ie4f4c13846de727647abe168aeb193a93f03e0bf |
527 | |
528 | - glance/tests/functional/test_bin_glance.py | 1 + |
529 | - .../functional/v1/test_bin_glance_cache_manage.py | 1 + |
530 | - glance/tests/functional/v1/test_misc.py | 10 ++++++++++ |
531 | + glance/tests/functional/test_bin_glance.py | 1 + |
532 | + glance/tests/functional/v1/test_bin_glance_cache_manage.py | 1 + |
533 | + glance/tests/functional/v1/test_misc.py | 10 ++++++++++ |
534 | 3 files changed, 12 insertions(+) |
535 | |
536 | commit ca84ec7d5550c0978ac80fad7972e77c1c971107 |
537 | @@ -8562,21 +8835,21 @@ |
538 | |
539 | Change-Id: I9d602ed429caff8ffb00e40f623c473c5425e1cc |
540 | |
541 | - glance/tests/functional/test_logging.py | 2 -- |
542 | - glance/tests/functional/test_respawn.py | 2 +- |
543 | - glance/tests/functional/test_scrubber.py | 3 --- |
544 | - .../functional/v1/test_bin_glance_cache_manage.py | 4 ---- |
545 | - .../tests/functional/v1/test_cache_middleware.py | 1 - |
546 | - glance/tests/functional/v1/test_s3.py | 5 +---- |
547 | - glance/tests/functional/v1/test_ssl.py | 6 +----- |
548 | - glance/tests/functional/v1/test_swift.py | 1 - |
549 | - glance/tests/stubs.py | 2 -- |
550 | - glance/tests/unit/test_clients.py | 8 -------- |
551 | - glance/tests/unit/test_context.py | 2 -- |
552 | - glance/tests/unit/test_db.py | 1 - |
553 | - glance/tests/unit/test_filesystem_store.py | 3 --- |
554 | - glance/tests/unit/test_image_cache.py | 1 - |
555 | - glance/tests/unit/test_s3_store.py | 5 +---- |
556 | + glance/tests/functional/test_logging.py | 2 -- |
557 | + glance/tests/functional/test_respawn.py | 2 +- |
558 | + glance/tests/functional/test_scrubber.py | 3 --- |
559 | + glance/tests/functional/v1/test_bin_glance_cache_manage.py | 4 ---- |
560 | + glance/tests/functional/v1/test_cache_middleware.py | 1 - |
561 | + glance/tests/functional/v1/test_s3.py | 5 +---- |
562 | + glance/tests/functional/v1/test_ssl.py | 6 +----- |
563 | + glance/tests/functional/v1/test_swift.py | 1 - |
564 | + glance/tests/stubs.py | 2 -- |
565 | + glance/tests/unit/test_clients.py | 8 -------- |
566 | + glance/tests/unit/test_context.py | 2 -- |
567 | + glance/tests/unit/test_db.py | 1 - |
568 | + glance/tests/unit/test_filesystem_store.py | 3 --- |
569 | + glance/tests/unit/test_image_cache.py | 1 - |
570 | + glance/tests/unit/test_s3_store.py | 5 +---- |
571 | 15 files changed, 4 insertions(+), 42 deletions(-) |
572 | |
573 | commit 35ed3105552cf6c182c76b6f13f719bfe7eb596b |
574 | @@ -8707,8 +8980,8 @@ |
575 | |
576 | Change-Id: Iab80a65464a591b732ecce4c00d04df50624e912 |
577 | |
578 | - Authors | 1 + |
579 | - .../db/migrate_repo/versions/006_key_to_name.py | 2 +- |
580 | + Authors | 1 + |
581 | + glance/registry/db/migrate_repo/versions/006_key_to_name.py | 2 +- |
582 | 2 files changed, 2 insertions(+), 1 deletion(-) |
583 | |
584 | commit 257be28b8c77bd1fa3e402d2bd2f5ee67ac4e60e |
585 | @@ -10302,12 +10575,12 @@ |
586 | Change-Id: I5ad5042dbc9785829694553f2657df3eb6e3ef20 |
587 | Signed-off-by: Chuck Short <chuck.short@canonical.com> |
588 | |
589 | - .../migrate_repo/versions/001_add_images_table.py | 2 +- |
590 | - .../versions/002_add_image_properties_table.py | 2 +- |
591 | - .../db/migrate_repo/versions/004_add_checksum.py | 2 +- |
592 | - .../db/migrate_repo/versions/007_add_owner.py | 2 +- |
593 | - .../versions/008_add_image_members_table.py | 2 +- |
594 | - .../versions/009_add_mindisk_and_minram.py | 2 +- |
595 | + glance/registry/db/migrate_repo/versions/001_add_images_table.py | 2 +- |
596 | + .../db/migrate_repo/versions/002_add_image_properties_table.py | 2 +- |
597 | + glance/registry/db/migrate_repo/versions/004_add_checksum.py | 2 +- |
598 | + glance/registry/db/migrate_repo/versions/007_add_owner.py | 2 +- |
599 | + .../registry/db/migrate_repo/versions/008_add_image_members_table.py | 2 +- |
600 | + .../registry/db/migrate_repo/versions/009_add_mindisk_and_minram.py | 2 +- |
601 | 6 files changed, 6 insertions(+), 6 deletions(-) |
602 | |
603 | commit 3b229c394521e5b1b81e4629c6ff9c09e3b866c9 |
604 | @@ -10991,8 +11264,8 @@ |
605 | |
606 | Change-Id: Ic248fdfe3933437928f0b393d8cde993b96bf2cb |
607 | |
608 | - .mailmap | 1 + |
609 | - .../migrate_repo/versions/003_add_disk_format.py | 2 +- |
610 | + .mailmap | 1 + |
611 | + glance/registry/db/migrate_repo/versions/003_add_disk_format.py | 2 +- |
612 | 2 files changed, 2 insertions(+), 1 deletion(-) |
613 | |
614 | commit 59ca8b0b44bbb2276d7e5903bfe9d14a6a26d901 |
615 | @@ -11352,7 +11625,7 @@ |
616 | |
617 | Change-Id: Iab1c3e7a52d739a445cf52eb9a67f61a69075026 |
618 | |
619 | - .../db/migrate_repo/versions/012_id_to_uuid.py | 8 ++------ |
620 | + glance/registry/db/migrate_repo/versions/012_id_to_uuid.py | 8 ++------ |
621 | 1 file changed, 2 insertions(+), 6 deletions(-) |
622 | |
623 | commit 300d4031a94b85539a30bde726131231008c80a6 |
624 | @@ -13740,7 +14013,7 @@ |
625 | |
626 | Change-Id: I66307cb355120b992913c8a1d8d5855b30f70504 |
627 | |
628 | - .../db/migrate_repo/versions/012_id_to_uuid.py | 4 ++-- |
629 | + glance/registry/db/migrate_repo/versions/012_id_to_uuid.py | 4 ++-- |
630 | 1 file changed, 2 insertions(+), 2 deletions(-) |
631 | |
632 | commit 94dcf3acd0b3ef7adcb61b90bf4bdcc733cf61ac |
633 | @@ -21103,8 +21376,8 @@ |
634 | |
635 | Add migration scripts for revising the datatype of the 'size' column in the images table. |
636 | |
637 | - .../migrate_repo/versions/006_mysql_downgrade.sql | 2 ++ |
638 | - .../db/migrate_repo/versions/006_mysql_upgrade.sql | 2 ++ |
639 | + glance/registry/db/migrate_repo/versions/006_mysql_downgrade.sql | 2 ++ |
640 | + glance/registry/db/migrate_repo/versions/006_mysql_upgrade.sql | 2 ++ |
641 | 2 files changed, 4 insertions(+) |
642 | |
643 | commit 84051230f523294a1ea57bcdb3560bcdb4fda84e |
644 | @@ -23083,8 +23356,8 @@ |
645 | |
646 | Creating indexes |
647 | |
648 | - .../migrate_repo/versions/001_add_images_table.py | 9 +++++---- |
649 | - .../versions/002_add_image_properties_table.py | 14 +++++++++----- |
650 | + .../db/migrate_repo/versions/001_add_images_table.py | 9 +++++---- |
651 | + .../versions/002_add_image_properties_table.py | 14 +++++++++----- |
652 | 2 files changed, 14 insertions(+), 9 deletions(-) |
653 | |
654 | commit d060da4993312aa803371464d876a63ded7afba3 |
655 | @@ -23114,8 +23387,8 @@ |
656 | |
657 | Small cleanups |
658 | |
659 | - .../migrate_repo/versions/001_add_images_table.py | 12 +++--------- |
660 | - .../versions/002_add_image_properties_table.py | 12 +++--------- |
661 | + .../db/migrate_repo/versions/001_add_images_table.py | 12 +++--------- |
662 | + .../versions/002_add_image_properties_table.py | 12 +++--------- |
663 | 2 files changed, 6 insertions(+), 18 deletions(-) |
664 | |
665 | commit a436b433ca746864aed9fdec8bbe345c3bf147a7 |
666 | @@ -23220,9 +23493,9 @@ |
667 | |
668 | Better logging |
669 | |
670 | - glance/registry/db/migrate_repo/schema.py | 19 +++++++++++++++++++ |
671 | - .../migrate_repo/versions/001_add_images_table.py | 12 ++++++------ |
672 | - .../versions/002_add_image_properties_table.py | 13 ++++++------- |
673 | + glance/registry/db/migrate_repo/schema.py | 19 +++++++++++++++++++ |
674 | + .../migrate_repo/versions/001_add_images_table.py | 12 ++++++------ |
675 | + .../versions/002_add_image_properties_table.py | 13 ++++++------- |
676 | 3 files changed, 31 insertions(+), 13 deletions(-) |
677 | |
678 | commit d923a0417537552f672fd5b38b63f40c695f5cd5 |
679 | |
680 | === modified file 'PKG-INFO' |
681 | --- PKG-INFO 2012-06-22 09:18:07 +0000 |
682 | +++ PKG-INFO 2013-01-08 00:34:25 +0000 |
683 | @@ -1,6 +1,6 @@ |
684 | Metadata-Version: 1.1 |
685 | Name: glance |
686 | -Version: 2012.2 |
687 | +Version: 2012.2.1 |
688 | Summary: The Glance project provides services for discovering, registering, and retrieving virtual machine images |
689 | Home-page: http://glance.openstack.org/ |
690 | Author: OpenStack |
691 | |
692 | === modified file 'debian/changelog' |
693 | --- debian/changelog 2012-10-19 23:02:14 +0000 |
694 | +++ debian/changelog 2013-01-08 00:34:25 +0000 |
695 | @@ -1,8 +1,66 @@ |
696 | -glance (2012.2-0ubuntu2~cloud0) precise-folsom; urgency=low |
697 | - |
698 | - * New release candidate for the Ubuntu Cloud Archive. |
699 | - |
700 | - -- Adam Gandelman <adamg@canonical.com> Fri, 19 Oct 2012 23:02:14 -0700 |
701 | +glance (2012.2.1-0ubuntu1~cloud0) precise-folsom; urgency=low |
702 | + |
703 | + * Stable update for the Ubuntu Cloud Archive. |
704 | + |
705 | + -- Adam Gandelman <adamg@ubuntu.com> Mon, 07 Jan 2013 16:02:15 -0800 |
706 | + |
707 | +glance (2012.2.1-0ubuntu1) quantal-proposed; urgency=low |
708 | + |
709 | + * Dropped patches, applied upstream: |
710 | + - debian/patches/CVE-2012-4573.patch |
711 | + - debian/patches/CVE-2012-4573b.patch |
712 | + * Resynchronize with stable/folsom (199783ce) (LP: #1085255): |
713 | + - [49408e9] Glance image-delete HTTPInternalServerError HTTP 500 |
714 | + (LP: #1075580) |
715 | + - [91aaa48] Image fails to upload to swift: TypeError: object of type |
716 | + 'CooperativeReader' has no len( (LP: #1057322) |
717 | + - [a296a5b] Return 403 when admin deletes a deleted image (LP: #1060944) |
718 | + - [3e58a6a] Disallow updating deleted images. (LP: #1060930) |
719 | + - [26c8085] admins can see deleted images in v2 api (LP: #1071446) |
720 | + - [8321ca6] No exclude option to skip tests in run_tests.sh (LP: #1065758) |
721 | + - [c3bea11] Badly named stable/folsom Glance tarballs (LP: #1059634) |
722 | + - [fc0ee76] Non-admin users can cause public glance images to be deleted |
723 | + from the backend storage repository in the v2 api (LP: #1076506) |
724 | + - [90bcdc5] Non-admin users can cause public glance images to be deleted |
725 | + from the backend storage repository (LP: #1065187) |
726 | + - [7841cc9] FakeAuth not always admin |
727 | + - [ddad275] Jenkins jobs fail because of incompatibility between sqlalchemy- |
728 | + migrate and the newest sqlalchemy-0.8.0b1 (LP: #1073569) |
729 | + - [1d5c651] nosetest options cause no such option errors (LP: #1056420) |
730 | + - [ac223e2] Set defaultbranch in .gitreview to stable/folsom |
731 | + |
732 | + -- Adam Gandelman <adamg@ubuntu.com> Tue, 04 Dec 2012 09:19:35 -0800 |
733 | + |
734 | +glance (2012.2-0ubuntu2.3~cloud0) precise-folsom; urgency=low |
735 | + |
736 | + * New package update for the Ubuntu Cloud Archive. |
737 | + |
738 | + -- Chuck Short <zulcss@ubuntu.com> Wed, 21 Nov 2012 15:04:26 -0500 |
739 | + |
740 | +glance (2012.2-0ubuntu2.3) quantal-security; urgency=low |
741 | + |
742 | + * SECURITY UPDATE: deletion of arbitrary public and shared images via |
743 | + authenticated user |
744 | + - debian/patches/CVE-2012-4573b.patch: previous patch was incomplete. |
745 | + Make corresponding change to glance/api/v2/images.py |
746 | + - CVE-2012-4573 |
747 | + * debian/control: add Build-Depends-Indep on python-chardet. This is needed |
748 | + by python-requests to do encoding detection which otherwise fails in the |
749 | + new tests introduced in CVE-2012-4573b.patch. |
750 | + |
751 | + -- Jamie Strandboge <jamie@ubuntu.com> Fri, 09 Nov 2012 06:53:44 -0600 |
752 | + |
753 | +glance (2012.2-0ubuntu2.2) quantal-security; urgency=low |
754 | + |
755 | + * SECURITY UPDATE: deletion of arbitrary public and shared images via |
756 | + authenticated user |
757 | + - debian/patches/CVE-2012-4573.patch: adjust glance/api/v1/images.py to |
758 | + ensure image is owned by user before delayed_deletion |
759 | + - CVE-2012-4573 |
760 | + * debian/patches/fakeauth-not-always-admin.patch: add required testsuite |
761 | + patch in support of the testsuite changes in CVE-2012-4573.patch |
762 | + |
763 | + -- Jamie Strandboge <jamie@ubuntu.com> Thu, 08 Nov 2012 07:41:02 -0600 |
764 | |
765 | glance (2012.2-0ubuntu2) quantal-proposed; urgency=low |
766 | |
767 | @@ -11,12 +69,6 @@ |
768 | |
769 | -- James Page <james.page@ubuntu.com> Fri, 12 Oct 2012 15:43:54 +0100 |
770 | |
771 | -glance (2012.2-0ubuntu1~cloud0) precise-folsom; urgency=low |
772 | - |
773 | - * New release candidate for the Ubuntu Cloud Archive. |
774 | - |
775 | - -- Chuck Short <zulcss@ubuntu.com> Thu, 27 Sep 2012 15:34:04 -0500 |
776 | - |
777 | glance (2012.2-0ubuntu1) quantal; urgency=low |
778 | |
779 | * debian/control: Clean-up python depends. Thanks to Sam Morrison. |
780 | @@ -31,12 +83,6 @@ |
781 | |
782 | -- Chuck Short <zulcss@ubuntu.com> Wed, 26 Sep 2012 12:37:00 -0500 |
783 | |
784 | -glance (2012.2~rc2-0ubuntu1~cloud0) precise-folsom; urgency=low |
785 | - |
786 | - * New release candidate for the Ubuntu Cloud Archive. |
787 | - |
788 | - -- Chuck Short <zulcss@ubuntu.com> Thu, 27 Sep 2012 14:04:18 -0500 |
789 | - |
790 | glance (2012.2~rc2-0ubuntu1) quantal; urgency=low |
791 | |
792 | * debian/control: Suggest ceph-common. |
793 | @@ -46,14 +92,16 @@ |
794 | |
795 | -- Chuck Short <zulcss@ubuntu.com> Wed, 26 Sep 2012 12:32:50 -0500 |
796 | |
797 | -glance (2012.2~rc1-0ubuntu1~cloud0) precise-folsom; urgency=low |
798 | - |
799 | - * New release candidate for the Ubuntu Cloud Archive. |
800 | - |
801 | - -- Chuck Short <zulcss@ubuntu.com> Tue, 18 Sep 2012 08:26:19 -0500 |
802 | - |
803 | glance (2012.2~rc1-0ubuntu1) quantal; urgency=low |
804 | |
805 | + * New upstrem release. |
806 | + * debian/glance.logrotate: compress right logfiles when rotating them. |
807 | + (LP: #1049314) |
808 | + |
809 | + -- Chuck Short <zulcss@ubuntu.com> Mon, 17 Sep 2012 07:44:11 -0500 |
810 | + |
811 | +glance (2012.2~rc1~20120907.129.f0bd856-0ubuntu1) quantal; urgency=low |
812 | + |
813 | [ Chuck Short ] |
814 | * New upstream version. |
815 | * drop debian/patches/fix-docs-build.patch. |
816 | @@ -61,8 +109,6 @@ |
817 | * debain/control: Add depends on python-swiftclient. |
818 | * debian/*.usptart: make glance start from runlevel 1 to runlevel |
819 | 2. (LP: #820688) |
820 | - * debian/glance.logrotate: compress right logfiles when rotating them. |
821 | - (LP: #1049314) |
822 | |
823 | [ Soren Hansen ] |
824 | * Update debian/watch to account for symbolically named tarballs and |
825 | @@ -71,7 +117,7 @@ |
826 | * Refresh disable-network-for-docs.patch |
827 | * Fix Launchpad URLs in debian/watch. |
828 | |
829 | - -- Chuck Short <zulcss@ubuntu.com> Mon, 17 Sep 2012 07:44:11 -0500 |
830 | + -- Chuck Short <zulcss@ubuntu.com> Fri, 07 Sep 2012 12:17:46 -0500 |
831 | |
832 | glance (2012.2~f3-0ubuntu1) quantal; urgency=low |
833 | |
834 | @@ -90,10 +136,16 @@ |
835 | |
836 | -- Chuck Short <zulcss@ubuntu.com> Thu, 16 Aug 2012 13:58:32 -0500 |
837 | |
838 | -glance (2012.2~f2-0ubuntu1~cloud0) precise; urgency=low |
839 | +glance (2012.2~f2-0ubuntu1) quantal; urgency=low |
840 | + |
841 | + * New upstream version. |
842 | + |
843 | + -- Chuck Short <zulcss@ubuntu.com> Fri, 06 Jul 2012 11:13:13 -0400 |
844 | + |
845 | +glance (2012.2~f2~20120621.1644-0ubuntu1) quantal; urgency=low |
846 | |
847 | [ Chuck Short ] |
848 | - * New upstream version. |
849 | + * New upstream release. |
850 | * debian/glance-reigstry.logrotate: Rotate the right logfile. (LP: #1009996) |
851 | * debian/control: Fix short description of glance-client. (LP: #982658) |
852 | * debian/pydist-overrides: Add argparse and python_swiftclient. |
853 | @@ -102,14 +154,25 @@ |
854 | * debian/glance-api.install: Remove glance-{scrubber, cache}-paste.ini. |
855 | * debian/patches/ensure_versioned_db_models.patch: Disable while database |
856 | related code changes settle upstream. |
857 | + |
858 | + -- Chuck Short <zulcss@ubuntu.com> Fri, 22 Jun 2012 09:18:07 -0400 |
859 | + |
860 | +glance (2012.2~f2~20120531.1560-0ubuntu2) quantal; urgency=low |
861 | + |
862 | * debian/patches/ensure_versioned_db_models.patch: Refresh. |
863 | * debian/patches/disable-swift-tests.patch: Refresh. |
864 | * debian/control: Re-enable python-jsonchema Dependency now that it has |
865 | landed in main. |
866 | |
867 | - -- Chuck Short <zulcss@ubuntu.com> Tue, 17 Jul 2012 10:12:05 -0500 |
868 | - |
869 | -glance (2012.2~f1-0ubuntu1~cloud0) precise-folsom; urgency=low |
870 | + -- Adam Gandelman <adamg@canonical.com> Tue, 05 Jun 2012 10:53:30 -0700 |
871 | + |
872 | +glance (2012.2~f2~20120531.1560-0ubuntu1) quantal; urgency=low |
873 | + |
874 | + * New upstream release. |
875 | + |
876 | + -- Chuck Short <zulcss@ubuntu.com> Fri, 01 Jun 2012 10:56:09 -0400 |
877 | + |
878 | +glance (2012.2~f2~20120524.1541-0ubuntu1) quantal; urgency=low |
879 | |
880 | [ Adam Gandelman ] |
881 | * debian/patches/ensure_versioned_db_models.patch: Check for valid |
882 | @@ -137,34 +200,6 @@ |
883 | |
884 | -- Adam Gandelman <adamg@canonical.com> Thu, 24 May 2012 10:26:57 -0700 |
885 | |
886 | -glance (2012.2~f1-0ubuntu1~cloud0) precise; urgency=low |
887 | - |
888 | - [ Adam Gandelman ] |
889 | - * debian/patches/ensure_versioned_db_models.patch: Check for valid |
890 | - db models+schema at service start, and ensure db is version controlled |
891 | - before running all migrations. |
892 | - * debian/{control, pydist-overrides}: *Temporarily* disable non-main |
893 | - dependencies pending MIRs |
894 | - * debian/rules: *Temporarily* disable tests until new dependencies are |
895 | - satisfied |
896 | - |
897 | - [ Chuck Short ] |
898 | - * New upstream version. |
899 | - * Prepare for quantal: |
900 | - - Removed debian/patches/fix_migration_012_foreign_keys.patch |
901 | - - Removed debian/patches/disable_db_table_auto_create.patch |
902 | - - Removed debian/patches/convert_properties_to_uuid.patch |
903 | - * debian/control: Add dependency on python-requests |
904 | - * debian/control: Add dependency on python-jsonschema |
905 | - * debian/control: Add python-keystone as a depends. (LP: #901881) |
906 | - * debian/patches/disable-swift-tests.patch: Rediffed |
907 | - |
908 | - [ Paul Belanger ] |
909 | - * debian/glance-common.postinst |
910 | - - Give glance group read permission to /etc/glance (LP: #989205) |
911 | - |
912 | - -- Chuck Short <zulcss@ubuntu.com> Mon, 09 Jul 2012 13:57:57 -0400 |
913 | - |
914 | glance (2012.1-0ubuntu2) precise; urgency=low |
915 | |
916 | [ Adam Gandelman ] |
917 | |
918 | === modified file 'debian/control' |
919 | --- debian/control 2012-10-12 15:43:54 +0000 |
920 | +++ debian/control 2013-01-08 00:34:25 +0000 |
921 | @@ -33,7 +33,8 @@ |
922 | python-glanceclient, |
923 | python-xattr, |
924 | curl, |
925 | - pep8 |
926 | + pep8, |
927 | + python-chardet |
928 | Standards-Version: 3.9.3 |
929 | XS-Python-Version: >= 2.6 |
930 | Homepage: http://launchpad.net/glance |
931 | |
932 | === modified file 'debian/patches/sql_conn.patch' |
933 | --- debian/patches/sql_conn.patch 2012-10-19 23:02:14 +0000 |
934 | +++ debian/patches/sql_conn.patch 2013-01-08 00:34:25 +0000 |
935 | @@ -1,8 +1,8 @@ |
936 | -Index: glance-2012.2.1/etc/glance-api.conf |
937 | +Index: glance/etc/glance-api.conf |
938 | =================================================================== |
939 | ---- glance-2012.2.1.orig/etc/glance-api.conf 2012-10-19 12:22:20.857638821 -0700 |
940 | -+++ glance-2012.2.1/etc/glance-api.conf 2012-10-19 12:40:12.729599445 -0700 |
941 | -@@ -46,7 +46,7 @@ |
942 | +--- glance.orig/etc/glance-api.conf 2012-07-24 20:49:24.649816988 -0700 |
943 | ++++ glance/etc/glance-api.conf 2012-07-24 20:52:03.309810007 -0700 |
944 | +@@ -35,7 +35,7 @@ |
945 | # SQLAlchemy connection string for the reference implementation |
946 | # registry server. Any valid SQLAlchemy connection string is fine. |
947 | # See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine |
948 | @@ -11,11 +11,11 @@ |
949 | |
950 | # Period in seconds after which SQLAlchemy should reestablish its connection |
951 | # to the database. |
952 | -Index: glance-2012.2.1/etc/glance-registry.conf |
953 | +Index: glance/etc/glance-registry.conf |
954 | =================================================================== |
955 | ---- glance-2012.2.1.orig/etc/glance-registry.conf 2012-10-19 12:22:20.857638821 -0700 |
956 | -+++ glance-2012.2.1/etc/glance-registry.conf 2012-10-19 12:40:12.733599445 -0700 |
957 | -@@ -25,7 +25,7 @@ |
958 | +--- glance.orig/etc/glance-registry.conf 2012-07-24 20:51:10.497812331 -0700 |
959 | ++++ glance/etc/glance-registry.conf 2012-07-24 20:51:11.301812296 -0700 |
960 | +@@ -21,7 +21,7 @@ |
961 | # SQLAlchemy connection string for the reference implementation |
962 | # registry server. Any valid SQLAlchemy connection string is fine. |
963 | # See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine |
964 | |
965 | === modified file 'glance.egg-info/PKG-INFO' |
966 | --- glance.egg-info/PKG-INFO 2012-06-22 09:18:07 +0000 |
967 | +++ glance.egg-info/PKG-INFO 2013-01-08 00:34:25 +0000 |
968 | @@ -1,6 +1,6 @@ |
969 | Metadata-Version: 1.1 |
970 | Name: glance |
971 | -Version: 2012.2 |
972 | +Version: 2012.2.1 |
973 | Summary: The Glance project provides services for discovering, registering, and retrieving virtual machine images |
974 | Home-page: http://glance.openstack.org/ |
975 | Author: OpenStack |
976 | |
977 | === modified file 'glance.egg-info/requires.txt' |
978 | --- glance.egg-info/requires.txt 2012-09-17 07:44:11 +0000 |
979 | +++ glance.egg-info/requires.txt 2013-01-08 00:34:25 +0000 |
980 | @@ -1,5 +1,5 @@ |
981 | greenlet>=0.3.1 |
982 | -SQLAlchemy>=0.7 |
983 | +SQLAlchemy>=0.7,<=0.7.9 |
984 | anyjson |
985 | eventlet>=0.9.12 |
986 | PasteDeploy |
987 | |
988 | === modified file 'glance/api/v1/images.py' |
989 | --- glance/api/v1/images.py 2012-09-17 07:44:11 +0000 |
990 | +++ glance/api/v1/images.py 2013-01-08 00:34:25 +0000 |
991 | @@ -714,6 +714,14 @@ |
992 | orig_image_meta = self.get_image_meta_or_404(req, id) |
993 | orig_status = orig_image_meta['status'] |
994 | |
995 | + # Do not allow any updates on a deleted image. |
996 | + # Fix for LP Bug #1060930 |
997 | + if orig_status == 'deleted': |
998 | + msg = _("Forbidden to update deleted image.") |
999 | + raise HTTPForbidden(explanation=msg, |
1000 | + request=req, |
1001 | + content_type="text/plain") |
1002 | + |
1003 | # The default behaviour for a PUT /images/<IMAGE_ID> is to |
1004 | # override any properties that were previously set. This, however, |
1005 | # leads to a number of issues for the common use case where a caller |
1006 | @@ -821,22 +829,34 @@ |
1007 | request=req, |
1008 | content_type="text/plain") |
1009 | |
1010 | - status = 'deleted' |
1011 | + if image['status'] == 'deleted': |
1012 | + msg = _("Forbidden to delete a deleted image.") |
1013 | + LOG.debug(msg) |
1014 | + raise HTTPForbidden(explanation=msg, request=req, |
1015 | + content_type="text/plain") |
1016 | + |
1017 | + if image['location'] and CONF.delayed_delete: |
1018 | + status = 'pending_delete' |
1019 | + else: |
1020 | + status = 'deleted' |
1021 | + |
1022 | try: |
1023 | + # Delete the image from the registry first, since we rely on it |
1024 | + # for authorization checks. |
1025 | + # See https://bugs.launchpad.net/glance/+bug/1065187 |
1026 | + registry.update_image_metadata(req.context, id, {'status': status}) |
1027 | + registry.delete_image_metadata(req.context, id) |
1028 | + |
1029 | # The image's location field may be None in the case |
1030 | # of a saving or queued image, therefore don't ask a backend |
1031 | # to delete the image if the backend doesn't yet store it. |
1032 | # See https://bugs.launchpad.net/glance/+bug/747799 |
1033 | if image['location']: |
1034 | if CONF.delayed_delete: |
1035 | - status = 'pending_delete' |
1036 | schedule_delayed_delete_from_backend(image['location'], id) |
1037 | else: |
1038 | safe_delete_from_backend(image['location'], |
1039 | req.context, id) |
1040 | - |
1041 | - registry.update_image_metadata(req.context, id, {'status': status}) |
1042 | - registry.delete_image_metadata(req.context, id) |
1043 | except exception.NotFound, e: |
1044 | msg = ("Failed to find image to delete: %(e)s" % locals()) |
1045 | for line in msg.split('\n'): |
1046 | |
1047 | === modified file 'glance/api/v2/images.py' |
1048 | --- glance/api/v2/images.py 2012-09-17 07:44:11 +0000 |
1049 | +++ glance/api/v2/images.py 2013-01-08 00:34:25 +0000 |
1050 | @@ -142,9 +142,12 @@ |
1051 | |
1052 | def _get_image(self, context, image_id): |
1053 | try: |
1054 | - return self.db_api.image_get(context, image_id) |
1055 | + image = self.db_api.image_get(context, image_id) |
1056 | + if image['deleted']: |
1057 | + raise exception.NotFound() |
1058 | except (exception.NotFound, exception.Forbidden): |
1059 | raise webob.exc.HTTPNotFound() |
1060 | + return image |
1061 | |
1062 | def show(self, req, image_id): |
1063 | self._enforce(req, 'get_image') |
1064 | @@ -158,6 +161,8 @@ |
1065 | context = req.context |
1066 | try: |
1067 | image = self.db_api.image_get(context, image_id) |
1068 | + if image['deleted']: |
1069 | + raise exception.NotFound() |
1070 | except (exception.NotFound, exception.Forbidden): |
1071 | msg = ("Failed to find image %(image_id)s to update" % locals()) |
1072 | LOG.info(msg) |
1073 | @@ -268,19 +273,22 @@ |
1074 | % locals()) |
1075 | raise webob.exc.HTTPForbidden(explanation=msg) |
1076 | |
1077 | - status = 'deleted' |
1078 | - if image['location']: |
1079 | - if CONF.delayed_delete: |
1080 | - status = 'pending_delete' |
1081 | - self.store_api.schedule_delayed_delete_from_backend( |
1082 | - image['location'], id) |
1083 | - else: |
1084 | - self.store_api.safe_delete_from_backend(image['location'], |
1085 | - req.context, id) |
1086 | + if image['location'] and CONF.delayed_delete: |
1087 | + status = 'pending_delete' |
1088 | + else: |
1089 | + status = 'deleted' |
1090 | |
1091 | try: |
1092 | self.db_api.image_update(req.context, image_id, {'status': status}) |
1093 | self.db_api.image_destroy(req.context, image_id) |
1094 | + |
1095 | + if image['location']: |
1096 | + if CONF.delayed_delete: |
1097 | + self.store_api.schedule_delayed_delete_from_backend( |
1098 | + image['location'], id) |
1099 | + else: |
1100 | + self.store_api.safe_delete_from_backend(image['location'], |
1101 | + req.context, id) |
1102 | except (exception.NotFound, exception.Forbidden): |
1103 | msg = ("Failed to find image %(image_id)s to delete" % locals()) |
1104 | LOG.info(msg) |
1105 | |
1106 | === modified file 'glance/common/utils.py' |
1107 | --- glance/common/utils.py 2012-09-07 12:17:46 +0000 |
1108 | +++ glance/common/utils.py 2013-01-08 00:34:25 +0000 |
1109 | @@ -118,9 +118,26 @@ |
1110 | :param fd: Underlying image file object |
1111 | """ |
1112 | self.fd = fd |
1113 | + self.iterator = None |
1114 | + # NOTE(markwash): if the underlying supports read(), overwrite the |
1115 | + # default iterator-based implementation with cooperative_read which |
1116 | + # is more straightforward |
1117 | if hasattr(fd, 'read'): |
1118 | self.read = cooperative_read(fd) |
1119 | |
1120 | + def read(self, length=None): |
1121 | + """Return the next chunk of the underlying iterator. |
1122 | + |
1123 | + This is replaced with cooperative_read in __init__ if the underlying |
1124 | + fd already supports read(). |
1125 | + """ |
1126 | + if self.iterator is None: |
1127 | + self.iterator = self.__iter__() |
1128 | + try: |
1129 | + return self.iterator.next() |
1130 | + except StopIteration: |
1131 | + return '' |
1132 | + |
1133 | def __iter__(self): |
1134 | return cooperative_iter(self.fd.__iter__()) |
1135 | |
1136 | |
1137 | === modified file 'glance/openstack/common/setup.py' |
1138 | --- glance/openstack/common/setup.py 2012-09-17 07:44:11 +0000 |
1139 | +++ glance/openstack/common/setup.py 2013-01-08 00:34:25 +0000 |
1140 | @@ -135,15 +135,16 @@ |
1141 | _run_shell_command("git fetch origin +refs/meta/*:refs/remotes/meta/*") |
1142 | milestone_cmd = "git show meta/openstack/release:%s" % branch_name |
1143 | milestonever = _run_shell_command(milestone_cmd) |
1144 | - if not milestonever: |
1145 | - milestonever = "" |
1146 | + if milestonever: |
1147 | + first_half = "%s~%s" % (milestonever, datestamp) |
1148 | + else: |
1149 | + first_half = datestamp |
1150 | post_version = _get_git_post_version() |
1151 | # post version should look like: |
1152 | # 0.1.1.4.gcc9e28a |
1153 | # where the bit after the last . is the short sha, and the bit between |
1154 | # the last and second to last is the revno count |
1155 | (revno, sha) = post_version.split(".")[-2:] |
1156 | - first_half = "%s~%s" % (milestonever, datestamp) |
1157 | second_half = "%s%s.%s" % (revno_prefix, revno, sha) |
1158 | return ".".join((first_half, second_half)) |
1159 | |
1160 | |
1161 | === modified file 'glance/store/rbd.py' |
1162 | --- glance/store/rbd.py 2012-08-16 13:58:32 +0000 |
1163 | +++ glance/store/rbd.py 2013-01-08 00:34:25 +0000 |
1164 | @@ -69,6 +69,9 @@ |
1165 | """ |
1166 | |
1167 | def process_specs(self): |
1168 | + # convert to ascii since librbd doesn't handle unicode |
1169 | + for key, value in self.specs.iteritems(): |
1170 | + self.specs[key] = str(value) |
1171 | self.fsid = self.specs.get('fsid') |
1172 | self.pool = self.specs.get('pool') |
1173 | self.image = self.specs.get('image') |
1174 | @@ -92,7 +95,14 @@ |
1175 | reason = _('URI must start with rbd://') |
1176 | LOG.error(_("Invalid URI: %(uri)s: %(reason)s") % locals()) |
1177 | raise exception.BadStoreUri(message=reason) |
1178 | - pieces = uri[len(prefix):].split('/') |
1179 | + # convert to ascii since librbd doesn't handle unicode |
1180 | + try: |
1181 | + ascii_uri = str(uri) |
1182 | + except UnicodeError: |
1183 | + reason = _('URI contains non-ascii characters') |
1184 | + LOG.error(_("Invalid URI: %(uri)s: %(reason)s") % locals()) |
1185 | + raise exception.BadStoreUri(message=reason) |
1186 | + pieces = ascii_uri[len(prefix):].split('/') |
1187 | if len(pieces) == 1: |
1188 | self.fsid, self.pool, self.image, self.snapshot = \ |
1189 | (None, None, pieces[0], None) |
1190 | |
1191 | === modified file 'glance/tests/functional/v2/test_images.py' |
1192 | --- glance/tests/functional/v2/test_images.py 2012-09-26 12:32:50 +0000 |
1193 | +++ glance/tests/functional/v2/test_images.py 2013-01-08 00:34:25 +0000 |
1194 | @@ -222,6 +222,12 @@ |
1195 | self.assertEqual(201, response.status_code) |
1196 | image_id = json.loads(response.text)['id'] |
1197 | |
1198 | + # Upload some image data |
1199 | + path = self._url('/v2/images/%s/file' % image_id) |
1200 | + headers = self._headers({'Content-Type': 'application/octet-stream'}) |
1201 | + response = requests.put(path, headers=headers, data='ZZZZZ') |
1202 | + self.assertEqual(201, response.status_code) |
1203 | + |
1204 | # TENANT1 should see the image in their list |
1205 | path = self._url('/v2/images') |
1206 | response = requests.get(path, headers=self._headers()) |
1207 | @@ -304,6 +310,12 @@ |
1208 | response = requests.delete(path, headers=headers) |
1209 | self.assertEqual(404, response.status_code) |
1210 | |
1211 | + # Image data should still be present after the failed delete |
1212 | + path = self._url('/v2/images/%s/file' % image_id) |
1213 | + response = requests.get(path, headers=self._headers()) |
1214 | + self.assertEqual(200, response.status_code) |
1215 | + self.assertEqual(response.text, 'ZZZZZ') |
1216 | + |
1217 | self.stop_servers() |
1218 | |
1219 | def test_tag_lifecycle(self): |
1220 | |
1221 | === modified file 'glance/tests/stubs.py' |
1222 | --- glance/tests/stubs.py 2012-09-07 12:17:46 +0000 |
1223 | +++ glance/tests/stubs.py 2013-01-08 00:34:25 +0000 |
1224 | @@ -60,7 +60,13 @@ |
1225 | |
1226 | def getresponse(self): |
1227 | mapper = routes.Mapper() |
1228 | - api = context.UnauthenticatedContextMiddleware(rserver.API(mapper)) |
1229 | + server = rserver.API(mapper) |
1230 | + # NOTE(markwash): we need to pass through context auth information if |
1231 | + # we have it. |
1232 | + if 'X-Auth-Token' in self.req.headers: |
1233 | + api = utils.FakeAuthMiddleware(server) |
1234 | + else: |
1235 | + api = context.UnauthenticatedContextMiddleware(server) |
1236 | webob_res = self.req.get_response(api) |
1237 | |
1238 | return utils.FakeHTTPResponse(status=webob_res.status_int, |
1239 | |
1240 | === modified file 'glance/tests/unit/test_clients.py' |
1241 | --- glance/tests/unit/test_clients.py 2012-09-17 07:44:11 +0000 |
1242 | +++ glance/tests/unit/test_clients.py 2013-01-08 00:34:25 +0000 |
1243 | @@ -39,7 +39,7 @@ |
1244 | UUID2 = _gen_uuid() |
1245 | |
1246 | #NOTE(bcwaldon): needed to init config_dir cli opt |
1247 | -config.parse_args() |
1248 | +config.parse_args(args=[]) |
1249 | |
1250 | |
1251 | class TestBadClients(test_utils.BaseTestCase): |
1252 | |
1253 | === modified file 'glance/tests/unit/test_store_location.py' |
1254 | --- glance/tests/unit/test_store_location.py 2012-08-16 13:58:32 +0000 |
1255 | +++ glance/tests/unit/test_store_location.py 2013-01-08 00:34:25 +0000 |
1256 | @@ -290,6 +290,15 @@ |
1257 | self.assertEqual(None, loc.pool) |
1258 | self.assertEqual(None, loc.snapshot) |
1259 | |
1260 | + uri = u'rbd://imagename' |
1261 | + loc = glance.store.rbd.StoreLocation({}) |
1262 | + loc.parse_uri(uri) |
1263 | + |
1264 | + self.assertEqual('imagename', loc.image) |
1265 | + self.assertEqual(None, loc.fsid) |
1266 | + self.assertEqual(None, loc.pool) |
1267 | + self.assertEqual(None, loc.snapshot) |
1268 | + |
1269 | uri = 'rbd://fsid/pool/image/snap' |
1270 | loc = glance.store.rbd.StoreLocation({}) |
1271 | loc.parse_uri(uri) |
1272 | @@ -299,6 +308,15 @@ |
1273 | self.assertEqual('pool', loc.pool) |
1274 | self.assertEqual('snap', loc.snapshot) |
1275 | |
1276 | + uri = u'rbd://fsid/pool/image/snap' |
1277 | + loc = glance.store.rbd.StoreLocation({}) |
1278 | + loc.parse_uri(uri) |
1279 | + |
1280 | + self.assertEqual('image', loc.image) |
1281 | + self.assertEqual('fsid', loc.fsid) |
1282 | + self.assertEqual('pool', loc.pool) |
1283 | + self.assertEqual('snap', loc.snapshot) |
1284 | + |
1285 | uri = 'rbd://%2f/%2f/%2f/%2f' |
1286 | loc = glance.store.rbd.StoreLocation({}) |
1287 | loc.parse_uri(uri) |
1288 | @@ -308,6 +326,15 @@ |
1289 | self.assertEqual('/', loc.pool) |
1290 | self.assertEqual('/', loc.snapshot) |
1291 | |
1292 | + uri = u'rbd://%2f/%2f/%2f/%2f' |
1293 | + loc = glance.store.rbd.StoreLocation({}) |
1294 | + loc.parse_uri(uri) |
1295 | + |
1296 | + self.assertEqual('/', loc.image) |
1297 | + self.assertEqual('/', loc.fsid) |
1298 | + self.assertEqual('/', loc.pool) |
1299 | + self.assertEqual('/', loc.snapshot) |
1300 | + |
1301 | bad_uri = 'rbd:/image' |
1302 | self.assertRaises(exception.BadStoreUri, loc.parse_uri, bad_uri) |
1303 | |
1304 | @@ -332,6 +359,9 @@ |
1305 | bad_uri = 'http://///' |
1306 | self.assertRaises(exception.BadStoreUri, loc.parse_uri, bad_uri) |
1307 | |
1308 | + bad_uri = 'rbd://' + unichr(300) |
1309 | + self.assertRaises(exception.BadStoreUri, loc.parse_uri, bad_uri) |
1310 | + |
1311 | def test_get_store_from_scheme(self): |
1312 | """ |
1313 | Test that the backend returned by glance.store.get_backend_class |
1314 | |
1315 | === modified file 'glance/tests/unit/test_utils.py' |
1316 | --- glance/tests/unit/test_utils.py 2012-09-07 12:17:46 +0000 |
1317 | +++ glance/tests/unit/test_utils.py 2013-01-08 00:34:25 +0000 |
1318 | @@ -73,6 +73,17 @@ |
1319 | |
1320 | self.assertEquals(bytes_read, BYTES) |
1321 | |
1322 | + def test_cooperative_reader_of_iterator(self): |
1323 | + """Ensure cooperative reader supports iterator backends too""" |
1324 | + reader = utils.CooperativeReader([l * 3 for l in 'abcdefgh']) |
1325 | + chunks = [] |
1326 | + while True: |
1327 | + chunks.append(reader.read(3)) |
1328 | + if chunks[-1] == '': |
1329 | + break |
1330 | + meat = ''.join(chunks) |
1331 | + self.assertEqual(meat, 'aaabbbcccdddeeefffggghhh') |
1332 | + |
1333 | def test_limiting_reader(self): |
1334 | """Ensure limiting reader class accesses all bytes of file""" |
1335 | BYTES = 1024 |
1336 | |
1337 | === modified file 'glance/tests/unit/v1/test_api.py' |
1338 | --- glance/tests/unit/v1/test_api.py 2012-09-17 07:44:11 +0000 |
1339 | +++ glance/tests/unit/v1/test_api.py 2013-01-08 00:34:25 +0000 |
1340 | @@ -103,7 +103,8 @@ |
1341 | """Establish a clean test environment""" |
1342 | super(TestRegistryAPI, self).setUp() |
1343 | self.mapper = routes.Mapper() |
1344 | - self.api = test_utils.FakeAuthMiddleware(rserver.API(self.mapper)) |
1345 | + self.api = test_utils.FakeAuthMiddleware(rserver.API(self.mapper), |
1346 | + is_admin=True) |
1347 | self.FIXTURES = [ |
1348 | {'id': UUID1, |
1349 | 'name': 'fake image #1', |
1350 | @@ -197,6 +198,38 @@ |
1351 | res = req.get_response(self.api) |
1352 | self.assertEquals(res.status_int, 404) |
1353 | |
1354 | + def test_show_deleted_image_as_admin(self): |
1355 | + """ |
1356 | + Tests that the /images/<id> registry API endpoint |
1357 | + returns a 200 for deleted image to admin user. |
1358 | + """ |
1359 | + # Delete image #2 |
1360 | + req = webob.Request.blank('/images/%s' % UUID2) |
1361 | + req.method = 'DELETE' |
1362 | + res = req.get_response(self.api) |
1363 | + self.assertEquals(res.status_int, 200) |
1364 | + |
1365 | + req = webob.Request.blank('/images/%s' % UUID2) |
1366 | + res = req.get_response(self.api) |
1367 | + self.assertEquals(res.status_int, 200) |
1368 | + |
1369 | + def test_show_deleted_image_as_nonadmin(self): |
1370 | + """ |
1371 | + Tests that the /images/<id> registry API endpoint |
1372 | + returns a 404 for deleted image to non-admin user. |
1373 | + """ |
1374 | + # Delete image #2 |
1375 | + req = webob.Request.blank('/images/%s' % UUID2) |
1376 | + req.method = 'DELETE' |
1377 | + res = req.get_response(self.api) |
1378 | + self.assertEquals(res.status_int, 200) |
1379 | + |
1380 | + api = test_utils.FakeAuthMiddleware(rserver.API(self.mapper), |
1381 | + is_admin=False) |
1382 | + req = webob.Request.blank('/images/%s' % UUID2) |
1383 | + res = req.get_response(api) |
1384 | + self.assertEquals(res.status_int, 404) |
1385 | + |
1386 | def test_get_root(self): |
1387 | """ |
1388 | Tests that the root registry API returns "index", |
1389 | @@ -2331,6 +2364,36 @@ |
1390 | """Tests delayed activation of image with missing container format""" |
1391 | self._do_test_put_image_content_missing_format('container_format') |
1392 | |
1393 | + def test_update_deleted_image(self): |
1394 | + """Tests that exception raised trying to update a deleted image""" |
1395 | + req = webob.Request.blank("/images/%s" % UUID2) |
1396 | + req.method = 'DELETE' |
1397 | + res = req.get_response(self.api) |
1398 | + self.assertEquals(res.status_int, 200) |
1399 | + |
1400 | + fixture = {'name': 'test_del_img'} |
1401 | + req = webob.Request.blank('/images/%s' % UUID2) |
1402 | + req.method = 'PUT' |
1403 | + req.content_type = 'application/json' |
1404 | + req.body = json.dumps(dict(image=fixture)) |
1405 | + |
1406 | + res = req.get_response(self.api) |
1407 | + self.assertEquals(res.status_int, webob.exc.HTTPForbidden.code) |
1408 | + self.assertTrue('Forbidden to update deleted image' in res.body) |
1409 | + |
1410 | + def test_delete_deleted_image(self): |
1411 | + """Tests that exception raised trying to delete a deleted image""" |
1412 | + req = webob.Request.blank("/images/%s" % UUID2) |
1413 | + req.method = 'DELETE' |
1414 | + res = req.get_response(self.api) |
1415 | + self.assertEquals(res.status_int, 200) |
1416 | + |
1417 | + req = webob.Request.blank("/images/%s" % UUID2) |
1418 | + req.method = 'DELETE' |
1419 | + res = req.get_response(self.api) |
1420 | + self.assertEquals(res.status_int, webob.exc.HTTPForbidden.code) |
1421 | + self.assertTrue('Forbidden to delete a deleted image' in res.body) |
1422 | + |
1423 | def test_register_and_upload(self): |
1424 | """ |
1425 | Test that the process of registering an image with |
1426 | @@ -2929,6 +2992,26 @@ |
1427 | res = req.get_response(self.api) |
1428 | self.assertEquals(res.status_int, webob.exc.HTTPNotFound.code) |
1429 | |
1430 | + def test_delete_not_allowed(self): |
1431 | + # Verify we can get the image data |
1432 | + req = webob.Request.blank("/images/%s" % UUID2) |
1433 | + req.method = 'GET' |
1434 | + req.headers['X-Auth-Token'] = 'user:tenant:' |
1435 | + res = req.get_response(self.api) |
1436 | + self.assertEqual(res.status_int, 200) |
1437 | + self.assertEqual(len(res.body), 19) |
1438 | + |
1439 | + # Verify we cannot delete the image |
1440 | + req.method = 'DELETE' |
1441 | + res = req.get_response(self.api) |
1442 | + self.assertEqual(res.status_int, 403) |
1443 | + |
1444 | + # Verify the image data is still there |
1445 | + req.method = 'GET' |
1446 | + res = req.get_response(self.api) |
1447 | + self.assertEqual(res.status_int, 200) |
1448 | + self.assertEqual(len(res.body), 19) |
1449 | + |
1450 | def test_delete_queued_image(self): |
1451 | """Delete an image in a queued state |
1452 | |
1453 | |
1454 | === modified file 'glance/tests/unit/v2/test_images_resource.py' |
1455 | --- glance/tests/unit/v2/test_images_resource.py 2012-09-17 07:44:11 +0000 |
1456 | +++ glance/tests/unit/v2/test_images_resource.py 2013-01-08 00:34:25 +0000 |
1457 | @@ -108,6 +108,20 @@ |
1458 | expected = set([UUID3]) |
1459 | self.assertEqual(actual, expected) |
1460 | |
1461 | + def test_index_admin(self): |
1462 | + request = unit_test_utils.get_fake_request(is_admin=True) |
1463 | + output = self.controller.index(request) |
1464 | + self.assertEqual(3, len(output['images'])) |
1465 | + |
1466 | + def test_index_admin_deleted_images_hidden(self): |
1467 | + request = unit_test_utils.get_fake_request(is_admin=True) |
1468 | + self.controller.delete(request, UUID1) |
1469 | + output = self.controller.index(request) |
1470 | + self.assertEqual(2, len(output['images'])) |
1471 | + actual = set([image['id'] for image in output['images']]) |
1472 | + expected = set([UUID2, UUID3]) |
1473 | + self.assertEqual(actual, expected) |
1474 | + |
1475 | def test_index_return_parameters(self): |
1476 | self.config(limit_param_default=1, api_limit_max=3) |
1477 | request = unit_test_utils.get_fake_request() |
1478 | @@ -319,6 +333,12 @@ |
1479 | self.assertRaises(webob.exc.HTTPNotFound, |
1480 | self.controller.show, request, image_id) |
1481 | |
1482 | + def test_show_deleted_image_admin(self): |
1483 | + request = unit_test_utils.get_fake_request(is_admin=True) |
1484 | + self.controller.delete(request, UUID1) |
1485 | + self.assertRaises(webob.exc.HTTPNotFound, |
1486 | + self.controller.show, request, UUID1) |
1487 | + |
1488 | def test_create(self): |
1489 | request = unit_test_utils.get_fake_request() |
1490 | image = {'name': 'image-1'} |
1491 | @@ -376,6 +396,12 @@ |
1492 | self.assertRaises(webob.exc.HTTPNotFound, self.controller.update, |
1493 | request, utils.generate_uuid(), changes=[]) |
1494 | |
1495 | + def test_update_deleted_image_admin(self): |
1496 | + request = unit_test_utils.get_fake_request(is_admin=True) |
1497 | + self.controller.delete(request, UUID1) |
1498 | + self.assertRaises(webob.exc.HTTPNotFound, self.controller.update, |
1499 | + request, UUID1, changes=[]) |
1500 | + |
1501 | def test_update_replace_base_attribute(self): |
1502 | self.db.image_update(None, UUID1, {'properties': {'foo': 'bar'}}) |
1503 | request = unit_test_utils.get_fake_request() |
1504 | @@ -608,6 +634,12 @@ |
1505 | self.assertRaises(webob.exc.HTTPNotFound, self.controller.delete, |
1506 | request, utils.generate_uuid()) |
1507 | |
1508 | + def test_delete_already_deleted_image_admin(self): |
1509 | + request = unit_test_utils.get_fake_request(is_admin=True) |
1510 | + self.controller.delete(request, UUID1) |
1511 | + self.assertRaises(webob.exc.HTTPNotFound, |
1512 | + self.controller.delete, request, UUID1) |
1513 | + |
1514 | def test_index_with_invalid_marker(self): |
1515 | fake_uuid = utils.generate_uuid() |
1516 | request = unit_test_utils.get_fake_request() |
1517 | |
1518 | === modified file 'glance/tests/utils.py' |
1519 | --- glance/tests/utils.py 2012-09-07 12:17:46 +0000 |
1520 | +++ glance/tests/utils.py 2013-01-08 00:34:25 +0000 |
1521 | @@ -57,7 +57,7 @@ |
1522 | #NOTE(bcwaldon): parse_args has to be called to register certain |
1523 | # command-line options - specifically we need config_dir for |
1524 | # the following policy tests |
1525 | - config.parse_args() |
1526 | + config.parse_args(args=[]) |
1527 | |
1528 | def tearDown(self): |
1529 | super(BaseTestCase, self).tearDown() |
1530 | @@ -347,7 +347,7 @@ |
1531 | |
1532 | class FakeAuthMiddleware(wsgi.Middleware): |
1533 | |
1534 | - def __init__(self, app, is_admin=True): |
1535 | + def __init__(self, app, is_admin=False): |
1536 | super(FakeAuthMiddleware, self).__init__(app) |
1537 | self.is_admin = is_admin |
1538 | |
1539 | @@ -368,6 +368,7 @@ |
1540 | 'tenant': tenant, |
1541 | 'roles': roles, |
1542 | 'is_admin': self.is_admin, |
1543 | + 'auth_tok': auth_tok, |
1544 | } |
1545 | |
1546 | req.context = context.RequestContext(**kwargs) |
1547 | |
1548 | === modified file 'glance/version.py' |
1549 | --- glance/version.py 2012-08-16 13:58:32 +0000 |
1550 | +++ glance/version.py 2013-01-08 00:34:25 +0000 |
1551 | @@ -17,6 +17,6 @@ |
1552 | |
1553 | from glance.openstack.common import version as common_version |
1554 | |
1555 | -NEXT_VERSION = '2012.2' |
1556 | +NEXT_VERSION = '2012.2.1' |
1557 | version_info = common_version.VersionInfo('glance', |
1558 | pre_version=NEXT_VERSION) |
1559 | |
1560 | === modified file 'glance/versioninfo' |
1561 | --- glance/versioninfo 2012-09-26 12:37:00 +0000 |
1562 | +++ glance/versioninfo 2013-01-08 00:34:25 +0000 |
1563 | @@ -1,1 +1,1 @@ |
1564 | -2012.2~rc3~20120926.r1.ga9f0a4c |
1565 | +2012.2.1 |
1566 | |
1567 | === modified file 'run_tests.sh' |
1568 | --- run_tests.sh 2012-08-16 13:58:32 +0000 |
1569 | +++ run_tests.sh 2013-01-08 00:34:25 +0000 |
1570 | @@ -24,8 +24,9 @@ |
1571 | -N|--no-virtual-env) let always_venv=0; let never_venv=1;; |
1572 | -p|--pep8) let just_pep8=1;; |
1573 | -f|--force) let force=1;; |
1574 | - --unittests-only) noseargs="$noseargs --exclude-dir=glance/tests/functional";; |
1575 | - -c|--coverage) noseargs="$noseargs --with-coverage --cover-package=glance";; |
1576 | + --unittests-only) noseopts="$noseopts --exclude-dir=glance/tests/functional";; |
1577 | + -c|--coverage) noseopts="$noseopts --with-coverage --cover-package=glance";; |
1578 | + -*) noseopts="$noseopts $1";; |
1579 | *) noseargs="$noseargs $1" |
1580 | esac |
1581 | } |
1582 | @@ -35,6 +36,7 @@ |
1583 | always_venv=0 |
1584 | never_venv=0 |
1585 | force=0 |
1586 | +noseopts= |
1587 | noseargs= |
1588 | wrapper="" |
1589 | just_pep8=0 |
1590 | @@ -67,7 +69,7 @@ |
1591 | } |
1592 | |
1593 | |
1594 | -NOSETESTS="nosetests $noseargs" |
1595 | +NOSETESTS="nosetests $noseopts $noseargs" |
1596 | |
1597 | if [ $never_venv -eq 0 ] |
1598 | then |
1599 | |
1600 | === modified file 'tools/pip-requires' |
1601 | --- tools/pip-requires 2012-09-17 07:44:11 +0000 |
1602 | +++ tools/pip-requires 2013-01-08 00:34:25 +0000 |
1603 | @@ -3,7 +3,7 @@ |
1604 | # package to get the right headers... |
1605 | greenlet>=0.3.1 |
1606 | |
1607 | -SQLAlchemy>=0.7 |
1608 | +SQLAlchemy>=0.7,<=0.7.9 |
1609 | anyjson |
1610 | eventlet>=0.9.12 |
1611 | PasteDeploy |