The i18n team has decided not to translate the logs because it seems
like it not very useful; operators prefer to have them in English so
that they can search for those strings on the internet.
Since we have removed log translations completely, we should add hacking
rule to prevent future mistakes.
Change-Id: Ia7524308ef2675f8d41ac80b37dfc7e3787efd90
1.As mentioned in [1], we should avoid using six.iteritems to achieve
iterators. We can use dict.items instead, as it will return iterators
in PY3 as well. And dict.items/keys will more readable.
2.In py2, the performance about list should be negligible, see the
link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html
Change-Id: Ib7ad61bac89e14561719434085b63cbad7e9a9be
Using oslo.service requires the WSGI server class to implement
oslo_service.service.ServiceBase. ec2api.wsgi.Server already implemented
the interface thus defined but lacked the correct parent class.
Change-Id: Iecd2721830821ef75a321fa800d2bbd85b3ce1e1
Closes-Bug: #1562860
This rule has been updated in hacking v0.10.0 to prevent usage of
self.__dict__ in formatting operations. Since global requirements
require >= v0.10.2 of hacking for Liberty, ec2api has to follow this
extended rule.
Change-Id: I9110ed47a9a38fe351c74db27bd6b4bbb8389da4
Separate ancestors of ec2api internal and aws compliant exceptions.
EC2APIException - base exception class for ec2api with formatting
support
EC2MetadataException - still covers internal exception of ec2api
metadata service
EC2Exception - still covers AWS compliant exceptions
EC2xxxException - derive EC2Exception and are intended to group
exceptions by kind
Also remove unused attributes and code from base exception class.
Fix string constant style to be 'xxx' wherever it's possible.
Change-Id: I398c1e8e1816e0d4073fa5d3fdf0c0a939470399
This code introduces standalone service which proxies its calls to
existing nova EC2-API.
All the code here except for the ec2api/api/proxy.py,
ec2api/api/ec2client.py and some util functions is taken from current
nova and unused functionality is cut of it.
The proxy.py and ec2client.py files implement the new code which
proxies incoming request (on port 8788) to original EC2 API in nova
on port 8773.
The result is transparently translated back to user.
Change-Id: I4cb84f833d7d4f0e379672710ed39562811d43e0