95 Commits

Author SHA1 Message Date
Jenkins
a88152a476 Merge "Cells: Add cells API extension" 2013-01-15 21:39:16 +00:00
Chris Behrens
6b4ad2d7d2 Cells: Add cells API extension
Enables cells-related functionality such as adding neighbor cells,
listing neighbor cells, and showing the capabilities of the local cell.

Implements blueprint nova-compute-cells

DocImpact

Change-Id: Iacc1e68721a7867aeaf233903cbe6d18f09ad96e
2013-01-15 01:22:35 +00:00
Matt Dietz
382435275e Renames the new os-networks extension
Merging the new os-networks extension upstream broke what was considered
a 'released' extension. This patch returns everything to normal and
renames the os-networks extension to os-tenant-networks

DocImpact

Implements: blueprint tenant-networks

Change-Id: I04b17d08c5760fd73736124b36cab0d383767020
2013-01-15 00:48:32 +00:00
Jenkins
92f390672a Merge "Added sample tests to FlavorSwap API." 2013-01-12 09:54:30 +00:00
Sean Dague
5fca1d9e97 fix new N402 errors
fix the N402 errors that have slipped in in the last 48 hrs since
starting this patch series.

fix an N401 error that our scanner current can't find because it
only looks for doc strings on classes and defs.

this is the xeno's paradox of patch series, but we're getting close.

Change-Id: I4a763bb4c812335d853eae05c72464f18ab93297
2013-01-10 08:57:09 -05:00
Giampaolo Lauria
35328ddd8f Added sample tests to FlavorSwap API.
Partially implements blueprint nova-api-samples
Fixes bug 1096653

Change-Id: I9a6ca8a023bf0f3404b3a9af635dd29a7a584aa3
2013-01-09 20:47:23 -05:00
Matt Dietz
129fd64ef8 Adds a new tenant-centric network extension
Implements: blueprint tenant-networks

Adds a new API extension that supports a more tenant-centric model for
interacting with isolated networks. Additionally, the patch renames the
existing networks extension as os-admin-networks to more fully fit the
self-described implementation. Two new novaclient extensions and a
novaclient change accompany this patch.

DocImpact

Change-Id: Ib90a65c0a92445f86e930fab88ab4495aefff7c7
2013-01-08 17:02:20 +00:00
Sean Dague
f20c3a4ea5 Fix N402 for nova/api
Fix N402 errors (single line docstring should end in a period)
for nova/api, part of a larger attempt to stop ignoring our own
hacking.py tests.

Fix tests that look at docs in extensions

Change-Id: I89d89d1fcf37c4e7740c36375da4c751d1b621ed
2013-01-08 23:40:13 -05:00
Jenkins
ddb2400047 Merge "Remove availability_zones from service table" 2013-01-09 04:09:31 +00:00
Jenkins
dcd4327bd0 Merge "Enable Aggregate based availability zones" 2013-01-09 04:09:00 +00:00
Jenkins
beee8b112a Merge "Added sample tests to FlavorRxtx API." 2013-01-09 04:02:25 +00:00
Joe Gordon
1ab2fc6477 Remove availability_zones from service table
This is the final step in enabling availability_zones using aggregate
metadata. Previously all services had an availability_zone, but the
availability_zone is only used for nova-compute.  Services such as
nova-scheduler, nova-network, nova-conductor have always spanned all
availability_zones.

After this change only compute nodes (nova-compute), will have an
availability_zone. In order to preserve current APIs, when running:
* nova host-list (os-hosts)
* euca-describe-availability-zones verbose
* nova-manage service list
Internal services will appear in there own internal availability_zone
(CONF.internal_service_availability_zone)
Internal zone is hidden in euca-describe-availability_zones
(non-verbose)

CONF.node_availability_zone has been renamed to
CONF.default_availability_zone and is only used by the nova-api and
nova-scheduler. CONF.node_availability_zone still works but is
deprecated

DocImpact

Completes blueprint aggregate-based-availability-zones

Change-Id: Ib772df5f9ac2865f20df479f8ddce575a9ce3aff
2013-01-08 14:01:30 -08:00
Joe Gordon
9f4534ab58 Enable Aggregate based availability zones
Instead of implementing availability zones in the service table,
availability zones are implemented using general aggregate metadata.

