Merge lp:~jakedahn/nova/lp820620 into lp:~hudson-openstack/nova/trunk

Proposed by Jake Dahn
Status: Superseded
Proposed branch: lp:~jakedahn/nova/lp820620
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 27 lines (+3/-1)
2 files modified
nova/api/openstack/contrib/floating_ips.py (+1/-1)
nova/tests/api/openstack/contrib/test_floating_ips.py (+2/-0)
To merge this branch: bzr merge lp:~jakedahn/nova/lp820620
Reviewer Review Type Date Requested Status
Nova Core security contacts Pending
Review via email: mp+70630@code.launchpad.net

Description of the change

This branch allows the standard inclusion of a body param which most http clients will send along with a POST request.

To post a comment you must log in.
lp:~jakedahn/nova/lp820620 updated
1389. By Vish Ishaya

Fixes broken image_convert. The context being passed to glance image service was not a real context.

1390. By Ilya Alekseyev

Added possibility to mark fixed ip like reserved and unreserved.

1391. By Chris Behrens

ZoneAwareScheduler classes couldn't build local instances due to an additional argument ('image') being added to compute_api.create_db_entry_for_new_instance() at some point.

With this fix, 'image' is now being passed down to the scheduler and into the above call. Updated an existing test so that it didn't stub around the above failing call.

1392. By Rick Harris

Adds ability to disable snapshots in the Openstack API.

1393. By Sandy Walsh

Adds OS API 1.1 support

1394. By Ed Leafe

This branch adds additional capability to the hosts API extension. The new options allow an admin to reboot or shutdown a host. I also added code to hide this extension if the --allow-admin-api is False, as regular users should have no access to host API calls.

1395. By Johannes Erdfelt

nova.exception.wrap_exception will re-raise some exceptions, but in the process of possibly notifying that an exception has occurred, it may clobber the current exception information. nova.utils.to_primitive in particular (used by the notifier code) will catch and handle an exception clobbering the current exception being handled in wrap_exception. Eventually when using the bare 'raise', it will attempt to raise None resulting a completely different and unhelpful exception.

The patch saves the exception at the beginning of wrap_exception and then re-raises the original exception avoiding the possibility of a clobbered exception.

1396. By Dan Prince

Set image progress to 100 if the image is active.

1397. By Ed Leafe

Adds the ability to read/write to a local xenhost config. No changes to the nova codebase; this will be used only by admin tools that have yet to be created.

1398. By Naveed Massjouni

Added xml schema validation for extensions resources.
Added corresponding xml schemas.
Added lxml dep, which is needed for doing xml schema validation.

1399. By Dan Prince

Update the curl command in the __public_instance_is_accessible function of test_netadmin to return an error code which we can then check for and handle properly. This should allow calling functions to properly retry and timeout if an actual test failure happens.

1400. By Isaku Yamahata

With this branch, boot-from-volume can be marked as completed in some sense.
The remaining is minor if any and will be addressed as bug fixes.

With this branch the following is enabled.
- describe instance attribute
- get_metadata for euca-bundle-vol
- root/ephemeral/swap device support

1401. By Dave Walker

Initial validation for ec2 security groups name.

1402. By Brian Waldon

OSAPI v1.1 POST /servers now returns a 202 rather than a 200

1403. By Thierry Carrez

Fix the two pep8 issues that sneaked in while the test was disabled.

1404. By Brian Waldon

Instance metadata now functionally works (completely to spec) through OSAPI

1405. By Thierry Carrez

Adds missing nova/api/openstack/schemas to tarball

1406. By Ken Pepple

I think this restores the functionality ...

