diff options
author | He Jie Xu <xuhj@linux.vnet.ibm.com> | 2013-09-02 16:36:26 +0800 |
---|---|---|
committer | He Jie Xu <xuhj@linux.vnet.ibm.com> | 2013-09-16 11:23:24 +0800 |
commit | 1fbdc5a9466c13408307a30e53f619a5894f44d5 (patch) | |
tree | 3f4f9af4136cd5088365fabb76f80207f43b8240 /doc | |
parent | 6a027703b921f057ea6c90bdceb0a62fe0526c6f (diff) | |
download | nova-1fbdc5a9466c13408307a30e53f619a5894f44d5.tar.gz |
Add v3 API samples for os-extended-volumes
Partially implements blueprint v3-api-unittests
Change-Id: I347b220890980a588eaecda644b15257d85b4a85
Diffstat (limited to 'doc')
12 files changed, 201 insertions, 10 deletions
diff --git a/doc/v3/api_samples/os-extended-volumes/attach-volume-req.json b/doc/v3/api_samples/os-extended-volumes/attach-volume-req.json new file mode 100644 index 0000000000..757ee7cdb3 --- /dev/null +++ b/doc/v3/api_samples/os-extended-volumes/attach-volume-req.json @@ -0,0 +1,6 @@ +{ + "attach": { + "volume_id": "a26887c6-c47b-4654-abb5-dfadf7d3f803", + "device": "/dev/vdd" + } +}
\ No newline at end of file diff --git a/doc/v3/api_samples/os-extended-volumes/attach-volume-req.xml b/doc/v3/api_samples/os-extended-volumes/attach-volume-req.xml new file mode 100644 index 0000000000..7b7fd0d97c --- /dev/null +++ b/doc/v3/api_samples/os-extended-volumes/attach-volume-req.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<attach volume_id="a26887c6-c47b-4654-abb5-dfadf7d3f803" device="/dev/vdd" />
\ No newline at end of file diff --git a/doc/v3/api_samples/os-extended-volumes/detach-volume-req.json b/doc/v3/api_samples/os-extended-volumes/detach-volume-req.json new file mode 100644 index 0000000000..7ba7b6fcc3 --- /dev/null +++ b/doc/v3/api_samples/os-extended-volumes/detach-volume-req.json @@ -0,0 +1,5 @@ +{ + "detach": { + "volume_id": "a26887c6-c47b-4654-abb5-dfadf7d3f803" + } +}
\ No newline at end of file diff --git a/doc/v3/api_samples/os-extended-volumes/detach-volume-req.xml b/doc/v3/api_samples/os-extended-volumes/detach-volume-req.xml new file mode 100644 index 0000000000..29010aba81 --- /dev/null +++ b/doc/v3/api_samples/os-extended-volumes/detach-volume-req.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<detach volume_id="a26887c6-c47b-4654-abb5-dfadf7d3f803" />
\ No newline at end of file diff --git a/doc/v3/api_samples/os-extended-volumes/server-get-resp.json b/doc/v3/api_samples/os-extended-volumes/server-get-resp.json new file mode 100644 index 0000000000..a5ae6177f0 --- /dev/null +++ b/doc/v3/api_samples/os-extended-volumes/server-get-resp.json @@ -0,0 +1,65 @@ +{ + "server": { + "access_ip_v4": "", + "access_ip_v6": "", + "addresses": { + "private": [ + { + "addr": "192.168.0.3", + "mac_addr": "aa:bb:cc:dd:ee:ff", + "type": "fixed", + "version": 4 + } + ] + }, + "created": "2013-09-16T03:22:28Z", + "flavor": { + "id": "1", + "links": [ + { + "href": "http://openstack.example.com/flavors/1", + "rel": "bookmark" + } + ] + }, + "host_id": "8feef92e2152b9970b51dbdade024afbec7f8f03daf7cb335a3c1cb9", + "id": "7d62983e-23df-4320-bc89-bbc77f2a2e40", + "image": { + "id": "70a599e0-31e7-49b7-b260-868f441e862b", + "links": [ + { + "href": "http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b", + "rel": "bookmark" + } + ] + }, + "key_name": null, + "links": [ + { + "href": "http://openstack.example.com/v3/servers/7d62983e-23df-4320-bc89-bbc77f2a2e40", + "rel": "self" + }, + { + "href": "http://openstack.example.com/servers/7d62983e-23df-4320-bc89-bbc77f2a2e40", + "rel": "bookmark" + } + ], + "metadata": { + "My Server Name": "Apache1" + }, + "name": "new-server-test", + "os-extended-volumes:volumes_attached": [ + { + "id": "volume_id1" + }, + { + "id": "volume_id2" + } + ], + "progress": 0, + "status": "ACTIVE", + "tenant_id": "openstack", + "updated": "2013-09-16T03:22:29Z", + "user_id": "fake" + } +}
\ No newline at end of file diff --git a/doc/v3/api_samples/os-extended-volumes/server-get-resp.xml b/doc/v3/api_samples/os-extended-volumes/server-get-resp.xml new file mode 100644 index 0000000000..28ca929bd3 --- /dev/null +++ b/doc/v3/api_samples/os-extended-volumes/server-get-resp.xml @@ -0,0 +1,21 @@ +<?xml version='1.0' encoding='UTF-8'?> +<server xmlns:os-extended-volumes="http://docs.openstack.org/compute/ext/extended_volumes/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" status="ACTIVE" updated="2013-09-16T03:22:42Z" user_id="fake" name="new-server-test" created="2013-09-16T03:22:39Z" tenant_id="openstack" access_ip_v4="" progress="0" host_id="2af1b68147c670fe4fcc9393435901abcfc46b2b3f7796be6fc17d5c" id="6c23b329-374d-449a-9e9f-6087cba322c0" access_ip_v6="" key_name="None"> + <image id="70a599e0-31e7-49b7-b260-868f441e862b"> + <atom:link href="http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b" rel="bookmark"/> + </image> + <flavor id="1"> + <atom:link href="http://openstack.example.com/flavors/1" rel="bookmark"/> + </flavor> + <metadata> + <meta key="My Server Name">Apache1</meta> + </metadata> + <addresses> + <network id="private"> + <ip version="4" type="fixed" addr="192.168.0.3" mac_addr="aa:bb:cc:dd:ee:ff"/> + </network> + </addresses> + <atom:link href="http://openstack.example.com/v3/servers/6c23b329-374d-449a-9e9f-6087cba322c0" rel="self"/> + <atom:link href="http://openstack.example.com/servers/6c23b329-374d-449a-9e9f-6087cba322c0" rel="bookmark"/> + <os-extended-volumes:volume_attached id="volume_id1"/> + <os-extended-volumes:volume_attached id="volume_id2"/> +</server>
\ No newline at end of file diff --git a/doc/v3/api_samples/os-extended-volumes/server-post-resp.json b/doc/v3/api_samples/os-extended-volumes/server-post-resp.json index 1e8d03dada..98a0e374af 100644 --- a/doc/v3/api_samples/os-extended-volumes/server-post-resp.json +++ b/doc/v3/api_samples/os-extended-volumes/server-post-resp.json @@ -1,14 +1,14 @@ { "server": { - "admin_pass": "wCGJKvs9RApD", - "id": "c43b584c-86ac-438c-aa9d-70aac14c2b27", + "admin_pass": "uNqGTziMK3px", + "id": "7d62983e-23df-4320-bc89-bbc77f2a2e40", "links": [ { - "href": "http://openstack.example.com/v3/servers/c43b584c-86ac-438c-aa9d-70aac14c2b27", + "href": "http://openstack.example.com/v3/servers/7d62983e-23df-4320-bc89-bbc77f2a2e40", "rel": "self" }, { - "href": "http://openstack.example.com/servers/c43b584c-86ac-438c-aa9d-70aac14c2b27", + "href": "http://openstack.example.com/servers/7d62983e-23df-4320-bc89-bbc77f2a2e40", "rel": "bookmark" } ] diff --git a/doc/v3/api_samples/os-extended-volumes/server-post-resp.xml b/doc/v3/api_samples/os-extended-volumes/server-post-resp.xml index 1455941855..9e09cac684 100644 --- a/doc/v3/api_samples/os-extended-volumes/server-post-resp.xml +++ b/doc/v3/api_samples/os-extended-volumes/server-post-resp.xml @@ -1,6 +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="4c256475-e5c7-4d1a-aafe-80992cc742ba" admin_pass="uRZ58nFyiwMn"> +<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="94b8c880-5d06-4f3d-a120-e1f43193e26d" admin_pass="6Hpc3u95ukbb"> <metadata/> - <atom:link href="http://openstack.example.com/v3/servers/4c256475-e5c7-4d1a-aafe-80992cc742ba" rel="self"/> - <atom:link href="http://openstack.example.com/servers/4c256475-e5c7-4d1a-aafe-80992cc742ba" rel="bookmark"/> + <atom:link href="http://openstack.example.com/v3/servers/94b8c880-5d06-4f3d-a120-e1f43193e26d" rel="self"/> + <atom:link href="http://openstack.example.com/servers/94b8c880-5d06-4f3d-a120-e1f43193e26d" rel="bookmark"/> </server>
\ No newline at end of file diff --git a/doc/v3/api_samples/os-extended-volumes/servers-detail-resp.json b/doc/v3/api_samples/os-extended-volumes/servers-detail-resp.json new file mode 100644 index 0000000000..395942f2b7 --- /dev/null +++ b/doc/v3/api_samples/os-extended-volumes/servers-detail-resp.json @@ -0,0 +1,67 @@ +{ + "servers": [ + { + "access_ip_v4": "", + "access_ip_v6": "", + "addresses": { + "private": [ + { + "addr": "192.168.0.3", + "mac_addr": "aa:bb:cc:dd:ee:ff", + "type": "fixed", + "version": 4 + } + ] + }, + "created": "2013-09-16T03:22:32Z", + "flavor": { + "id": "1", + "links": [ + { + "href": "http://openstack.example.com/flavors/1", + "rel": "bookmark" + } + ] + }, + "host_id": "f9622ec1b5ab6e3785661ea1c1e0294f95aecbcf27ac4cb60b06bd02", + "id": "8e479732-7701-48cd-af7a-04d84f51b742", + "image": { + "id": "70a599e0-31e7-49b7-b260-868f441e862b", + "links": [ + { + "href": "http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b", + "rel": "bookmark" + } + ] + }, + "key_name": null, + "links": [ + { + "href": "http://openstack.example.com/v3/servers/8e479732-7701-48cd-af7a-04d84f51b742", + "rel": "self" + }, + { + "href": "http://openstack.example.com/servers/8e479732-7701-48cd-af7a-04d84f51b742", + "rel": "bookmark" + } + ], + "metadata": { + "My Server Name": "Apache1" + }, + "name": "new-server-test", + "os-extended-volumes:volumes_attached": [ + { + "id": "volume_id1" + }, + { + "id": "volume_id2" + } + ], + "progress": 0, + "status": "ACTIVE", + "tenant_id": "openstack", + "updated": "2013-09-16T03:22:34Z", + "user_id": "fake" + } + ] +}
\ No newline at end of file diff --git a/doc/v3/api_samples/os-extended-volumes/servers-detail-resp.xml b/doc/v3/api_samples/os-extended-volumes/servers-detail-resp.xml new file mode 100644 index 0000000000..e978335234 --- /dev/null +++ b/doc/v3/api_samples/os-extended-volumes/servers-detail-resp.xml @@ -0,0 +1,23 @@ +<?xml version='1.0' encoding='UTF-8'?> +<servers xmlns:os-extended-volumes="http://docs.openstack.org/compute/ext/extended_volumes/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1"> + <server status="ACTIVE" updated="2013-09-16T03:22:37Z" user_id="fake" name="new-server-test" created="2013-09-16T03:22:36Z" tenant_id="openstack" access_ip_v4="" progress="0" host_id="7840e9f7175388e4a55b12a2c4b877aed4aed61c78fcf910f53c5ccb" id="a7a8a042-e1cf-41ab-be9c-085c1f3ee4fc" access_ip_v6="" key_name="None"> + <image id="70a599e0-31e7-49b7-b260-868f441e862b"> + <atom:link href="http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b" rel="bookmark"/> + </image> + <flavor id="1"> + <atom:link href="http://openstack.example.com/flavors/1" rel="bookmark"/> + </flavor> + <metadata> + <meta key="My Server Name">Apache1</meta> + </metadata> + <addresses> + <network id="private"> + <ip version="4" type="fixed" addr="192.168.0.3" mac_addr="aa:bb:cc:dd:ee:ff"/> + </network> + </addresses> + <atom:link href="http://openstack.example.com/v3/servers/a7a8a042-e1cf-41ab-be9c-085c1f3ee4fc" rel="self"/> + <atom:link href="http://openstack.example.com/servers/a7a8a042-e1cf-41ab-be9c-085c1f3ee4fc" rel="bookmark"/> + <os-extended-volumes:volume_attached id="volume_id1"/> + <os-extended-volumes:volume_attached id="volume_id2"/> + </server> +</servers>
\ No newline at end of file diff --git a/doc/v3/api_samples/os-extended-volumes/swap-volume-req.json b/doc/v3/api_samples/os-extended-volumes/swap-volume-req.json index 32aaf11dfd..17ae8dda25 100644 --- a/doc/v3/api_samples/os-extended-volumes/swap-volume-req.json +++ b/doc/v3/api_samples/os-extended-volumes/swap-volume-req.json @@ -1,6 +1,6 @@ { - "swap": { + "swap_volume_attachment": { "old_volume_id": "a26887c6-c47b-4654-abb5-dfadf7d3f803", - "new_volume_id": "a26887c6-c47b-4654-abb5-dfadf7d3f804" + "new_volume_id": "a26887c6-c47b-4654-abb5-dfadf7d3f805" } }
\ No newline at end of file diff --git a/doc/v3/api_samples/os-extended-volumes/swap-volume-req.xml b/doc/v3/api_samples/os-extended-volumes/swap-volume-req.xml index 32bc36436f..dd31b004d9 100644 --- a/doc/v3/api_samples/os-extended-volumes/swap-volume-req.xml +++ b/doc/v3/api_samples/os-extended-volumes/swap-volume-req.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="UTF-8"?> -<swap old_volume_id="a26887c6-c47b-4654-abb5-dfadf7d3f803" new_volume_id="a26887c6-c47b-4654-abb5-dfadf7d3f804" />
\ No newline at end of file +<swap_volume_attachment old_volume_id="a26887c6-c47b-4654-abb5-dfadf7d3f803" new_volume_id="a26887c6-c47b-4654-abb5-dfadf7d3f805" />
\ No newline at end of file |