Bases: nova.test.TestCase
Bases: object
Bases: nova.network.quantumv2.api.API
Used to ensure that API handles subclasses properly.
Bases: nova.test.TestCase
Bases: nova.test.TestCase
Bases: nova.test.TestCase
Servers tests using default API router with all extensions enabled.
The intent here is to catch cases where extensions end up throwing an exception because of a malformed request before the core API gets a chance to validate the request and return a 422 response.
For example, ServerDiskConfigController extends servers.Controller:
@wsgi.extends def create(self, req, body):
- if ‘server’ in body:
- self._set_disk_config(body[‘server’])
resp_obj = (yield) self._show(req, resp_obj)
we want to ensure that the extension isn’t barfing on an invalid body.
Bases: nova.test.TestCase
Shared implementation for tests below that create instance.
Test that the create works if there is no image supplied but os-volumes extension is enabled and bdms are supplied
Test that the create will fail if there is no image and no bdms supplied in the request
Test creating multiple instances but not asking for reservation_id
Test creating multiple instances but not asking for reservation_id
Test creating multiple instances with asking for reservation_id
Test that a BadRequest is raised if multiple instances are requested with a list of block device mappings for volumes.
Test that a BadRequest is raised if multiple instances are requested to boot from a single volume.
Bases: nova.test.TestCase
We want to make sure that if two instances are on the same host, then they return the same hostId. If two instances are on different hosts, they should return different hostId’s. In this test, there are 5 instances - 2 on one host and 3 on another.
Test getting servers by ip with admin_api enabled and admin context
Test getting servers by ip6 with admin_api enabled and admin context
Test getting servers by admin-only or unknown options when context is not admin. Make sure the admin and unknown options are stripped before they get to compute_api.get_all()
Test getting servers by admin-only or unknown options when context is admin. All options should be passed
Create two servers with the same host and different project_ids and check that the hostId’s are unique
Bases: nova.test.TestCase
Tests of places we throw 422 Unprocessable Entity from
Bases: nova.test.TestCase
Bases: nova.test.TestCase
Bases: nova.test.TestCase
Bases: nova.test.TestCase
Should throw a 400 error on corrupt xml.