summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorDan Prince <dprince@redhat.com>2012-08-29 14:38:20 -0400
committerDan Prince <dprince@redhat.com>2012-08-29 16:01:58 -0400
commit22addea2d26913096d75531ff5a7d10cac7d03c8 (patch)
tree0dbc648d6270ef5604114e20e91a6f934eabc86c /nova/tests
parent20c6bb6c9000fa0d193f688b668f5f3eeda8fb05 (diff)
Sort API extensions by alias.
Updates the ExtensionManager so that extensions are sorted by alias when accessed via the get_resources or get_controller_extensions functions. This fixes the integrated.test_api_samples.ServersSampleAllExtensionXmlTest.test_servers_get test which fails on Fedora 17 (but passes on Fedora 16 and apparently some other distros as well). Includes updated api_samples for XML that was regenerated by the test_servers_get test. Fixes LP Bug #1042709. Change-Id: I82c679f457a3cd11c8a8cd76f402693b61bb14cc
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/integrated/api_samples/all_extensions/server-get-resp.xml8
-rw-r--r--nova/tests/integrated/api_samples/all_extensions/server-get-resp.xml.tpl2
-rw-r--r--nova/tests/integrated/api_samples/all_extensions/server-post-resp.xml6
3 files changed, 8 insertions, 8 deletions
diff --git a/nova/tests/integrated/api_samples/all_extensions/server-get-resp.xml b/nova/tests/integrated/api_samples/all_extensions/server-get-resp.xml
index 3441eedcd..6f2d8587f 100644
--- a/nova/tests/integrated/api_samples/all_extensions/server-get-resp.xml
+++ b/nova/tests/integrated/api_samples/all_extensions/server-get-resp.xml
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
-<server xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1" xmlns:OS-EXT-SRV-ATTR="http://docs.openstack.org/compute/ext/extended_status/api/v1.1" xmlns:OS-EXT-STS="http://docs.openstack.org/compute/ext/extended_status/api/v1.1" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" status="ACTIVE" updated="2012-08-20T21:11:08Z" hostId="96727264c2742d842c80c182cd505afa6108eb16305773070f893e23" name="new-server-test" created="2012-08-20T21:11:08Z" userId="fake" tenantId="openstack" accessIPv4="" accessIPv6="" progress="0" id="2c7a2ff8-63ce-4dcb-a3fa-1c311fe9fb04" config_drive="" key_name="None" OS-EXT-SRV-ATTR:instance_name="instance-00000001" OS-EXT-SRV-ATTR:host="6d7bdd9082cd4294aae7804dc0e5f214" OS-EXT-SRV-ATTR:hypervisor_hostname="" OS-DCF:diskConfig="AUTO" OS-EXT-SRV-ATTR:vm_state="active" OS-EXT-SRV-ATTR:task_state="None" OS-EXT-SRV-ATTR:power_state="1">
+<server xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1" xmlns:OS-EXT-SRV-ATTR="http://docs.openstack.org/compute/ext/extended_status/api/v1.1" xmlns:OS-EXT-STS="http://docs.openstack.org/compute/ext/extended_status/api/v1.1" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" status="ACTIVE" updated="2012-08-29T18:31:11Z" hostId="28cb24b3eafec0079eaca92bb439843ccdbe0cc2597b3ad9956f2113" name="new-server-test" created="2012-08-29T18:31:11Z" userId="fake" tenantId="openstack" accessIPv4="" accessIPv6="" progress="0" id="f3053932-a09d-446d-ba6e-4303b6725317" key_name="None" config_drive="" OS-EXT-SRV-ATTR:vm_state="active" OS-EXT-SRV-ATTR:task_state="None" OS-EXT-SRV-ATTR:power_state="1" OS-EXT-SRV-ATTR:instance_name="instance-00000001" OS-EXT-SRV-ATTR:host="6f18ef4ea265447d8fe1b957b1e23ab4" OS-EXT-SRV-ATTR:hypervisor_hostname="None" OS-DCF:diskConfig="AUTO">
<image id="70a599e0-31e7-49b7-b260-868f441e862b">
<atom:link href="http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b" rel="bookmark"/>
</image>
@@ -14,9 +14,9 @@
<ip version="4" addr="192.168.0.3"/>
</network>
</addresses>
- <atom:link href="http://openstack.example.com/v2/openstack/servers/2c7a2ff8-63ce-4dcb-a3fa-1c311fe9fb04" rel="self"/>
- <atom:link href="http://openstack.example.com/openstack/servers/2c7a2ff8-63ce-4dcb-a3fa-1c311fe9fb04" rel="bookmark"/>
+ <atom:link href="http://openstack.example.com/v2/openstack/servers/f3053932-a09d-446d-ba6e-4303b6725317" rel="self"/>
+ <atom:link href="http://openstack.example.com/openstack/servers/f3053932-a09d-446d-ba6e-4303b6725317" rel="bookmark"/>
<security_groups>
<security_group name="default"/>
</security_groups>
-</server>
+</server> \ No newline at end of file
diff --git a/nova/tests/integrated/api_samples/all_extensions/server-get-resp.xml.tpl b/nova/tests/integrated/api_samples/all_extensions/server-get-resp.xml.tpl
index 585492ffe..8211a3e0a 100644
--- a/nova/tests/integrated/api_samples/all_extensions/server-get-resp.xml.tpl
+++ b/nova/tests/integrated/api_samples/all_extensions/server-get-resp.xml.tpl
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
-<server xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1" xmlns:OS-EXT-SRV-ATTR="http://docs.openstack.org/compute/ext/extended_status/api/v1.1" xmlns:OS-EXT-STS="http://docs.openstack.org/compute/ext/extended_status/api/v1.1" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" status="ACTIVE" updated="%(timestamp)s" hostId="%(hostid)s" name="new-server-test" created="%(timestamp)s" userId="fake" tenantId="openstack" accessIPv4="" accessIPv6="" progress="0" id="%(id)s" config_drive="" key_name="None" OS-EXT-SRV-ATTR:instance_name="instance-00000001" OS-EXT-SRV-ATTR:host="%(compute_host)s" OS-EXT-SRV-ATTR:hypervisor_hostname="None" OS-DCF:diskConfig="AUTO" OS-EXT-SRV-ATTR:vm_state="active" OS-EXT-SRV-ATTR:task_state="None" OS-EXT-SRV-ATTR:power_state="1">
+<server xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1" xmlns:OS-EXT-SRV-ATTR="http://docs.openstack.org/compute/ext/extended_status/api/v1.1" xmlns:OS-EXT-STS="http://docs.openstack.org/compute/ext/extended_status/api/v1.1" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" status="ACTIVE" updated="%(timestamp)s" hostId="%(hostid)s" name="new-server-test" created="%(timestamp)s" userId="fake" tenantId="openstack" accessIPv4="" accessIPv6="" progress="0" id="%(id)s" key_name="None" config_drive="" OS-EXT-SRV-ATTR:vm_state="active" OS-EXT-SRV-ATTR:task_state="None" OS-EXT-SRV-ATTR:power_state="1" OS-EXT-SRV-ATTR:instance_name="instance-00000001" OS-EXT-SRV-ATTR:host="%(compute_host)s" OS-EXT-SRV-ATTR:hypervisor_hostname="None" OS-DCF:diskConfig="AUTO">
<image id="%(uuid)s">
<atom:link href="%(host)s/openstack/images/%(uuid)s" rel="bookmark"/>
</image>
diff --git a/nova/tests/integrated/api_samples/all_extensions/server-post-resp.xml b/nova/tests/integrated/api_samples/all_extensions/server-post-resp.xml
index 3edac38e4..1754dc700 100644
--- a/nova/tests/integrated/api_samples/all_extensions/server-post-resp.xml
+++ b/nova/tests/integrated/api_samples/all_extensions/server-post-resp.xml
@@ -1,8 +1,8 @@
<?xml version='1.0' encoding='UTF-8'?>
-<server xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="7ed84cec-56e4-456c-987b-92684cd28f19" adminPass="gkRBLnnq4dqG" OS-DCF:diskConfig="AUTO">
+<server xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="f3053932-a09d-446d-ba6e-4303b6725317" adminPass="phFnce4H8pnP" OS-DCF:diskConfig="AUTO">
<metadata/>
- <atom:link href="http://openstack.example.com/v2/openstack/servers/7ed84cec-56e4-456c-987b-92684cd28f19" rel="self"/>
- <atom:link href="http://openstack.example.com/openstack/servers/7ed84cec-56e4-456c-987b-92684cd28f19" rel="bookmark"/>
+ <atom:link href="http://openstack.example.com/v2/openstack/servers/f3053932-a09d-446d-ba6e-4303b6725317" rel="self"/>
+ <atom:link href="http://openstack.example.com/openstack/servers/f3053932-a09d-446d-ba6e-4303b6725317" rel="bookmark"/>
<security_groups>
<security_group name="default"/>
</security_groups>