24500 Commits

Author SHA1 Message Date
Ken'ichi Ohmichi
c88b2de92b Make v3 admin_password parameters consistent
There are API parameters "admin_password" and "admin_pass" on some APIs:
 * AdminPasswordController: admin_password
 * EvacuateController     : admin_password
 * RescueController       : admin_pass
 * ServersController      : admin_pass

These parameters mean the same thing, it is the admin password of a vm
instance. They should be the same parameter name because of the meaning.

DocImpact

Partially implements bp nova-v3-api

Change-Id: I452672e064d0dc4a1d5700bb96c01de8087f33d8
2013-11-05 15:33:32 +09:00
Jenkins
f119908b26 Merge "Use _get_server_admin_password()" 2013-11-05 05:21:15 +00:00
Jenkins
185eaafe9c Merge "Remove useless variable from libvirt/driver.py" 2013-11-05 05:18:20 +00:00
Jenkins
ae24a9304c Merge "Add auth_token settings to nova.conf.sample." 2013-11-05 02:15:21 +00:00
Jenkins
2d2758e187 Merge "Fix NoopQuotaDriver.get_(project|user)_quotas format" 2013-11-05 01:31:28 +00:00
Jenkins
0302bbc907 Merge "Remove multipath mapping device descriptor" 2013-11-05 01:31:03 +00:00
Jenkins
5bab216c8e Merge "compute tests: replace assertEquals with assertEqual" 2013-11-04 18:04:15 +00:00
Jenkins
344ef26244 Merge "xenapi: converting XenAPIVolumeTestCase to NoDB" 2013-11-04 17:42:47 +00:00
Jenkins
0d52cbfaf6 Merge "Always pass context to compute driver destroy()" 2013-11-04 13:24:57 +00:00
Jenkins
856c022ad3 Merge "nit: fix indentation" 2013-11-04 10:12:03 +00:00
OpenStack Jenkins
ba6d4416f2 Imported Translations from Transifex
Change-Id: I70654c90973a2f89180694b1b4454d2f32d70f2d
2013-11-04 06:10:05 +00:00
Jenkins
b6ebe1aa79 Merge "Parted 'invalid option' in XenAPI driver" 2013-11-03 14:59:15 +00:00
Russell Bryant
a2b454c878 nit: fix indentation
These lines (indented 3 spaces instead of 4) were making me twitch, so
fix it.

Change-Id: I7009214a44109b01a99531d7d84550eeafab6326
2013-11-03 20:02:25 +08:00
OpenStack Jenkins
61dbd18156 Merge "Imported Translations from Transifex" 2013-11-03 07:27:51 +00:00
Russell Bryant
933530ab40 Always pass context to compute driver destroy()
The context arg was added to the compute driver's destroy() method in
commit 8c0673d3102478ef34ef1b11c1db156db4b68f62.  The context is used by
the libvirt driver when dealing with encrypted volumes.

Unfortunately, most of the places where this method is called in the
compute manager, the context wasn't being passed in.  This patch makes
the argument mandatory and updates all of the drivers to match.

Change-Id: Icea2a36c16869af43954065473ff4e4910f32b1e
2013-11-03 15:20:49 +08:00
Jenkins
c3e5e1e557 Merge "Fixes the destroy() method for the Docker virt driver" 2013-11-03 06:23:29 +00:00
OpenStack Jenkins
46e0d8a710 Imported Translations from Transifex
Change-Id: I473e1dacce9c8fe58a6e3a29ea047980cbcd6967
2013-11-03 06:10:08 +00:00
Gary Kotton
14463cc3d3 compute tests: replace assertEquals with assertEqual
assertEquals will be deprecated in Python 3.

This is part of blueprint assertequal

Change-Id: Id639655621be04383fac986e8a0dc50a0951b64b
2013-11-02 10:29:30 -07:00
Brian Lamar
2f2a9cf3c7 Parted 'invalid option' in XenAPI driver
/sbin/parted is throwing an 'invalid option' error when setting the
partition endpoint to -0 (which tells parted to extend the partition
to the end of the disk). This change adds '--' to indicate the
remaining args are not options.

Fixes bug 1247307

