Commit Graph

15550 Commits

Author SHA1 Message Date
Dan Wendlandt 97dd343b16 update python-quantumclient dependency to >=2.0
Nova should depend on a version of quantum client that includes
API v2.0 support.  That means the client version should be 2.0+ .

This was just pushed to PyPi today:

http://pypi.python.org/pypi/python-quantumclient/2.0

Change-Id: Ib9d997ceff92f2da6986d184b7b0da9e564800aa
2012-08-13 07:31:58 -07:00
Jenkins e2bb812db3 Merge "Rewrite image code to use python-glanceclient" 2012-08-14 00:39:00 +00:00
Jenkins 4d9cca956c Merge "Add missing self. for parent" 2012-08-13 22:12:48 +00:00
Jenkins 09f24242a3 Merge "Fix rpc error with live_migration." 2012-08-13 21:58:40 +00:00
Jenkins 6a848df400 Merge "Don't stuff non-db data into instance dict" 2012-08-13 21:57:53 +00:00
Yun Mao e4ecf19667 Add missing self. for parent
Change-Id: Icb67278d46485f5515aae3f66c4654a094b1662c
2012-08-13 17:05:26 -04:00
Brian Waldon 95015ad42a Rewrite image code to use python-glanceclient
This patch rewrites the Glance-specific code within Nova to use
the new python-glanceclient library. The old client is deprecated
in Folsom and should not be used in conjunction with
python-glanceclient.

This removes the dependency on installing 'glance' through pip.

Implements bp integrate-python-glanceclient
Fixes bug 880964

Change-Id: Ifb9e75593abd36a2d1c08773d02f192e5e5627fc
2012-08-13 13:28:48 -07:00
Jenkins 3fc3dbe6ab Merge "Fix TypeError conversion in API layer" 2012-08-13 20:27:56 +00:00
Jenkins 7de1aca766 Merge "Improve bw_usage_update() performance" 2012-08-13 19:20:30 +00:00
Russell Bryant f72f349865 Fix rpc error with live_migration.
The topic argument to live_migration was removed on the manager side in
rpc API version 1.3, but was not removed from scheduler/rpcapi.py.
Remove it now.

Change-Id: I0b1c68848f7bd55f6f10c63b9433746f0a343a63
2012-08-13 14:37:10 -04:00
Yun Mao e4a7edd175 Avoid {} and [] as default arguments
Dict and list objects are mutable and are usually the sources of
subtle bugs when used as default arguments. Avoid them.

Change-Id: I5340c7051455a80c4adfab885d89acb46570fa52
2012-08-13 13:44:14 -04:00
Chris Behrens 7a500ecc87 Improve bw_usage_update() performance
Fixes bug 1036084

bw_usage_update() most commonly updates rows vs creates rows.  New rows
are only created on the 1st bandwidth update for an instance or when
the audit period rolls over.  This cuts down DB queries to 1 for the
'update' case.

Added bonus:
Remove unused 'import inspect' in compute manager.

Change-Id: Ie5f6c919676046d817b842138dc9d17d1115d3c0
2012-08-13 16:59:16 +00:00
Johannes Erdfelt 99fb9d2a99 Don't stuff non-db data into instance dict
The RPC API passes admin_pass and injected_files as arguments, but when
calling the driver API, those values get stuffed into the instance dict
which is otherwise all data that is stored in the database. This has
led to some bugs (such as 1034948) which could have been avoided if
the code was consistent.

Change-Id: I09a7de8eca3791a5ab27e93b22e5ccccee31cf09
2012-08-13 16:37:00 +00:00
Jenkins 7c9bb06622 Merge "Fix type error in state comparison" 2012-08-13 16:35:55 +00:00
Jenkins dafa79ff78 Merge "Move results filtering to db." 2012-08-13 16:17:08 +00:00
Yun Mao a0ef5ad84f Fix type error in state comparison
vm_states.RESIZED is not a list/tuple, use == to compare instead
of in (although it did work by accident in Python).

