Merge lp:~jaypipes/glance/versioning into lp:~glance-coresec/glance/cactus-trunk

Proposed by Jay Pipes on 2011-01-27
Status: Merged
Merged at revision: 58
Proposed branch: lp:~jaypipes/glance/versioning
Merge into: lp:~glance-coresec/glance/cactus-trunk
Diff against target: 769 lines (+214/-79)
23 files modified
bin/glance-api (+8/-8)
bin/glance-registry (+10/-8)
doc/source/conf.py (+5/-3)
glance/__init__.py (+16/-0)
glance/client.py (+1/-1)
glance/common/__init__.py (+16/-0)
glance/common/db/__init__.py (+2/-1)
glance/common/db/sqlalchemy/__init__.py (+16/-0)
glance/common/db/sqlalchemy/session.py (+1/-0)
glance/registry/db/__init__.py (+2/-1)
glance/registry/db/api.py (+2/-0)
glance/registry/db/sqlalchemy/api.py (+2/-0)
glance/registry/server.py (+1/-1)
glance/version.py (+46/-0)
setup.py (+22/-11)
tests/__init__.py (+16/-0)
tests/stubs.py (+2/-4)
tests/unit/__init__.py (+16/-0)
tests/unit/test_api.py (+7/-11)
tests/unit/test_clients.py (+14/-20)
tests/unit/test_registry_api.py (+6/-6)
tests/unit/test_stores.py (+1/-2)
tools/install_venv.py (+2/-2)
To merge this branch: bzr merge lp:~jaypipes/glance/versioning
Reviewer Review Type Date Requested Status
Rick Harris (community) Approve on 2011-01-30
Vish Ishaya (community) Approve on 2011-01-27
Devin Carlen (community) 2011-01-27 Approve on 2011-01-27
Monty Taylor 2011-01-27 Pending
Review via email: mp+47714@code.launchpad.net

Commit message

Add dynamic versioning to Glance

Description of the change

Glance now has non-static versioning. Pulled in r56 from Bexar trunk and version.py stuff from Nova.

To post a comment you must log in.
Devin Carlen (devcamcar) wrote :

lgtm

review: Approve
Vish Ishaya (vishvananda) wrote :

looks like lots of whitespace fixes too. LGTM, though

review: Approve
Jay Pipes (jaypipes) wrote :

eh, yeah, the whitespace fixes were from the last revision to the Bexar trunk...slipped by me when I created the Cactus trunk this is going into..