$ bin/nova-manage flavor list
m1.medium: Memory: 4096MB, VCPUS: 2, Storage: 40GB, FlavorID: 3, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB
m1.large: Memory: 8192MB, VCPUS: 4, Storage: 80GB, FlavorID: 4, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB
m1.tiny: Memory: 512MB, VCPUS: 1, Storage: 0GB, FlavorID: 1, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB
m1.xlarge: Memory: 16384MB, VCPUS: 8, Storage: 160GB, FlavorID: 5, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB
m1.small: Memory: 2048MB, VCPUS: 1, Storage: 20GB, FlavorID: 2, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB
$ bin/nova-manage flavor delete m1.medium
m1.medium deleted
$ bin/nova-manage flavor delete m1.medium --purge
m1.medium purged
$ bin/nova-manage flavor list
m1.xlarge: Memory: 16384MB, VCPUS: 8, Storage: 160GB, FlavorID: 5, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB
m1.large: Memory: 8192MB, VCPUS: 4, Storage: 80GB, FlavorID: 4, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB
m1.tiny: Memory: 512MB, VCPUS: 1, Storage: 0GB, FlavorID: 1, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB
m1.small: Memory: 2048MB, VCPUS: 1, Storage: 20GB, FlavorID: 2, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB

1407. By Brian Waldon

Fix pep8 error.

1408. By Dan Prince

Update the OSAPI v1.1 server 'createImage' and 'createBackup' actions to limit the number of image metadata items based on the configured quota.allowed_metadata_items that is set.

1409. By Johannes Erdfelt

Be more tolerant of agent failures. It is often the case there is only a problem with the agent, not with the instance, so don't claim it failed to boot so quickly.

1410. By Chris Behrens

This adds the servers search capabilities defined in the OS API v1.1 spec.. and more for admins.

For users, flavor=, image=, status=, and name= can be specified. name= supports regular expression matching.
Most other options are ignored. (things outside of the spec like 'recurse_zones' and 'reservation_id' still work, also)

If admin_api is enabled and context is an admin: along with the above, one can specify ip= and ip6= which will do regular expression matching. Also, any other 'Instance' column name can be specified, so you can do regexp matching there as well. Unknown Instance columns are ignored.

Also fixes up fixed_ip=, making a 404 returned vs a 500 error... and handling this properly with zone recursion as well.

1411. By jakedahn

This branch makes sure to detach fixed ips when their associated floating ip is deallocated from a project/tenant.

1412. By Soren Hansen

Pass py_modules=[] to setup to avoid installing run_tests.py as a top-level module.

1413. By Matthew Hooker

These fixes are the result of trolling the pylint violations here

https://jenkins.openstack.org/job/nova-pylint-errors/violations/

1414. By Ed Leafe

Removed verbose debugging output when capabilities are reported. This was clogging up the logs with kbytes of useless data, preventing actual helpful information from being retrieved easily.

1415. By Jesse Andrews

Adding keypair support to the openstack contribute api

1416. By Thierry Carrez

* Removes rogue direct usage of subprocess module by proper utils.execute calls
* Adds a run_as_root parameter to utils.execute, that prefixes your command with FLAG.root_helper (which defaults to 'sudo')
* Turns all sudo calls into run_as_root=True calls
* Update fakes accordingly
* Replaces usage of "sudo -E" and "addl_env" parameter into passing environment in the command (allows it to be compatible with alternative sudo_helpers)
* Additionally, forces close_fds=True on all utils.execute calls, since it's a more secure default

1417. By Tushar Patil

Support for management of security groups in OS API as a new extension.

1418. By Chris Behrens

API needs virtual_interfaces.instance joined when pulling instances from the DB. Updated instance_get_all() to match instance_get_all_by_filters() even though the former is only used by nova-manage now. (The latter is used by the API).

1419. By William Wolf

Fixes pep8 issues in test_keypairs.py

1420. By Brian Lamar

Allows for a tunable number of SQL connections to be maintained between services and the SQL server using new configuration flags. Only applies when using the MySQLdb dialect in SQLAlchemy.

1421. By Brian Waldon

Fixing a 500 error when -1 is supplied for flavorRef on server create.

1422. By Anthony Young

Fix a typo that causes ami images to launch with a kernel as ramdisk when using xen.