This patch does not remove availability zones from the service table, a
latter patch will do that.

* In theory supports a single compute node in multiple availability zones
* Drop availability_zone column from Aggregate table (is now a property)
* map aggregate metadata 'availability_zone' so API does not change

Implements blueprint aggregate-based-availability-zones

Change-Id: I2a2ac5bfaa526d639dff5efa392c051347dbd9bb
2013-01-08 14:00:41 -08:00
Jenkins
741e0e8e75 Merge "Add api extension to get and reset password" 2013-01-08 21:15:52 +00:00
Giampaolo Lauria
8596e8b840 Added sample tests to FlavorRxtx API.
Partially implements blueprint nova-api-samples
Fixes bug 1091743

Change-Id: I400e627cfc499b3e7bb1c88d6ce7d24b4d222b84
2013-01-08 13:34:26 -05:00
Vishvananda Ishaya
285994be59 Add api extension to get and reset password
Password is stored in system_instance_metadata as four items with the
keys 'password_0' through 'password_3'. The extension adds a resource
endpoint with two methods:

GET v2/servers/<uuid>/os-server-password  # get_password
DELETE v2/servers/<uuid>/os-server-password # reset_password

get_password retuns:

JSON: {"password": "xxx"}
XML: <?xml version='1.0' encoding='UTF-8'?><password>xxx</password>

Note that this is intended to be an encrypted password set by the
guest. Includes api tests for json and xml. Also includes api samples.

Part of blueprint get-password

Change-Id: I6c03f9c3bc8a2c70403bbb3e57917ab9522d75bd
2013-01-07 15:35:45 -08:00
Giampaolo Lauria
d9b69045a7 Added sample tests to QuotaClasses API.
Partially implements blueprint nova-api-samples
Fixes bug 1070171

Change-Id: I504a9120a0980a727bda21ca2ac76a5d06477e66
2013-01-07 19:46:42 +00:00
Jenkins
b4d72616c1 Merge "Add html reports to report action in coverage extension." 2013-01-04 12:33:35 +00:00
Jenkins
8d10a6bc55 Merge "Added sample tests to FlavorDisabled API." 2013-01-04 11:58:30 +00:00
Jenkins
5f9641c979 Merge "Add API sample tests to FixedIPs extension" 2013-01-02 14:29:25 +00:00
ivan-zhu
abba5574ca Add API sample tests to FixedIPs extension
Partially implements blueprint nova-api-samples
Bug 1091739

Change-Id: Ie10fd85199ec10de29e99338c748f34cc04aeeb6
2012-12-29 16:39:53 +08:00
Jenkins
bde5420564 Merge "Add API samples tests for the coverage extension." 2012-12-27 21:47:52 +00:00
Jason Kölker
b3bbd09131 Add extension to allow hiding of addresses
* Servers in certain states will have network_info but it may change,
  (eg. rescheduled build on another host). The extension allows the
  operator to hide the address information in those states
* Fixes bug LP 1089092

Change-Id: Ie843e34a41c77903b201b45c5b67a6f75334cb5e
2012-12-20 15:43:15 -06:00
Matthew Treinish
ce9867b3fa Add html reports to report action in coverage extension.
This makes a few minor cleanups and 2 additions to the
coverage extension. First, it adds a new optional field to the
report action: 'html'. This will generate an html report instead
of either the text or xml reports that the extension can
generate.

The second change is that it adds a return for the stop action.
Now upon successful completion of the stop action the directory
where the coverage data files will be returned.

Change-Id: If1aa25fc7237e9bb5100d2a4a8e560f0a68eba61
2012-12-20 15:45:45 -05:00
Matthew Treinish
2655ac9f3c Add API samples tests for the coverage extension.
Partially implements blueprint nova-api-samples
Fixes bug 1089531

Change-Id: I5b287ea210f275a0c316a28d6dc3614d107aff05
2012-12-20 15:39:20 -05:00
Giampaolo Lauria
58d5b2b0c1 Added sample tests to FlavorDisabled API.
Partially implements blueprint nova-api-samples
Fixes bug 1070161

Change-Id: I889a5b2e85d31fda1e9a8a82043ba7e9ddf1b7a6
2012-12-17 22:32:50 -05:00
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