Make jsonutils.dumps more general

Fixes bug #1009848

Fixed jsonutils.dumps to receive other parameters

Change-Id: I34836ae89359bccb689a36a7b486e85bb41d70e4
Use 'is not None' instead of '!= None'

Fixes bug 1010570

pep8 suggests the former over the latter

Change-Id: Ice3a3b1cc2eea9228fffb4ee40fc360ff79054a3
Fix utcnow_ts to return UTC timestamp

Fixes bug #1011121

Use calendar.timegm instead of time.mktime

Change-Id: Idb8d470f1ef90162641d21122699a026fa38faf1
Merge "Use 'is not None' instead of '!= None'"
Add impl_zmq to rpc.

Part of blueprint common-rpc.

This driver just went into nova.rpc.  Pull it in over here.  I haven't
been able to test this, but I can't get the tests to work in nova,
either.

There is a bit of a complication with impl_zmq worth mentioning.  It
requires a service to run (nova/bin/nova-rpc-zmq-receiver).  Only once
instance of this service should run on a given machine, so it shouldn't
be copied into each project that uses rpc.  Once openstack-common is an
installed library, it can be distributed with that, but until then ...
we'll just leave it in nova for now.

Change-Id: I2bd067be58d943d4f3a90e013b22282217484872
Get update.py to be able to copy rpc.

Part of blueprint common-rpc.

Change-Id: I634bf7b0ce85900a34c9b5a4a295f1d806458bbf
add more realistic unit tests for importutils

Add realistic tests including objects with and without args to
importutils.

Change-Id: If23db5ef80cdfa4be95e95b90e647ac2455fffc8
Merge "Fix utcnow_ts to return UTC timestamp"
Merge "Add impl_zmq to rpc."
Merge "Get update.py to be able to copy rpc."
Add missing ack to impl_qpid.

Fix bug 1012374.

Johannes Erdfelt pointed out that impl_qpid wasn't acking messages that
it received.  This turned out to be a nasty oversight, resulting in
unbounded message queue growth inside of the python-qpid library.  This
fixes it.

Change-Id: I446530239e16701009c4db8407a344596bb17952
rpc: Update rpc_backend handling.

Part of blueprint common-rpc.

This patch updates the rpc_backend option handling in a couple of ways.

1) Set the default based on wherever this code has been copied to.

2) If we fail to import the backend, replace 'nova.rpc' with
'nova.openstack.common.rpc' just in case the value came from an older
nova configuration file.  Backwards compatibility is a good thing.

Change-Id: I9ad7c084a2f0813ca1559115e7612f0a24fcce67
Fix nova.rpc references in comments.

Part of blueprint common-rpc.

Strip remaining references to 'nova.rpc' that existed in comments.

Change-Id: I27885918a5e38eb730504c9e88bdda2b72b23257
Merge "add more realistic unit tests for importutils"
Add autodoc generation to the build_sphinx command

The logic is pulled from the nova code, but has been abstracted
from being nova specific. It allows us to duplicate less info,
because we know a lot of the meta information in setup.py anyway.

Once this is in, we'll get autodoc module information everywhere
pretty much for free, and we can delete the doc/ext dir and the
doc/*sh from nova. (thanks to bcwaldon for pushing things to be
better)

Change-Id: I4c55c370ea6c3790958b5412e21e3378f4474104
add import_object_ns function

To support bp:virt-driver-cleanup, there is a desire to have shorter
driver strings (i.e. libvirt.LibvirtDriver instead of
nova.virt.libvirt.LibvirtDriver). One way to support this is with
a new import_object variant that takes a namespace to load from.

If the code fails to load the driver in the prefered namespace it
will also try loading the full driver path, before throwing an
exception.

Change-Id: Ib97c92f38685ca89f29890f8015fc413acc744f8
Merge "Add missing ack to impl_qpid."
Update common code to support pep 1.3.
bug 1014216

Change-Id: I3f8fa2e11c9d3f3d34fb20f65ce886bb9c94463d
Merge "rpc: Update rpc_backend handling."
Merge "add import_object_ns function"