summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorChris Yeoh <cyeoh@au1.ibm.com>2013-09-02 22:13:14 +0930
committerChris Yeoh <cyeoh@au1.ibm.com>2013-09-03 20:39:17 +0930
commitabaadf09ed86ef682c9fe2a77b8e60b608e29ac2 (patch)
tree34eb1f8f0a8c936e315f85a7a8ed439e45b3fb23 /doc
parentb7fdf9707a29e2c9a4d37aecf4db7c818030ccb5 (diff)
downloadnova-abaadf09ed86ef682c9fe2a77b8e60b608e29ac2.tar.gz
Adds V3 API samples for cells and multinic
Adds V3 API samples for cells and multinic extensions. Bundling them together to save on review load Partially implements blueprint v3-api-unittests Partially implements blueprint v3-api-specification Change-Id: I50840b3d900fbc8ff4f655e4188cc886d7065729
Diffstat (limited to 'doc')
-rw-r--r--doc/v3/api_samples/os-cells/cells-capacities-resp.json26
-rw-r--r--doc/v3/api_samples/os-cells/cells-capacities-resp.xml19
-rw-r--r--doc/v3/api_samples/os-cells/cells-get-resp.json9
-rw-r--r--doc/v3/api_samples/os-cells/cells-get-resp.xml2
-rw-r--r--doc/v3/api_samples/os-cells/cells-list-empty-resp.json3
-rw-r--r--doc/v3/api_samples/os-cells/cells-list-empty-resp.xml2
-rw-r--r--doc/v3/api_samples/os-cells/cells-list-resp.json39
-rw-r--r--doc/v3/api_samples/os-cells/cells-list-resp.xml8
-rw-r--r--doc/v3/api_samples/os-multinic/multinic-add-fixed-ip-req.json5
-rw-r--r--doc/v3/api_samples/os-multinic/multinic-add-fixed-ip-req.xml3
-rw-r--r--doc/v3/api_samples/os-multinic/multinic-remove-fixed-ip-req.json5
-rw-r--r--doc/v3/api_samples/os-multinic/multinic-remove-fixed-ip-req.xml3
-rw-r--r--doc/v3/api_samples/os-multinic/server-post-req.json16
-rw-r--r--doc/v3/api_samples/os-multinic/server-post-req.xml19
-rw-r--r--doc/v3/api_samples/os-multinic/server-post-resp.json16
-rw-r--r--doc/v3/api_samples/os-multinic/server-post-resp.xml6
16 files changed, 181 insertions, 0 deletions
diff --git a/doc/v3/api_samples/os-cells/cells-capacities-resp.json b/doc/v3/api_samples/os-cells/cells-capacities-resp.json
new file mode 100644
index 0000000000..5e067dd3aa
--- /dev/null
+++ b/doc/v3/api_samples/os-cells/cells-capacities-resp.json
@@ -0,0 +1,26 @@
+{
+ "cell": {
+ "capacities": {
+ "disk_free": {
+ "total_mb": 1052672,
+ "units_by_mb": {
+ "0": 0,
+ "163840": 5,
+ "20480": 46,
+ "40960": 23,
+ "81920": 11
+ }
+ },
+ "ram_free": {
+ "total_mb": 7680,
+ "units_by_mb": {
+ "16384": 0,
+ "2048": 3,
+ "4096": 1,
+ "512": 13,
+ "8192": 0
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/doc/v3/api_samples/os-cells/cells-capacities-resp.xml b/doc/v3/api_samples/os-cells/cells-capacities-resp.xml
new file mode 100644
index 0000000000..fd99b8cb41
--- /dev/null
+++ b/doc/v3/api_samples/os-cells/cells-capacities-resp.xml
@@ -0,0 +1,19 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<cell xmlns="http://docs.rackspacecloud.com/servers/api/v1.0">
+ <capacities>
+ <ram_free total_mb="7680">
+ <unit_by_mb unit="0" mb="8192"/>
+ <unit_by_mb unit="13" mb="512"/>
+ <unit_by_mb unit="1" mb="4096"/>
+ <unit_by_mb unit="3" mb="2048"/>
+ <unit_by_mb unit="0" mb="16384"/>
+ </ram_free>
+ <disk_free total_mb="1052672">
+ <unit_by_mb unit="11" mb="81920"/>
+ <unit_by_mb unit="46" mb="20480"/>
+ <unit_by_mb unit="5" mb="163840"/>
+ <unit_by_mb unit="23" mb="40960"/>
+ <unit_by_mb unit="0" mb="0"/>
+ </disk_free>
+ </capacities>
+</cell> \ No newline at end of file
diff --git a/doc/v3/api_samples/os-cells/cells-get-resp.json b/doc/v3/api_samples/os-cells/cells-get-resp.json
new file mode 100644
index 0000000000..62eb8ec31d
--- /dev/null
+++ b/doc/v3/api_samples/os-cells/cells-get-resp.json
@@ -0,0 +1,9 @@
+{
+ "cell": {
+ "name": "cell3",
+ "rpc_host": null,
+ "rpc_port": null,
+ "type": "child",
+ "username": "username3"
+ }
+} \ No newline at end of file
diff --git a/doc/v3/api_samples/os-cells/cells-get-resp.xml b/doc/v3/api_samples/os-cells/cells-get-resp.xml
new file mode 100644
index 0000000000..12256a5bdc
--- /dev/null
+++ b/doc/v3/api_samples/os-cells/cells-get-resp.xml
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<cell xmlns="http://docs.rackspacecloud.com/servers/api/v1.0" username="username3" rpc_host="None" type="child" name="cell3" rpc_port="None"/> \ No newline at end of file
diff --git a/doc/v3/api_samples/os-cells/cells-list-empty-resp.json b/doc/v3/api_samples/os-cells/cells-list-empty-resp.json
new file mode 100644
index 0000000000..5325a4e855
--- /dev/null
+++ b/doc/v3/api_samples/os-cells/cells-list-empty-resp.json
@@ -0,0 +1,3 @@
+{
+ "cells": []
+} \ No newline at end of file
diff --git a/doc/v3/api_samples/os-cells/cells-list-empty-resp.xml b/doc/v3/api_samples/os-cells/cells-list-empty-resp.xml
new file mode 100644
index 0000000000..6ac77b4bd8
--- /dev/null
+++ b/doc/v3/api_samples/os-cells/cells-list-empty-resp.xml
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<cells xmlns="http://docs.rackspacecloud.com/servers/api/v1.0"/> \ No newline at end of file
diff --git a/doc/v3/api_samples/os-cells/cells-list-resp.json b/doc/v3/api_samples/os-cells/cells-list-resp.json
new file mode 100644
index 0000000000..97ea4c6dd3
--- /dev/null
+++ b/doc/v3/api_samples/os-cells/cells-list-resp.json
@@ -0,0 +1,39 @@
+{
+ "cells": [
+ {
+ "name": "cell1",
+ "rpc_host": null,
+ "rpc_port": null,
+ "type": "child",
+ "username": "username1"
+ },
+ {
+ "name": "cell3",
+ "rpc_host": null,
+ "rpc_port": null,
+ "type": "child",
+ "username": "username3"
+ },
+ {
+ "name": "cell5",
+ "rpc_host": null,
+ "rpc_port": null,
+ "type": "child",
+ "username": "username5"
+ },
+ {
+ "name": "cell2",
+ "rpc_host": null,
+ "rpc_port": null,
+ "type": "parent",
+ "username": "username2"
+ },
+ {
+ "name": "cell4",
+ "rpc_host": null,
+ "rpc_port": null,
+ "type": "parent",
+ "username": "username4"
+ }
+ ]
+} \ No newline at end of file
diff --git a/doc/v3/api_samples/os-cells/cells-list-resp.xml b/doc/v3/api_samples/os-cells/cells-list-resp.xml
new file mode 100644
index 0000000000..7d697bb918
--- /dev/null
+++ b/doc/v3/api_samples/os-cells/cells-list-resp.xml
@@ -0,0 +1,8 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<cells xmlns="http://docs.rackspacecloud.com/servers/api/v1.0">
+ <cell username="username1" rpc_host="None" type="child" name="cell1" rpc_port="None"/>
+ <cell username="username3" rpc_host="None" type="child" name="cell3" rpc_port="None"/>
+ <cell username="username5" rpc_host="None" type="child" name="cell5" rpc_port="None"/>
+ <cell username="username2" rpc_host="None" type="parent" name="cell2" rpc_port="None"/>
+ <cell username="username4" rpc_host="None" type="parent" name="cell4" rpc_port="None"/>
+</cells> \ No newline at end of file
diff --git a/doc/v3/api_samples/os-multinic/multinic-add-fixed-ip-req.json b/doc/v3/api_samples/os-multinic/multinic-add-fixed-ip-req.json
new file mode 100644
index 0000000000..8127b212cc
--- /dev/null
+++ b/doc/v3/api_samples/os-multinic/multinic-add-fixed-ip-req.json
@@ -0,0 +1,5 @@
+{
+ "addFixedIp":{
+ "networkId": 1
+ }
+} \ No newline at end of file
diff --git a/doc/v3/api_samples/os-multinic/multinic-add-fixed-ip-req.xml b/doc/v3/api_samples/os-multinic/multinic-add-fixed-ip-req.xml
new file mode 100644
index 0000000000..ee4b549a83
--- /dev/null
+++ b/doc/v3/api_samples/os-multinic/multinic-add-fixed-ip-req.xml
@@ -0,0 +1,3 @@
+<add_fixed_ip>
+ <network_id>1</network_id>
+</add_fixed_ip> \ No newline at end of file
diff --git a/doc/v3/api_samples/os-multinic/multinic-remove-fixed-ip-req.json b/doc/v3/api_samples/os-multinic/multinic-remove-fixed-ip-req.json
new file mode 100644
index 0000000000..cc2cff2786
--- /dev/null
+++ b/doc/v3/api_samples/os-multinic/multinic-remove-fixed-ip-req.json
@@ -0,0 +1,5 @@
+{
+ "remove_fixed_ip":{
+ "address": "10.0.0.4"
+ }
+} \ No newline at end of file
diff --git a/doc/v3/api_samples/os-multinic/multinic-remove-fixed-ip-req.xml b/doc/v3/api_samples/os-multinic/multinic-remove-fixed-ip-req.xml
new file mode 100644
index 0000000000..e89050ce6d
--- /dev/null
+++ b/doc/v3/api_samples/os-multinic/multinic-remove-fixed-ip-req.xml
@@ -0,0 +1,3 @@
+<remove_fixed_ip>
+ <address>10.0.0.4</address>
+</remove_fixed_ip> \ No newline at end of file
diff --git a/doc/v3/api_samples/os-multinic/server-post-req.json b/doc/v3/api_samples/os-multinic/server-post-req.json
new file mode 100644
index 0000000000..d41985a1bc
--- /dev/null
+++ b/doc/v3/api_samples/os-multinic/server-post-req.json
@@ -0,0 +1,16 @@
+{
+ "server" : {
+ "name" : "new-server-test",
+ "image_ref" : "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
+ "flavor_ref" : "http://openstack.example.com/openstack/flavors/1",
+ "metadata" : {
+ "My Server Name" : "Apache1"
+ },
+ "personality" : [
+ {
+ "path" : "/etc/banner.txt",
+ "contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVsc2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4gQnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRoZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlvdSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vyc2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/doc/v3/api_samples/os-multinic/server-post-req.xml b/doc/v3/api_samples/os-multinic/server-post-req.xml
new file mode 100644
index 0000000000..598839cf6a
--- /dev/null
+++ b/doc/v3/api_samples/os-multinic/server-post-req.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server xmlns="http://docs.openstack.org/compute/api/v1.1" image_ref="http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b" flavor_ref="http://openstack.example.com/openstack/flavors/1" name="new-server-test">
+ <metadata>
+ <meta key="My Server Name">Apache1</meta>
+ </metadata>
+ <personality>
+ <file path="/etc/banner.txt">
+ ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
+ dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k
+ IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
+ c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g
+ QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
+ ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv
+ dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
+ c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6
+ b25zLiINCg0KLVJpY2hhcmQgQmFjaA==
+ </file>
+ </personality>
+</server> \ No newline at end of file
diff --git a/doc/v3/api_samples/os-multinic/server-post-resp.json b/doc/v3/api_samples/os-multinic/server-post-resp.json
new file mode 100644
index 0000000000..86eea81c4d
--- /dev/null
+++ b/doc/v3/api_samples/os-multinic/server-post-resp.json
@@ -0,0 +1,16 @@
+{
+ "server": {
+ "admin_pass": "5Y9rR4XaM8Qg",
+ "id": "bbe8d469-e8cb-49b1-96d8-f93b68c82355",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/servers/bbe8d469-e8cb-49b1-96d8-f93b68c82355",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/servers/bbe8d469-e8cb-49b1-96d8-f93b68c82355",
+ "rel": "bookmark"
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/doc/v3/api_samples/os-multinic/server-post-resp.xml b/doc/v3/api_samples/os-multinic/server-post-resp.xml
new file mode 100644
index 0000000000..55b0d0d8c2
--- /dev/null
+++ b/doc/v3/api_samples/os-multinic/server-post-resp.xml
@@ -0,0 +1,6 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="fcfa0d46-4f4d-4fa5-a255-5b1d826b5331" admin_pass="ofbz7nspfcQt">
+ <metadata/>
+ <atom:link href="http://openstack.example.com/v3/servers/fcfa0d46-4f4d-4fa5-a255-5b1d826b5331" rel="self"/>
+ <atom:link href="http://openstack.example.com/servers/fcfa0d46-4f4d-4fa5-a255-5b1d826b5331" rel="bookmark"/>
+</server> \ No newline at end of file