Update docstring for baremetal opportunistic tests

The db.test_migrations can test the migrations for Nova and nova
bare-metal. This patch updates the docstring on how to run those
tests opportunistically.

Change-Id: I327d688ec9af7dc0e8e0e58804bac8a3091cb727
VMware: iscsi target discovery fails while attaching volumes

VMware Drivers are unable to discover iscsi targets because
the api calls fail to specify the iscsi server location
(referred in the code as target portal) to retrieve targets.
This is critical for the attach_volume feature to work with
iscsi supported cinder drivers.

Closes-Bug: #1235112

Change-Id: I60c06ae651bb2eb6d466a5ca61a09f289c21d1a3
VMware: Add a test helper to mock the suds client

Change-Id: I326abd0ee5a4b1512c34a63de5fea6a7ba1b6f77
Fix invalid vim call in vim_util.get_dynamic_properties()

Code was calling
vim.CancelRetrievePropertiesEx(token=obj_content.token)

This will be translated into a call to
vim_request_handler(managed_object, **kwargs) by Vim.__getattr__(),
which requires a managed_object argument.

This change also adds a test for vim_util.get_dynamic_properties which
exercises both property retrieval, and the cancellation of an
unfinished RetrieveResult.

Change-Id: Ie0d98cbded4dee680593d2a950510de25ee5fab7
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
Remove mention of removed dhcp_options_enabled

Commit 3292103d80676fc789615465759de966dba4e9f7 removed
dhcp_options_enabled, remove it from the help string as well.

Change-Id: I1f89e0b809c5a47b02a11f2c013a8cbb6d0afa4a
Closes-Bug: #1289993
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
Cells: Send instance object for instance_delete_everywhere

The delete method in the compute api expects an instance object to be
passed in. So the instance object needs to not be to_primitived in the
instance_delete_everywhere rpc method.

Change-Id: I620ec57bc28ba11335758455c7cac0bfa63f5b37
Closes-bug: #1293750
VMware: bug fix for host operations when using VMwareVCDriver

Currently the driver does not have a mapping between a Nova 'host'
and a VMware 'cluster'. A host operation would update the state of
one of the hosts in one of the configured clusters.

The solution is for the driver to raise a NotImplemented exception.

Change-Id: Idd78020374a6fe2d34bf8d860c30e2ed8c719903
Closes-bug: #1274129
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
Merge "Update docstring for baremetal opportunistic tests"
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.