Fixed spelling error - occured to occurred

Change-Id: I22c0a083d6965b9a8bbc0f9c93f15d14f65c7efc
Move test_insert_from_select unit test from nova to oslo

Nova had it's own copy of InsertFromSelect so change Iefa5b431 is
removing that copy from Nova to use the version in Oslo. The only
difference is Nova had an additional unit test for InsertFromSelect so
we can move that to Oslo.

Partial-Bug: #1280055

Change-Id: I457acf335c4877c398c443b0cfde55bb997dfe6d
Do not use the 'extend' method on a dict_items object

This method does not exist: it is meant to be used on a list. In Python 3,
keys() return a dict_items object, instead of a list in Python 2, so an error
happens. Fix this by converting the dict_items object  to a list before calling
extend().

This is enough to fix tests/unit/db/sqlalchemy/test_models.py in Python 3, so
we can enable this test.

Change-Id: Ic09af6c084e89e19ddc60058270890dbe052c85e
Remove rendundant parentheses of cfg help strings

There is a hacking review https://review.openstack.org/#/c/74493/.
That makes me be aware we maybe have rendunant parentheses.
We'd better clean the parentheses, Python will handle that well.

Change-Id: I275aaa49450d8088d93b3e19138850c359a4abae
Don't call provision.py directly

When testr.conf calls the sqlalchemy/provision.py script directly,
sys.path[0] is the directory that invoked the script.  So when it
tries to import openstack.common.db you end up with an import failure.

---
Traceback (most recent call last):
  File "./openstack/common/db/sqlalchemy/provision.py", line 27, in <module>
    from openstack.common.db import exception as exc
ImportError: No module named openstack.common.db
---

The solution is to run it with -m

Closes-Bug: #1303579
Change-Id: Ia7ff187df1685f0dd5ef32c3f6de474218874b04
Fix safe_encode(): return bytes on Python 3

safe_decode() decodes bytes to text. safe_encode() should be the reverse
operation: encode text to bytes. Currently, it returns text on Python 3
which is wrong in my opinion.

The patch fixes also test_encode() on Python 3.

Change-Id: If91a866d864a22d28a352152beff4c7406a27b7b
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
Start ping listener also for postgresql

We can make use of the automatic connection disposal
for PostgreSQL as well.

Closes-Bug: #1298310
Change-Id: Ifb498b64f6a4305c6639afaeed246394043decd1
Remove pep8, pyflakes, and flake8 from test requirements

No need to pin the versions of pep8, pyflakes, and flake8 since they are
already pinned by hacking. This is the same way its done for all other
integrated projects.

Change-Id: Id9513203776f16896dc488209f92670ada5760d0
Update ensure()/reconnect() to catch MessagingError

The error handling code that gets connections reset if necessary
caught ConnectionError. It really needs to catch MessagingError,
which ConnectionError inherits from. There are other types of
MessagingErrors that may occur, such as InternalError, and they need
to cause the connection to reset, as well.

This fix has already been merged into oslo.messaging.

Closes-bug: #1303890
Change-Id: Ic5082b74a362ded8b35cbc75cf178fe6e0db62d0
Merge "Move test_insert_from_select unit test from nova to oslo"
Merge "Remove pep8, pyflakes, and flake8 from test requirements"
Merge "Don't call provision.py directly"
Merge "Do not use the 'extend' method on a dict_items object"
Merge "Fix safe_encode(): return bytes on Python 3"
Merge "Start ping listener also for postgresql"
Updated from global requirements

Change-Id: I4dc4d6f914f3b586c5859b4a8f5b5e04f3389279
Merge "Remove rendundant parentheses of cfg help strings"