Update sqlite to use PoolEvents for regexp.

Use PoolEvents instead of PoolListener for adding regexp function.

Fixes bug 1037219

Change-Id: I205ecce133f628e995f38dea5ce89ddf36b01a9b
Adds support for serial to libvirt config disks.

In order for users to find a volume that they have attached to
a vm, it is valuable to be able to find it in a consistent
location. A following patch wil accomplish this by setting
the serial number of the device to the uuid of the volume.

This patch prepares for that change by allowing serial numbers
to be set in the libvirt config disk object.

Prepares to fix bug 1004328

Change-Id: Iecdfc17b45e1c38df50f844f127c0e95558ab22c
Allows libvirt to set a serial number for a volume

The serial number defaults to the volume_id of the volume being
attached. We may expose a method in the future to set a different
serial number when creating or attaching a volume.

The purpose of this change is to give users a consistent place
they can find their volume. It should show up now in most flavors
of linux under /disk/by-id/virtio-<volume_uuid>

Fixes bug 1004328

Change-Id: Id1c56b5b23d799deb7da2d39ae57ecb48965c55f
Ignoring *.sw[op] files

Change-Id: I3a059106a32f36374da787bc36a3721463189e6d
Implement network creation in compute API

Implements blueprint os-api-network-create

The ability to create new networks is currently only exposed by the
nova-manage CLI. Here we add support for network creation in the
os-networks API extension.

With the exception of num_networks and network_size, all the parameters
supported by 'nova-manage network create' are supported. Only a single
network may be created by each API call.

To avoid code duplication, the nova-manage code is refactored and moved
into NetworkManager so that it can be re-used by the API.

DocImpact
Change-Id: I682d498ab35ea43b553b64e13e677fe9eeb8e08b
add availability_zone to openstack metadata

This adds the key 'availability_zone' to the metadata for openstack.

'availability-zone' in EC2 is very useful to the instance to figure out
where it is.  For example, Ubuntu uses this information to determine
mirror location on EC2.

Fixes bug 1039579.

Change-Id: I212d3854b75e08a67138b5cd0bea178c47840e11
XCP-XAPI version fix

Fixes bug 1033933.

On an Kronos installation (Ubuntu + XCP-XAPI), the reported
software_version dictionary did not contain both product_version and
product_brand. This caused a KeyError. With this fix, the session's
product_version and product_brand will default to None in such cases.
The resize operation's name in these cases will default to VDI.resize.

Change-Id: Ic0db4128a7b27c08c24461562423bcecd1373e58
Typo fix: existant => existent

Impact:
* debug log message in nova/compute/manager
* Test function names
* Test strings and comments

Change-Id: I9be1b0ced2dfe257eef9785659f2cbe27b07ad3f
continue deleting instance even if quantum port delete fails

bug 1040385

Change-Id: Idb289437e40c7a1522b3a3f34f6c14ffe420c077
Add two prereq pkgs to nova devref env guide

fixes bug 1024903

As noted in the bug report, without libxml2-dev and libxslt-dev
installed on ubuntu 12.04, the virtualenv creation will fail.

This fix simply adds the packages to the first
"Install the prerequisite packages." line

Change-Id: I588ce14f63fa75d54405562f83d202d05c8a05c6
Re-define libvirt domain on "not found" exception

Fixes bug 1039891

If for any reason a libvirt-based VM becomes unregistered, there is
currently no mechanism for recovering without administrative
intervention. Discussing this with Vish, we agreed it was prudent to
validate and accordingly define domains with libvirt on hard_reboot or
hypervisor reboot.

This patch will allow hard_reboot to re-define a domain in the event
that a "domain not found" exception is returned from libvirt.  The
same approach is also applied to resume_state_on_host_boot.

Change-Id: Ic0cd59087d3d84787173fdd9eefdb77b67c33995
Merge "Typo fix: existant => existent"
Merge "Adds support for serial to libvirt config disks."
Merge "add availability_zone to openstack metadata"
Merge "Update sqlite to use PoolEvents for regexp."
Check association when removing floating ip.

Fixes bug 1032558 and returns 404 when trying to delete a floating ip
from an instance to which it is not associated.

Change-Id: I30b4d8a318597d38c7afc01ee6d2e6842b999157
Provide a hint for missing EC2 image ids

EC2 image ids are allocated when the images are listed for the first
time. Remind users of this if they specify an image id which does
not exist. Resolves bug 961451.

Change-Id: Id7326ba32e58051dbbf25c3c940fd0c9cc611ff3
Return actual availability zones

Report on real availability zones, not a hard coded "nova" zone in
the output of ec2 DescribeAvailabilityZones when the output is
verbose. Resolves bug 1032890.

Change-Id: Ie85cfa1c3638fc490f52f48c8238b3162732647d
Let admin list instances in vm_states.DELETED

Command 'nova list --status DELETED' returns nothing at the moment.
Make 'nova list --status DELETED' work and work for admin only.

Fixes LP Bug #1037885

Change-Id: I0bace95df713a767bb17e470e66361e1891e628c
Allow generate_sample.sh to be run from toplevel dir

I hit an issue where extract_opts.py couldn't import importutils
since it's not in my sys.path, so it's clear we need to set
PYTHONPATH before running.

The whole business of running the tool from the tools/conf dir
is fairly awkward, so change it to run from the top-level dir
instead.

Change-Id: I89b4d874a6ee3732234a9704a8ee6001a293ed71