From c4a632a8f448aad18676c0caa07c13e655c67f7c Mon Sep 17 00:00:00 2001 From: Eli Qiao Date: Sun, 15 Feb 2015 18:21:15 +0800 Subject: [PATCH] Add missing api samples for floating-ips api(v2) floating-ips api missing floating-ips-get-resp sample file, and the integrated test cases use a wrong sample file(algouth the contents are same). This patch addes missing api samples file and correct the integrated test case. Change-Id: Icadcabad369cb6a9c3270915aa3bc9545d5348e8 --- .../os-extended-floating-ips/floating-ips-get-resp.json | 9 +++++++++ .../os-floating-ips/floating-ips-get-resp.json | 9 +++++++++ nova/tests/functional/test_api_samples.py | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 doc/api_samples/os-extended-floating-ips/floating-ips-get-resp.json create mode 100644 doc/api_samples/os-floating-ips/floating-ips-get-resp.json diff --git a/doc/api_samples/os-extended-floating-ips/floating-ips-get-resp.json b/doc/api_samples/os-extended-floating-ips/floating-ips-get-resp.json new file mode 100644 index 000000000000..fe161a7dd129 --- /dev/null +++ b/doc/api_samples/os-extended-floating-ips/floating-ips-get-resp.json @@ -0,0 +1,9 @@ +{ + "floating_ip": { + "fixed_ip": null, + "id": 1, + "instance_id": null, + "ip": "10.10.10.1", + "pool": "nova" + } +} \ No newline at end of file diff --git a/doc/api_samples/os-floating-ips/floating-ips-get-resp.json b/doc/api_samples/os-floating-ips/floating-ips-get-resp.json new file mode 100644 index 000000000000..fe161a7dd129 --- /dev/null +++ b/doc/api_samples/os-floating-ips/floating-ips-get-resp.json @@ -0,0 +1,9 @@ +{ + "floating_ip": { + "fixed_ip": null, + "id": 1, + "instance_id": null, + "ip": "10.10.10.1", + "pool": "nova" + } +} \ No newline at end of file diff --git a/nova/tests/functional/test_api_samples.py b/nova/tests/functional/test_api_samples.py index 3a7bcfad6826..eb1466983fce 100644 --- a/nova/tests/functional/test_api_samples.py +++ b/nova/tests/functional/test_api_samples.py @@ -899,7 +899,7 @@ class FloatingIpsJsonTest(ApiSampleTestBaseV2): # but it would be better if we could get this from the create response = self._do_get('os-floating-ips/%d' % 1) subs = self._get_regexes() - self._verify_response('floating-ips-create-resp', subs, response, 200) + self._verify_response('floating-ips-get-resp', subs, response, 200) def test_floating_ips_delete(self): self.test_floating_ips_create()