Change-Id: Ib739e729ae79a3f68ca0eac10167982bd3a6656c
2012-08-13 11:53:53 -04:00
Jenkins 2db23f6ba4 Merge "Flavor extra specs extension use instance_type id" 2012-08-13 15:36:28 +00:00
Jenkins 726bd9bb3f Merge "xenapi: ensure all calls to agent get logged" 2012-08-13 15:03:11 +00:00
Vishvananda Ishaya ed80ed6157 Key auto_disk_config in create server off of ext.
Implements part of blueprint disable-server-extensions

Makes sure that auto_disk_config is only accepted in the create
server request if the extension is enabled. Note that the extension
alias is OS-DCF because it also adds output to the server
request.

Change-Id: I59fafe769e1e562e6bf9f6db768acc9b0f8d2b93
2012-08-12 10:08:47 -07:00
Jenkins d036fdbe0f Merge "Compute restart causes period of network 'blackout'" 2012-08-12 02:15:53 +00:00
Jenkins 480f4e2a3a Merge "remove nova code related to Quantum v1 API" 2012-08-12 02:15:37 +00:00
Brian Elliott 5646b96119 Fix TypeError conversion in API layer
Fix conversion of TypeError to Fault in ResourceExceptionHandler.
TypeError can result when the list of extensions is inovked if the
parameters don't match the extension method's signature.

Specifically, if an empty body was sent with an HTTP POST to create a
server, a 500 error was returned.  This change is a fix to properly
return a 400 instead.

(In Python2.6, the ex_value argument of __exit__ is type string when
ex_type is a TypeError, which caused the conversion logic to get
skipped.)

bug 1035120

Change-Id: I96ad335a6338523345d28b7e744dbc7449b4753d
2012-08-12 00:40:18 +00:00
Jenkins 0effb5ce1d Merge "Default behavior should restrict admins to tenant for volumes." 2012-08-12 00:34:51 +00:00
Jenkins cddfa51bd0 Merge "Revert "Remove unused add_network_to_project() method"" 2012-08-12 00:32:15 +00:00
Jenkins 7aa0fa014e Merge "Sync with latest version of openstack.common.cfg" 2012-08-12 00:29:59 +00:00
Jenkins 068f907fa7 Merge "Sync some cleanups from openstack.common" 2012-08-12 00:29:49 +00:00
Jenkins 8650d84a8e Merge "Key requested_networks off of network extension" 2012-08-11 15:11:29 +00:00
Jenkins c2fd0866e2 Merge "Config drive v2" 2012-08-11 03:08:49 +00:00
Nachi Ueno 80724254ed Key requested_networks off of network extension
partially implements blueprint disable-server-extensions

Change-Id: Id6abe827b0d0bbf04dc25bed9a92296b24f34f5f
2012-08-10 23:45:59 +00:00
Jenkins 649d3cea2a Merge " Key config_drive off of config-drive extension" 2012-08-10 23:35:59 +00:00
Jenkins 7c62170c67 Merge changes I87ce041c,Iaca00958,I326b26c4
* changes:
  Don't accept key_name if not enabled
  Key min_count, max_count, ret_res_id off of ext.
  Key availability_zone in create server off of ext.
2012-08-10 23:31:45 +00:00
Jenkins c998ebda59 Merge "import module, not type." 2012-08-10 23:27:05 +00:00
Jenkins 13c23fd68e Merge "Make sure reservations is initialized" 2012-08-10 23:12:37 +00:00
Jenkins 7e944c0e8d Merge "maint: remove an unused import in libvirt.driver" 2012-08-10 23:05:33 +00:00
Jenkins 95dbc97a2c Merge "Don't accept scheduler_hints if not enabled" 2012-08-10 23:05:02 +00:00
Nachi Ueno dec1531f1d Key config_drive off of config-drive extension
partially implements blueprint disable-server-extensions

Change-Id: I42743efeb74b3286c158589eb6af7b1d9ba215d5
2012-08-10 23:04:58 +00:00
Jenkins faa0b5e88b Merge changes I7aef0ebe,I0dd233c2
* changes:
  Key user_data in create server off of extension
  Key block_device_mapping off of volume extension
