Merge lp:~anso/nova/paste into lp:~hudson-openstack/nova/trunk
Proposed by
Todd Willey
Status: | Merged |
---|---|
Approved by: | Todd Willey |
Approved revision: | 480 |
Merged at revision: | 513 |
Proposed branch: | lp:~anso/nova/paste |
Merge into: | lp:~hudson-openstack/nova/trunk |
Diff against target: |
359 lines (+265/-5) 8 files modified
bin/nova-api-paste (+109/-0) etc/nova-api.conf (+63/-0) nova/api/ec2/__init__.py (+53/-2) nova/api/ec2/metadatarequesthandler.py (+4/-0) nova/api/openstack/__init__.py (+21/-2) nova/api/openstack/auth.py (+6/-0) nova/api/openstack/ratelimiting/__init__.py (+6/-0) tools/pip-requires (+3/-1) |
To merge this branch: | bzr merge lp:~anso/nova/paste |
Related bugs: | |
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Devin Carlen (community) | Approve | ||
Jay Pipes (community) | Approve | ||
Review via email: mp+44813@code.launchpad.net |
Description of the change
Uses paste.deploy to make application running configurable. This includes the ability to swap out middlewares, define new endpoints, and generally move away from having code to build wsgi routers and middleware chains into a configurable, extensible method for running wsgi servers.
To post a comment you must log in.
Hi Todd!
Good direction and starting point :) Here are some notes...
1) pep8 will fail
I can see a number of things that will fail pep8 checks, so before going further, you may want to do:
pep8 --repeat bin/* nova
and fix all the warnings/errors reported
2) i18n'ing
You will need to do:
gettext. install( 'nova', unicode=1)
*before* importing wsgi/flags from nova. The reason is because gettext.install() places the _() method into the builtins namespace. If nova.wsgi or nova.flags has any text strings that are surrounded by _(), then this will result in an error.
In addition, please wrap all text strings that could be output to a user with the _() function.
For instance, here:
71 + LOG.debug("Paste config at %s has no secion for known apis", paste_config)
72 + print "Paste config at %s has no secion for any known apis" % paste_config
the strings should be wrapped in _()...
3)
This code could be simplified/made clearer:
86 + ip = config.get('host', None) get("%s_ host" % api, None) or ip or '0.0.0.0'
...
91 + host = config.
to:
ip = config.get('host', '0.0.0.0') get("%s_ host" % api, ip)
...
host = config.
Cheers!
jay