Merge lp:~soren/nova/include-test-extensions into lp:~hudson-openstack/nova/trunk
- include-test-extensions
- Merge into trunk
Status: | Superseded | ||||
---|---|---|---|---|---|
Proposed branch: | lp:~soren/nova/include-test-extensions | ||||
Merge into: | lp:~hudson-openstack/nova/trunk | ||||
Diff against target: |
44 lines (+24/-2) 2 files modified
nova/api/openstack/extensions.py (+9/-2) nova/tests/api/openstack/extensions/__init__.py (+15/-0) |
||||
To merge this branch: | bzr merge lp:~soren/nova/include-test-extensions | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jay Pipes (community) | Approve | ||
Sandy Walsh (community) | Approve | ||
Review via email: mp+54869@code.launchpad.net |
This proposal has been superseded by a proposal from 2011-03-28.
Commit message
Toss an __init__ in the test extensions dir. This gets it included in the tarball.
Make extensions code ignore modules whose name starts with '_'.
Description of the change
OpenStack Infra (hudson-openstack) wrote : | # |
The attempt to merge lp:~soren/nova/include-test-extensions into lp:nova failed. Below is the output from the failed tests.
AccountsTest
test_
test_
test_
test_
AdminAPITest
test_
test_
APITest
test_
Test
test_
test_
test_bad_token OK
test_
test_
test_no_user OK
test_
TestFunctional
test_
test_
TestLimiter
test_
LimiterTest
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
ActionExtensionTest
test_
test_
test_
ExtensionContro
test_
test_index ERROR
ExtensionManage
test_
ResourceExtensi
test_
test_
test_
ResponseExtensi
test_
test_
TestFaults
test_
test_raise ...
Soren Hansen (soren) wrote : | # |
:(
OpenStack Infra (hudson-openstack) wrote : | # |
The attempt to merge lp:~soren/nova/include-test-extensions into lp:nova failed. Below is the output from the failed tests.
AccountsTest
test_
test_
test_
test_
AdminAPITest
test_
test_
APITest
test_
Test
test_
test_
test_bad_token OK
test_
test_
test_no_user OK
test_
TestFunctional
test_
test_
TestLimiter
test_
LimiterTest
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
ActionExtensionTest
test_
test_
test_
ExtensionContro
test_
test_index ERROR
ExtensionManage
test_
ResourceExtensi
test_
test_
test_
ResponseExtensi
test_
test_
TestFaults
test_
test_raise ...
OpenStack Infra (hudson-openstack) wrote : | # |
The attempt to merge lp:~soren/nova/include-test-extensions into lp:nova failed. Below is the output from the failed tests.
AccountsTest
test_
test_
test_
test_
AdminAPITest
test_
test_
APITest
test_
Test
test_
test_
test_bad_token OK
test_
test_
test_no_user OK
test_
TestFunctional
test_
test_
TestLimiter
test_
LimiterTest
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
ActionExtensionTest
test_
test_
test_
ExtensionContro
test_
test_index ERROR
ExtensionManage
test_
ResourceExtensi
test_
test_
test_
ResponseExtensi
test_
test_
TestFaults
test_
test_raise ...
Soren Hansen (soren) wrote : | # |
This makes *no* sense to me.
OpenStack Infra (hudson-openstack) wrote : | # |
The attempt to merge lp:~soren/nova/include-test-extensions into lp:nova failed. Below is the output from the failed tests.
AccountsTest
test_
test_
test_
test_
AdminAPITest
test_
test_
APITest
test_
Test
test_
test_
test_bad_token OK
test_
test_
test_no_user OK
test_
TestFunctional
test_
test_
TestLimiter
test_
LimiterTest
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
ActionExtensionTest
test_
test_
test_
ExtensionContro
test_
test_index ERROR
ExtensionManage
test_
ResourceExtensi
test_
test_
test_
ResponseExtensi
test_
test_
TestFaults
test_
test_raise ...
Soren Hansen (soren) wrote : | # |
Stab in the dark: Added contents (license and copyright) to the file. Trying again.
OpenStack Infra (hudson-openstack) wrote : | # |
The attempt to merge lp:~soren/nova/include-test-extensions into lp:nova failed. Below is the output from the failed tests.
AccountsTest
test_
test_
test_
test_
AdminAPITest
test_
test_
APITest
test_
Test
test_
test_
test_bad_token OK
test_
test_
test_no_user OK
test_
TestFunctional
test_
test_
TestLimiter
test_
LimiterTest
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
ActionExtensionTest
test_
test_
test_
ExtensionContro
test_
test_index ERROR
ExtensionManage
test_
ResourceExtensi
test_
test_
test_
ResponseExtensi
test_
test_
TestFaults
test_
test_raise ...
termie (termie) wrote : | # |
neat bug
Soren Hansen (soren) wrote : | # |
Ok, I *swear* I ran the test suite before uploading this. I'm *almost*
sure I even ran it in the right directory.
- 890. By Soren Hansen
-
Add friendlier message if an extension fails to include a correctly named class or factory.
- 891. By Soren Hansen
-
Spell "warn" correctly.
- 892. By Soren Hansen
-
Remove now useless try/except block.
- 893. By Soren Hansen
-
pep8
Unmerged revisions
Preview Diff
1 | === modified file 'nova/api/openstack/extensions.py' | |||
2 | --- nova/api/openstack/extensions.py 2011-03-21 18:00:39 +0000 | |||
3 | +++ nova/api/openstack/extensions.py 2011-03-28 13:26:08 +0000 | |||
4 | @@ -317,11 +317,18 @@ | |||
5 | 317 | LOG.audit(_('Loading extension file: %s'), f) | 317 | LOG.audit(_('Loading extension file: %s'), f) |
6 | 318 | mod_name, file_ext = os.path.splitext(os.path.split(f)[-1]) | 318 | mod_name, file_ext = os.path.splitext(os.path.split(f)[-1]) |
7 | 319 | ext_path = os.path.join(self.path, f) | 319 | ext_path = os.path.join(self.path, f) |
9 | 320 | if file_ext.lower() == '.py': | 320 | if file_ext.lower() == '.py' and not mod_name.startswith('_'): |
10 | 321 | mod = imp.load_source(mod_name, ext_path) | 321 | mod = imp.load_source(mod_name, ext_path) |
11 | 322 | ext_name = mod_name[0].upper() + mod_name[1:] | 322 | ext_name = mod_name[0].upper() + mod_name[1:] |
12 | 323 | try: | 323 | try: |
14 | 324 | new_ext = getattr(mod, ext_name)() | 324 | new_ext_class = getattr(mod, ext_name, None) |
15 | 325 | if not new_ext_class: | ||
16 | 326 | LOG.warning(_('Did not find expected name ' | ||
17 | 327 | '"%(ext_name)" in %(file)s'), | ||
18 | 328 | { 'ext_name': ext_name, | ||
19 | 329 | 'file': ext_path }) | ||
20 | 330 | continue | ||
21 | 331 | new_ext = new_ext_class() | ||
22 | 325 | self._check_extension(new_ext) | 332 | self._check_extension(new_ext) |
23 | 326 | self.extensions[new_ext.get_alias()] = new_ext | 333 | self.extensions[new_ext.get_alias()] = new_ext |
24 | 327 | except AttributeError as ex: | 334 | except AttributeError as ex: |
25 | 328 | 335 | ||
26 | === added file 'nova/tests/api/openstack/extensions/__init__.py' | |||
27 | --- nova/tests/api/openstack/extensions/__init__.py 1970-01-01 00:00:00 +0000 | |||
28 | +++ nova/tests/api/openstack/extensions/__init__.py 2011-03-28 13:26:08 +0000 | |||
29 | @@ -0,0 +1,15 @@ | |||
30 | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 | ||
31 | 2 | |||
32 | 3 | # Copyright 2011 OpenStack LLC | ||
33 | 4 | # | ||
34 | 5 | # Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
35 | 6 | # not use this file except in compliance with the License. You may obtain | ||
36 | 7 | # a copy of the License at | ||
37 | 8 | # | ||
38 | 9 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
39 | 10 | # | ||
40 | 11 | # Unless required by applicable law or agreed to in writing, software | ||
41 | 12 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
42 | 13 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
43 | 14 | # License for the specific language governing permissions and limitations | ||
44 | 15 | # under the License. |
sure