Commit Graph

351 Commits

Author SHA1 Message Date
Jenkins 23948b0a7b Merge "Merge server usage tests between v2 and v2.1" 2015-05-07 12:21:55 +00:00
Jenkins 47a4aa2909 Merge "Merge extended server Att tests between v2 and v2.1" 2015-05-07 12:20:59 +00:00
Jenkins dbc53add94 Merge "Merge extended server status tests between v2 and v2.1" 2015-05-07 12:20:06 +00:00
Jenkins 38b1f60091 Merge "Share hide server add tests between v2 and v2.1" 2015-04-29 22:49:49 +00:00
Jenkins ba888a64ad Merge "Merge flavor_access functional tests of v2 and v2.1" 2015-04-29 19:41:52 +00:00
Jenkins 7ecd933c1d Merge "Merge flavor_rxtx functional tests of v2 and v2.1" 2015-04-29 19:41:27 +00:00
ghanshyam bb00d795c6 Merge server usage 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 usage functional tests.

In V2.1 os-access-ip is separate plugin where in v2 it was mixed in server
plugin itself. So os-access-ip extension is enabled to run
merged functional tests for both v2 and v2.1.

Change-Id: I46bfeaed8f47ea7674f14d6f3d3b301dcc35d419
2015-04-17 08:53:49 +00:00
ghanshyam 57d4698f66 Share hide server add 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 hide server addresses functional tests.

In V2.1 os-access-ip is separate plugin where in v2 it was mixed in server
plugin itself. So os-access-ip extension is enabled to run
merged functional tests for both v2 and v2.1.

Change-Id: I8c467050ea3ed666c3837d9c2846ae5d9b245c69
2015-04-17 17:51:21 +09:00
ghanshyam 1ff170370f Share V2 and V2.1 images functional tests
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 all images functional tests.
- images
- image_metadata
- image_size

Change-Id: I26bd1c521cb50c97a8720438fe08412577ae7204
2015-04-17 17:38:25 +09:00
ghanshyam b445083aea Merge extended server Att 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 extended servers attribute functional tests.

In V2.1 os-access-ip is separate plugin where in v2 it was mixed in server
plugin itself. So os-access-ip extension is enabled to run
merged functional tests for both v2 and v2.1.
Also enabling required extension for v2 tests.

Change-Id: I6dfafe454378fdd1a3fda0109f9bd6f3484d8b66
2015-04-17 11:29:35 +09:00
ghanshyam 7b40b0b90b Merge extended server status 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 extended servers status functional tests.

In V2.1 os-access-ip is separate plugin where in v2 it was mixed in server
plugin itself. So os-access-ip extension is enabled to run
merged functional tests for both v2 and v2.1.
Also enabling required extension for v2 tests.

Change-Id: I9ec0172c52ecca3b0f4ecb34223b1762729536f5
2015-04-17 01:54:44 +00:00
Jenkins 19e861180c Merge "Share multiple create server tests between v2 and v2.1" 2015-04-16 23:52:58 +00:00
Jenkins f969917f27 Merge "Merge server tests between v2 and v2.1" 2015-04-16 23:38:13 +00:00
ghanshyam 5aad375727 Share multiple create server 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 multiple create servers functional tests.

Change-Id: I6c19fa5365b7c7e05e75dffb3dcb806fb5f004db
2015-04-15 16:24:53 +09:00
Jenkins a25f3c6c2e Merge "Merge flavor_manage functional tests of v2 and v2.1" 2015-04-15 00:10:55 +00:00
parklong 2ca2236b83 Merge flavor_rxtx functional tests of 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 flavor_rxtx functional tests.

Change-Id: I82b183f95cd5a8e9981d2969b96204f11ab48c8f
2015-04-07 13:00:49 +08:00
ghanshyam f713c7c7b5 Merge server 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 functional tests.

In V2.1 os-access-ip is separate plugin where in v2 it was mixed in server
plugin itself. So os-access-ip extension is enabled for server tests to run
merged functional tests for both v2 and v2.1.

Change-Id: I3dda5820cf8e1897c7a3895edb43bc708db9073d
2015-04-07 02:05:32 +00:00
parklong 5fb5170adf Merge flavor_manage functional tests of 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 flavor_manage functional tests.

