-
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.
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
- Loading branch information
Giampaolo Lauria
committed
Dec 11, 2012
1 parent
fcedc02
commit 2d85cb2
Showing
16 changed files
with
74 additions
and
75 deletions.
There are no files selected for viewing
12 changes: 6 additions & 6 deletions
12
doc/api_samples/OS-FLV-EXT-DATA/flavors-extra-data-post-req.json
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
{ | ||
"flavor": { | ||
"OS-FLV-EXT-DATA:ephemeral": 30, | ||
"disk": 10, | ||
"id": "666", | ||
"name": "flavortest", | ||
"ram": 1024, | ||
"vcpus": 2, | ||
"disk": 10, | ||
"id": "666", | ||
"rxtx_factor": 2.0, | ||
"swap": 5, | ||
"vcpus": 2 | ||
"OS-FLV-EXT-DATA:ephemeral": 30, | ||
"swap": 5 | ||
} | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
doc/api_samples/OS-FLV-EXT-DATA/flavors-extra-data-post-req.xml
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<flavor xmlns="http://docs.openstack.org/compute/api/v1.1" | ||
xmlns:OS-FLV-EXT-DATA="http://docs.openstack.org/compute/ext/flavor_extra_data/api/v1.1" | ||
name="testflavor1" | ||
name="flavortest" | ||
ram="1024" | ||
vcpus="2" | ||
disk="10" | ||
id="666" | ||
swap="5" | ||
rxtx_factor="2.0" | ||
OS-FLV-EXT-DATA:ephemeral="30" /> | ||
OS-FLV-EXT-DATA:ephemeral="30" /> |
2 changes: 1 addition & 1 deletion
2
doc/api_samples/OS-FLV-EXT-DATA/flavors-extra-data-post-resp.xml
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<flavor xmlns:OS-FLV-EXT-DATA="http://docs.openstack.org/compute/ext/flavor_extra_data/api/v1.1" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="10" vcpus="2" ram="1024" name="testflavor1" id="666" OS-FLV-EXT-DATA:ephemeral="30"> | ||
<flavor xmlns:OS-FLV-EXT-DATA="http://docs.openstack.org/compute/ext/flavor_extra_data/api/v1.1" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="10" vcpus="2" ram="1024" name="flavortest" id="666" OS-FLV-EXT-DATA:ephemeral="30"> | ||
<atom:link href="http://openstack.example.com/v2/openstack/flavors/666" rel="self"/> | ||
<atom:link href="http://openstack.example.com/openstack/flavors/666" rel="bookmark"/> | ||
</flavor> |
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 |
---|---|---|
|
@@ -5,6 +5,4 @@ | |
<vcpus>2</vcpus> | ||
<disk>10</disk> | ||
<id>10</id> | ||
<rxtx_factor>1</rxtx_factor> | ||
<swap>0</swap> | ||
</flavor> |
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
8 changes: 4 additions & 4 deletions
8
nova/tests/integrated/api_samples/OS-FLV-EXT-DATA/flavors-extra-data-get-resp.xml.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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<flavor xmlns:OS-FLV-EXT-DATA="http://docs.openstack.org/compute/ext/flavor_extra_data/api/v1.1" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="0" vcpus="1" ram="512" name="m1.tiny" id="1" OS-FLV-EXT-DATA:ephemeral="0"> | ||
<atom:link href="http://openstack.example.com/v2/openstack/flavors/1" rel="self"/> | ||
<atom:link href="http://openstack.example.com/openstack/flavors/1" rel="bookmark"/> | ||
</flavor> | ||
<flavor xmlns:OS-FLV-EXT-DATA="http://docs.openstack.org/compute/ext/flavor_extra_data/api/v1.1" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="0" vcpus="1" ram="512" name="%(flavor_name)s" id="%(flavor_id)s" OS-FLV-EXT-DATA:ephemeral="0"> | ||
<atom:link href="%(host)s/v2/openstack/flavors/%(flavor_id)s" rel="self"/> | ||
<atom:link href="%(host)s/openstack/flavors/%(flavor_id)s" rel="bookmark"/> | ||
</flavor> |
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
22 changes: 11 additions & 11 deletions
22
nova/tests/integrated/api_samples/OS-FLV-EXT-DATA/flavors-extra-data-list-resp.xml.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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<flavors xmlns:OS-FLV-EXT-DATA="http://docs.openstack.org/compute/ext/flavor_extra_data/api/v1.1" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1"> | ||
<flavor disk="0" vcpus="1" ram="512" name="m1.tiny" id="1" OS-FLV-EXT-DATA:ephemeral="0"> | ||
<atom:link href="http://openstack.example.com/v2/openstack/flavors/1" rel="self"/> | ||
<atom:link href="http://openstack.example.com/openstack/flavors/1" rel="bookmark"/> | ||
<atom:link href="%(host)s/v2/openstack/flavors/1" rel="self"/> | ||
<atom:link href="%(host)s/openstack/flavors/1" rel="bookmark"/> | ||
</flavor> | ||
<flavor disk="20" vcpus="1" ram="2048" name="m1.small" id="2" OS-FLV-EXT-DATA:ephemeral="0"> | ||
<atom:link href="http://openstack.example.com/v2/openstack/flavors/2" rel="self"/> | ||
<atom:link href="http://openstack.example.com/openstack/flavors/2" rel="bookmark"/> | ||
<atom:link href="%(host)s/v2/openstack/flavors/2" rel="self"/> | ||
<atom:link href="%(host)s/openstack/flavors/2" rel="bookmark"/> | ||
</flavor> | ||
<flavor disk="40" vcpus="2" ram="4096" name="m1.medium" id="3" OS-FLV-EXT-DATA:ephemeral="0"> | ||
<atom:link href="http://openstack.example.com/v2/openstack/flavors/3" rel="self"/> | ||
<atom:link href="http://openstack.example.com/openstack/flavors/3" rel="bookmark"/> | ||
<atom:link href="%(host)s/v2/openstack/flavors/3" rel="self"/> | ||
<atom:link href="%(host)s/openstack/flavors/3" rel="bookmark"/> | ||
</flavor> | ||
<flavor disk="80" vcpus="4" ram="8192" name="m1.large" id="4" OS-FLV-EXT-DATA:ephemeral="0"> | ||
<atom:link href="http://openstack.example.com/v2/openstack/flavors/4" rel="self"/> | ||
<atom:link href="http://openstack.example.com/openstack/flavors/4" rel="bookmark"/> | ||
<atom:link href="%(host)s/v2/openstack/flavors/4" rel="self"/> | ||
<atom:link href="%(host)s/openstack/flavors/4" rel="bookmark"/> | ||
</flavor> | ||
<flavor disk="160" vcpus="8" ram="16384" name="m1.xlarge" id="5" OS-FLV-EXT-DATA:ephemeral="0"> | ||
<atom:link href="http://openstack.example.com/v2/openstack/flavors/5" rel="self"/> | ||
<atom:link href="http://openstack.example.com/openstack/flavors/5" rel="bookmark"/> | ||
<atom:link href="%(host)s/v2/openstack/flavors/5" rel="self"/> | ||
<atom:link href="%(host)s/openstack/flavors/5" rel="bookmark"/> | ||
</flavor> | ||
</flavors> | ||
</flavors> |
12 changes: 6 additions & 6 deletions
12
nova/tests/integrated/api_samples/OS-FLV-EXT-DATA/flavors-extra-data-post-req.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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
{ | ||
"flavor": { | ||
"OS-FLV-EXT-DATA:ephemeral": 30, | ||
"disk": 10, | ||
"id": "666", | ||
"name": "flavortest", | ||
"name": "%(flavor_name)s", | ||
"ram": 1024, | ||
"vcpus": 2, | ||
"disk": 10, | ||
"id": "%(flavor_id)s", | ||
"rxtx_factor": 2.0, | ||
"swap": 5, | ||
"vcpus": 2 | ||
"OS-FLV-EXT-DATA:ephemeral": 30, | ||
"swap": 5 | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
nova/tests/integrated/api_samples/OS-FLV-EXT-DATA/flavors-extra-data-post-req.xml.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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<flavor xmlns="http://docs.openstack.org/compute/api/v1.1" | ||
xmlns:OS-FLV-EXT-DATA="http://docs.openstack.org/compute/ext/flavor_extra_data/api/v1.1" | ||
name="testflavor1" | ||
name="%(flavor_name)s" | ||
ram="1024" | ||
vcpus="2" | ||
disk="10" | ||
id="666" | ||
id="%(flavor_id)s" | ||
swap="5" | ||
rxtx_factor="2.0" | ||
OS-FLV-EXT-DATA:ephemeral="30" /> |
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
8 changes: 4 additions & 4 deletions
8
nova/tests/integrated/api_samples/OS-FLV-EXT-DATA/flavors-extra-data-post-resp.xml.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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<flavor xmlns:OS-FLV-EXT-DATA="http://docs.openstack.org/compute/ext/flavor_extra_data/api/v1.1" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="10" vcpus="2" ram="1024" name="testflavor1" id="666" OS-FLV-EXT-DATA:ephemeral="30"> | ||
<atom:link href="http://openstack.example.com/v2/openstack/flavors/666" rel="self"/> | ||
<atom:link href="http://openstack.example.com/openstack/flavors/666" rel="bookmark"/> | ||
</flavor> | ||
<flavor xmlns:OS-FLV-EXT-DATA="http://docs.openstack.org/compute/ext/flavor_extra_data/api/v1.1" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="10" vcpus="2" ram="1024" name="%(flavor_name)s" id="%(flavor_id)s" OS-FLV-EXT-DATA:ephemeral="30"> | ||
<atom:link href="%(host)s/v2/openstack/flavors/%(flavor_id)s" rel="self"/> | ||
<atom:link href="%(host)s/openstack/flavors/%(flavor_id)s" rel="bookmark"/> | ||
</flavor> |
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 |
---|---|---|
|
@@ -5,6 +5,4 @@ | |
<vcpus>2</vcpus> | ||
<disk>10</disk> | ||
<id>%(flavor_id)s</id> | ||
<rxtx_factor>1</rxtx_factor> | ||
<swap>0</swap> | ||
</flavor> |
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