-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds api sample testing for versions
This patch tests api samples for the versions resource in json and xml. It makes a small modification to the integrated api client to support making requests above /v2/tenant_id. This also fixes an uncovered bug in the link handling in the versions resource. Fixes bug 1041426 Change-Id: Ie898ef3822fa250def2e0fa407a0968275262260
- Loading branch information
1 parent
31f6244
commit 9e96a92
Showing
7 changed files
with
73 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"versions": [ | ||
{ | ||
"id": "v2.0", | ||
"links": [ | ||
{ | ||
"href": "http://openstack.example.com/v2/", | ||
"rel": "self" | ||
} | ||
], | ||
"status": "CURRENT", | ||
"updated": "2011-01-21T11:33:21Z" | ||
} | ||
] | ||
} |
15 changes: 15 additions & 0 deletions
15
nova/tests/integrated/api_samples/versions-get-resp.json.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"versions": [ | ||
{ | ||
"id": "v2.0", | ||
"links": [ | ||
{ | ||
"href": "%(host)s/v2/", | ||
"rel": "self" | ||
} | ||
], | ||
"status": "CURRENT", | ||
"updated": "2011-01-21T11:33:21Z" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<versions xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/common/api/v1.0"> | ||
<version status="CURRENT" updated="2011-01-21T11:33:21Z" id="v2.0"> | ||
<atom:link href="http://openstack.example.com/v2/" rel="self"/> | ||
</version> | ||
</versions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<versions xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/common/api/v1.0"> | ||
<version status="CURRENT" updated="2011-01-21T11:33:21Z" id="v2.0"> | ||
<atom:link href="http://openstack.example.com/v2/" rel="self"/> | ||
</version> | ||
</versions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters