24096 Commits

Author SHA1 Message Date
Chris Yeoh
fccf0ca795 Adds V3 API samples for attach-interfaces
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
2013-10-15 12:53:35 +10:30
Jenkins
2b17aa7f5a Merge "xenapi: stop using get_all_vdis_in_sr in spawn" 2013-10-14 22:30:56 +00:00
Jenkins
e6d1349ae7 Merge "xenapi: removes sleep after final upload retry" 2013-10-14 22:30:23 +00:00
Jenkins
c52259d386 Merge "Remove unused method _get_res_pool_ref from VMware" 2013-10-14 21:44:51 +00:00
Jenkins
f1ef506c22 Merge "Move exception definitions out of db api" 2013-10-14 21:34:32 +00:00
Jenkins
84b7f6ed18 Merge "Fix typos in nova/api code" 2013-10-14 21:33:03 +00:00
Jenkins
293906498e Merge "Fix NovaObject versioning attribute usage" 2013-10-14 19:09:37 +00:00
Jenkins
9f8c83c6b2 Merge "Harden version checking for boto" 2013-10-14 15:56:09 +00:00
Jenkins
f99641f099 Merge "Use the oslo fixture module" 2013-10-14 15:55:24 +00:00
Dan Smith
99cbfb3492 Fix NovaObject versioning attribute usage
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
2013-10-14 07:14:20 -07:00
John Garbutt
a8062f9004 xenapi: removes sleep after final upload retry
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
2013-10-14 14:56:44 +01:00
John Garbutt
ce8e95c7a3 xenapi: stop using get_all_vdis_in_sr in spawn
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
2013-10-14 12:42:30 +00:00
Davanum Srinivas
eaf5636544 Harden version checking for boto
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
2013-10-14 11:25:05 +00:00
John Garbutt
29d037a3d3 xenapi: simplify _migrate_disk_resizing_up
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
2013-10-14 11:28:37 +01:00
John Garbutt
fd24923db3 xenapi: revert on _migrate_disk_resizing_up error
_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
2013-10-14 11:28:36 +01:00
John Garbutt
275d503c3a xenapi: make _migrate_disk_resizing_up use @step
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
2013-10-14 11:28:36 +01:00
Jenkins
56a2954c4a Merge "VMware tests: replace assertEquals with assertEqual" 2013-10-14 10:01:50 +00:00
Jenkins
5524cd7baa Merge "Remove instance_info_cache_update() from conductor" 2013-10-14 09:35:29 +00:00
Jenkins
2a9b1621ea Merge "Xenapi: set hostname when performing a network reset" 2013-10-14 09:34:56 +00:00
Jenkins
e85a00f2a4 Merge "Fixes typos in the files in the nova folder" 2013-10-14 09:34:14 +00:00
Jenkins
6c41d8435d Merge "Fixes typos in nova/db code" 2013-10-14 09:33:18 +00:00
Jenkins
a61ce1a4bc Merge "Move utils.hash_file -> imagecache._hash_file" 2013-10-14 09:32:45 +00:00
Jenkins
5ad654699f Merge "Log which filter failed when on log level INFO" 2013-10-14 09:32:20 +00:00
Jenkins
d6b477c2dc Merge "Fixes typo in ListTargets CLI in hyperv driver" 2013-10-14 09:31:48 +00:00
Jenkins
cbee9048d6 Merge "hyperv tests: replace assertEquals with assertEqual" 2013-10-14 09:29:50 +00:00
Mehdi Abaakouk
b035359952 Use the oslo fixture module
The oslo fixture import has been imported
And the tests code have been updated to use this new module