Rick Harris (rconradharris) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/glance-api'
2--- bin/glance-api 2011-01-02 02:47:59 +0000
3+++ bin/glance-api 2011-01-27 20:06:13 +0000
4@@ -5,17 +5,17 @@
5 # Administrator of the National Aeronautics and Space Administration.
6 # All Rights Reserved.
7 #
8-# Licensed under the Apache License, Version 2.0 (the "License");
9-# you may not use this file except in compliance with the License.
10-# You may obtain a copy of the License at
11+# Licensed under the Apache License, Version 2.0 (the "License"); you may
12+# not use this file except in compliance with the License. You may obtain
13+# a copy of the License at
14 #
15-# http://www.apache.org/licenses/LICENSE-2.0
16+# http://www.apache.org/licenses/LICENSE-2.0
17 #
18 # Unless required by applicable law or agreed to in writing, software
19-# distributed under the License is distributed on an "AS IS" BASIS,
20-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21-# See the License for the specific language governing permissions and
22-# limitations under the License.
23+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
24+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
25+# License for the specific language governing permissions and limitations
26+# under the License.
27
28 """
29 Glance API Server
30
31=== modified file 'bin/glance-registry'
32--- bin/glance-registry 2011-01-18 21:01:49 +0000
33+++ bin/glance-registry 2011-01-27 20:06:13 +0000
34@@ -3,19 +3,21 @@
35
36 # Copyright 2010 United States Government as represented by the
37 # Administrator of the National Aeronautics and Space Administration.
38+# Copyright 2011 OpenStack LLC.
39 # All Rights Reserved.
40 #
41-# Licensed under the Apache License, Version 2.0 (the "License");
42-# you may not use this file except in compliance with the License.
43-# You may obtain a copy of the License at
44+# Licensed under the Apache License, Version 2.0 (the "License"); you may
45+# not use this file except in compliance with the License. You may obtain
46+# a copy of the License at
47 #
48-# http://www.apache.org/licenses/LICENSE-2.0
49+# http://www.apache.org/licenses/LICENSE-2.0
50 #
51 # Unless required by applicable law or agreed to in writing, software
52-# distributed under the License is distributed on an "AS IS" BASIS,
53-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
54-# See the License for the specific language governing permissions and
55-# limitations under the License.
56+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
57+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
58+# License for the specific language governing permissions and limitations
59+# under the License.
60+
61 """
62 Reference implementation server for Glance Registry
63 """
64
65=== modified file 'doc/source/conf.py'
66--- doc/source/conf.py 2011-01-27 01:17:54 +0000
67+++ doc/source/conf.py 2011-01-27 20:06:13 +0000
68@@ -77,9 +77,11 @@
69 # built documents.
70 #
71 # The short X.Y version.
72-version = '0.1'
73+from glance import version as glance_version
74 # The full version, including alpha/beta/rc tags.
75-release = '0.1.6'
76+release = glance_version.version_string()
77+# The short X.Y version.
78+version = glance_version.canonical_version_string()
79
80 # The language for content autogenerated by Sphinx. Refer to documentation
81 # for a list of supported languages.
82@@ -118,7 +120,7 @@
83 # A list of ignored prefixes for module index sorting.
84 modindex_common_prefix = ['glance.']
85
86-# -- Options for man page output ----------------------------------------------
87+# -- Options for man page output --------------------------------------------
88
89 # Grouping the document tree for man pages.
90 # List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual'
91
92=== modified file 'glance/__init__.py'
93--- glance/__init__.py 2010-09-27 22:43:04 +0000
94+++ glance/__init__.py 2011-01-27 20:06:13 +0000
95@@ -0,0 +1,16 @@
96+# vim: tabstop=4 shiftwidth=4 softtabstop=4
97+
98+# Copyright 2010-2011 OpenStack LLC.
99+# All Rights Reserved.
100+#
101+# Licensed under the Apache License, Version 2.0 (the "License"); you may
102+# not use this file except in compliance with the License. You may obtain
103+# a copy of the License at
104+#
105+# http://www.apache.org/licenses/LICENSE-2.0
106+#
107+# Unless required by applicable law or agreed to in writing, software
108+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
109+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
110+# License for the specific language governing permissions and limitations
111+# under the License.
112
113=== modified file 'glance/client.py'
114--- glance/client.py 2011-01-21 16:35:11 +0000
115+++ glance/client.py 2011-01-27 20:06:13 +0000
116@@ -1,6 +1,6 @@
117 # vim: tabstop=4 shiftwidth=4 softtabstop=4
118
119-# Copyright 2010 OpenStack, LLC
120+# Copyright 2010-2011 OpenStack, LLC
121 # All Rights Reserved.
122 #
123 # Licensed under the Apache License, Version 2.0 (the "License"); you may
124
125=== modified file 'glance/common/__init__.py'
126--- glance/common/__init__.py 2010-09-29 00:20:11 +0000
127+++ glance/common/__init__.py 2011-01-27 20:06:13 +0000
128@@ -0,0 +1,16 @@
129+# vim: tabstop=4 shiftwidth=4 softtabstop=4
130+
131+# Copyright 2010-2011 OpenStack LLC.
132+# All Rights Reserved.
133+#
134+# Licensed under the Apache License, Version 2.0 (the "License"); you may
135+# not use this file except in compliance with the License. You may obtain
136+# a copy of the License at
137+#
138+# http://www.apache.org/licenses/LICENSE-2.0
139+#
140+# Unless required by applicable law or agreed to in writing, software
141+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
142+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
143+# License for the specific language governing permissions and limitations
144+# under the License.
145
146=== modified file 'glance/common/db/__init__.py'
147--- glance/common/db/__init__.py 2010-12-23 19:20:52 +0000
148+++ glance/common/db/__init__.py 2011-01-27 20:06:13 +0000
149@@ -1,8 +1,8 @@
150 # vim: tabstop=4 shiftwidth=4 softtabstop=4
151-# vim: tabstop=4 shiftwidth=4 softtabstop=4
152
153 # Copyright 2010 United States Government as represented by the
154 # Administrator of the National Aeronautics and Space Administration.
155+# Copyright 2010-2011 OpenStack LLC.
156 # All Rights Reserved.
157 #
158 # Licensed under the Apache License, Version 2.0 (the "License"); you may
159@@ -16,6 +16,7 @@
160 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
161 # License for the specific language governing permissions and limitations
162 # under the License.
163+
164 """
165 DB abstraction for Nova and Glance
166 """
167
168=== modified file 'glance/common/db/sqlalchemy/__init__.py'
169--- glance/common/db/sqlalchemy/__init__.py 2010-10-01 19:51:29 +0000
170+++ glance/common/db/sqlalchemy/__init__.py 2011-01-27 20:06:13 +0000
171@@ -0,0 +1,16 @@
172+# vim: tabstop=4 shiftwidth=4 softtabstop=4
173+
174+# Copyright 2010-2011 OpenStack LLC.
175+# All Rights Reserved.
176+#
177+# Licensed under the Apache License, Version 2.0 (the "License"); you may
178+# not use this file except in compliance with the License. You may obtain
179+# a copy of the License at
180+#
181+# http://www.apache.org/licenses/LICENSE-2.0
182+#
183+# Unless required by applicable law or agreed to in writing, software
184+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
185+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
186+# License for the specific language governing permissions and limitations
187+# under the License.
188
189=== modified file 'glance/common/db/sqlalchemy/session.py'
190--- glance/common/db/sqlalchemy/session.py 2010-10-15 05:35:15 +0000
191+++ glance/common/db/sqlalchemy/session.py 2011-01-27 20:06:13 +0000
192@@ -15,6 +15,7 @@
193 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
194 # License for the specific language governing permissions and limitations
195 # under the License.
196+
197 """
198 Session Handling for SQLAlchemy backend
199 """
200
201=== modified file 'glance/registry/db/__init__.py'
202--- glance/registry/db/__init__.py 2010-12-16 22:04:58 +0000
203+++ glance/registry/db/__init__.py 2011-01-27 20:06:13 +0000
204@@ -1,8 +1,8 @@
205 # vim: tabstop=4 shiftwidth=4 softtabstop=4
206-# vim: tabstop=4 shiftwidth=4 softtabstop=4
207
208 # Copyright 2010 United States Government as represented by the
209 # Administrator of the National Aeronautics and Space Administration.
210+# Copyright 2010-2011 OpenStack LLC.
211 # All Rights Reserved.
212 #
213 # Licensed under the Apache License, Version 2.0 (the "License"); you may
214@@ -16,6 +16,7 @@
215 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
216 # License for the specific language governing permissions and limitations
217 # under the License.
218+
219 """
220 DB abstraction for Nova and Glance
221 """
222
223=== modified file 'glance/registry/db/api.py'
224--- glance/registry/db/api.py 2010-12-14 02:23:42 +0000
225+++ glance/registry/db/api.py 2011-01-27 20:06:13 +0000
226@@ -2,6 +2,7 @@
227
228 # Copyright 2010 United States Government as represented by the
229 # Administrator of the National Aeronautics and Space Administration.
230+# Copyright 2010-2011 OpenStack LLC.
231 # All Rights Reserved.
232 #
233 # Licensed under the Apache License, Version 2.0 (the "License"); you may
234@@ -15,6 +16,7 @@
235 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
236 # License for the specific language governing permissions and limitations
237 # under the License.
238+
239 """
240 Defines interface for DB access
241 """
242
243=== modified file 'glance/registry/db/sqlalchemy/api.py'
244--- glance/registry/db/sqlalchemy/api.py 2011-01-22 19:15:55 +0000
245+++ glance/registry/db/sqlalchemy/api.py 2011-01-27 20:06:13 +0000
246@@ -2,6 +2,7 @@
247
248 # Copyright 2010 United States Government as represented by the
249 # Administrator of the National Aeronautics and Space Administration.
250+# Copyright 2011 OpenStack LLC.
251 # All Rights Reserved.
252 #
253 # Licensed under the Apache License, Version 2.0 (the "License"); you may
254@@ -15,6 +16,7 @@
255 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
256 # License for the specific language governing permissions and limitations
257 # under the License.
258+
259 """
260 Implementation of SQLAlchemy backend
261 """
262
263=== modified file 'glance/registry/server.py'
264--- glance/registry/server.py 2011-01-05 00:06:31 +0000
265+++ glance/registry/server.py 2011-01-27 20:06:13 +0000
266@@ -1,6 +1,6 @@
267 # vim: tabstop=4 shiftwidth=4 softtabstop=4
268
269-# Copyright 2010 OpenStack LLC.
270+# Copyright 2010-2011 OpenStack LLC.
271 # All Rights Reserved.
272 #
273 # Licensed under the Apache License, Version 2.0 (the "License"); you may
274
275=== added file 'glance/version.py'
276--- glance/version.py 1970-01-01 00:00:00 +0000
277+++ glance/version.py 2011-01-27 20:06:13 +0000
278@@ -0,0 +1,46 @@
279+# vim: tabstop=4 shiftwidth=4 softtabstop=4
280+
281+# Copyright 2011 OpenStack LLC
282+#
283+# Licensed under the Apache License, Version 2.0 (the "License"); you may
284+# not use this file except in compliance with the License. You may obtain
285+# a copy of the License at
286+#
287+# http://www.apache.org/licenses/LICENSE-2.0
288+#
289+# Unless required by applicable law or agreed to in writing, software
290+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
291+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
292+# License for the specific language governing permissions and limitations
293+# under the License.
294+
295+try:
296+ from glance.vcsversion import version_info
297+except ImportError:
298+ version_info = {'branch_nick': u'LOCALBRANCH',
299+ 'revision_id': 'LOCALREVISION',
300+ 'revno': 0}
301+
302+GLANCE_VERSION = ['2011', '2']
303+YEAR, COUNT = GLANCE_VERSION
304+
305+FINAL = False # This becomes true at Release Candidate time
306+
307+
308+def canonical_version_string():
309+ return '.'.join([YEAR, COUNT])
310+
311+
312+def version_string():
313+ if FINAL:
314+ return canonical_version_string()
315+ else:
316+ return '%s-dev' % (canonical_version_string(),)
317+
318+
319+def vcs_version_string():
320+ return "%s:%s" % (version_info['branch_nick'], version_info['revision_id'])
321+
322+
323+def version_string_with_vcs():
324+ return "%s-%s" % (canonical_version_string(), vcs_version_string())
325
326=== modified file 'setup.py'
327--- setup.py 2011-01-27 01:17:54 +0000
328+++ setup.py 2011-01-27 20:06:13 +0000
329@@ -20,6 +20,16 @@
330 from setuptools import setup, find_packages
331 from setuptools.command.sdist import sdist
332
333+from glance import version
334+
335+
336+if os.path.isdir('.bzr'):
337+ with open("glance/vcsversion.py", 'w') as version_file:
338+ vcs_cmd = subprocess.Popen(["bzr", "version-info", "--python"],
339+ stdout=subprocess.PIPE)
340+ vcsversion = vcs_cmd.communicate()[0]
341+ version_file.write(vcsversion)
342+
343
344 class local_sdist(sdist):
345 """Customized sdist hook - builds the ChangeLog file from VC first"""
346@@ -37,8 +47,12 @@
347
348 cmdclass = {'sdist': local_sdist}
349
350+# If Sphinx is installed on the box running setup.py,
351+# enable setup.py to build the documentation, otherwise,
352+# just ignore it
353 try:
354 from sphinx.setup_command import BuildDoc
355+
356 class local_BuildDoc(BuildDoc):
357 def run(self):
358 for builder in ['html', 'man']:
359@@ -51,21 +65,19 @@
360 pass
361
362
363-name = 'glance'
364-version = '0.1.6'
365-
366-
367 setup(
368- name=name,
369- version=version,
370- description='Glance',
371+ name='glance',
372+ version=version.canonical_version_string(),
373+ description='The Glance project provides services for discovering, '
374+ 'registering, and retrieving virtual machine images',
375 license='Apache License (2.0)',
376- author='OpenStack, LLC.',
377- author_email='openstack-admins@lists.launchpad.net',
378- url='https://launchpad.net/glance',
379+ author='OpenStack',
380+ author_email='openstack@lists.launchpad.net',
381+ url='http://glance.openstack.org/',
382 packages=find_packages(exclude=['tests', 'bin']),
383 test_suite='nose.collector',
384 cmdclass=cmdclass,
385+ include_package_data=True,
386 classifiers=[
387 'Development Status :: 4 - Beta',
388 'License :: OSI Approved :: Apache Software License',
389@@ -73,7 +85,6 @@
390 'Programming Language :: Python :: 2.6',
391 'Environment :: No Input/Output (Daemon)',
392 ],
393- install_requires=[], # removed for better compat
394 scripts=['bin/glance-api',
395 'bin/glance-registry',
396 'bin/glance-upload'])
397
398=== modified file 'tests/__init__.py'
399--- tests/__init__.py 2010-09-27 22:43:04 +0000
400+++ tests/__init__.py 2011-01-27 20:06:13 +0000
401@@ -0,0 +1,16 @@
402+# vim: tabstop=4 shiftwidth=4 softtabstop=4
403+
404+# Copyright 2010-2011 OpenStack LLC.
405+# All Rights Reserved.
406+#
407+# Licensed under the Apache License, Version 2.0 (the "License"); you may
408+# not use this file except in compliance with the License. You may obtain
409+# a copy of the License at
410+#
411+# http://www.apache.org/licenses/LICENSE-2.0
412+#
413+# Unless required by applicable law or agreed to in writing, software
414+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
415+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
416+# License for the specific language governing permissions and limitations
417+# under the License.
418
419=== modified file 'tests/stubs.py'
420--- tests/stubs.py 2011-01-26 16:51:08 +0000
421+++ tests/stubs.py 2011-01-27 20:06:13 +0000
422@@ -1,6 +1,6 @@
423 # vim: tabstop=4 shiftwidth=4 softtabstop=4
424
425-# Copyright 2010 OpenStack, LLC
426+# Copyright 2010-2011 OpenStack, LLC
427 # All Rights Reserved.
428 #
429 # Licensed under the Apache License, Version 2.0 (the "License"); you may
430@@ -136,7 +136,6 @@
431 def chunk_it():
432 for i in xrange(0, len(cls.DATA), cls.CHUNK_SIZE):
433 yield cls.DATA[i:i + cls.CHUNK_SIZE]
434-
435 return chunk_it()
436
437 fake_swift_backend = FakeS3Backend()
438@@ -202,8 +201,7 @@
439 DATA = \
440 {'files': [
441 {'location': 'file:///chunk0', 'size': 12345},
442- {'location': 'file:///chunk1', 'size': 1235}
443- ]}
444+ {'location': 'file:///chunk1', 'size': 1235}]}
445
446 @classmethod
447 def lookup(cls, _parsed_uri):
448
449=== modified file 'tests/unit/__init__.py'
450--- tests/unit/__init__.py 2010-09-27 22:43:04 +0000
451+++ tests/unit/__init__.py 2011-01-27 20:06:13 +0000
452@@ -0,0 +1,16 @@
453+# vim: tabstop=4 shiftwidth=4 softtabstop=4
454+
455+# Copyright 2010-2011 OpenStack LLC.
456+# All Rights Reserved.
457+#
458+# Licensed under the Apache License, Version 2.0 (the "License"); you may
459+# not use this file except in compliance with the License. You may obtain
460+# a copy of the License at
461+#
462+# http://www.apache.org/licenses/LICENSE-2.0
463+#
464+# Unless required by applicable law or agreed to in writing, software
465+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
466+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
467+# License for the specific language governing permissions and limitations
468+# under the License.
469
470=== modified file 'tests/unit/test_api.py'
471--- tests/unit/test_api.py 2011-01-11 17:04:14 +0000
472+++ tests/unit/test_api.py 2011-01-27 20:06:13 +0000
473@@ -1,6 +1,6 @@
474 # vim: tabstop=4 shiftwidth=4 softtabstop=4
475
476-# Copyright 2010 OpenStack, LLC
477+# Copyright 2010-2011 OpenStack, LLC
478 # All Rights Reserved.
479 #
480 # Licensed under the Apache License, Version 2.0 (the "License"); you may
481@@ -88,8 +88,8 @@
482 'name': 'fake image #2',
483 'is_public': True,
484 'type': 'kernel',
485- 'status': 'active'
486- }
487+ 'status': 'active'}
488+
489 req = webob.Request.blank('/images/detail')
490 res = req.get_response(rserver.API())
491 res_dict = json.loads(res.body)
492@@ -105,8 +105,7 @@
493 """Tests that the /images POST registry API creates the image"""
494 fixture = {'name': 'fake public image',
495 'is_public': True,
496- 'type': 'kernel'
497- }
498+ 'type': 'kernel'}
499
500 req = webob.Request.blank('/images')
501
502@@ -134,8 +133,7 @@
503 'name': 'fake public image',
504 'is_public': True,
505 'type': 'kernel',
506- 'status': 'bad status'
507- }
508+ 'status': 'bad status'}
509
510 req = webob.Request.blank('/images')
511
512@@ -151,8 +149,7 @@
513 def test_update_image(self):
514 """Tests that the /images PUT registry API updates the image"""
515 fixture = {'name': 'fake public image #2',
516- 'type': 'ramdisk'
517- }
518+ 'type': 'ramdisk'}
519
520 req = webob.Request.blank('/images/2')
521
522@@ -175,8 +172,7 @@
523 'name': 'fake public image',
524 'is_public': True,
525 'type': 'kernel',
526- 'status': 'bad status'
527- }
528+ 'status': 'bad status'}
529
530 req = webob.Request.blank('/images/3')
531
532
533=== modified file 'tests/unit/test_clients.py'
534--- tests/unit/test_clients.py 2011-01-26 16:51:08 +0000
535+++ tests/unit/test_clients.py 2011-01-27 20:06:13 +0000
536@@ -1,6 +1,6 @@
537 # vim: tabstop=4 shiftwidth=4 softtabstop=4
538
539-# Copyright 2010 OpenStack, LLC
540+# Copyright 2010-2011 OpenStack, LLC
541 # All Rights Reserved.
542 #
543 # Licensed under the Apache License, Version 2.0 (the "License"); you may
544@@ -161,15 +161,13 @@
545 'type': 'kernel',
546 'size': 19,
547 'location': "file:///tmp/glance-tests/2",
548- 'properties': {'distro': 'Ubuntu 10.04 LTS'}
549- }
550+ 'properties': {'distro': 'Ubuntu 10.04 LTS'}}
551 expected = {'name': 'fake public image',
552 'is_public': True,
553 'type': 'kernel',
554 'size': 19,
555 'location': "file:///tmp/glance-tests/2",
556- 'properties': {'distro': 'Ubuntu 10.04 LTS'}
557- }
558+ 'properties': {'distro': 'Ubuntu 10.04 LTS'}}
559
560 new_image = self.client.add_image(fixture)
561
562@@ -216,8 +214,7 @@
563 def test_update_image(self):
564 """Tests that the /images PUT registry API updates the image"""
565 fixture = {'name': 'fake public image #2',
566- 'type': 'ramdisk'
567- }
568+ 'type': 'ramdisk'}
569
570 self.assertTrue(self.client.update_image(2, fixture))
571
572@@ -233,7 +230,7 @@
573 'name': 'fake public image',
574 'is_public': True,
575 'type': 'kernel',
576- 'status': 'bad status'
577+ 'status': 'bad status',
578 }
579
580 self.assertRaises(exception.NotFound,
581@@ -386,9 +383,8 @@
582 """Tests client returns image as queued"""
583 fixture = {'name': 'fake public image',
584 'is_public': True,
585- 'type': 'kernel'
586+ 'type': 'kernel',
587 }
588-
589 image_meta = self.client.add_image(fixture)
590 self.assertEquals('queued', image_meta['status'])
591 self.assertEquals(0, image_meta['size'])
592@@ -401,7 +397,6 @@
593 'size': 19,
594 'location': "file:///tmp/glance-tests/2",
595 }
596-
597 new_image = self.client.add_image(fixture)
598 new_image_id = new_image['id']
599
600@@ -425,16 +420,15 @@
601 'type': 'kernel',
602 'size': 19,
603 'location': "file:///tmp/glance-tests/2",
604- 'properties': {'distro': 'Ubuntu 10.04 LTS'}
605+ 'properties': {'distro': 'Ubuntu 10.04 LTS'},
606 }
607 expected = {'name': 'fake public image',
608 'is_public': True,
609 'type': 'kernel',
610 'size': 19,
611 'location': "file:///tmp/glance-tests/2",
612- 'properties': {'distro': 'Ubuntu 10.04 LTS'}
613+ 'properties': {'distro': 'Ubuntu 10.04 LTS'},
614 }
615-
616 new_image = self.client.add_image(fixture)
617 new_image_id = new_image['id']
618
619@@ -485,7 +479,7 @@
620 'is_public': True,
621 'type': 'kernel',
622 'size': 19,
623- 'properties': {'distro': 'Ubuntu 10.04 LTS'}
624+ 'properties': {'distro': 'Ubuntu 10.04 LTS'},
625 }
626
627 image_data_fixture = r"chunk00000remainder"
628@@ -510,7 +504,7 @@
629 'is_public': True,
630 'type': 'kernel',
631 'size': 19,
632- 'properties': {'distro': 'Ubuntu 10.04 LTS'}
633+ 'properties': {'distro': 'Ubuntu 10.04 LTS'},
634 }
635
636 image_data_fixture = r"chunk00000remainder"
637@@ -546,7 +540,7 @@
638 fixture = {'name': 'fake public image',
639 'is_public': True,
640 'type': 'kernel',
641- 'properties': {'distro': 'Ubuntu 10.04 LTS'}
642+ 'properties': {'distro': 'Ubuntu 10.04 LTS'},
643 }
644
645 image_data_fixture = r"chunk00000remainder"
646@@ -574,7 +568,7 @@
647 'type': 'kernel',
648 'size': 19,
649 'store': 'bad',
650- 'properties': {'distro': 'Ubuntu 10.04 LTS'}
651+ 'properties': {'distro': 'Ubuntu 10.04 LTS'},
652 }
653
654 image_data_fixture = r"chunk00000remainder"
655@@ -587,7 +581,7 @@
656 def test_update_image(self):
657 """Tests that the /images PUT registry API updates the image"""
658 fixture = {'name': 'fake public image #2',
659- 'type': 'ramdisk'
660+ 'type': 'ramdisk',
661 }
662
663 self.assertTrue(self.client.update_image(2, fixture))
664@@ -604,7 +598,7 @@
665 'name': 'fake public image',
666 'is_public': True,
667 'type': 'kernel',
668- 'status': 'bad status'
669+ 'status': 'bad status',
670 }
671
672 self.assertRaises(exception.NotFound,
673
674=== modified file 'tests/unit/test_registry_api.py'
675--- tests/unit/test_registry_api.py 2011-01-11 17:04:14 +0000
676+++ tests/unit/test_registry_api.py 2011-01-27 20:06:13 +0000
677@@ -1,6 +1,6 @@
678 # vim: tabstop=4 shiftwidth=4 softtabstop=4
679
680-# Copyright 2010 OpenStack, LLC
681+# Copyright 2010-2011 OpenStack, LLC
682 # All Rights Reserved.
683 #
684 # Licensed under the Apache License, Version 2.0 (the "License"); you may
685@@ -80,7 +80,7 @@
686 'name': 'fake image #2',
687 'is_public': True,
688 'type': 'kernel',
689- 'status': 'active'
690+ 'status': 'active',
691 }
692 req = webob.Request.blank('/images/detail')
693 res = req.get_response(server.API())
694@@ -97,7 +97,7 @@
695 """Tests that the /images POST registry API creates the image"""
696 fixture = {'name': 'fake public image',
697 'is_public': True,
698- 'type': 'kernel'
699+ 'type': 'kernel',
700 }
701
702 req = webob.Request.blank('/images')
703@@ -126,7 +126,7 @@
704 'name': 'fake public image',
705 'is_public': True,
706 'type': 'kernel',
707- 'status': 'bad status'
708+ 'status': 'bad status',
709 }
710
711 req = webob.Request.blank('/images')
712@@ -143,7 +143,7 @@
713 def test_update_image(self):
714 """Tests that the /images PUT registry API updates the image"""
715 fixture = {'name': 'fake public image #2',
716- 'type': 'ramdisk'
717+ 'type': 'ramdisk',
718 }
719
720 req = webob.Request.blank('/images/2')
721@@ -167,7 +167,7 @@
722 'name': 'fake public image',
723 'is_public': True,
724 'type': 'kernel',
725- 'status': 'bad status'
726+ 'status': 'bad status',
727 }
728
729 req = webob.Request.blank('/images/3')
730
731=== modified file 'tests/unit/test_stores.py'
732--- tests/unit/test_stores.py 2011-01-26 16:51:08 +0000
733+++ tests/unit/test_stores.py 2011-01-27 20:06:13 +0000
734@@ -1,6 +1,6 @@
735 # vim: tabstop=4 shiftwidth=4 softtabstop=4
736
737-# Copyright 2010 OpenStack, LLC
738+# Copyright 2010-2011 OpenStack, LLC
739 # All Rights Reserved.
740 #
741 # Licensed under the Apache License, Version 2.0 (the "License"); you may
742@@ -107,7 +107,6 @@
743
744
745 class TestSwiftBackend(TestBackend):
746-
747 def setUp(self):
748 super(TestSwiftBackend, self).setUp()
749 stubs.stub_out_swift_backend(self.stubs)
750
751=== modified file 'tools/install_venv.py'
752--- tools/install_venv.py 2011-01-20 19:48:11 +0000
753+++ tools/install_venv.py 2011-01-27 20:06:13 +0000
754@@ -4,7 +4,7 @@
755 # Administrator of the National Aeronautics and Space Administration.
756 # All Rights Reserved.
757 #
758-# Copyright 2010 OpenStack, LLC
759+# Copyright 2010 OpenStack LLC.
760 #
761 # Licensed under the Apache License, Version 2.0 (the "License"); you may
762 # not use this file except in compliance with the License. You may obtain
763@@ -33,7 +33,7 @@
764
765
766 def die(message, *args):
767- print >>sys.stderr, message % args
768+ print >> sys.stderr, message % args
769 sys.exit(1)
770
771

Subscribers

People subscribed via source and target branches