Fix more OS-DCF:diskConfig XML handling

Add handling in the deserialisation code to handle the
OS-DCF:diskConfig attribute in the rebuild and resize actions so
the diskConfig extension can handle it properly. Formerly only
the older auto_disk_config attribute was managed (and incorrectly so).

Fixes bug 1153133

Change-Id: I68479d258cf23083274dd21b1f9eabab2feeb093
Return error details to users in "dns-create-private-domain"

Fixes bug 1135539
When SysLogHandler is configured in UDP socket mode, the user
who doesn't have the admin privilege got the unexpecting internal
server error(HTTP 500) in "nova dns-create-private-domain" command.
This bug occurs as the call graph drew below:

|--ProxyCallback._process_data():amqp.py
                          |--LOG.exception()
                          |    :
                          |    |--BaseHub.switch():hub.py
                          |                 |-- clear_sys_exc_info()
                          |
                          |--ctxt.reply(None, sys.exc_info(),..)
                                       |
                                       :
                                       |
                         |--serialize_remote_exception():common.py
                                       |--failure_info#(None,None,None)

The sys.exc_info() is cleared by the clear_sys_exc_info(), but it is
called again by the ctxt.reply().
This patch prevents the internal error and returns the details of
the forbidden error(HTTP 403) which is expected.

Change-Id: I76d4a938e66bfaf44423f7586e00db2caf9f5dde
LibvirtGenericVIFDriver update for stp

Fixes bug 1129055

The patch will set the stp status as 'off' and the bridge
forwarding delay to 0.

Change-Id: Ie9c96caa797de623ef0b357c61f1b7233a7d869e
Fix issues with cells and resize

There are cases where compute API resizez() is called with 'flavor_id'
as a positional argument, so we need to fix up the cells_api version of
resize() to more closely match the super class.

Also: A recent change for storing instance_type info in system_metadata
happened to make an incorrect change, assuming cells_api was for child
cells.. which it's for the API cell.  It needs to pull the instance type
from the DB just like the super class does.

Fixes bug 1154843

Change-Id: Ifdf2a68c3bff6d27d5f192e2eb73f9b79804c2c7
Remove unused virt.disk.api methods bind/unbind

The bind and unbind methods were only used by the old LXC
attach/detach volume code which was removed in
https://review.openstack.org/17861 (commit
b8831091a8d097bb55a0e65c3af254a8bfa88811). Remove them.

Fixes bug 1156127

Change-Id: I37b0344970415fe93faabd955b4b4db88de269db
Remove dead code.

This patch removes an unreachable line of code.  Just above this line
was an if/else that had a return in both cases.  This final return False
was unreachable.

Change-Id: Ib71f732d231dd541a4f77d0244dda2c8d9914060
Merge "Fix issues with cells and resize"
libvirt: Tolerate existing vm(s) with cdrom(s)

When there is an existing vm with cdrom (not started by Nova), we
should tolerate missing file attribute (just skip those)

Fixes LP# 1144756

Change-Id: I43d45872e2d7348801b2e54cd43651609676f372
xenapi: Adding logging for migration plugin

With this change administrators will be able to examine hypervisor
logs for real-time progress of rsync operations (resizes, migrates).

Change-Id: I463b574be1021e141fe2c8380b9c07f6cd860c78
Merge "Remove dead code."
Fix XenAPI performance issue

This patch implements 'list_instance_uuids' in the xenapi virt driver so
that compute manager's '_get_instances_on_driver' can operate more
efficiently.

Fixes bug 1097980

The cleanup_running_deleted_instances periodic task uses the above call
while context has been modified to be read_deleted='yes'.  Without
list_instance_uuids being implemented in xenapi, there's a fallback to
querying all instances on the host.  Because of read_deleted='yes', this
queries all instances that have ever lived on the host.  In a very busy
environment where instances are repeatedly built and destroyed, one can
end up with thousands of deleted instances.  Now that we are storing
instance_type data in system_metadata and system_metadata is joined with
every instance_get, this results in 10x the number of rows being
returned with sqlalchemy... the fallback doesn't perform well enough.

Change-Id: I4bbfd69c9769807cec813af757665f03d9643460
Fix RequestContext crashes w/ no service catalog

Code introduced in a prev review assumed service_catalog will be
at least an empty list and will never be None.  But missed one code
path where the service_catalog could potentially be set to None. So
this change switches back the default value of service_catalog in
the arguments to None and makes sure we tolerate anyone else
passing in a None or Empty list as service_catalog

Fix for LP# 1156730

Change-Id: I480b761d57c4699ea7ef72114160cdbeb281e454
Merge "Remove unused virt.disk.api methods bind/unbind"
Merge "Fix XenAPI performance issue"
Fixes PowerVM spawn failed as missing attr supported_instances

During test in a cross-hypervisor environment (KVM+PowerVM), user will run
into an issue during deploying an instance for Power host by PowerVM driver,
though the property "hypervisor_type" for the PowerVM image have been
configured. Since the _update_host_stats of PowerVM driver missing the
attribute "supported_instances".

Fixes bug: 1155498

Change-Id: I81259d153a7b5ae35747e57c53b14e0075d28d78
Merge "LibvirtGenericVIFDriver update for stp"
Require netaddr>=0.7.6 to avoid UnboundLocalError

This issue is discussed at https://github.com/drkjam/netaddr/issues/2.
The bug in netaddr was fixed in release 0.7.6 on 13th Sep 2011.

Change-Id: Iea75a30963a09f9b0dd94138460bf041ab98fc66
Fixes: bug #1157058
Merge "libvirt: Tolerate existing vm(s) with cdrom(s)"
Merge "Fix more OS-DCF:diskConfig XML handling"
Merge "Require netaddr>=0.7.6 to avoid UnboundLocalError"