Change-Id: I3bd2e25404d002329aa0ea53e9b60b69c90c0adb
2013-11-01 22:26:48 -04:00
Jenkins
b1f0d78a10 Merge "Remove duplicated test" 2013-11-01 20:17:04 +00:00
Jenkins
534218f093 Merge "Correct exception handling" 2013-11-01 20:16:31 +00:00
Jenkins
a0c2678e95 Merge "Send delete.end with latest instance state" 2013-11-01 20:07:20 +00:00
Jenkins
96f822c7b9 Merge "Add missing fields in DriverBlockDevice" 2013-11-01 20:05:41 +00:00
Jenkins
4a50d64da4 Merge "Move diff_dict to compute API" 2013-11-01 19:38:33 +00:00
Jenkins
480824ee67 Merge "Update schema_diff.py to use 'postgresql' URLs." 2013-11-01 19:37:50 +00:00
Rick Harris
711a12b402 Fix NoopQuotaDriver.get_(project|user)_quotas format
The quota API extension expects `get_project_quotas` and `get_user_quotas` to
return a dictionary where the value is another dictionary with a `limit` key.

The `DbQuotaDriver` adhered to this spec, but the `NoopQuotaDriver` didn't.

This fixes the `NoopQuotaDriver` to return the results in the correct format.

Fixes bug 1244842

Change-Id: Iea274dab1c3f10c3cb0a2815f431e15b4d4934b1
2013-11-01 18:48:35 +00:00
Jenkins
c6e54d416e Merge "Add notification for host operation" 2013-11-01 17:10:22 +00:00
Andrew Melton
0c409d98bb Send delete.end with latest instance state
Delete.end notifications were getting sent with a blank deleted_at
field. This meant that services listening to notifications for
instance state changes could potentially never get the instances
deleted_at value. The instance usage audit notification would be
the only source for that value.

This change returns the destroyed instance from the conductor API
and sends the delete.end notification with that state, containing
the deleted_at value which was just set.

UpgradeImpact
Closes-Bug: #1241681
Change-Id: I3481e0bada1711c3bff50f249f6a2b40a4ea6855
2013-11-01 10:00:37 -04:00
Davanum Srinivas
5647c6f457 Add missing fields in DriverBlockDevice
Pylint reports the following, let's clean them up
["Instance of 'DriverBlockDevice' has no '_fields' member", ""]
["Instance of 'DriverBlockDevice' has no '_legacy_fields' member", ""]

Change-Id: Iaf56dc35ce5ad963a6fb50d6641b203409ca6798
Closes-Bug: #1214377
2013-11-01 09:13:31 -04:00
Mark McLoughlin
e154c1a040 Remove superflous 'instances' joinedload
We already specify instances.{system_metadata,info_cache} as columns to
join so, loading 'instances' is implicit joinedload_all() behaviour.

Change-Id: I0c28e3b4d2ce8b5884d1247a7f96ecc810842d93
2013-11-01 06:32:08 +00:00
Sam Alba
c0e546ace4 Fixes the destroy() method for the Docker virt driver
* Added the missing "context" argument in nova/virt/driver.py
* Added the missing argument in the test_virt_drivers.destroy() as well so it
will make sure none of the other drivers will miss it.

Change-Id: I083b935da95c28ad4f9879036ef2bf7c1fbbb58e
Closes-Bug: #1244829
2013-10-31 17:53:35 -07:00
Jenkins
1dc66b9d2e Merge "Add compatibility for InstanceMetadata and primitives" 2013-10-31 18:22:32 +00:00
Jenkins
8e10afb748 Merge "ensure we don't boot oversized images" 2013-10-31 18:01:47 +00:00
Rick Harris
7dc9346ffb xenapi: converting XenAPIVolumeTestCase to NoDB
* Uses NoDB base class for speedup
* Removes dead/unecessary code

Change-Id: I0aa8c0886801c2e0b331d0655170a48f37a874d5
2013-10-31 17:51:21 +00:00
Rick Harris
f42d16134e Move diff_dict to compute API
`diff_dict` is only once, in the compute API, so just move it there.

Change-Id: I3a5a56a969aa661b096587b82fd4dc3fc430995f
2013-10-31 17:18:28 +00:00
Dan Smith
8ad28f924c Add compatibility for InstanceMetadata and primitives
Since the virt drivers instantiate InstanceMetadata manually,
this adds a bit of compatibility for primitive instance objects
until we have all of compute manager converted.

