Fixes the usage of PowerVMFileTransferFailed class

If it fails in the process of "Calculate file size in multiples of 512
bytes", the exception.PowerVMFileTransferFailed message is illegal.
"KeyError: u'file_path'" is occurs when there is no argument.

Change-Id: I15a7467bbc103f683d82949dc0892210cd63c4b6
Closes-Bug: #1223198
Code change for regex filter matching

Remove REGEXP_LIKE operator for oracle db backend since it's not suitable,
Such as:
Oracle: 'select xxx from xxx where REGEXP_LIKE (column, pattern)'
Mysql: 'select xxx from xxx where column REGEXP pattern'

For the simple pattern matching(LIKE operator) used for unsupported backend db,
add '%' wildcard character on both sides of the value.

Change-Id: I4682d38086a06032bb5650a14b253f6b2b859613
Closes-Bug: #1230102
plug_vif raise NotImplementedError instead of pass

The Hyper-V, VMware, Docker and PowerVM drivers raise
NotImplementedError from the plug_vifs and unplug_vifs
methods rather than pass.
The compute manager handles the NotImplementedError
case when initializing the host.

Fixed bug 1218593

Change-Id: Id17a1f691f46816eadfe257d9ac0cc46502318ef
Host aggregate configuration throws exception

If the virtualization driver did not implement the host
aggregate support functions (add_to_aggregate,
remove_from_aggregate and undo_aggregate_operation) then an
exception is thrown when a host aggregate was created/deleted.
Configuration of the host aggregates breaks tempest tests when
the underlying driver does not have these methods implemented.

The only driver that actually uses this is the Xen driver.
The solution enables all drivers to support this without
having to add in specific code. More specifically, the compute
manager will not raise NotImplementedError.

Closes-Bug: 1229912
Closes-Bug: 1229911

Change-Id: Iee69e45d94047742b6a499a139bac96ad9dd971f
VMware: Check for the propSet attribute's existence before using

There may be cases when the call to RetrievePropertiesEx may have missing
data. That is, the propSet field may be missing. In this case the missing
field will be logged. This will help with troubleshooting the problem.

Fields may be missing due to one of the following reasons:
 - SystemError if there was some unknown problem reading the value
 - NoPermission if the logged in session did not have permission to read
   the value

The propSet attribute is marked as optional in the API documentation so this
should have been anticipated and this can be interpreted as a bug in the
client code.

http://pubs.vmware.com/vsphere-51/index.jsp#com.vmware.wssdk.apiref.doc/vmodl.query.PropertyCollector.ObjectContent.html

Fixes bug: 1215958

Change-Id: If8fd912327e057320cd6013c276000617b9c320c
Merge "Fixes the usage of PowerVMFileTransferFailed class"
Merge "plug_vif raise NotImplementedError instead of pass"
Merge "VMware: Check for the propSet attribute's existence before using"
Merge "Code change for regex filter matching"
Merge "Host aggregate configuration throws exception"
xenapi: refactor: move UpdateGlanceImage to common

During the review of https://review.openstack.org/41651 it was
recommended to move UpdateGlanceImage to a common library. A bug was
filed to deal with the refactors. This change fixes the first part.

Fixes bug 1220596

Change-Id: I95ae89525b7e6768c5a70364945d5a10cb906d88
xenapi: refactor: move RawTGZImage to common

During the review of https://review.openstack.org/40909 it was
requested, that the RawTGZImage class should be moved to a common
territory, so that others can re-use it later.

Fixes bug 1220596

Change-Id: I0f186c2f81edbd546c0a24d66e4b9c1626373b12
XenAPI: Fix translation of metadetails in aggregates

https://review.openstack.org/#/c/43157/ added a translation from the sqlalchemy model to
the instance object replacing metadetails with metadata.

This added more traces in general for XenAPI (when we queried whether we were using
aggregates) and actually broke the host aggregate functionality

Change-Id: I87195753931945b6e1ecf75bc81575a6fa03068e
Closes-bug: 1232179
xenapi: post install scriptlet to rpm

A post install script that creates the /images directory on xenserver,
and sets up the trust relationship.

Change-Id: Id57e3a3ab2782550468c6aa4c01059ceb7cc81ab