2012-08-10 23:04:48 +00:00
Jenkins b962f98a18 Merge "Make sure ec2 mapping raises proper exceptions" 2012-08-10 23:04:18 +00:00
Jenkins 4e596a171f Merge "General host aggregates part 2" 2012-08-10 23:01:29 +00:00
Kevin L. Mitchell a811692056 Make sure reservations is initialized
In compute API, _delete() could reference reservations before it was
ever assigned, if the call to _update() or to QUOTAS.reserve() raised
an exception--the exception handlers test to see if reservations is
set, and if so, rolls the reservations back.  This patch makes sure
the reservations variable is initialized to None before entering the
try: block.

Change-Id: I7e344074d8fd75b371d78abf8fd15b6f84023cef
2012-08-10 17:21:05 -05:00
Russell Bryant 31d10e9454 import module, not type.
This patch fixes a little HACKING issue.  Import the collections module
instead of the defaultdict type from collections.

Change-Id: I59c6fe947b6ed03f13c3481b0484896e8daaa963
2012-08-10 18:02:05 -04:00
Michael Still d507bd9f18 Config drive v2
This is the first cut of config drive v2. Some points to note:

 - implements a helper to create new-style config drives. These
   config drives can be VFAT or ISO9660, this is controlled by
   a flag. The current default is ISO9660.

 - the config drives contain all the injected files, as well as
   everything returned from the ec2 style metadata service. Only
   the most recent version of the ec2 metadata is used, but future
   versions will appear as well.

 - the v1 functionality of specifying an image from glance to have
   the files injected into is dropped.

 - the location for file injection is now a directory named
   openstack/files, not the root level of the filesystem. Filename
   mapping is in the openstack metadata files.

 - the default format for the config drive is iso9660, although
   the previous vfat is available with a flag change.

 - includes the first version of an openstack metadata format.

 - there are some simple unit tests which probably need more done
   to them.

Partially implements bp config-drive-v2.

Change-Id: I210fa4dd7d8d6be398a46b30a0d46b960e22d6b0
2012-08-11 07:50:40 +10:00
Sean Dague 13d25ed7dc Don't accept key_name if not enabled
partially implements blueprint disable-server-extensions

moves filling out key_name variable behind conditional only
used when os-keypairs is enabled.

Adds unit tests to ensure this behaves as expected

(Remove debugging that was left in)

Change-Id: I87ce041c2093c93a1a2456ef51357593e9de0681
2012-08-10 17:07:54 -04:00
jakedahn 8077486b3c Default behavior should restrict admins to tenant for volumes.
* NOTE: This is a port from cinder to nova volumes
  * Now to view all volumes or volume snapshots across
    all tenants you need to include the all_tenants=1
    GET param in your api request.
  * Fixes remaining issues blocking bug #967882

Change-Id: I7fe15e792b62e59973c7faa2cf1c52929ae5864f
2012-08-10 13:43:15 -07:00
Jenkins 2ef345534a Merge "Making security group refresh more specific" 2012-08-10 19:42:57 +00:00
Jenkins 67e2bbdfa2 Merge "Moves security group functionality into extension" 2012-08-10 19:13:45 +00:00
Jenkins a7abc32cfe Merge "Send host not ComputeNode into uptime RPC call." 2012-08-10 19:13:35 +00:00
Jenkins 3b0ef1fb2e Merge "maint: compare singletons with 'is' not '=='" 2012-08-10 19:03:21 +00:00
Jenkins aef2fbb2da Merge "Create unique volumes_dir for testing." 2012-08-10 18:58:08 +00:00
Dan Wendlandt 357ffa7d3a remove nova code related to Quantum v1 API
bug 1034692

Quantum team is removing all v1 support in Folsom, so this code
will not be used or supported with Quantum Folsom release.

Change-Id: I4c397d5238fcc3a15320e052bdc4735dfec1f176
2012-08-10 11:30:14 -07:00