Update Metadefs associated with ImagePropertiesFilter

From: http://docs.openstack.org/trunk/config-reference/content/section_compute-scheduler.html#imagepropertiesfilter

Filters hosts based on properties defined on the instance's image.

Updated descriptions to be provide better information.
Added baremetal "hypervisor_type" after getting info from
Nova core about what hypervisors to include.

Left out "architecture" for now, because horizon fails when
trying to update architecture property.

Change-Id: I9195825a0ab4b89e764983da06827173a2daa23c
Closes-bug: 1368965
GET property which name includes resource type prefix

Currently GET call to API to retrieve property details ends with
404 error when property name includes resource type prefix.
This patch extends show method to take filters as a parameter.
If 'resource_type' is included in filters then the prefix of included
resource type is removed from property name. This enables user to look
for property name starting with prefix that comes from associated
resource type.

Change-Id: I3c4d96fbc9ce15016631017bf76089c338ac3cdc
Closes-Bug: #1367564
DocImpact
Co-Authored-By: Bartosz Fic <bartosz.fic@intel.com>
Co-Authored-By: Pawel Koniszewski <pawel.koniszewski@intel.com>
Merge "GET property which name includes resource type prefix"
Merge "Update Metadefs associated with ImagePropertiesFilter"
Use specific exceptions instead of the general MetadefRecordNotFound

Currently, when metadef namespaces, objects or properties are not found
by ID, a general MetadefRecordNotFound exception is raised. Instead,
just use the specific MetadefNamespaceNotFound, MetadefObjectNotFound or
MetadefPropertyNotFound exceptions.

Change-Id: Icb6bf543015305174720f2fd950f5e4984f39798
Closes-Bug: 1367650
Remove stale chunks when failed to update image to registry

For image v1 api, the operation of uploading image bits to store and
the operation of updating image metadata are separaed, so when the
second operation failed, the image stale chunks will be leaked in store.
This change added a logic to remove those chunks if an exception
happenned during the step of image metadata updating. And if
glance-registry could be reached still, the image status will be changed
to 'killed', this followed standard glance image status transition.

Closes-bug: 1254497
Change-Id: I01e13066b48a8feb1ead0de64992e7997feafdea
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Merge "Remove stale chunks when failed to update image to registry"