Change-Id: Ifb9ae7838300280895d63ffbd13337529b6d883c
2013-10-31 17:15:22 +00:00
Jenkins
93b6883d33 Merge "Utilizes assertIsNone and assertIsNotNone - tests/virt" 2013-10-31 16:59:52 +00:00
Jenkins
91d93e5afb Merge "Replace assertEquals with assertEqual - tests/api" 2013-10-31 16:59:10 +00:00
Jenkins
ba68740c6a Merge "Make unshelve use new style BDM" 2013-10-31 16:58:30 +00:00
Jenkins
9d21dc5f26 Merge "Add V3 API samples for config-drive" 2013-10-31 16:57:11 +00:00
Jenkins
48b36a1073 Merge "Make non-admin users can unshelve a server" 2013-10-31 16:54:52 +00:00
Pádraig Brady
f6810be4ae ensure we don't boot oversized images
Since we can't generally shrink incoming images, add extra checks
to ensure oversized images are not allowed through.
All cases when populating the libvirt image cache are now handled,
including the initial download from glance, where we avoid
converting to raw, as that could generate non sparse images
much larger than the downloaded image.

* nova/virt/libvirt/utils.py (fetch_image): Allow passing through
of the max_size parameter.
* nova/virt/images.py (fetch_to_raw): Accept the max_size parameter,
and use it to discard images with larger (virtual) sizes.
* nova/virt/libvirt/imagebackend.py (verify_base_size): A new
refactored function to identify and raise exception to oversized images.
(Raw.create_image): Pass the max_size to the fetch function.
Also enforce virtual image size checking for already fetched images,
as this class (despite the name) can be handling qcow files.
(Qcow2.create_image): Pass the max_size to the fetch function,
or verify the virtual size for the instance as done previously.
(Lvm.create_image): Pass the max_size to the fetch function.
Also check the size before transferring to the volume to improve
efficiency by not even attempting the transfer of oversized images.
(Rbd.create_image): Likewise.
* nova/tests/virt/libvirt/fake_libvirt_utils.py: Support max_size arg.
* nova/tests/virt/libvirt/test_libvirt.py (test_fetch_raw_image):
Add a case to check oversized images are discarded.
* nova/tests/virt/libvirt/test_imagebackend.py
(test_create_image_too_small): Adjust to avoid the fetch size check.

Fixes bug: 1177830
Fixes bug: 1206081
Change-Id: I3d47adaa2ad07434853f447feb27d7aae0e2e717
2013-10-31 17:01:34 +01:00
Jenkins
59255d7692 Merge "Use elevated context in resource_tracker.instance_claim" 2013-10-31 15:39:05 +00:00
Jenkins
d48ae3d636 Merge "Add updates and notifications to build_and_run_instance" 2013-10-31 15:36:39 +00:00
Jenkins
1748df63c9 Merge "Add network handling to build_and_run_instance" 2013-10-31 15:35:43 +00:00
He Jie Xu
f4af85dce5 Add V3 API samples for config-drive
Adds api sample tests and api samples for config-drive

Partially implements blueprint v3-api-unittests
Partially implements blueprint v3-api-specification

Change-Id: Id589ddced8c30089bacbb3eca81d4b9238901a91
2013-10-31 14:33:22 +08:00
Olga Kopilova
a2654bc965 Remove duplicated test
Function test_create_instance_with_img_ref_associates_config_drive
do the same as function test_create_instance_associates_config_drive
(identical bodies with different names)

Change-Id: I3c77d9249150231831f2e7eba1ccd493867ca5c0
2013-10-31 07:55:18 +02:00
Jay Lau
d8ffb4bf42 Add notification for host operation
Add notification for the following host operations:
1) compute/api.py:set_host_enabled
2) compute/api.py:host_power_action
3) compute/api.py:set_host_maintenance

This can make sure 3rd party callers can get host status quickly.

Implements bp host-operation-notification

Change-Id: Ib4cc80e568b6028afbdd6cb86f6ac8edeed4f933
2013-10-31 12:19:50 +08:00
Jenkins
042dc44970 Merge "Utilizes assertIsNone and assertIsNotNone - tests/etc" 2013-10-31 01:19:40 +00:00
Jenkins
2a8fb8f8f9 Merge "Add a metadata type validation when creating vm" 2013-10-30 23:26:14 +00:00