From d9e7e0de9da7a10341ef04edd181fb2dc83426e9 Mon Sep 17 00:00:00 2001 From: Giampaolo Lauria Date: Mon, 3 Dec 2012 13:59:53 -0500 Subject: [PATCH] Adds API Sample tests for Quotas extension. Partially implements blueprint nova-api-samples Fixes bug 1070172 Change-Id: I796897e69ec75da6da047574c0b8131f94bfa17e --- .../quotas-show-defaults-get-resp.json | 16 ++++++++++++++++ .../quotas-show-defaults-get-resp.xml | 14 ++++++++++++++ .../os-quota-sets/quotas-show-get-resp.json | 16 ++++++++++++++++ .../os-quota-sets/quotas-show-get-resp.xml | 14 ++++++++++++++ .../os-quota-sets/quotas-update-post-req.json | 5 +++++ .../os-quota-sets/quotas-update-post-req.xml | 4 ++++ .../os-quota-sets/quotas-update-post-resp.json | 15 +++++++++++++++ .../os-quota-sets/quotas-update-post-resp.xml | 14 ++++++++++++++ 8 files changed, 98 insertions(+) create mode 100644 doc/api_samples/os-quota-sets/quotas-show-defaults-get-resp.json create mode 100644 doc/api_samples/os-quota-sets/quotas-show-defaults-get-resp.xml create mode 100644 doc/api_samples/os-quota-sets/quotas-show-get-resp.json create mode 100644 doc/api_samples/os-quota-sets/quotas-show-get-resp.xml create mode 100644 doc/api_samples/os-quota-sets/quotas-update-post-req.json create mode 100644 doc/api_samples/os-quota-sets/quotas-update-post-req.xml create mode 100644 doc/api_samples/os-quota-sets/quotas-update-post-resp.json create mode 100644 doc/api_samples/os-quota-sets/quotas-update-post-resp.xml diff --git a/doc/api_samples/os-quota-sets/quotas-show-defaults-get-resp.json b/doc/api_samples/os-quota-sets/quotas-show-defaults-get-resp.json new file mode 100644 index 000000000..70d4b66eb --- /dev/null +++ b/doc/api_samples/os-quota-sets/quotas-show-defaults-get-resp.json @@ -0,0 +1,16 @@ +{ + "quota_set": { + "cores": 20, + "floating_ips": 10, + "id": "fake_tenant", + "injected_file_content_bytes": 10240, + "injected_file_path_bytes": 255, + "injected_files": 5, + "instances": 10, + "key_pairs": 100, + "metadata_items": 128, + "ram": 51200, + "security_group_rules": 20, + "security_groups": 10 + } +} \ No newline at end of file diff --git a/doc/api_samples/os-quota-sets/quotas-show-defaults-get-resp.xml b/doc/api_samples/os-quota-sets/quotas-show-defaults-get-resp.xml new file mode 100644 index 000000000..7dfdddeb2 --- /dev/null +++ b/doc/api_samples/os-quota-sets/quotas-show-defaults-get-resp.xml @@ -0,0 +1,14 @@ + + + 20 + 10 + 10240 + 255 + 5 + 10 + 100 + 128 + 51200 + 20 + 10 + \ No newline at end of file diff --git a/doc/api_samples/os-quota-sets/quotas-show-get-resp.json b/doc/api_samples/os-quota-sets/quotas-show-get-resp.json new file mode 100644 index 000000000..70d4b66eb --- /dev/null +++ b/doc/api_samples/os-quota-sets/quotas-show-get-resp.json @@ -0,0 +1,16 @@ +{ + "quota_set": { + "cores": 20, + "floating_ips": 10, + "id": "fake_tenant", + "injected_file_content_bytes": 10240, + "injected_file_path_bytes": 255, + "injected_files": 5, + "instances": 10, + "key_pairs": 100, + "metadata_items": 128, + "ram": 51200, + "security_group_rules": 20, + "security_groups": 10 + } +} \ No newline at end of file diff --git a/doc/api_samples/os-quota-sets/quotas-show-get-resp.xml b/doc/api_samples/os-quota-sets/quotas-show-get-resp.xml new file mode 100644 index 000000000..7dfdddeb2 --- /dev/null +++ b/doc/api_samples/os-quota-sets/quotas-show-get-resp.xml @@ -0,0 +1,14 @@ + + + 20 + 10 + 10240 + 255 + 5 + 10 + 100 + 128 + 51200 + 20 + 10 + \ No newline at end of file diff --git a/doc/api_samples/os-quota-sets/quotas-update-post-req.json b/doc/api_samples/os-quota-sets/quotas-update-post-req.json new file mode 100644 index 000000000..1f12caa04 --- /dev/null +++ b/doc/api_samples/os-quota-sets/quotas-update-post-req.json @@ -0,0 +1,5 @@ +{ + "quota_set": { + "security_groups": 45 + } +} diff --git a/doc/api_samples/os-quota-sets/quotas-update-post-req.xml b/doc/api_samples/os-quota-sets/quotas-update-post-req.xml new file mode 100644 index 000000000..4bb7b3a47 --- /dev/null +++ b/doc/api_samples/os-quota-sets/quotas-update-post-req.xml @@ -0,0 +1,4 @@ + + + 45 + \ No newline at end of file diff --git a/doc/api_samples/os-quota-sets/quotas-update-post-resp.json b/doc/api_samples/os-quota-sets/quotas-update-post-resp.json new file mode 100644 index 000000000..6581c6354 --- /dev/null +++ b/doc/api_samples/os-quota-sets/quotas-update-post-resp.json @@ -0,0 +1,15 @@ +{ + "quota_set": { + "cores": 20, + "floating_ips": 10, + "injected_file_content_bytes": 10240, + "injected_file_path_bytes": 255, + "injected_files": 5, + "instances": 10, + "key_pairs": 100, + "metadata_items": 128, + "ram": 51200, + "security_group_rules": 20, + "security_groups": 45 + } +} \ No newline at end of file diff --git a/doc/api_samples/os-quota-sets/quotas-update-post-resp.xml b/doc/api_samples/os-quota-sets/quotas-update-post-resp.xml new file mode 100644 index 000000000..aef4761f8 --- /dev/null +++ b/doc/api_samples/os-quota-sets/quotas-update-post-resp.xml @@ -0,0 +1,14 @@ + + + 20 + 10 + 10240 + 255 + 5 + 10 + 100 + 128 + 51200 + 20 + 45 + \ No newline at end of file