Fixes NoneType vcpu list returned by Libvirt driver

* libvirt dom.vcpu may return a NoneType if vcpus dont exist

Change-Id: Iee10c2559ceea636bc4896595962e3470228ad35
Closes-Bug: #1274758
Update aggregate should not allow duplicated names

It is not allow to create 2 aggregates with the same name
but if update an existing one with a name already used
by other aggregate that check should be made.
This patch doesn't allow to change the name to an existing
one.

Change-Id: Icfe315594beaec94229e5a4a4c1bb80fc366b66e
Closes-Bug: #1288296
Add helper method for checking if VM is booting from a volume

Add a _is_booted_from_value method which determines whether
the disk mapping indicates that the VM is booting from a volume
Update the _create_image method to use this helper API.

Related-Bug: #1271528
Change-Id: Iaa92f84ad3de9e84ba49bb255add043f3c8e4c8f
Add helper method for injecting data in an image

Add a _inject_data method whish helps to injecting data
in a disk image file system.
Update the _create_image method to use this helper

Change-Id: Ia005eee0a34d77bbf3eb33f7fef231dcf1eabe2c
Related-Bug: #1271528
Fix raise_http_conflict_for_instance_invalid_state docstring

The docstring says it's returning an HTTPConflict exception but it's
actually raising one, there is no return value to the method. This can
also be implied from the method name, but the docstring should be
accurate.

Change-Id: I23f005db0342008f20dcbfe90e63a87339c98716
Adds test for rebuild in compute api

While trying to verify a reported bug I wrote a test for the compute api
rebuild method.  The test verified that the bug was not here.

Related-bug: #1292181

Change-Id: I443f4d0927e7756a99b14b0491bb7f133ece5d86
Remove XenAPI driver deprecation warning log message

This reverts commit 8404694daec4febffd1665ee5d3753177031f1d5. CI has
been running for XenAPI and all requirements have been met such that we
will not be removing XenAPI.

Change-Id: I544bb642fdd72aef28bcaf809c34d5db43ce0937
Make compute API resize methods use Quotas objects

The compute API's various resize methods are using the old-style quota
class to reserve and commit quota changes directly to the database. This
change uses quotas objects to do the reserve and commit instead so those
operations go through conductor for the database access.

Note that the long-term goal is to pass the quota object over RPC
rather than the reservations list, but that's a larger patch which
is not necessary for the bug fix.

Closes-Bug: #1262461

Change-Id: Id18357f449193d25287f32bb8ffbf26ee2194a22
Prevent rescheduling on block device failure

Due to a race condition - it is possible for more instances to race for
the same volume. In such a scenario, the one that fails will get
rescheduled, and in the process detach the volume of a successful
instance.

To prevent this, this patch makes nova not reschedule on block device
failures. This is actually reasonable behaviour as block device failures
are rarely related to the compute host itself and so rescheduling is not
usually useful.

This bug does not exist in the new boot code in the manager which will
be used once remove-cast-to-schedule-run-instance bp lands (see
Iefab71047996b7cc08107794d5bc628c11680a70). However, it is now clear
that this will not be merged for Icehouse, so this patch is a
"forward port" of a patch we already applied to stable/havana.

Closes-bug: #1195947

Change-Id: I6b68965ac65cdb0e1da3b44e83428f056b1693aa
Fix KeyError if neutron security group is not TCP/UDP/ICMP and no ports

Previously, if a neutron security group rule was created that was not
TCP/UDP/ICMP and did not contain a port_range_min/max retrieving it from
nova-api would result in a KeyError in nova-api. This patch resolves
this issue.

Change-Id: I6284a7a8690aec9509b63f7cbd18812e09ef3fdd
Closes-bug: #1294346
VMware: add a file to help config the firewall for vnc

This file can be installed to properly configure the
firewall to allow VNC access to openstack instances

DocImpact
Closes Bug: 1294411

Change-Id: Ifc9a7d88c71dfe1b66d6ac395d9574cc619c1d3a
Refuse to block migrate instances with config drive

libvirt does not block migrate read only devices such as config
drives. It decides that the config drive is read only because it
is attached as a cdrom. So, we just throw our hands up in the
air and bravely refuse to block migrate those instances.

Partial-Bug: 1246201

Change-Id: I24f4f83c1ddf1cf3e37db4663ab82e61f0a2d00f
DocImpact: you should read all that stuff above.
Merge "Add helper method for checking if VM is booting from a volume"
Merge "Add helper method for injecting data in an image"
Merge "Prevent rescheduling on block device failure"
Merge "Adds test for rebuild in compute api"
Merge "Update aggregate should not allow duplicated names"
Merge "Fix KeyError if neutron security group is not TCP/UDP/ICMP and no ports"
Merge "Fixes NoneType vcpu list returned by Libvirt driver"
Merge "Fix raise_http_conflict_for_instance_invalid_state docstring"