1423. By Dan Prince

Fixes to the OSAPI floating API extension DELETE.
Updated to use correct args for self.disassociate (don't sweep exceptions which should cause test cases to fail under the rug).
Additionally updated to pass network_api.release_floating_ip the address instead of a dict.

1424. By Dan Prince

Nuke hostname from nova-dhcpbridge. We don't use it.

1425. By termie

Allow different schedulers for compute and volume.

1426. By Johannes Erdfelt

Fix v1.1 /servers/<id> PUT request to match API documentation by returning 200 code and the server data in the body

1427. By Vladimir Popovski

typo fix

1428. By Tushar Patil

Currently OS API doesn't accept availability zone parameter so there is no way to instruct scheduler (SimpleScheduler) to launch VM instance on specific host of specified zone.

Now changes have been made in the create_instance_helper to read the availability zone and pass it to the compute create API. Any OS extensions can take a advantage of it.
Also changes have been made in the nova-manage ServiceCommands class to expose zone information to the admin users. Only admin users will be allowed to launch VM instance on specific host.

1429. By Alex Meade

Changes requests with an invalid server action to return an HTTP 400 instead of a 501.

1430. By John Tran

  fix InvalidPortRange exception shows up in euca2ools instead of UnknownError when euca-authorize is specified w/ invalid port #.

1431. By John Tran

added logic to make the creation of networks (IPv4 only) validation a bit smarter:
  - detects if the cidr is already in use
  - detects if any existing smaller networks are within the range of requested cidr(s)
  - detects if splitting a supernet into # of num_networks && network_size will fit
  - detects if requested cidr(s) are within range of already existing supernet (larger cidr).

IPv6 logic remains intact yet had not been improved by this code.

1432. By Soren Hansen

Add source-group filtering.

Move refresh to be triggered by allocation and deallocation of IP's rather than creation/destruction of instances.

There really needs a way to use ipsets for this, but it's not widely supported yet (went into mainline linux at 2.6.39), so this implementation just uses regular iptables.

1433. By Donal Lafferty

Added ability too boot VM from install ISO. System detects an image of type iso. Images is streamed to a VDI and mounted to the VM. Blank disk allocated to VM based on instance type.

Currently available for XenServer.

1434. By Monsyne Dragon

Add durable flag for rabbit queues.

1435. By Jake Dahn

Adding standard inclusion of a body param which most http clients will send along with a POST request.

1436. By Jake Dahn

making body default to none

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nova/api/openstack/contrib/floating_ips.py'
2--- nova/api/openstack/contrib/floating_ips.py 2011-07-27 17:34:58 +0000
3+++ nova/api/openstack/contrib/floating_ips.py 2011-08-05 21:46:05 +0000
4@@ -124,7 +124,7 @@
5 "floating_ip": floating_ip,
6 "fixed_ip": fixed_ip}}
7
8- def disassociate(self, req, id):
9+ def disassociate(self, req, id, body):
10 """ POST /floating_ips/{id}/disassociate """
11 context = req.environ['nova.context']
12 floating_ip = self.network_api.get_floating_ip(context, id)
13
14=== modified file 'nova/tests/api/openstack/contrib/test_floating_ips.py'
15--- nova/tests/api/openstack/contrib/test_floating_ips.py 2011-08-02 11:28:43 +0000
16+++ nova/tests/api/openstack/contrib/test_floating_ips.py 2011-08-05 21:46:05 +0000
17@@ -177,8 +177,10 @@
18 self.assertEqual(actual, expected)
19
20 def test_floating_ip_disassociate(self):
21+ body = dict()
22 req = webob.Request.blank('/v1.1/os-floating-ips/1/disassociate')
23 req.method = 'POST'
24+ req.body = json.dumps(body)
25 req.headers['Content-Type'] = 'application/json'
26 res = req.get_response(fakes.wsgi_app())
27 self.assertEqual(res.status_int, 200)