python3: Add python3 compatibility support

Add python2/python3 compatibility support:

- Use six.iteritems() to replace dictionary.iteritems()
  on python2 or dictionary.items() on python3.

- Use six.advanced_iterator as a replacement to call
  it.next() on python2 and next(it) on python3.

Change-Id: I48442696b66392de33520714b9beb2c645ec1b58
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Add serializer param to RPC service

Allow a serializer to be passed to RPC service class
when it is instantiated.

Change-Id: I85dafc392023f0ae845efe851a5a4a9438e40e37
Add eclipse project files to .gitignore

Like some of the other projects (nova, heat) ignore eclipse
project files, for those people that work with eclipse (yuck :)

Change-Id: Ifbb5762b6e16b315f4066ceff35e85d2ac6f990f
Avoid shadowing Exception 'message' attribute

Exception.message is deprecated in Python 3, and it's confusing
that we shadow it right now, so change class attributes named
message to something else.

For reference, see commit 7bfd4439fe48e861675e3930486b55f8badd072e

Change-Id: I913a8a5d025cc392ef2003951763cf55629fd8d2
Exception code cleanup

Remove old commented code
Remove some incorrect comments
Remove unnecessary __class__ indirection
Convert err.__str__() to str(err)
Remove unused tb item in test

Change-Id: I9adaa90bbd6dffd7f58f5ff0403859e8806e37fb
Allow use of hacking 0.6.0 and enable new checks

There are only several errors after running hacking 0.6.0:

* H501  Do not use locals() for string formatting
* H231  Python 3.x incompatible 'except x,y:' construct

Change-Id: Iacae482fda07507c3e7ce8e6da8dbb7bde699016
On reconnecting a FanoutConsumer, don't grow the topic name

Commit 719eba4cae7f2bc11753b17c65c7597b8d6ed72d in oslo-incubator
introduced a small bug on reconnect. Because of the way the topic
was extracted, an extra '_fanout' gets tacked onto the topic name
with each reconnect. A one line fix in code (rpartition) and test
case are needed.

Change-Id: I7b3ca48502c9d5a99802c24dfcec0a1a8292fa07
Fixes: bug #1201552
Change file bit of sample config file generator

The module will never execute by itself.
Deleted the shebang line and redundant author line.

Change-Id: I54c6257e9bbd70bc121016f3778836104ad16140
Fix issues syncing sample generator in update.py

When updating the openstack.common.config module, the shutil module
raises an exception when attemting to copy a directory.
Fixed to skip directories as copy targets and handle directories
of target module names.
Fixed problem of wrong import path of the generator module.

Change-Id: Ie8336b070573c74691ab5e7304dd05c540826c53
Import config file generator module from python path

The sample config file generator will be executed in each project's
virtualenv after being copied using the update.py module. Therefore
accessing the generator module would not work the current way
of using relative paths. This patch executes the generator module
by directly importing it. The update.py will update the module path
when copying to each project.

Change-Id: Id40422ae170935d2fc1c7443eee4b31161b7d3d3
Merge "On reconnecting a FanoutConsumer, don't grow the topic name"
Merge "Add eclipse project files to .gitignore"
Merge "Fix issues syncing sample generator in update.py"
Merge "Import config file generator module from python path"
Merge "Allow use of hacking 0.6.0 and enable new checks"
Merge "Change file bit of sample config file generator"
Merge "Add serializer param to RPC service"
Merge "python3: Add python3 compatibility support"
Merge "Avoid shadowing Exception 'message' attribute"
Merge "Exception code cleanup"