Commit Graph

69 Commits

Author SHA1 Message Date
Chris Yeoh 37d42caeab Add more association support to network API
Adds API support to:
- Disassociate only host from network
- Disassociate only project from network
- Associate network with host (project already supported)

New functionality is added to a new extension networks_associate,
but the original networks extension is modified to allow networks_associate
to extend how it needs to. The original behavior of the networks extension is
preserved (no new functionality, nor change in existing behavior) in
terms of the API presented.

Bumps RPC API version for network RPC server version in order add
the associate function which allows to both associate and disassociate
a network with a host and or tenant. Has overlap with disassociate
and add_network_to_project but these are kept for backwards compatibility

DocImpact
Implmenents: blueprint apis-for-nova-manage
Change-Id: I78fd76e0696d1c872646355ab04d32f051551def
2012-12-17 17:26:03 +10:30
Mark McLoughlin 6c9d9ab434 Fix errors in used_limits extension
Fixes bug #1062049

There was a typo mapping the security groups resource to floating IPs.

Volumes usage isn't tracked by Nova any more since delete-nova-volume.

Key pairs don't work with the extension because of bug #1089877.

Change-Id: Ifd694b21fef1dc95e67c07dcef0cd6ea3daa8d53
2012-12-13 16:46:44 +00:00
Tiago Mello 15a395f4b5 Adds API Sample tests for DiskConfig extension.
Partially implements blueprint nova-api-samples
Fixes bug 1070158

Change-Id: Ied2efc3ae17599b61133247273a7a4bec9020927
2012-12-12 13:01:40 -02:00
Jenkins 1f024f55e1 Merge "Add coverage extension to nova API." 2012-12-11 21:31:17 +00:00
Matthew Treinish 2ec79220e1 Add coverage extension to nova API.
This adds a new extension to nova API. It allows for internal use of
Ned Batchelder's coverage_ module. (what is used for the nosecoverage
plugin)

The api allows for coverage to be enabled and a report to be output to
a file with API calls. The intended use of this is for instrumenting
client based tests like Tempest. Coverage on tempest will not give
information regarding how much of nova is covered.

Implements: blueprint coverage-extension
Change-Id: I47497f5be3fd5956250f2dcd1630c86c72725ce8
Signed-off-by: Matthew Treinish <treinish@linux.vnet.ibm.com>
2012-12-11 13:24:17 -05:00
Giampaolo Lauria 2d85cb2c38 Modified sample tests to FlavorExtraData API.
Added subs wherever applicable.
Added checks for correct return codes after REST ops
Modified sample tests to FlavorManage API to differentiate them
from the ones in FlavorExtraData.

Partially implements blueprint nova-api-samples
Fixes bug 1070162

Change-Id: I57c6611f379bef2ff586551b5501c4f7654e4374
2012-12-10 22:43:43 -05:00
Giampaolo Lauria 797e9dc50f Added sample tests to FlavorManage API.
Partially implements blueprint nova-api-samples
Fixes bug 1070163

Change-Id: Ib838adf0c21f3eee6c52cd8e1942c96ae89cca98
2012-12-08 14:11:15 -05:00
Jenkins 2804b01a6b Merge "Add agent build API support for list/create/delete/modify agent build" 2012-12-05 18:51:58 +00:00
ivan-zhu 82042ac276 Add agent build API support for list/create/delete/modify agent build
This adds an extension that provides REST API for list/create/delete/
modify agent build. The interface is accessed via

GET /v2/{tenant_id}/os-agents
PUT /v2/{tenant_id}/os-agents/id
POST /v2/{tenant_id}/os-agents
DELETE /v2/{tenant_id}/os-agents

And this patch also create tests to get agent build API Samples.
DocImpact
Implements one workitem of blueprint apis-for-nova-manage

The agent is talking about guest agent.The host can use this for
things like accessing files on the disk, configuring networking,
or running other applications/scripts in the guest while it is
running. Typically this uses some hypervisor-specific transport
to avoid being dependent on a working network configuration.
Xen, VMware, and VirtualBox have guest agents,although the Xen
driver is the only one with an implementation for managing them
in openstack. KVM doesn't really have a concept of a guest agent
(although one could be written).

