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
This commit is contained in:
Chris Yeoh 2013-09-02 22:13:14 +09:30
parent 6e9c409606
commit 9a1c8679f4
16 changed files with 181 additions and 0 deletions

View File

@ -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
}
}
}
}
}

View File

@ -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>

View File

@ -0,0 +1,9 @@
{
"cell": {
"name": "cell3",
"rpc_host": null,
"rpc_port": null,
"type": "child",
"username": "username3"
}
}

View File

@ -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"/>

View File

@ -0,0 +1,3 @@
{
"cells": []
}

View File

@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<cells xmlns="http://docs.rackspacecloud.com/servers/api/v1.0"/>

View File

@ -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"
}
]
}

View File

@ -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>

View File

@ -0,0 +1,5 @@
{
"addFixedIp":{
"networkId": 1
}
}

View File

@ -0,0 +1,3 @@
<add_fixed_ip>
<network_id>1</network_id>
</add_fixed_ip>

View File

@ -0,0 +1,5 @@
{
"remove_fixed_ip":{
"address": "10.0.0.4"
}
}

View File

@ -0,0 +1,3 @@
<remove_fixed_ip>
<address>10.0.0.4</address>
</remove_fixed_ip>

View File

@ -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=="
}
]
}
}

View File

@ -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>

View File

@ -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"
}
]
}
}

View File

@ -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>