This commit also tags FlavorManageSampleJsonTests as ADMIN_API to avoid
AuthenticationException when create a test flavor

Change-Id: I5fe68870285cfee2b3254184209a7111b24f7223
2015-04-03 16:55:29 +08:00
He Jie Xu 8423a9cd15 Add json-schema for v2.1 fixed-ips
This patch adds json-schema for v2.1 fixed-ips. The json-schame limits
the input for actions reserve/unreserve. Also fixed the API sample
file at same time and add parameter_type none.

Co-Authored-By: Ken'ichi Ohmichi <ken1ohmichi@gmail.com>
Change-Id: Id2d0416c3ccc2a50d3cb66bed8747082f98fb194
Closes-Bug: #1438480
2015-04-01 18:39:16 +08:00
ghanshyam e8006761d7 Fix v2.1 list-host to remove 'services' filter
In v2.1, list-host supports 'services' filter also
But this is not case with v2 API. v2 list-host does not support
'services' filter.
v2.1 APIs should be same as v2 in all cases/scenarios.

This is bug fix so not putting as microversions, its just a change to
the v2.1 code so it is equivalent to v2. If later needed then, this can
be reverted back as current ways via microversion.

This was no best test coverage to catch this kind of issue.
This was caught while merging the v2 and v2.1 tests
- Ibd53a7ddd4792942fe2dc45121dcc25fc9864903

Change-Id: I11210babde0c5a668c794cd6aae7eb8c5093a99c
Closes-Bug: #1437184
2015-03-27 17:20:58 +09:00
parklong 1648a5a598 Merge flavor_access functional tests of 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 flavor_acess functional tests.

In V2 flavor_access has following extensions
- os-flavor-access
- os-flavor-manage
- OS-FLV-DISABLED
- OS-FLV-EXT-DATA
- os-flavor-swap

Change-Id: Ie552312079233ddacf3fdce5903a11ba280be2fd
2015-03-26 18:33:26 +08:00
ghanshyam 7f5462777b Fix v2.1 hypervisor servers to return empty list
In v2.1, os-hypervisors/servers API returns empty servers list in
case where hypervisors does not have any servers.

But this is not case with v2 API. v2 API does not put 'servers' field
in response if it is empty.

v2.1 APIs should be same as v2 in all cases/scenarios.

This is bug fix so not putting as microversions, its just a change to
the v2.1 code so it is equivalent to v2. If later needed then, this can
be reverted back as current ways via microversion.

This was no best test coverage to catch this kind of issue.
This was caught while merging the v2 and v2.1 tests
- I5ddf3c54dd80a67f71762769d6130db41e772b01

Change-Id: I32e5cde65baeca71ec06b814b7db7aa7469eac64
Closes-Bug: #1435668
2015-03-24 23:54:23 +00:00
Jenkins 8601f1ef4f Merge "Merge V2 and V2.1 functional tests" 2015-03-23 23:18:21 +00:00
ghanshyam e24c2239fb Merge V2 and V2.1 functional tests
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 use the testscenearios to generate the tests one for v2 and one for v2.1
and make v2.1 tests to run against v2.1 plugins by redirecting /v2 endpoint to v2.1
plugins in api-paste.ini

As example this commit merge flavor APIs functional tests between v2 & v2.1.
In V2 flavor API has following extensions
- Flavor_swap
- Flavor_disabled
- Flavorextradata
In V2.1 above extensions have been merged together in flavor plugins

NOTE- As testscenarios is applied in base class. v2 tests will be generated
for all the existing tests but for tests which are not merged yet
their v2 generated tests will be skipped till they gets
merged. After merge, both version tests are expected to pass like
flavor tests in this patch. So you may see lot of skipped tests
which is expected and will gets disappear as tests gets merged.

Change-Id: I0e0262f818c7d7fb15528b16d3225b9578910996
2015-03-23 17:27:55 +09:00
Davanum Srinivas ae3c635020 Fix docs build break
fix 2 bad json files to get the docs build to succeed.

Closes-Bug: #1434855
Change-Id: I600f5e83bdaf254bcebbd232ec4a2d396041ceb3
2015-03-21 13:23:08 -04:00
ghanshyam 2f32996c3e V2.1 tests - Reuse server post req/resp sample file
There are lot of duplicate sample files for server POST req/resp
in functional tests.