Change-Id: I3454440770402c028f49a92c6728d7bbad0c9aa0
2013-10-14 09:43:24 +01:00
Jenkins
5ccf8c4e5f Merge "Fixes inconsistency in flavors list with marker" 2013-10-14 08:23:13 +00:00
Jenkins
2b6ceae0d6 Merge "Fix vmwareapi driver get_diagnostics calls" 2013-10-14 08:05:57 +00:00
Jenkins
bac6e6c643 Merge "compute api should throw exception if soft reboot invalid state VM" 2013-10-14 08:02:30 +00:00
Jenkins
dd9b169b40 Merge "VMware: fix regression attaching iscsi cinder volumes" 2013-10-14 07:56:09 +00:00
OpenStack Jenkins
cc2ab51594 Merge "Imported Translations from Transifex" 2013-10-14 07:26:31 +00:00
Jenkins
a3587c961f Merge "Add test_instance_get_active_by_window_joined" 2013-10-14 07:11:04 +00:00
Yaguang Tang
a5ddcbfd9f Remove unused method _get_res_pool_ref from VMware
This method has been moved to vm_util.py in commit
9408d79e7413aadcba52a61b7a33164090785e4f, so we can
remove it safely.

Change-Id: I6c192414c58c30ceec206937694ae92a3eea4d2d
2013-10-14 14:25:08 +08:00
OpenStack Jenkins
4d9d6cddce Imported Translations from Transifex
Change-Id: Ic8c3db69dde877030740a0a0df8e2f341addde34
2013-10-14 06:10:03 +00:00
Matt Riedemann
db68dc8670 Fix vmwareapi driver get_diagnostics calls
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
2013-10-13 00:28:35 -07:00
Jenkins
29aa77387e Merge "Remove unused scheduler rpcapi from compute api" 2013-10-13 00:42:17 +00:00
Jenkins
45ee4243fa Merge "Fix a typo of tabstop" 2013-10-13 00:41:44 +00:00
Jenkins
b8f328595f Merge "Update log message for add_host_to_aggregate" 2013-10-12 23:25:40 +00:00
Hans Lindgren
198720f441 Remove instance_info_cache_update() from conductor
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
2013-10-12 19:15:26 +02:00
Jay Lau
2392313f56 compute api should throw exception if soft reboot invalid state VM
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
2013-10-12 22:40:41 +08:00
Dan Smith
a9a23591d3 Make a note about Object deepcopy helper
This adds some clarifying documentation on the NovaObject.__deepcopy__
helper.

Change-Id: I0d2e997a6826537c059e34fcfc8b894662d42ee3
2013-10-11 21:13:54 -07:00
Dan Smith
74ffdbe75a Avoid caching quota.QUOTAS in Quotas object
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
2013-10-11 21:13:53 -07:00
Dan Smith
390aa76f17 Remove transitional callable field interface
Related to blueprint structured-object-fields

Change-Id: If0ffcd609fd58abd573926cda789bb6f722e28ff
2013-10-11 21:13:53 -07:00
Dan Smith
91a89f47b4 Make the base object infrastructure use Fields
Related to blueprint structured-object-fields

Change-Id: Icd2944f17b6100d51007dbc48da90e4e992bbd48
2013-10-11 21:13:53 -07:00
Dan Smith
0239429c19 Migrate some tests that were using callable fields
Related to blueprint structured-object-fields

Change-Id: I24207991e7385a7bbd2c56808d3cda76bed68ad8
2013-10-11 21:13:53 -07:00
Dan Smith
74c08b640d Migrate NovaPersistentObject and ObjectListBase to Fields
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
2013-10-11 21:13:53 -07:00
Dan Smith
9e772c6f67 Migrate Instance object to Fields
Related to blueprint structured-object-fields

Change-Id: Icd8a22458b311c4ca10c1382e214e09b23cba36c
2013-10-11 21:13:53 -07:00
Jenkins
8d8798efff Merge "Don't change the default attach-method" 2013-10-12 02:32:54 +00:00
Jenkins
e98f6bb689 Merge "Utilizes assertNotIn" 2013-10-12 02:25:40 +00:00
Jenkins
65fb6077c9 Merge "Add variable to expand for format string" 2013-10-11 23:52:20 +00:00