Fix i18n support for apiclient

There are some messages in apiclient which don't support i18n,
this patch must fixed them.

Change-Id: I9247d3d765da7242b4df29b0a7b1f7ff6eee0cdd
Closes-Bug: #1275665
Partial fix of test_strutils.py on Python 3

StringToBytesTest does not work on Python 3 because it uses testscenarios which
does not work in nosetests, see the bug:
https://bugs.launchpad.net/testscenarios/+bug/872887

Because of this bug, the test_strutils.py is not enabled yet for py33 in
tox.ini.

Change-Id: Ie3a7742dfd802f21c6c7420e3b894122e1dca295
Add a warning to not use get_table for working with ForeignKeys

The get_table utility loads a single table with a unique MetaData object
each time it's called but sqlalchemy needs the MetaData object to hold
information about both tables in the ForeignKey constraint so it
shouldn't be used when creating those types of constraints.  This patch
adds a warning to the method's docstring against it's usage in that
case.

Closes-Bug: #1303824

Change-Id: I7b038d668f08f166700300fd787a8cf3cab73a17
Add test case for config generator hostname check

When I fixed the referenced bug I failed to add a unit test to
cover the error case, so it's been up to the reviewers to make sure
it doesn't regress.  Let's give the reviewers a break and add a
proper test case.

Change-Id: I46c0f082acd9da6e84c7ac4d4cba387ec97c23c8
Related-Bug: #1205411
Let update.py read/write same file one time for all replacements

update.py handles base name replacement after copying each file.
We read/write same file for each replacement, we'd better collect
all replacements and read/write file only one time for all replacements.

Change-Id: Ifa274b6f4426fa0e65e5a3d6fd40dfde3aff1bd2
Closes-Bug: #1304788
Updated from global requirements

Change-Id: I4dc4d6f914f3b586c5859b4a8f5b5e04f3389279
Merge "Add test case for config generator hostname check"
Merge "Partial fix of test_strutils.py on Python 3"
Merge "Add a warning to not use get_table for working with ForeignKeys"
apiclient.exceptions.from_response() may miss request_id

The common header name for the request ID value across OpenStack projects is
x-openstack-request-id. However, apiclient.exceptions.from_response() checks
for x-compute-request-id, which is only set in nova and cinder responses.
This precludes the request ID value from being outputted by glanceclient and
others; this hinders error debugging.

Change-Id: Ibb88d5e6a22c7422315dffd7c5853a29864e34d9
Closes-Bug: #1306654
Merge "Updated from global requirements"
Warn the user when they sync an obsolete module

Print a warning from update.py when the user syncs an obsolete module,
including a message about which new oslo library they should be using
instead.

Change-Id: Id65ab87ef6a89a772a4fab838220454c394a8737
sizelimit: port to Python 3

In the tests, use bytes for the request body, since that is what is used by
webob in Python 3.

In RequestBodySizeLimiter.__call__(), do not compare NoneType to an integer: it
is forbidden in Python 3. Instead, properly handle the fact that
req.content_lenght might be None.

Change-Id: I179997789b9e2fcd3f3326e4d724e547c807f195
Move notification point to a better place

Follow-up for I80f325c9be9c171c2dc8d5526570bf64f0f87c78
"notify calling process we are ready to serve"

Xavier Queralt found issue with sending readiness notification from inside
run_service: it returns premature OK in case of multiple service endpoints
in one systemd service like nova-api which by default provides osapi, ec2 and
metadata services.

Instead, send readiness notification before entering wait loop for each
Launcher type.

Change-Id: I69bf10f353f5fecaaf89e537c2d3c46b73e39d36
Implements: blueprint service-readiness
Fix common.scheduler.base_weight.BaseWeigher to be Python3 compatible

Use six.with_metaclass to create the metaclass.

Change-Id: I35402d0ce81799fef23849bbb01fa183e145b954
Remove duplicated "caught" message

The affected messge is duplicated in _wait_for_exit_or_signal.  Since
INFO doesn't log it's source function it can be confusing as to where
this log output actually came from.

See also https://review.openstack.org/#/c/85639/

Change-Id: Ic4ff6321559cd484b722955c70d0db776e3e6620
Merge "sizelimit: port to Python 3"
Merge "Move notification point to a better place"
Use oslotest instead of common test module

Module openstack.common.test is obsolete, so we should use
oslotest library instead of it.
Modified tests and common database code, new requirement added.

Change-Id: I853e548f11a4c3785eaf75124510a6d789536634
Drop dependency oslo.db from common.log

Openstack common.log module registers a few oslo.config options,
which possibly could cause of DuplicateOptError raising in case of use
of both common.log and oslo.db in target projects.
Thus logging module from python standart library should be used.

Change-Id: I1ab30ab99ec2564687ee166aa93aab32268e4c1d
Blueprint: oslo-db-lib