This patch reuse the server post req/resp sample file for V2.1
functional tests.

Change-Id: I5da924b78780eae64a40ee39ee4fbe1e5b8c3b1f
2015-03-11 15:59:52 +09:00
Alexandre Levine abc656d3d5 Add info for Standalone EC2 API to cut access to Nova DB.
This change adds properties to v2.1
os-extended-server-properties and os-extended-volumes nova APIs
in order to expose information which is required for the standalone
EC2 API implementation (resides on stackforge/ec2-api) to use only
public APIs. Right now this information is taken by directly accessing
internal Nova DB.
It adds proposed microversion v2.3.
It implements the spec "Nova changes required for standalone EC2 API
implementation" in this review: https://review.openstack.org/#/c/153636/

APIImpact
Implements: blueprint ec2-api

Change-Id: I850e51e730c82906f68fddb14fb0004d7091eb91
2015-03-05 19:19:23 +04:00
Jenkins 854d95ec11 Merge "Adds keypair type in nova-api" 2015-03-05 14:41:07 +00:00
Chris Yeoh c836f425bc Adds keypair type in nova-api
X509 certificates are used by Windows for passwordless
authentication (WinRM) in a way which can be considered
consistent with the usage of SSH keys on Linux, as both
are based on public / private keypairs.

Enables nova-api to return the keypair type, updates
nova-api version to reflect the changes and updates the
unit and functional tests to validate the API changes.

Unit tests have been updated to ensure that the keypair
type is not being returned on previous API versions.

Note: x509 keypair implementation is added in the next
commit.

DocImpact - See nova/api/openstack/rest_api_version_history.rst
for details

APIImpact

Depends-On: Id5b210d7afe5c0a590abcbd42b9ff85b071a5c55

Co-Authored-By: Chris Yeoh <cyeoh@au1.ibm.com>
Partially implements: blueprint keypair-x509-certificates

Change-Id: I215662f2f92a01921a866c3218031787a9eaf915
2015-03-04 22:16:37 +00:00
ghanshyam e74b62f26f Remove extended addresses from V2.1 update & rebuild
V2.1 server update and rebuild response contain
'OS-EXT-IPS:type' & 'OS-EXT-IPS-MAC:mac_addr' in address field
which are new attributes compared to V2 response for those API.

These new attributes are found during tempest testing by blocking
additional properties in schema -https://review.openstack.org/#/c/156130/

V2.1 must be identical with V2 and must not contain any new attributes in
response. This commit removes these new attributes from V2.1 API.

Partially implements blueprint v2-on-v3-api

Change-Id: Id5b210d7afe5c0a590abcbd42b9ff85b071a5c55
2015-03-04 16:08:02 +09:00
Jenkins 064849bcf0 Merge "Disables pci plugin for v2.1 & microversions" 2015-03-03 14:33:58 +00:00
Chris Yeoh 45591b6da1 Disables pci plugin for v2.1 & microversions
The pci plugin was only ever merged into the v3 (now v2.1 microversions)
and never the v2 API. Since v2.1 i meant to be identical to v2 it should not
appear in v2 either.

This change disables the pci api functionality in v2.1. It will be renabled
soon after microversions is enabled using a microversion bump.

Related-Bug: 1426241
Partially implements blueprint v2-on-v3-api

Change-Id: Ifc1d6f24d5a637270154b996087a98b41133e014
2015-03-03 14:20:42 +10:30
He Jie Xu 7007ab20f6 Remove attach/detach/swap from V2.1 extended_volumes
V2.1 must be identical with V2 and must not contain any new attributes
and new method. And those methods have same methods in the volumes
extensions. Those methods are added in the early stage of v3 works,
because the in early stage v3 works decides to delete any volume related
proxy API, then adds those method instead of them. This commit remove
these methods from V2.1 API.

Partially implements blueprint v2-on-v3-api

