deallocate_fixed_ip attempts to update deleted ip

Fixes bug 1017633. When deleting a vm, the nova
network manager looks to deallocate wrong fixed
ip when context has read_deleted set to 'yes',
in case when a network had been deleted and re-
created , it attempts to update already deleted
fixed_ips and therefore looks to teardown from
wrong network_id as well.

Change-Id: I574a20273220ef81498403da80f489732ae81eb1
Flesh out the README file with a little more useful information

The current README file contents are amuzing, but could contain
more useful information for downstream users / developers. This
is an attempt to fill out the README file with further content.

Change-Id: I1c364d107d1d6caf110d223560cee3a0a065ee6b
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Remove passing superfluous read_deleted argument

model_query() will already set read_deleted to context.read_deleted if
a read_deleted argument is not passed

Change-Id: I3778149e5df4c3a7d62a9cf7186c3f65273359ca
Add check for no domains in libvirt driver.

A check is needed to see if there are any domains before calling
the listDomainsID() method. This check is needed to add support
for OpenVZ which will throw an exception from this method if there
are no domains. The 'virsh' source code does this check, too.

This change circumvents this libvirt bug:
   https://bugzilla.redhat.com/show_bug.cgi?id=836647

Change-Id: Ia71d996722a1b531e720e91c1fa68f561ad4d58d
Ability to read deleted system metadata records.

Update _instance_system_metadata_get_query to use read_deleted from
the passed in context instead of just hard-coding "no". Also, use
this to ensure system metadata is always collected during delete,
even if the instance was deleted elsewhere.

Fixes bug 1019357

Change-Id: I9285f110801435344fcaa76ba21fb88c23aac2fa
Merge "Ability to read deleted system metadata records."
Refactoring code to kernel Dom0 plugin.

The kernel and ramdisk VDI manipulation code really has nothing to do
with Glance so it doesn't make a lot of sense for it to exist in the
Glance Dom0 plugin.

This patch refactors the code out to its own plugin and then applies a
few misc cleanups.

Change-Id: I363d54ea3c2d51aa6a6c1635b4fb59ebb9ce1fc0
Create instance in DB before block device mapping

Fixes lp 1019334

A recently added foreign key constraint on the the block_device_mapping
table causes boot-from-volume to fail, as the bdm is populated before the
instance DB entry is created.

This fix simply transposes the ordering to avoid breaking the constraint.

Change-Id: Ic62ea3ba000a2cdf58d2bd5bb17dde2b8cf340e4
Merge "Flesh out the README file with a little more useful information"
Merge "Create instance in DB before block device mapping"
Add missing gettextutils from openstack-common.

This patch adds gettextutils from openstack-common to nova.  It is used
by rpc, so some parts of rpc are broken without this patch.

Change-Id: I0830319f4e2011b87180abcc24354c935bea8d16
Sync cfg from openstack-common.

This change pulls in the latest version of the cfg module from
openstack-coludes some formatting changes, spelling fixes, and support
for deprecated options.

Change-Id: I3da358989209b274799018028bb6bd94d6ffb6bd
Sync excutils from openstack-common.

This patch syncs the latest version of excutils from openstack-common.
It includes a trivial formatting change.

Change-Id: I306e0f00c9398498c298098725f17e5dbfdc0bb7
Sync latest importutils from openstack-common.

This patch pulls in the latest version of importutils from
openstack-common.  It includes a formatting change and one new function:
import_object_ns().

Change-Id: Ifc1533fe1e33a447e4c501d759a6c838133d1063
Sync iniparser from openstack-common.

This patch pulls in the latest version of the iniparser module from
openstack-common.  It adds support for quoting option values.  For
example:

    foo = "option with a trailing space now works "

Change-Id: Ia2b6e1a7888ceb04e6befe3b221e3deef9f53f0b
Sync jsonutils from openstack-common.

This patch syncs the latest changes to the jsonutils module from
openstack-common.  It includes a fix for dealing with
xmlrpclib.DateTime types in to_primitive() and allows customizing the
default param to json.dumps().

Change-Id: I61f6734cdf0c85b56a71b350ca07f564454285a5
Redefine the domain's XML on volume attach/detach

This fixes bug 1004791 by adding new disk definitions to the defined
XML instead of just modifying the running instance.

Change-Id: I6596dae7c54158c32bc7b399c55a1797b2d98242
Sync rpc from openstack-common.

This patch pulls in the latest changes to rpc from openstack-common.
Changes include:

1) Formatting changes.

2) Add a missing gettextutils import to rpc.common and rpc.impl_kombu.

3) Raise an AttributeError from the rpc dispatcher if the version was
fine but the method didn't exist.  This makes the code match previous
behavior pre-version support.

Change-Id: I5b0d4b8eced87cfdfdd4ff7827991bbd9cd0ed43
Merge "Add missing gettextutils from openstack-common."
Merge changes I5b0d4b8e,I61f6734c,Ia2b6e1a7,Ifc1533fe,I306e0f00,I3da35898

* changes:
  Sync rpc from openstack-common.
  Sync jsonutils from openstack-common.
  Sync iniparser from openstack-common.
  Sync latest importutils from openstack-common.
  Sync excutils from openstack-common.
  Sync cfg from openstack-common.