Adds api sample tests and api samples for attach interfaces
Partially implements blueprint v3-api-unittests
Partially implements blueprint v3-api-specification
Change-Id: I54088cca1b83a8b92620062840606f2340a528c9
A typo made early in the object prototyping process has meant that
all objects thus far have been exposing a version of '1.0' because
the base object has been using an attribute of 'version'. The
object implementations have been exposing a 'VERSION' attribute
with their desired version advertisement.
Since we are still relatively early in the process of deploying
objects, the impact from this should be relatively minor, although
it is important to get this fixed ASAP before any incompatible
object changes are made.
Change-Id: If9154dc663111f304f72ef7f6f37c465e84ff504
Closes-bug: #1239709
This change removes the sleep that happens after the final retry of
uploading an image.
This change also ensures the unit tests do not take too long by stubbing
out time.sleep.
Closes bug 1239707
Change-Id: I16b6639e3231d41fa476218f406fa5b3abdfaf71
Currently when trying to find a cached image, the very expensive call to
get_all_vdis_in_sr is used, where we could instead fetch the VDI
directly using a more targeted query.
Now we are fetching the VDI by name_label we must ensure to clear the
name_label on newly created VDIs to ensure they do not get picked up by
later calls to _find_cached_image().
Fixes bug 1221292
The above code that checks for _find_cached_images has race conditions
where its possible to end up with two VDIs returned. To stop this
happening the code to create the cached images is now synchronized on
the image being fetched.
Fixes bug 1226073
Change-Id: I534fb8f42b00b5d39dc17dd5fee297144b5f379a
Simple string comparison is not effective for version checking.
Let's switch to using pkg_resources.parse_version and compare
the tuples. Per review feedback, enabling the code path for
2.13 as well. Originally we had handled this by excluding
2.13 from requirements. With this we should be able to removing
the exclusion for 2.13 from global requirements.
Change-Id: Ie047f7201d8e6a9a9641000d387c4312506f49b1
Closes-Bug: #1239220
Previously it called get_vdi_for_vm_safely but there was no need,
because we already get all the VDI information we need from
snapshot_attached_here.
This will make it easer to expand the method to include the migration of
ephemeral disks.
Part of blueprint xenapi-migrate-ephemeral-disks
Change-Id: I4e0dd1a875ee7e194d38016ff49296a360627aea
_migrate_disk_resizing_up now follows similar pattern to
_migrate_disk_resizing_down.
This involves using the @step decorator to report progress and rolling
back if any errors occur while migrating the disks to the destination
host.
Part of blueprint xenapi-migrate-ephemeral-disks
Change-Id: I2557357a4f3502f991a5d187c2ecf7ffeb22286e
Make use of the step decorator into _migrate_disk_resizing_up to make it
more consistent with _migrate_disk_resizing_up.
Also add some extra unit tests to help lock down this process with unit
tests.
Part of blueprint xenapi-migrate-ephemeral-disks
Change-Id: I395b8e27380649c667bb8d891802532ee3ab746b
The oslo fixture import has been imported
And the tests code have been updated to use this new module
Change-Id: I3454440770402c028f49a92c6728d7bbad0c9aa0
This method has been moved to vm_util.py in commit
9408d79e7413aadcba52a61b7a33164090785e4f, so we can
remove it safely.
Change-Id: I6c192414c58c30ceec206937694ae92a3eea4d2d
The vmware driver is calling vmops.get_info for both the get_info and
get_diagnostics APIs which is wrong since they should be returning
different information. Given the hypervisor support matrix doesn't list
the vmware driver as supporting the nova diagnostics API, it seems this
was just an oversight.
This patch changes the driver code to call the vmops.get_diagnostics
method which raises NotImplementedError. It also fixes the tests to
actually ensure covers get_diagnostics for both the ESX driver and the
VC driver.
Closes-Bug: #1237622
Change-Id: I0c9015f1f7d5dd219548196de479e87e878ea0fd
After network api was converted to use InfoCache object it no longer
depends on the conductor instance_info_cache_update() method.
This change removes this method from conductor and in addition removes
conductor parameter in calls to network api from within compute manager,
previously needed by the @refrech_cache() decorator in network api for
its calls to this same conductor method.
Change-Id: I5bb535062b5f5948e2b6ba1daa089f3d93471394
When user perform soft reboot to a VM which in suspended/paused/
stopped/error state, nova compute api should throw exception for
such state.
Change-Id: Ic365c6360f6b7407d9de0dac6ff1093484692cf4
Closes-Bug: #1236930
This removes the local caching of the QUOTAS module in the Quotas
object. If we ever use deepcopy() on objects, this will cause
us trouble. Since it's not necessary, remove it for now.
Change-Id: I0d0e5fba9cd26c1648ff724238554478e65f62ea
This actually uncovers an invalid testing scenario we had for lists,
which was using non-objects in the list-of-objects tests.
Related to blueprint structured-object-fields
Change-Id: I94609c1fd4a8b011e71bde7d9510ec2d3cb29868