You can find the design of agent update in this link:
http://wiki.openstack.org/AgentUpdate
and find the code in nova.virt.xenapi.vmops.VMOps._boot_new_instance.
In this design We need update agent in guest from host, so we need
some interfaces to update the agent info in host.

You can find more information about the design of the GuestAgent in
the following link:
http://wiki.openstack.org/GuestAgent
http://wiki.openstack.org/GuestAgentXenStoreCommunication

DocImpact
Change-Id: I5830388a894efce5b13680fc6916e0cd81a16624
2012-12-05 16:39:48 +08:00
Yolanda Robla 530b48386b Added sample tests to extended status API.
Partially implements blueprint nova-api-samples
Fixes bug 1070160

Change-Id: Ide7119a308a03ded101ae76faf8204352ffc8566
2012-12-05 07:40:01 +00:00
Giampaolo Lauria d775836347 Adds API Sample tests for Quotas extension.
Partially implements blueprint nova-api-samples
Fixes bug 1070172

Change-Id: I796897e69ec75da6da047574c0b8131f94bfa17e
2012-12-03 15:32:46 -05:00
Jenkins c783a97326 Merge "Renaming xml test class in sample tests of consoles API." 2012-12-03 17:12:52 +00:00
Yolanda Robla 25325153ae Added sample tests to deferred delete API.
Partially implements blueprint nova-api-samples
Fixes bug 1070157

Change-Id: Icd6c743b842a7986bbc0a21c5dc62fbceda488bf
2012-12-01 19:54:38 +00:00
Yolanda Robla 324ae560c3 Renaming xml test class in sample tests of consoles API.
Partially implements blueprint nova-api-samples
Fixes bug 1083642

Change-Id: I9ed16780e9a75a1fa34afac5c7861a0595180596
2012-12-01 08:49:59 +00:00
Chris Yeoh 0bf27df376 Add vpn ip/port setting support for CloudPipe
This extends the cloudpipe REST API to allow the setting of the IP and port
for the VPN for each network in the project

