remove 2 unused function in test_volumes.py

2 fake functions are not used in this test file, remove them

Change-Id: I35d374cb2cbffc0ba6d2ac761b4f7fd20b47401f
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
Fixes evacuate doesn't honor enable password conf for v3

The evacuate api should honor enable_instance_password conf
setting just like server creation, rebuild and rescue api does,
enables this flag will returning the instance password from
server API call evacuate, If the hypervisor does not support
password injection then the password returned will not be
correct, this patch just fixes v3 evacuate api, since change
return value of v2 could potentially break apps which depend
on this being returned.

This patch also changes the evacuate response code to 202 to
keep consistency with api.

DocImpact
Change-Id: I2b9e5a067323ca84e2040e175a0425de3c0fafba
Closes-Bug: #1244203
Make compute use quota object existing function

There are several places which check the admin project_id and
user_id with instance project_id and user_id in compute.
There is already a helper function in quota objects, make the code
use the existing one.

Change-Id: I73e7e53ad15eda3788607a1be09c27215d09bda1
vmwareapi:Fix nova compute service down issue when injecting pure IPv6

Use vmware center driver to static inject pure IPv6 address, since
IPv6 injection function still not be implemented, but it should not
throw exception, it will impact nova compute service work

Change-Id: I8d0835623202d48466a97798312b67f049ffb6c8
Closes-Bug: #1286006
VMware: add in debug information for network selection

Add in some debug information to assist remote debugging of networking
issues.

Change-Id: I3cdeb56e0745d4a964e6c6069325fadee99c1088
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
Fix typo and add test for refresh_instance_security_rules

Change Ia36b0dfb adds virt driver API method
refresh_instance_security_rules but there is a typo in the method's
docstring and it needs to be covered in test_virt_drivers.py.

Closes-Bug: #1290036

Change-Id: Idacffe2087f0bec6290e3422d1e777376b489615
Catch FloatingIpNotFoundForHost exception

When showing floating ips for a given host, the FloatingIpNotFoundForHost
exception isn't handled when no floating ips can be found for the host.
This patch fixes this bug.

Closes-Bug: #1289164
Change-Id: Ic25ffd66945fd40ba10d69515e0cbfeae840313c
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
Specify spacing on periodic_tasks in manager.py

Some methods in compute/manager.py were using the @periodic_task
decorator to ensure they were called regularly, but were not passing
in the `spacing` kwarg.  In this case the method can only be called at
the default rate, calculated as min(60 seconds, <spacings from all
periodic_tasks>), regardless of the poll interval set in config.

Although there was throttling code which prevented the methods from
executing too often, the case where we do want the method to execute
very often was missed.  This patch ensures that setting the config
values low will cause the method to be called as frequently.

Change-Id: I1530c8b3b6ac71f4d9e2e41188c0eca4a6556e01
Closes-Bug: #1274317
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
Fix "computeFault" when v3 API "GET /versions/:(id)" is called

Usually, the API of "GET /versions/:(id)" is not called directly.
However we can call it directly. So this commit fixes it to work
without the "computeFault ... Unexpected API Error".

Change-Id: Ic5513e5bce214d6fe90a9ccd7d056ac1dd0a4d19
Closes-Bug: #1281936