diff options
author | Adalberto Medeiros <adalbas@linux.vnet.ibm.com> | 2013-02-04 11:34:55 -0200 |
---|---|---|
committer | Adalberto Medeiros <adalbas@linux.vnet.ibm.com> | 2013-02-14 13:58:26 -0200 |
commit | d74ad18520e5b17b19e76110aee24e1264793289 (patch) | |
tree | 8906ced6cd688ede0922ca8c19a04db3755da280 /doc | |
parent | 16fc2fd78c7b77b20cadbbc893a9d3571170ab87 (diff) | |
download | nova-d74ad18520e5b17b19e76110aee24e1264793289.tar.gz nova-d74ad18520e5b17b19e76110aee24e1264793289.tar.xz nova-d74ad18520e5b17b19e76110aee24e1264793289.zip |
add config drive to api_samples
Add config drive extension show and details to api_samples
blueprint nova-api-samples
bug 1091737
Change-Id: I6ae1f01a417f153723b85d08c2f181909c154946
Diffstat (limited to 'doc')
8 files changed, 209 insertions, 0 deletions
diff --git a/doc/api_samples/os-config-drive/server-config-drive-get-resp.json b/doc/api_samples/os-config-drive/server-config-drive-get-resp.json new file mode 100644 index 000000000..8745b3d62 --- /dev/null +++ b/doc/api_samples/os-config-drive/server-config-drive-get-resp.json @@ -0,0 +1,55 @@ +{ + "server": { + "accessIPv4": "", + "accessIPv6": "", + "addresses": { + "private": [ + { + "addr": "192.168.0.3", + "version": 4 + } + ] + }, + "config_drive": "", + "created": "2013-02-04T13:17:50Z", + "flavor": { + "id": "1", + "links": [ + { + "href": "http://openstack.example.com/openstack/flavors/1", + "rel": "bookmark" + } + ] + }, + "hostId": "8725fb615b191d8249a40f3e90d1efde88d914412e4edb2719176afd", + "id": "dd3b0715-a3fc-43d8-bbd2-2720beb226fb", + "image": { + "id": "70a599e0-31e7-49b7-b260-868f441e862b", + "links": [ + { + "href": "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b", + "rel": "bookmark" + } + ] + }, + "links": [ + { + "href": "http://openstack.example.com/v2/openstack/servers/dd3b0715-a3fc-43d8-bbd2-2720beb226fb", + "rel": "self" + }, + { + "href": "http://openstack.example.com/openstack/servers/dd3b0715-a3fc-43d8-bbd2-2720beb226fb", + "rel": "bookmark" + } + ], + "metadata": { + "My Server Name": "Apache1" + }, + "name": "new-server-test", + "progress": 0, + "status": "ACTIVE", + "tenant_id": "openstack", + "updated": "2013-02-04T13:17:51Z", + "user_id": "fake" + } +}
\ No newline at end of file diff --git a/doc/api_samples/os-config-drive/server-config-drive-get-resp.xml b/doc/api_samples/os-config-drive/server-config-drive-get-resp.xml new file mode 100644 index 000000000..6bb4c5e7c --- /dev/null +++ b/doc/api_samples/os-config-drive/server-config-drive-get-resp.xml @@ -0,0 +1,19 @@ +<?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" status="ACTIVE" updated="2013-02-04T13:26:10Z" hostId="7a8c3fc15db5d6227d26d5ef559b77c880bbe99da5ce5f5871fc113e" name="new-server-test" created="2013-02-04T13:26:09Z" userId="fake" tenantId="openstack" accessIPv4="" accessIPv6="" progress="0" id="3b9e0572-3d7b-4e6f-9c21-35ad0f7dbf95" config_drive=""> + <image id="70a599e0-31e7-49b7-b260-868f441e862b"> + <atom:link href="http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b" rel="bookmark"/> + </image> + <flavor id="1"> + <atom:link href="http://openstack.example.com/openstack/flavors/1" rel="bookmark"/> + </flavor> + <metadata> + <meta key="My Server Name">Apache1</meta> + </metadata> + <addresses> + <network id="private"> + <ip version="4" addr="192.168.0.3"/> + </network> + </addresses> + <atom:link href="http://openstack.example.com/v2/openstack/servers/3b9e0572-3d7b-4e6f-9c21-35ad0f7dbf95" rel="self"/> + <atom:link href="http://openstack.example.com/openstack/servers/3b9e0572-3d7b-4e6f-9c21-35ad0f7dbf95" rel="bookmark"/> +</server>
\ No newline at end of file diff --git a/doc/api_samples/os-config-drive/server-post-req.json b/doc/api_samples/os-config-drive/server-post-req.json new file mode 100644 index 000000000..d88eb4122 --- /dev/null +++ b/doc/api_samples/os-config-drive/server-post-req.json @@ -0,0 +1,16 @@ +{ + "server" : { + "name" : "new-server-test", + "imageRef" : "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b", + "flavorRef" : "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/api_samples/os-config-drive/server-post-req.xml b/doc/api_samples/os-config-drive/server-post-req.xml new file mode 100644 index 000000000..0a3c8bb53 --- /dev/null +++ b/doc/api_samples/os-config-drive/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" imageRef="http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b" flavorRef="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/api_samples/os-config-drive/server-post-resp.json b/doc/api_samples/os-config-drive/server-post-resp.json new file mode 100644 index 000000000..231f5b9f4 --- /dev/null +++ b/doc/api_samples/os-config-drive/server-post-resp.json @@ -0,0 +1,16 @@ +{ + "server": { + "adminPass": "am5LKVsBVQ4s", + "id": "58da039c-dc81-4d8f-8688-a2f819e2f750", + "links": [ + { + "href": "http://openstack.example.com/v2/openstack/servers/58da039c-dc81-4d8f-8688-a2f819e2f750", + "rel": "self" + }, + { + "href": "http://openstack.example.com/openstack/servers/58da039c-dc81-4d8f-8688-a2f819e2f750", + "rel": "bookmark" + } + ] + } +}
\ No newline at end of file diff --git a/doc/api_samples/os-config-drive/server-post-resp.xml b/doc/api_samples/os-config-drive/server-post-resp.xml new file mode 100644 index 000000000..3cbb199ce --- /dev/null +++ b/doc/api_samples/os-config-drive/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="00bba779-f8ae-403e-901d-1af18bcb9187" adminPass="XJqvFkH62TZh"> + <metadata/> + <atom:link href="http://openstack.example.com/v2/openstack/servers/00bba779-f8ae-403e-901d-1af18bcb9187" rel="self"/> + <atom:link href="http://openstack.example.com/openstack/servers/00bba779-f8ae-403e-901d-1af18bcb9187" rel="bookmark"/> +</server>
\ No newline at end of file diff --git a/doc/api_samples/os-config-drive/servers-config-drive-details-resp.json b/doc/api_samples/os-config-drive/servers-config-drive-details-resp.json new file mode 100644 index 000000000..1373721ef --- /dev/null +++ b/doc/api_samples/os-config-drive/servers-config-drive-details-resp.json @@ -0,0 +1,57 @@ +{ + "servers": [ + { + "accessIPv4": "", + "accessIPv6": "", + "addresses": { + "private": [ + { + "addr": "192.168.0.3", + "version": 4 + } + ] + }, + "config_drive": "", + "created": "2013-02-04T13:21:44Z", + "flavor": { + "id": "1", + "links": [ + { + "href": "http://openstack.example.com/openstack/flavors/1", + "rel": "bookmark" + } + ] + }, + "hostId": "76e154b0015e25fad65a7ab0c35a86dd79acfa8312075a6534ef6176", + "id": "720e688f-5ec8-4d4f-b585-dbd1a89ceeb0", + "image": { + "id": "70a599e0-31e7-49b7-b260-868f441e862b", + "links": [ + { + "href": "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b", + "rel": "bookmark" + } + ] + }, + "links": [ + { + "href": "http://openstack.example.com/v2/openstack/servers/720e688f-5ec8-4d4f-b585-dbd1a89ceeb0", + "rel": "self" + }, + { + "href": "http://openstack.example.com/openstack/servers/720e688f-5ec8-4d4f-b585-dbd1a89ceeb0", + "rel": "bookmark" + } + ], + "metadata": { + "My Server Name": "Apache1" + }, + "name": "new-server-test", + "progress": 0, + "status": "ACTIVE", + "tenant_id": "openstack", + "updated": "2013-02-04T13:21:44Z", + "user_id": "fake" + } + ] +}
\ No newline at end of file diff --git a/doc/api_samples/os-config-drive/servers-config-drive-details-resp.xml b/doc/api_samples/os-config-drive/servers-config-drive-details-resp.xml new file mode 100644 index 000000000..6de687a91 --- /dev/null +++ b/doc/api_samples/os-config-drive/servers-config-drive-details-resp.xml @@ -0,0 +1,21 @@ +<?xml version='1.0' encoding='UTF-8'?> +<servers xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1"> + <server status="ACTIVE" updated="2013-02-04T13:26:27Z" hostId="2a00edcff768661880eb9c96c951f56c2c5dcd873bb652361008efc7" name="new-server-test" created="2013-02-04T13:26:27Z" userId="fake" tenantId="openstack" accessIPv4="" accessIPv6="" progress="0" id="515d94d3-aee4-4bd5-bb4e-9601c657372f" config_drive=""> + <image id="70a599e0-31e7-49b7-b260-868f441e862b"> + <atom:link href="http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b" rel="bookmark"/> + </image> + <flavor id="1"> + <atom:link href="http://openstack.example.com/openstack/flavors/1" rel="bookmark"/> + </flavor> + <metadata> + <meta key="My Server Name">Apache1</meta> + </metadata> + <addresses> + <network id="private"> + <ip version="4" addr="192.168.0.3"/> + </network> + </addresses> + <atom:link href="http://openstack.example.com/v2/openstack/servers/515d94d3-aee4-4bd5-bb4e-9601c657372f" rel="self"/> + <atom:link href="http://openstack.example.com/openstack/servers/515d94d3-aee4-4bd5-bb4e-9601c657372f" rel="bookmark"/> + </server> +</servers>
\ No newline at end of file |