Select disk driver for libvirt+Xen according to the Xen version

There are two versions of the blktap [1] driver available under Xen.
blktap1 has been replaced by blktap2 that does not support "tap"
devices but "tap2", therefore we should use "tap2" devices by default.

Fixes bug 1188517
Fixes bug 1084618
DocImpact

Change-Id: I8b46885b0909de7cb51fd2d0f6ba2e9bcbf33cc6
Add notifiers to both attach and detach volumes

Implements: notifiers for attach and detach volumes
Fixes: bug #1191072
Change-Id: I84bc4d5eea6bfc9fe73ca09a5bec0e1e4d14ae02
xenapi: glance plugin should close connections

Current the xenapi glance plugin does not close
httplib connections when exceptions are raised.

Note this code is run under python 2.4 so with
is not available.

Fixes bug 1197846

Change-Id: I5cfb067320e7506109c301532a95fe83aa4fd0f9
Port security groups extension to v3 API Part 1

This changeset only copies the v2 implementation file into the
appropriate v3 directory unchanged. The copy as-is will not be
loaded by either the v2 or v3 extension loaders. The second
changeset will then make the changes required for it to work as a
v3 extension.

This is being done in order to make reviewing of extension porting
easier as gerrit will display only what is actually changed for v3
rather than entirely new files.

Partially implements blueprint nova-v3-api

Change-Id: I9cf1fb168283f9c76bac622d20719ac1bf7eb648
Port security groups extension to v3 API Part 2

This patch contains the changes required to adapt the
security groups extension and the corresponding unittests
to the v3 framework.

In v3, the management of security groups will be handled
by the networking service API. However, the dis/association
of security groups with instances still needs to be handled
by Nova. This change removes the security group management
code and ports the dis/association code to v3.

Partially implements blueprint nova-v3-api

Change-Id: I617eee5660447bc61518b89eed73ce394f7435a2
Enable core API-v3 to be optional when unit testing

Long ago init_only was added to avoid load all extension during unit tests and
speed it up.
So this patch enables to *not* load all core API-v3.

Related to bp nova-v3-api

Change-Id: I6acd264ace4440724b944009dff8575df8ad3512
Add Instance.get_by_id() query method

This adds the ability to fetch instances by id (instead of just
by uuid). In order to do that, the following additional changes
were made:

1. Refactor the get_by_uuid() method to share more code, and
   also fix its use of a kwarg as a positional one
2. Add columns_to_join as a parameter to db.instance_get()

Note that #1 above required a bunch of trivial changes to the
existing instance tests for the new calling mechanism.

Related to blueprint unified-object-model

Change-Id: I83eb55c363062a3506c7f5dfa161d8072865f11d
Merge "Port security groups extension to v3 API Part 1"
Merge "Port security groups extension to v3 API Part 2"
Fix cells manager rpc api version

405ebb90 added version 1.11 to the rpc API, but the cells manager did
not get updated.

Change-Id: I400db9229e88dc3e8e2fbb24c6adae7b070d12cd
Merge "Add notifiers to both attach and detach volumes"
Merge "Select disk driver for libvirt+Xen according to the Xen version"
Merge "xenapi: glance plugin should close connections"
Merge "Fix cells manager rpc api version"
Merge "Add Instance.get_by_id() query method"
Merge "Enable core API-v3 to be optional when unit testing"