file_open: fixed docstring to refer to open() instead of file()

Now that we use open() instead of file(), we should refer to proper
function in the docstring.

Change-Id: I0d945784cbe24e34c8ef19d3d3c9c0f012cfe176
Fix parenthesis typo misunderstanding in periodic_task

Commit c5a1088 meant to fix a typo for 'parens' thinking it meant
'parents' but it was actually short-hand for parenthesis, so fix the
wording to be clear and accurate.

Change-Id: I5ce16688871c43b81c0671500acd6e92dc71cd06
use /usr/bin/env python instead of /usr/bin/python

The usage of /usr/bin/env ensures that the first interpreter
found in the environment's $PATH variable is used.

Change-Id: Id2e500721084ccaeb86532263d278cb4d5ce0d4d
Restore UUID and human-ID bash completion

The refactoring to use Oslo's `Resource` broke UUID and human_id
(https://review.openstack.org/#/c/63104/) bash-completion by removing the code
that writes the IDs to the cache.

This patch adds the missing code back, careful to handle cases where the
`Manager` in a particular client doesn't yet support the
`write_to_completion_cache` method that Novaclient does.

Change-Id: I7b231eb492509cdfc844e7ed036892e37c5bb8b6
Closes-Bug: 1327431
Fix common.log.ContextFormatter for Python 3

The incompatibilty of common.log.ContextFormatter with Python 3 is due
to the use of 'hack' with Formatter._fmt, which is not working since
Python 3.2 after introduction of different styles of formatting
syntax. The formatting string in Python3 should be stored in
Formatter._style object.

In this patch the property where the formatting string should be written
is selected based on the current version of Python.

Change-Id: Ibb2244ce95137996ad927fbb9d4380a0e32d8b46
Bump hacking to 0.9.x series

In order to keep this patch to just a requirements bump, ignore new and
stricter hacking rules that are being triggered. Fixing up the code and
turning these on is out of scope of this patch and is for future patches.

Change-Id: I848b1e90b46f6f39a4f188c8dc2cdbca54fa41e7
Prevent races in opportunistic db test cases

Opportunistic db test cases create schemas on demand, so that each
test case which inherits the base test case class, will get its own
db schema (i. e. races between tests are not possible).

In order to do schema provisioning we have to connect to RDBMS server
first. So far we've been connecting to the openstack_citest database,
which is guaranteed to exist on CI nodes. It turns out, there are a
few test cases in Nova (maybe in other projects as well), that drop
and recreate the openstack_citest database. If they happen to do that
when the opportunistic db fixture is in the middle of provisioning a
schema, those tests will fail (as there is an an open session to the
database and thus it can't be dropped).

This can be solved easily by changing the way we provision new
schemas in opportunistic db test cases as actually, we don't have to
connect to the openstack_citest database at all:

 - for MySQL we can use an empty db name to connect to MySQL server,
   but not to a particular database
 - PostgreSQL requires us to specify the database name. We can use
   the service postgres database here (PostgreSQL shell utils such
   as createdb, createuser, etc use it for the very same reason)

Closes-Bug: #1328997

Change-Id: Id82090743e8b93f6c960de066fd05d8a2f9fb934
generator: remove unused param, small clean up

Remove mod_obj parameter from _guess_groups() not used since
Iaa4e9a806e79032ce1675b46a6b7a7628c3eff89

Do not need to initialize opt_type before try/except because the try
will initialize opt_type or system will exit.

Always use multi-line string syntax for docstrings

Change-Id: I3185a14e3cef48584bdcb406f01e066c6d928bf5
Merge "use /usr/bin/env python instead of /usr/bin/python"
Merge "Bump hacking to 0.9.x series"
Merge "generator: remove unused param, small clean up"
Merge "Fix parenthesis typo misunderstanding in periodic_task"
Merge "Fix common.log.ContextFormatter for Python 3"
Merge "Restore UUID and human-ID bash completion"
Merge "file_open: fixed docstring to refer to open() instead of file()"