Change-Id: I20e0498ec187e9feafd2bfb1aa9646426b3609af
2015-03-01 12:30:52 +08:00
Jenkins cd845661bc Merge "Remove OS-EXT-IPS attributes from V2.1 server ips" 2015-02-27 20:42:05 +00:00
Jenkins 165d37c963 Merge "Remove 'locked_by' from V2.1 extended server status" 2015-02-27 20:41:35 +00:00
Jenkins 92b0adad39 Merge "Remove 'id' from V2.1 update quota_set resp" 2015-02-27 20:41:00 +00:00
Jenkins afc2e675d7 Merge "API: Change the API cpu_info to be meaning ful." 2015-02-27 05:32:02 +00:00
ghanshyam 6931bedb9e Remove OS-EXT-IPS attributes from V2.1 server ips
V2.1 server ips response contain 'OS-EXT-IPS:type' & 'OS-EXT-IPS-MAC:mac_addr'
also which are new attributes compared to V2 response.

These new attributes are found during tempest testing by blocking
additional properties in schema -https://review.openstack.org/#/c/156130/

V2.1 must be identical with V2 and must not contain any new attributes in
response. This commit removes these new attributes from V2.1 API.

Partially implements blueprint v2-on-v3-api

Change-Id: Id9fcce0c9629c3d325b87cf9b35f13f1ba15b13f
2015-02-27 13:14:00 +09:00
ghanshyam 8f98f8205b Remove 'locked_by' from V2.1 extended server status
In case of v2.1, extended server status contain 'locked_by' which does
not match with V2 response.

These new attributes are found during tempest testing by blocking
additional properties in schema -https://review.openstack.org/#/c/156130/

V2.1 must be identical with V2 and must not contain any new attributes in
response. This commit removes this extra attributes from V2.1 API.

Partially implements blueprint v2-on-v3-api

Change-Id: I5c4f6851300510f8fc5342d3bfc596e0ac9f1800
2015-02-27 10:32:32 +09:00
ghanshyam e511410188 Remove 'id' from V2.1 update quota_set resp
In case of v2.1, update quota_set response contain 'id' which does
not match with V2 response.

These new attributes are found during tempest testing by blocking
additional properties in schema -
https://etherpad.openstack.org/p/Removal_new_attribute_V2_1

V2.1 must be identical with V2 and must not contain any new attributes in
response. This commit removes this extra attributes from V2.1 API.

Partially implements blueprint v2-on-v3-api

Change-Id: I7d1d03fadd1eaf90d9e37eb4f1dc330770f9ace9
2015-02-27 01:10:38 +00:00
ghanshyam 1c29a25ca5 Remove accessips attribute from V2.1 POST server resp
In case of v2.1, if "os-access-ips" extension is enabled then server
POST response contain access ips attribute which does not match
with V2 response. V2 server POST response never have access ips attribute.

V2.1 must be identical with V2 and must not contain any new attributes in
response. This commit remove these extra attributes from V2.1 API.

V2 server POST response-
{
    "server": {
        "OS-DCF:diskConfig": "AUTO",
        "adminPass": "ahW3PjQNAu6r",
        "id": "e726f5ae-8179-44ba-bbfb-8a0c52b33095",
        "links": [
            {
                "href": "http://openstack.example.com/v2/openstack/
servers/e726f5ae-8179-44ba-bbfb-8a0c52b33095",
                "rel": "self"
            },
            {
                "href": "http://openstack.example.com/openstack/
servers/e726f5ae-8179-44ba-bbfb-8a0c52b33095",
                "rel": "bookmark"
            }
        ],
        "security_groups": [
            {
                "name": "default"
            }
        ]
    }
}

V2.1 server POST response-
{
    "server": {
        "OS-DCF:diskConfig": "AUTO",
        "adminPass": "zPnp2GseTqG4",
        "id": "8195065c-fea4-4d57-b93f-5c5c63fe90e8",
        "links": [
            {
                "href": "http://openstack.example.com/v3/servers/
8195065c-fea4-4d57-b93f-5c5c63fe90e8",
                "rel": "self"
            },
            {
                "href": "http://openstack.example.com/servers/
8195065c-fea4-4d57-b93f-5c5c63fe90e8",
                "rel": "bookmark"
            }
        ],
        "accessIPv4": "",
        "accessIPv6": "",
        "security_groups": [
            {
                "name": "default"
            }
        ]
    }
}

Partially implements blueprint v2-on-v3-api

