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
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
generator: sanitize values ending with the fqdn

Some options (neutron_id in the neutron bigswitch plugin) use the
hostname/fqdn to generate default values prefixed with a static string.
This patch handles such options and sanitize the default value by
replacing the hostname/fqdn with the 'oslo' string.

Closes-Bug: #1298589
Change-Id: I2471d638f42fc425efc928b280e1b47c23fddabd
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
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
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
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
Activate unit tests from test_base_report.py under Python3

Change-Id: I780cb2be94e7be7ec3ca4eccacad429af5bb748a
Fix tests.unit.reports.test_guru_meditation_report under Python3

Change-Id: Ib329965aecc5e685eed9c1d313ffe1b709981b71
Merge "Use oslotest instead of common test module"
Activate test_generator.py tests under Python3

Change-Id: Ia240b3b6815220ee8f187e8029ee118ced6fa23a
Merge "Fix tests.unit.reports.test_guru_meditation_report under Python3"
Merge "Activate test_generator.py tests under Python3"
Merge "Fix i18n support for apiclient"
Merge "Activate unit tests from test_base_report.py under Python3"
Merge "Warn the user when they sync an obsolete module"
Merge "Remove duplicated "caught" message"
Add graceful stop function to ThreadGroup.stop

Currently ThreadGroup.stop() would stop both timers and threads
immediately.
However, heat-engine should stop timers before threads finished for
the purpose of graceful shutdown.

The graceful shutdown for Heat is "do process exit after stack
processing finished". Heat implemented the stack processing as threads.
We should wait its finishing for graceful shutdown's purpose.

On the one hand, Heat is using timers.
The timers have the function of make another job threads.
It means, we should stop timers before waiting threads for preventing
another thread occur by timers.

From the above, the appropriate order of Heat's graceful shutdown is:

  * stop timers for preventing new thread occur
  * wait for all threads to be finished
  * process exit

However, currently ThreadGroup class doesn't have the function of
graceful stop. So I propose the function of graceful stop.

Change-Id: Id575674af95ae7ad88c00a2ac5d629ab0d0a9b46
Closes-bug: #1304244
Merge "Let update.py read/write same file one time for all replacements"