Handle invalid xml request to return BadRequest

Handled ExpatError,LookupError to return BadRequest
if the user inputs the invalid xml

fixes bug 1032092

Change-Id: I7374532d91e3d7675bc80730031a195f50bb2abc
Add version to network rpc API.

This patch adds versioning support for the nova-network rpc API.  During
Folsom development I added versioning to all rpc APIs with the exception
of network and volume.  I was holding off on those to see what the fate
of that code in nova was going to be for sure.  Adding it to the volume
API in nova doesn't make much sense at this point (but doing it in
Cinder does).  Since nova-network is sticking around for a while, it
seems worthwhile to add a version number to the API for any future
changes while the code is still in the tree.

There are plenty of things in this rpc API that could be cleaned up or
improved, but I held off on doing any of those things.  I would
recommend the same for anyone else (unless it's a bug that needs to be
fixed).  I think any further improvements should be focused on Quantum
integration with Nova or Quantum itself.

Fixes bug 1060197.

Change-Id: I63ce57657388166544202af9c44c2298ae551aea
handles empty dhcp_domain with hostname in metadata

Fixes bug 1064713.

Currently hostname in metadata is created by concatenating the
instance hostname with the dhcp_domain. When dhcp_domain is empty,
it results in a hostname with a trailing dot.

Change-Id: I52a50ff7f62c0a0dc900ddf707cc3dddce62bcb3
Imported Translations from Transifex

Change-Id: Ibd2d774602925e5d9863367a42ca79886ea59e2d
Remove db access for block devices on terminate_instance

This makes compute/api pass in an instance's block devices to
compute/manager::terminate_instance() so that it doesn't have
to hit the database itself.

Note that this doesn't remove all database activity in the
terminate_instance() path, just the block-device-related bits.

bp no-db-compute

Change-Id: Ibfb333ef7918e05f0e3634f1fb063f1b02535bff
Remove db access for block devices and network info on reboot

This makes compute/api pass the block device and network info to
compute_manager::reboot_instance() so that it doesn't have to hit
the database itself.

This also extends the reboot tests for the compute manager and
api to validate that these two bits of data are making it all the
way through the stack.

bp no-db-compute

Change-Id: I92346d6c821241885b5f4b08fec05f38e6261edf
Merge "Remove db access for block devices on terminate_instance"
Merge "Remove db access for block devices and network info on reboot"
Set host prior to allocating network information.

Make sure 'host' field on the instance is set before allocating
network information.

bug 1065004

Change-Id: I7b929fd50a057c8c69a0b83e07cdc5cd9cb55b45
Merge "Set host prior to allocating network information."
Merge "Handle invalid xml request to return BadRequest"
Allow local rbd user and secret_uuid configuration

By default, the rbd_user and rbd_secret_uuid are specified in the
nova-volume/cinder configuration and passed to nova-compute when
volumes are attached to instances.

This change allows these values to be specified locally in
nova-compute which means access control to RADOS devices in ceph
can be managed independently from nova-volume/cinder with no
requirement for consistent uuid's for libvirt secrets.

Fixes bug 1065883.

Change-Id: I9f07d040ae267bfbe8f794a5d22d327106314cc6
Fixes syntax error in nova.tools.esx.guest_tools.py

Fixes syntax error in nova.tools.esx.guest_tools.py.
Fixes bug1067840.

Change-Id: Ib08e03a2be05f02c30e9578fa8773f1171a8b330
Use consoleauth rpcapi in nova-novncproxy.

The nova-novncproxy service was using rpc.call directly when it should
have been going through the rpcapi client proxy class.  This patch fixes
that.

Fix bug 1067858.

Change-Id: I626fb01ff61ff507520d528122358ef687d297b7
Merge "Use consoleauth rpcapi in nova-novncproxy."
Merge "Add version to network rpc API."
Do not call directly vmops.attach_volume

Relates to blueprint xenapi-volume-drivers

Driver already have an attach_volume function call which calls
volumeops.attach_volume. This change replaces the direct
volumeops.attach_volume calls with driver.attach_volume, so that
driver.attach_volume will be the entry point for attaching the volume.

Change-Id: I86e7c7df3d37076d7b7945f3504c7f305dce6820
Remove ComputeDriver.update_host_status()

Nobody calls the method.

Change-Id: Ib585f769788753c64e19fe49a1f186880e1c6f49
update kwargs with args in wrap_instance_fault

fix bug: 1067254

If argument 'instance' is in args rather than kwargs,
we will get a KeyError exception which will cover up
the real exception. So, we update kwargs with the
values from args first. then, we can get 'instance'
from kwargs easily.

Change-Id: Ife89f9e9629e4b581d96289434e9ececced17915
Deallocate network if instance is deleted in spawn

If the instance is deleted while the virt driver is spawning, an
InstanceNotFound exception is raised and caught in compute to prevent it
from being rescheduled. This also deallocates the network to prevent
leaking interfaces/mac/ips.

* Fixes LP1068716

Change-Id: I991f5956facf7b105faea137d4a5b48897e68ae6