Use cfg's new behavior of reset() clearing overrides

Cherry-picks b858108 from Nova.

Change-Id: I5e14dea25afd5bff03a39671b2d3b85481977bec
Reviewed-on: https://review.openstack.org/9868
Reviewed-by: Huang Zhiteng <zhiteng.huang@intel.com>
Reviewed-by: Vish Ishaya <vishvananda@gmail.com>
Approved: John Griffith <john.griffith@solidfire.com>
Tested-by: Jenkins
Remove 'cinder-manage config convert'

This convers the old flagfile style config files into the the
new .ini style config files. Since Cinder is new and it's first
release will only support .ini style files there's no need for
such a command.

Change-Id: Ie2f4cd8b6f5fc66547a59d39aa3d5eb896b1ddf4
Reviewed-on: https://review.openstack.org/9871
Reviewed-by: Huang Zhiteng <zhiteng.huang@intel.com>
Reviewed-by: Vish Ishaya <vishvananda@gmail.com>
Approved: John Griffith <john.griffith@solidfire.com>
Tested-by: Jenkins
Remove unused synchronization decorator

This is only used on the compute and network side in Nova.

Change-Id: I6211c32f585b1b5ff66d1a7a5f65dd25857d76f0
Reviewed-on: https://review.openstack.org/9888
Reviewed-by: Vish Ishaya <vishvananda@gmail.com>
Approved: John Griffith <john.griffith@solidfire.com>
Tested-by: Jenkins
Stop using cinder.exception from cinder.rpc.

This patch is a part of continuing to remove dependencies from cinder.rpc
on the rest of cinder.  One RPC related exception was defined in
cinder.exception, so that was moved to cinder.rpc.common where the rest of
them live.  These exceptions were changed to no longer use CinderException
as their base.  Instead, there is a new RPCException base.

One other change that should be reviewed closely is the removal of using
cinder.exception.wrap_exception() in cinder.rpc.amqp.  As far as I can tell,
this didn't actually do anything since nothing was being passed in to
wrap_exception().

Change-Id: I36ff7c05ab0467ad8506b56d561c532eadf8dff8
Reviewed-on: https://review.openstack.org/9899
Reviewed-by: Vish Ishaya <vishvananda@gmail.com>
Approved: John Griffith <john.griffith@solidfire.com>
Tested-by: Jenkins
Make kombu support optional for running unit tests.

Fix bug 838386.

Previously, the unit tests required kombu to be installed to run.  This
patch makes it so the unit tests will still complete successfully, even
if kombu is not installed.

Change-Id: I06831a37f8c857bbfd0bce1b1c3aeda7d341a589
Reviewed-on: https://review.openstack.org/9900
Reviewed-by: Vish Ishaya <vishvananda@gmail.com>
Approved: John Griffith <john.griffith@solidfire.com>
Tested-by: Jenkins
Add base support for rpc API versioning.

Part of blueprint versioned-rpc-apis.

This commit includes the base support for versioned RPC APIs.  It
introduces the RpcProxy and RpcDispatcher classes that have common code
for handling versioning on the client and server sides, respectively.

RPC APIs will be converted one at a time using this infrastructure.

Change-Id: I07bd82e9ff60c356123950e466caaffdfce79eba
Reviewed-on: https://review.openstack.org/9901
Reviewed-by: Huang Zhiteng <zhiteng.huang@intel.com>
Reviewed-by: Vish Ishaya <vishvananda@gmail.com>
Approved: John Griffith <john.griffith@solidfire.com>
Tested-by: Jenkins
Move queue_get_for() from db to rpc.

Part of blueprint common-rpc.

The function queue_get_for() is a utility function used by various
consumers of the rpc API.  This function lived in the db API, but never
ended up using anything from the database.  This patch moves it into the
rpc API so that it can be used by other users of rpc once it moves into
openstack-common.

Change-Id: If92675beecff5471b416a929c161b810e3c71939
Reviewed-on: https://review.openstack.org/9906
Reviewed-by: Vish Ishaya <vishvananda@gmail.com>
Approved: John Griffith <john.griffith@solidfire.com>
Tested-by: Jenkins
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: I0370293807f0282e1dbdd59246f70be031e888a9
Reviewed-on: https://review.openstack.org/9908
Reviewed-by: Vish Ishaya <vishvananda@gmail.com>
Approved: John Griffith <john.griffith@solidfire.com>
Tested-by: Jenkins
Convert Cinder to use openstack-common jsonutils.

This patch replaces json handling code in Cinder with openstack-common
jsonutils.  Also remove some unused imports.

Implement blueprint cinder-common-jsonutils

Change-Id: I28c1a095823c2f04f30c32724144297a2d67fba4
Reviewed-on: https://review.openstack.org/9912
Reviewed-by: Mark McLoughlin <markmc@redhat.com>
Reviewed-by: Vish Ishaya <vishvananda@gmail.com>
Approved: John Griffith <john.griffith@solidfire.com>
Tested-by: Jenkins
Sync with latest version of openstack.common.cfg

Cherry picks c1bf456 from Nova.

Changes since last sync:

 - Alphabetize imports in openstack/common/cfg.py
 - make reset() clear defaults and overrides
 - automatically create option groups
 - allow options to be marked as required
 - use a list comprehension instead of map()

Change-Id: Ie17fe855a75b5021b031902aa86031d8ddc06dfd
Reviewed-on: https://review.openstack.org/9867
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: James E. Blair <corvus@inaugust.com>