Change-Id: Ib9197cc9061bbba0c040f237bb52d12a60a976d7
2015-02-26 07:00:40 +00:00
yunhong jiang ab437c0e90 API: Change the API cpu_info to be meaning ful.
Currently the API sample get '?' for the cpu_info, this is really
confusing, it even does not tell the type of the return.

Change it to be more meaningful.

Change-Id: I791beb7502f47dff646a46c08e818c29f9e6cd79
2015-02-24 13:57:49 -08:00
Jenkins 3f33e76d19 Merge "Implement api samples test for os-baremetal-nodes Part 2" 2015-02-16 14:32:24 +00:00
Jenkins 1fbca42d27 Merge "Implement api samples test for os-baremetal-nodes" 2015-02-12 14:27:01 +00:00
Chris Yeoh 9b794005fe Implement api samples test for os-baremetal-nodes Part 2
Implements an API sample test for a GET request for os-baremetal-nodes
which was previously manually generated and wrong. Removes api samples
for add-interface, create, and remove-interface which were removed
for os-baremetal-nodes at some point.

This should bring the os-baremetal-nodes plugin in sync with reality
for both v2 and v2.1

Partially implements blueprint v2-on-v3-api

Change-Id: Ibd55b43368485b7f460ef6564f611df136275562
2015-02-11 14:48:53 +10:30
Chris Yeoh e11a6de1d9 Implement api samples test for os-baremetal-nodes
Looks like the api samples for os-baremetal-noes were added manually
and so either weren't correct in the first place or the api output
has changed since the first merge. This patch implements tests
for index method. More to follow in later patches

Partially implements bp v2-on-v3-api

Change-Id: I3bd421b9a8b9eb49d274c190d124aaac6fbd361f
2015-02-10 22:06:18 +10:30
Chris Yeoh 9631e4836a Extract preserve ephemeral on rebuild from servers plugin
The preserve ephemeral on rebuild functionality was merged into the servers plugin
code. This should never have happened and the hook for handling extra parameters
for the rebuild api used instead (otherwise we end up with monster functions).

This patch splits the relevant bits out to their own plugin.

Partially implements bp v2-on-v3-api

Change-Id: I0f35f897b9470039d509a97e6513c6cc806169b4
2015-02-09 21:36:53 +10:30
Chris Yeoh c99d8f32b2 Change some v2.1 extension names to v2
Changes some extension names (not aliases) in the v2.1 api to match
what they are in v2. This is for compatibility between v2.1 and v2
to ensure /extensions output matches. Longer term the extension names
don't really matter as users should just be using the extension alias
and /extensions will be replaced by microversions and json HOME. So its not
worth adding extra infrastructure which is capable of translating just the
extension name like we do with other parts of the v2.1 /extension information

Partially implements bp v2-on-v3-api

Change-Id: I22227496aec51c5f523112cf49af92f0fa124a10
2015-02-09 09:56:30 +10:30
Chris Yeoh 30ed3064ab Convert v2.1 extension_info to show V2 API extension list
The V2.1 API implementation does not have a 1-1 mapping of extensions
compared to the V2 API. For example because many of the dummy
extensions were only originally added in order to be able to signal to
the API clients that new functionality was available these were not
ported and functionally hard coded into the original plugin.
However in order to retain complete backwards compatibility we need
to have an /extensions output which is identical to the original
V2 API. This patch implements that backwards compatibility including
fields such as XML namespaces, links and updated which are no
longer supported.

Some minor testcase changes to reflect no real xml support in v2.1
now

Part of blueprint v2-on-v3-api

Change-Id: I8e63a684093dfe3a643c07b20e8080c1e950ed5a
2015-02-09 09:52:32 +10:30
Ken'ichi Ohmichi 569d62716d Remove v1.1 from v2.1 extension description
Current v2.1 os-user-data extension only includes "v1.1" in the
description, but it confuses developers/users because of mismatching
versions. In addition, the other extensions doesn't contain version
number in their descriptions.
So this patch removes v1.1 from os-user-data extension's description.

Partially implements blueprint v2-on-v3-api

Change-Id: I6280a0633c0e416e4b1798a708035eaf8c979fba
2015-02-05 07:44:38 +00:00