From 57c1cff9caa476e10cba95303db386e61b38b433 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Mon, 26 Nov 2012 13:15:50 -0800 Subject: Verify doc/api_samples files along with the templates This also includes a bunch of updates to the actual samples that have become stale as things have changed in the tree and naughty developers haven't updated the docs. This new bit of logic in the samples test should help prevent that in the future. In order to verify the static doc/api_samples files, this adds a new method to the base test, which allows the subclasses to refine their subs into pattern matches after the server response is verified, and before the doc/api_samples file is verified. Change-Id: Ie46b24a65145c407d46974b63a97a84911223547 --- .../all_extensions/extensions-get-resp.json | 24 +++++++++++++++++ .../all_extensions/extensions-get-resp.xml | 9 +++++++ doc/api_samples/limit-get-resp.json | 31 +++++++++++++++------- doc/api_samples/limit-get-resp.xml | 21 ++++++++------- .../os-cloudpipe/cloud-pipe-create-resp.json | 4 +-- .../os-cloudpipe/cloud-pipe-get-resp.json | 16 +++++------ doc/api_samples/os-hosts/hosts-list-resp.json | 13 ++++++--- doc/api_samples/os-hosts/hosts-list-resp.xml | 9 ++++--- .../os-used-limits/usedlimits-get-resp.json | 25 ++++++++++++----- .../os-used-limits/usedlimits-get-resp.xml | 19 +++++++------ 10 files changed, 119 insertions(+), 52 deletions(-) (limited to 'doc') diff --git a/doc/api_samples/all_extensions/extensions-get-resp.json b/doc/api_samples/all_extensions/extensions-get-resp.json index 155a877c2..f34eec0a3 100644 --- a/doc/api_samples/all_extensions/extensions-get-resp.json +++ b/doc/api_samples/all_extensions/extensions-get-resp.json @@ -136,6 +136,14 @@ "namespace": "http://docs.openstack.org/compute/ext/deferred-delete/api/v1.1", "updated": "2011-09-01T00:00:00+00:00" }, + { + "alias": "os-fixed-ips", + "description": "Fixed IPs support", + "links": [], + "name": "FixedIPs", + "namespace": "http://docs.openstack.org/compute/ext/fixed_ips/api/v2", + "updated": "2012-10-18T13:25:27-06:00" + }, { "alias": "os-flavor-access", "description": "Flavor access supprt", @@ -200,6 +208,22 @@ "namespace": "http://docs.openstack.org/compute/ext/floating_ips/api/v1.1", "updated": "2011-06-16T00:00:00+00:00" }, + { + "alias": "os-floating-ips-bulk", + "description": "Bulk handling of Floating IPs", + "links": [], + "name": "FloatingIpsBulk", + "namespace": "http://docs.openstack.org/compute/ext/floating_ips_bulk/api/v2", + "updated": "2012-10-29T13:25:27-06:00" + }, + { + "alias": "os-fping", + "description": "Fping Management Extension.", + "links": [], + "name": "Fping", + "namespace": "http://docs.openstack.org/compute/ext/fping/api/v1.1", + "updated": "2012-07-06T00:00:00+00:00" + }, { "alias": "os-hosts", "description": "Admin-only host administration", diff --git a/doc/api_samples/all_extensions/extensions-get-resp.xml b/doc/api_samples/all_extensions/extensions-get-resp.xml index ad10c671b..78dd425a7 100644 --- a/doc/api_samples/all_extensions/extensions-get-resp.xml +++ b/doc/api_samples/all_extensions/extensions-get-resp.xml @@ -63,6 +63,9 @@ Instance deferred delete + + Fixed IPs support + Flavor access supprt @@ -89,6 +92,12 @@ Floating IPs support + + Bulk handling of Floating IPs + + + Fping Management Extension. + Admin-only host administration diff --git a/doc/api_samples/limit-get-resp.json b/doc/api_samples/limit-get-resp.json index 1c5aa7a74..e11c3ee8e 100644 --- a/doc/api_samples/limit-get-resp.json +++ b/doc/api_samples/limit-get-resp.json @@ -4,34 +4,34 @@ "maxImageMeta": 128, "maxPersonality": 5, "maxPersonalitySize": 10240, + "maxSecurityGroupRules": 20, + "maxSecurityGroups": 10, "maxServerMeta": 128, "maxTotalCores": 20, "maxTotalFloatingIps": 10, "maxTotalInstances": 10, "maxTotalKeypairs": 100, - "maxTotalRAMSize": 51200, - "maxSecurityGroups": 10, - "maxSecurityGroupRules": 20 + "maxTotalRAMSize": 51200 }, "rate": [ { "limit": [ { - "next-available": "2012-08-31T22:36:27Z", + "next-available": "2012-11-27T17:22:18Z", "remaining": 10, "unit": "MINUTE", "value": 10, "verb": "POST" }, { - "next-available": "2012-08-31T22:36:27Z", + "next-available": "2012-11-27T17:22:18Z", "remaining": 10, "unit": "MINUTE", "value": 10, "verb": "PUT" }, { - "next-available": "2012-08-31T22:36:27Z", + "next-available": "2012-11-27T17:22:18Z", "remaining": 100, "unit": "MINUTE", "value": 100, @@ -44,7 +44,7 @@ { "limit": [ { - "next-available": "2012-08-31T22:36:27Z", + "next-available": "2012-11-27T17:22:18Z", "remaining": 50, "unit": "DAY", "value": 50, @@ -57,7 +57,7 @@ { "limit": [ { - "next-available": "2012-08-31T22:36:27Z", + "next-available": "2012-11-27T17:22:18Z", "remaining": 3, "unit": "MINUTE", "value": 3, @@ -66,7 +66,20 @@ ], "regex": ".*changes-since.*", "uri": "*changes-since*" + }, + { + "limit": [ + { + "next-available": "2012-11-27T17:22:18Z", + "remaining": 12, + "unit": "HOUR", + "value": 12, + "verb": "GET" + } + ], + "regex": "^/os-fping", + "uri": "*/os-fping" } ] } -} +} \ No newline at end of file diff --git a/doc/api_samples/limit-get-resp.xml b/doc/api_samples/limit-get-resp.xml index a47e0b22f..d8c197091 100644 --- a/doc/api_samples/limit-get-resp.xml +++ b/doc/api_samples/limit-get-resp.xml @@ -2,28 +2,31 @@ - - - + + + - + - + + + + - + + + - - - + \ No newline at end of file diff --git a/doc/api_samples/os-cloudpipe/cloud-pipe-create-resp.json b/doc/api_samples/os-cloudpipe/cloud-pipe-create-resp.json index 8c555bf99..a66b456c1 100644 --- a/doc/api_samples/os-cloudpipe/cloud-pipe-create-resp.json +++ b/doc/api_samples/os-cloudpipe/cloud-pipe-create-resp.json @@ -1,5 +1,3 @@ { - "cloudpipe": { - "instance_id": "72afecab-24b0-437e-b1d9-88a83be701b3" - } + "instance_id": "1e9b8425-34af-488e-b969-4d46f4a6382e" } \ No newline at end of file diff --git a/doc/api_samples/os-cloudpipe/cloud-pipe-get-resp.json b/doc/api_samples/os-cloudpipe/cloud-pipe-get-resp.json index 9efac48bb..d6773dfa5 100644 --- a/doc/api_samples/os-cloudpipe/cloud-pipe-get-resp.json +++ b/doc/api_samples/os-cloudpipe/cloud-pipe-get-resp.json @@ -1,15 +1,13 @@ { "cloudpipes": [ { - "cloudpipe": { - "created_at": "2012-09-25T18:18:55Z", - "instance_id": "72afecab-24b0-437e-b1d9-88a83be701b3", - "internal_ip": "192.168.0.3", - "project_id": "cloudpipe-059f21e3-c20e-4efc-9e7a-eba2ab3c6f9a", - "public_ip": "127.0.0.1", - "public_port": 22, - "state": "down" - } + "created_at": "2012-11-27T17:18:01Z", + "instance_id": "27deecdb-baa3-4a26-9c82-32994b815b01", + "internal_ip": "192.168.0.3", + "project_id": "cloudpipe-fa1765bd-a352-49c7-a6b7-8ee108a3cb0c", + "public_ip": "127.0.0.1", + "public_port": 22, + "state": "down" } ] } \ No newline at end of file diff --git a/doc/api_samples/os-hosts/hosts-list-resp.json b/doc/api_samples/os-hosts/hosts-list-resp.json index 760db64ff..d4146c082 100644 --- a/doc/api_samples/os-hosts/hosts-list-resp.json +++ b/doc/api_samples/os-hosts/hosts-list-resp.json @@ -1,24 +1,29 @@ { "hosts": [ { - "host_name": "c5a4acad61bc463ab5f60d164d942516", + "host_name": "787f4f6dda1b409bb8b2f9082349690e", "service": "compute", "zone": "nova" }, { - "host_name": "9112426abe5f4934a81b494fcdee8c5b", + "host_name": "a98b433151084aee8b1a986e28823b36", "service": "cert", "zone": "nova" }, { - "host_name": "d483b9e6124d47f2a6ad14e57716a778", + "host_name": "c56158d13a884a87abf9171efb7de9d8", "service": "network", "zone": "nova" }, { - "host_name": "3f9c73ba6d634092a70d6640f53930c8", + "host_name": "81d5cdcda0014918b3ebd3503a2e5c9a", "service": "scheduler", "zone": "nova" + }, + { + "host_name": "6e48bfe1a3304b7b86154326328750ae", + "service": "conductor", + "zone": "nova" } ] } \ No newline at end of file diff --git a/doc/api_samples/os-hosts/hosts-list-resp.xml b/doc/api_samples/os-hosts/hosts-list-resp.xml index 7defe0457..8266a5d49 100644 --- a/doc/api_samples/os-hosts/hosts-list-resp.xml +++ b/doc/api_samples/os-hosts/hosts-list-resp.xml @@ -1,7 +1,8 @@ - - - - + + + + + \ No newline at end of file diff --git a/doc/api_samples/os-used-limits/usedlimits-get-resp.json b/doc/api_samples/os-used-limits/usedlimits-get-resp.json index f018be9be..21ed3a082 100644 --- a/doc/api_samples/os-used-limits/usedlimits-get-resp.json +++ b/doc/api_samples/os-used-limits/usedlimits-get-resp.json @@ -22,21 +22,21 @@ { "limit": [ { - "next-available": "2012-10-04T15:38:20Z", + "next-available": "2012-11-27T17:24:52Z", "remaining": 10, "unit": "MINUTE", "value": 10, "verb": "POST" }, { - "next-available": "2012-10-04T15:38:20Z", + "next-available": "2012-11-27T17:24:52Z", "remaining": 10, "unit": "MINUTE", "value": 10, "verb": "PUT" }, { - "next-available": "2012-10-04T15:38:20Z", + "next-available": "2012-11-27T17:24:52Z", "remaining": 100, "unit": "MINUTE", "value": 100, @@ -49,7 +49,7 @@ { "limit": [ { - "next-available": "2012-10-04T15:38:20Z", + "next-available": "2012-11-27T17:24:52Z", "remaining": 50, "unit": "DAY", "value": 50, @@ -62,7 +62,7 @@ { "limit": [ { - "next-available": "2012-10-04T15:38:20Z", + "next-available": "2012-11-27T17:24:52Z", "remaining": 3, "unit": "MINUTE", "value": 3, @@ -71,7 +71,20 @@ ], "regex": ".*changes-since.*", "uri": "*changes-since*" + }, + { + "limit": [ + { + "next-available": "2012-11-27T17:24:52Z", + "remaining": 12, + "unit": "HOUR", + "value": 12, + "verb": "GET" + } + ], + "regex": "^/os-fping", + "uri": "*/os-fping" } ] } -} +} \ No newline at end of file diff --git a/doc/api_samples/os-used-limits/usedlimits-get-resp.xml b/doc/api_samples/os-used-limits/usedlimits-get-resp.xml index b86a41555..745a4828a 100644 --- a/doc/api_samples/os-used-limits/usedlimits-get-resp.xml +++ b/doc/api_samples/os-used-limits/usedlimits-get-resp.xml @@ -2,26 +2,27 @@ - - - + + + - + - + + + + - - @@ -29,6 +30,8 @@ + + - + \ No newline at end of file -- cgit