Commit Graph

8 Commits

Author SHA1 Message Date
Sean Dague 0c57f3c4e0 Drop the use of magic openstack project_id
When we put validation into the project_id in urls we had to expand
the default set of allowed values to include 'openstack' and
'fake'. This cleans up all the instances of 'openstack' in the
functional tests, and api samples, and instead uses a constant string
which looks like a real project_id.

We need a stable project_id and not a sentinel otherwise the samples
will be arbitrarily changes on every update.

Change-Id: I1099fd43d2374abd1658b0917765d5375c4b8d1d
2016-03-08 19:34:56 +00:00
Matt Riedemann 0875a411aa ServerGroupsV213SampleJsonTest should actually test v2.13
This API samples test was not using testscenarios properly,
and it wasn't extending the correct test class, so it was:

1. Not actually running tests.
2. Not running tests at the correct microversion (v2.13).

This fixes the testscenarios setup for the subclass and the
API samples and templates (since it's not using subs for the
intended project_id that was in the samples).

Also fixes a typo in ApiSampleTestBaseV21.

Change-Id: I27e8fce5d456914d88098c6cfabe05fa8afbc8eb
Closes-Bug: #1534354
2016-01-14 14:48:40 -08:00
Kevin_Zheng 6c74a145bc Add project-id and user-id when list server-groups
Currently, command "nova server-group-list" and
"nova server-group-get" doesn't return groups'
project id and user id information. It is really
hard to identify which group belong to which
project/user when admin user use this command
with option "--all-projects".

This patch add project-id and user-id to the list.
All os-server-groups APIs will contain the above
mentioned data in the response data.

DocImpact: This adds API microversion
APIImpact: Project id information will be returned for
os-servers-group API

Change-Id: I0405ed6271c33981578841cfade220758615b1fd
Implements: blueprint add-project-id-and-user-id
Partial-bug: #1481210
Depends-On: I167141676ef4f597a1c022c1fd5dc96fd55d02ad
2015-12-10 20:11:33 +08:00
He Jie Xu 9f9802eebd Move the v2 api_sample functional tests
This patch move the all v2.1 api sample tests under
'functional/api_sample_tests'. Also move sample files under
'doc/api-samples'.

Co-Authored-By: Ed Leafe <ed@leafe.com>
Co-Authored-By: Alex Xu <hejie.xu@intel.com>
Partial-Bug: #1462901
Change-Id: I2b924f2ad7687a23a018a9b658e8acd9e04d7963
2015-08-18 15:25:41 +08:00
ghanshyam 9c70db4d44 Merge server groups tests between v2 and v2.1
Currently v2 and v2.1 have separate functional tests and their
corresponding sample files. As v2 and v2.1 are supposed to be identical,
there is overhead to maintain two set of functional tests and sample files.
We can have one set of tests which can run for both v2 and v2.1.

This commit merges servers groups functional tests.
Also inheriting this tests class from ApiSampleTestBaseV3 instead of
ServersSampleBase as this does not use any ServersSampleBase class methods.

Change-Id: I687ce52a9844b830ee324105c4f49dec83534d9b
2015-04-21 16:04:08 +09:00
Davanum Srinivas 417704816e Nuke XML support from Nova REST API - Phase 1
In I5a580fc323c3809790b4a68a9f8f8129ecdc2cf0 we switched off XML support. In
this review we entirely remove all the testcases and supporting files.

Change-Id: I83827d438753fd3899053dd6e09bc77c997c7406
2015-01-05 12:46:04 -05:00
Gary Kotton 26bf8c0dd0 Instance groups: validate policy configuration
Ensure that API does not allow conflicting policies to be configured
on an instance group. More specifically the user should not be allowed
to configured 'anti-affinity' and 'affinity' on the same instance group.

In addition to this a validation will also be done on the policy, that is,
if the policy is not supported then an exception will be raised.

This is part of blueprint instance-group-api-extension.

Change-Id: Id19c55cb60109819429f73e2b28efe7f15cc5194
2014-03-06 23:51:15 -08:00
Debo Dutta aeda1f6e64 Add REST API for instance group api extension
Support the Creation, Read, Delete, and List of server groups.

Refactored the code to use objects (https://review.openstack.org/#/c/38979/
Renamed from "instance group" to "server group".

Implements: blueprint instance-group-api-extension

Change-Id: I650a8f191dea5eab5b4b1828f0b9f65e33edea2a
2014-03-06 23:30:44 -08:00