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