Sync with latest version of openstack.common.importutils

Changes since last sync:

 - Improve exception from importutils.import_class().
 - Merge "add import_object_ns function"
 - Update common code to support pep 1.3. bug 1014216
 - add import_object_ns function

Change-Id: Ibaa60f50af255ec77a3f0c93213f8a9f446eeb0d
Sync with latest version of openstack.common.timeutils

Changes since last since:

 - Remove unused imports
 - Fix utcnow_ts to return UTC timestamp
 - Add nova time util functions to timeutils
 - Replace datetime.utcnow with timeutils.utcnow

Change-Id: Ic98bfc9655edad8f7319daafede192534f68a1a5
Sync with latest version of openstack.common.log

Changes since last sync:

 - Install a qualified except hook.
 - Remove code to clear basicConfig root log handlers
 - don't throw exceptions if %(color)s tag is used
 - fix bug lp:1019348,update openstack-common to support pep8 1.3.
 - Fix missing gettextutils in several modules.
 - Switch common files to using jsonutils.

Change-Id: I430caf24526e571688c78f3cdd9f9453f5d525c4
Sync with latest version of openstack.common.notifier

Changes since last sync:

 - Add multiple-driver support to the notifier api.
 - fix bug lp:1019348,update openstack-common to support pep8 1.3.
 - Fix missing gettextutils in several modules.
 - Fix line length for pep8 compliance after cloning into other projects
 - Switch common files to using jsonutils.

Also add notifier and local to openstack-common.conf since we appear
to have forgotten to add them when they were imported.

Change-Id: If2cea51761ae14d188861518c567abdf0d8a0649
Update rbd store to allow copy-on-write clones

This is in preparation for cinder blueprint
efficient-volumes-from-images. If the same rbd cluster is used by
glance and cinder, a new volume can be created as a copy-on-write
clone by the ceph cluster rather than downloading all the data from
glance.

Since bp api-v2-store-access is implemented, make the location for the
rbd store more specific, so cinder can check that it's accessing the
same backend as glance. fsid is a unique identifier for a Ceph cluster.

Within a cluster, the full specification of an rbd image includes
pool, image name, and optionally snapshot. Creating a copy-on-write
clone is only possible in rbd on a protected snapshot, so after
uploading an image to rbd, create a snapshot and protect
it. Protection means it can't be deleted until it is unprotected, so
you can't accidentally render any clones unusable by removing their
parent. Add a new exception, InUseByStore, to handle a snapshot or
image that's still protected or otherwise in use.

More details can be found at
http://ceph.com/docs/master/dev/rbd-layering/.

For backwards compatibility, only use these new features if they are
supported by the installed librados and librbd python bindings. Otherwise
fallback to the previous location specifier which only includes image
id, since cloning won't work anyway.

Since the location parsing is now a bit more complicated, add unit
tests for it.

Change-Id: I9711702276d966f88284fae44f9531b992cdd06f
Make swift_store_admin_tenants a ListOpt.

The swift_store_admin_tenants config option should have never
been a boolean opt. Actually using the config in this state will
cause glance-api to fail to startup.

Fixes LP Bug #1035471.

Change-Id: Ie800f6ee7cf1b8d863d5e8e8ac41e8ed36f345f1
Use container_format and disk_format as-is in v2

Rather than force a painful migration to type and format, use
container_format and disk_format as they are in the v1 API for v2
since there isn't a clear path to an interoperable alternative.

Related to bp api-2

Change-Id: If8161390abf17961885e5c02e38d635b287aeca4
Merge "Sync with latest version of openstack.common.importutils"
Refactor v2 images resource unit tests

* Add _fixture() helper method for generating image fixtures
* Simplify some tests that were asserting things they didnt need to
* Remove unused glance.common.exception import

Change-Id: I5eec5430df2ca0867b21fcfda0586ef5273061f3
Merge "Sync with latest version of openstack.common.timeutils"
Merge "Sync with latest version of openstack.common.log"
Merge "Refactor v2 images resource unit tests"
Filter out None values from v2 API image entity

Prevent core image attributes with None values from being returned
to v2 API clients. Most attribute schemas are of type 'string' and
returning None is invalid.

Fixes bug 1034790

Change-Id: I2885cabf14307e46ff711bdabfcd3ff3253e6628
Add min_ram and min_disk to v2 images schema

The min_ram and min_disk image attributes are stored in the db, so
we need to expose them as core image attributes to preserve
backwards-compatibility with the v1 Images API.

Related to bp api-2

Change-Id: If2afa1f171aa6c4f07052225592d216f7e09ca90
Reveal v2 API as v2.0 in versions response

* Report v2.0 API compatibility, not v2
* Allow users to specify '/v2' or '/v2.0' in their request URI

Related to bp api-2

Change-Id: Ia8d41902a2171aad8f06d3ac329a3e3c097cdc90
Merge "Make swift_store_admin_tenants a ListOpt."
Merge "Filter out None values from v2 API image entity"
Merge "Update rbd store to allow copy-on-write clones"
Merge "Add min_ram and min_disk to v2 images schema"
Merge "Sync with latest version of openstack.common.notifier"