/v2/{tenant_id/os-cloudpipe/configure-project # POST ip/port

This forms part of the work to provide APIs for functionality currently
implemented by nova-manage that needs direct db access so nova-manage
can eventually be removed

DocImpact
Implements: blueprint apis-for-nova-manage

Change-Id: I416c0bfbe1c88470638f1c2004d1dcaeb51a6c41
2012-11-30 19:24:32 +10:30
Jenkins d9f02e6ced Merge "Complete API samples for Hosts extension" 2012-11-29 17:14:45 +00:00
Jenkins aaa1c3145a Merge "Verify doc/api_samples files along with the templates" 2012-11-28 22:54:32 +00:00
Dan Smith 57c1cff9ca Verify doc/api_samples files along with the templates
This also includes a bunch of updates to the actual samples that have
become stale as things have changed in the tree and naughty developers
haven't updated the docs. This new bit of logic in the samples test
should help prevent that in the future.

In order to verify the static doc/api_samples files, this adds a new
method to the base test, which allows the subclasses to refine their
subs into pattern matches after the server response is verified, and
before the doc/api_samples file is verified.

Change-Id: Ie46b24a65145c407d46974b63a97a84911223547
2012-11-28 09:51:13 -08:00
Dan Prince 47ddb8ca76 Validate rxtx_factor as a float.
Updates the rxtx_factor validations in the instance_types modules so
that rxtx_factor is validated as a float. Given that rxtx_factor is stored
as a float in the database this makes sense... and also adheres
to some of the extension documentation as well (although some of
the extension docs were incorrect as well).

Previously rxtx_factor was being cast into an int which caused it to
be stored and displayed incorrectly via the API.

This patchset adds a test which fails with the old code.

Additionally some of the API docs are corrected so that rxtx_factor is
listed as a float in all examples.

Fixes LP Bug #1081287.

Change-Id: Iae98522a1f2ed63cbd2497b0b0af5ac2d9bb935c
2012-11-27 11:12:41 -05:00
Mauro S. M. Rodrigues c9273ab797 Complete API samples for Hosts extension
The API samples for Hosts extension missed power operations (shutdown, reboot
and startup) and maintenance/status operations.

Complete fix to bug 1070167

Change-Id: I07fd34e071eae9afc82f9320634df24f48623e0b
2012-11-22 14:22:52 -05:00
Chris Yeoh 576ada198a Adds API for bulk creation/deletion of floating IPs
This adds an extension that provides a REST API for the bulk creation,
deletion and listing of floating IPs. The interface is accessed via

/v2/{tenant_id}/os-floating-ips-bulk

This forms part of the work to provide APIs for functionality currently
implemented by nova-manage that needs direct db access so nova-manage
can eventually be removed

Implements: blueprint apis-for-nova-manage
DocImpact

Change-Id: I621e2b070a896f7230cdf3f26f78ded85e72cf16
2012-11-21 19:38:55 +10:30
Yaguang Tang a7e5180a04 Fix os-hosts extension can't return xml response correctly.
Also add os-hosts integrated testing template files.
fix bug 1075575
fix bug 1070167.

DocImpact

Change-Id: I6b9f9e58e7cbe10a931d2c83d9baf9dcee74de08
2012-11-19 21:55:16 +08:00
Jenkins 308285c164 Merge "update api_samples add os-services module" 2012-11-19 01:58:25 +00:00
Jenkins fd2d9335de Merge "Added sample tests to consoles API." 2012-11-17 11:05:19 +00:00
Sean Dague b349340e6e update api_samples add os-server-start-stop
api_samples docs for os-server-start-stop apparently got
lost in adding the extension api_samples tests. Adding
in the docs for the extension

DocImpact

Change-Id: Ia9b97c0eb4fc7e8b22fe624ccddab6c7e003952e
2012-11-16 10:32:12 -05:00
Sean Dague 61ac6726bd update api_samples add os-services module
part of blueprint:apis-for-nova-manage

os-services is a new module for to support getting
rid of nova-manage. Add this to the all_extensions
api listing.

DocImpact

Change-Id: I3a954de59b16fd86d81204a535f8b152f3073468
2012-11-16 10:26:02 -05:00
yolanda.robla 2241a2b0f4 Added sample tests to consoles API.
Partially implements blueprint nova-api-samples
Fixes bug 1070155

Change-Id: I4437d2440468afafe3fae7a11fb686ea2c533f13
2012-11-16 12:21:25 +00:00
Sean Dague 123fa7b040 updated api_samples with real hypervisor_hostname
now that hypervisor_hostname is getting set in tests, update
api_samples with something better than none

part of blueprint:nova-api-samples

DocImpact

Change-Id: Iaac6a5d2d172eb3c56b64f0dc2a6075a79412712
2012-11-15 15:07:05 -05:00
Joe Gordon 29f7bdc045 Remove nova-volume DB
*  Remove volume calls from nova.db.api
*  Remove volume calls from nova.db.sqlalchemy.api
*  Remove tables from nova/db/sqlalchemy/models.py
*  Remove Xen Storage Manager Volume Driver code
*  No migration to preserve data in unused tables
*  Remove quota support for volumes

DocImpact

part of bp delete-nova-volume

Change-Id: I2c82c96d67f3746e5de28f917dd8ceb0c8037e27
2012-11-08 21:31:31 +00:00
Jenkins 6143e90d77 Merge "Add API samples to Admin Actions" 2012-10-29 19:27:03 +00:00
Mauro S. M. Rodrigues 9d54a1b70d Add API samples to Admin Actions
Change-Id: If072bf9e9a55c79c71fd3911776045ee46483a00
2012-10-29 07:17:32 -04:00
Vishvananda Ishaya 7e2b93acc5 removes the nova-volume code from nova
This removes the majority of the nova-volume code from the codebase.
It updates relevent config options to default to cinder. It updates a
number of existing tests that were depending on code that was removed.

A few things still need to be removed:

 * volume/driver.py & volume/iscsi.py
   These files are used by the libvirt volume driver tests. These
   tests should be updated to mock the relevant calls.

 * scheduler/simple.py & scheduler/multi.py
   These files should no longer be necessary so they can be removed
   in a subsequent patch

 * exception.py cleanup
   Once the above files are removed there are a number of unused
   exceptions which can be removed

 * database calls and database tables
   The database calls have not been removed and the tables have not
   been dropped. This can be done in a separate migration

 * additional config options and nova.conf.sample
   There may be a few extra config options that can be removed and the
   conf sample can be regenerated

Implements bp delete-nova-volume

Change-Id: I0b540e54dbabd26901a7530035a38583bb521fda
2012-10-28 11:34:05 -07:00
Matthew Treinish 7fbe9ad597 Add availability zone extension to API samples test.
Change-Id: I43e64d6637ef850119475c5d470cc54e7168c388
Signed-off-by: Matthew Treinish <treinish@linux.vnet.ibm.com>
2012-10-24 17:10:04 -04:00
Mauro S. M. Rodrigues d6e0fdf752 Add Server diagnostics extension api samples
Change-Id: Id53e17caa75dcab01dd3209f771891b4e92debec
2012-10-22 07:14:49 -04:00
Mauro S. M. Rodrigues d2af738f02 Add api samples to simple tenant usage extension
Change-Id: Ib6e00e5c049846146619f52732cd06fefac62494
2012-10-11 00:59:07 -04:00
Jenkins 3d726a77ca Merge "Add api-samples to Used limits extension" 2012-10-10 23:56:57 +00:00
Mauro S. M. Rodrigues 10f31f7c43 Add api-samples to Used limits extension
Change-Id: I67069637db35eeb5a87026bf62252d006ed11b98
2012-10-09 00:01:08 -04:00
Matthew Treinish 3f77dec937 Add Multiple Create extension to API sample tests.
Change-Id: Ifa5cf31cc61e4269502ff692508866948670e46f
Signed-off-by: Matthew Treinish <treinish@linux.vnet.ibm.com>
2012-10-05 10:00:13 -04:00
Mauro S. M. Rodrigues 103ba15161 Add api samples to Certificates extension
Change-Id: Ifb61c9cd90f03225c27b5683e5f54f30c636994c
2012-10-02 15:01:10 -07:00
Matthew Treinish ce2ba8fae8 Add aggregates extension to API samples test.
Change-Id: I8f0f5b022795dc1d766e585cab8fe5f8445a3722
Signed-off-by: Matthew Treinish <treinish@linux.vnet.ibm.com>
2012-10-01 14:51:04 -04:00
Jenkins 62e49b5ec4 Merge "all_extensions api_samples testing for server actions" 2012-09-30 07:35:12 +00:00
Jenkins cf9d5de2ce Merge "Add servers/ips api_samples tests" 2012-09-30 07:34:30 +00:00
Mauro S. M. Rodrigues dda508ec6f Add api samples to cloudpipe extension
Change-Id: I0c9d5ac191c9c9dc6c74f955857aebf7c1952b94
2012-09-28 10:03:16 -04:00
Dan Smith e788d7694d Add servers/ips api_samples tests
Change-Id: I65f8b53b4126458e1522f0bc47559dc1318a473a
2012-09-25 09:41:36 -07:00
Sean Dague 8d4af6b906 all_extensions api_samples testing for server actions
server actions sometimes return servers objects, which means
their output is different when extensions are enabled. This
adds api samples for those cases to give a more realistic view
to the user of what they might expect.

Change-Id: Iaa9a4c3a373dee41931c5dc4f1b805f09a05299f
2012-09-25 10:15:27 -04:00
Nikola Dipanov 7090ef9437 Integration tests virtual interfaces API extension
Adds tests and templates for testing of the virtual interfaces
API extension. Tests both json and XML API functionality.

Change-Id: I95f4e6667c3c2df123246d73498f13d826e3866a
2012-09-24 17:31:07 +02:00
Nikola Dipanov b456a862ad Adds API sample testing for rescue API extension
Adds tests and templates for testing of the server rescue
API extension. Tests both json and XML API functionality.

Change-Id: Icb241e96ebedde0b6385f8ba60eebd0e768f22da
2012-09-20 09:55:01 +02:00
Mauro S. M. Rodrigues 894ea491dd Add Keypairs extension to API samples test.
NOTE: This include two samples of post request: One to create the keypair and
another to import from a public key

Change-Id: I754fd5998cf8be46a96e69e3459c91d4f767575e
2012-09-18 20:49:59 -04:00
Jenkins 0de73a0d90 Merge "sample api testing for os-floating-ips extension" 2012-09-18 22:48:47 +00:00
Jenkins ebb2814524 Merge "Makes scheduler hints and disk config xml correct" 2012-09-18 22:41:18 +00:00