summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorSean Dague <sdague@linux.vnet.ibm.com>2012-09-25 10:15:27 -0400
committerSean Dague <sdague@linux.vnet.ibm.com>2012-09-25 10:15:27 -0400
commit8d4af6b906e70437fa77e7cdc5b0e2fcd216c17d (patch)
tree3f8fb22a7f04eceba20d53a4c3cc1f7228e7bd16 /doc
parent13a08f6ec7969c4ec6bd4b3bd816bb2a40f9896a (diff)
downloadnova-8d4af6b906e70437fa77e7cdc5b0e2fcd216c17d.tar.gz
nova-8d4af6b906e70437fa77e7cdc5b0e2fcd216c17d.tar.xz
nova-8d4af6b906e70437fa77e7cdc5b0e2fcd216c17d.zip
all_extensions api_samples testing for server actions
server actions sometimes return servers objects, which means their output is different when extensions are enabled. This adds api samples for those cases to give a more realistic view to the user of what they might expect. Change-Id: Iaa9a4c3a373dee41931c5dc4f1b805f09a05299f
Diffstat (limited to 'doc')
-rw-r--r--doc/api_samples/all_extensions/server-action-changepassword.json5
-rw-r--r--doc/api_samples/all_extensions/server-action-changepassword.xml4
-rw-r--r--doc/api_samples/all_extensions/server-action-confirmresize.json3
-rw-r--r--doc/api_samples/all_extensions/server-action-confirmresize.xml3
-rw-r--r--doc/api_samples/all_extensions/server-action-createimage.json8
-rw-r--r--doc/api_samples/all_extensions/server-action-createimage.xml8
-rw-r--r--doc/api_samples/all_extensions/server-action-reboot.json5
-rw-r--r--doc/api_samples/all_extensions/server-action-reboot.xml4
-rw-r--r--doc/api_samples/all_extensions/server-action-rebuild-resp.json56
-rw-r--r--doc/api_samples/all_extensions/server-action-rebuild-resp.xml19
-rw-r--r--doc/api_samples/all_extensions/server-action-rebuild.json18
-rw-r--r--doc/api_samples/all_extensions/server-action-rebuild.xml25
-rw-r--r--doc/api_samples/all_extensions/server-action-resize.json5
-rw-r--r--doc/api_samples/all_extensions/server-action-resize.xml4
-rw-r--r--doc/api_samples/all_extensions/server-action-revertresize.json3
-rw-r--r--doc/api_samples/all_extensions/server-action-revertresize.xml3
16 files changed, 173 insertions, 0 deletions
diff --git a/doc/api_samples/all_extensions/server-action-changepassword.json b/doc/api_samples/all_extensions/server-action-changepassword.json
new file mode 100644
index 000000000..421a4aa93
--- /dev/null
+++ b/doc/api_samples/all_extensions/server-action-changepassword.json
@@ -0,0 +1,5 @@
+{
+ "changePassword" : {
+ "adminPass" : "foo"
+ }
+} \ No newline at end of file
diff --git a/doc/api_samples/all_extensions/server-action-changepassword.xml b/doc/api_samples/all_extensions/server-action-changepassword.xml
new file mode 100644
index 000000000..4326e0161
--- /dev/null
+++ b/doc/api_samples/all_extensions/server-action-changepassword.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<changePassword
+ xmlns="http://docs.openstack.org/compute/api/v1.1"
+ adminPass="foo"/> \ No newline at end of file
diff --git a/doc/api_samples/all_extensions/server-action-confirmresize.json b/doc/api_samples/all_extensions/server-action-confirmresize.json
new file mode 100644
index 000000000..2940d2a39
--- /dev/null
+++ b/doc/api_samples/all_extensions/server-action-confirmresize.json
@@ -0,0 +1,3 @@
+{
+ "confirmResize" : null
+} \ No newline at end of file
diff --git a/doc/api_samples/all_extensions/server-action-confirmresize.xml b/doc/api_samples/all_extensions/server-action-confirmresize.xml
new file mode 100644
index 000000000..ffad7f16a
--- /dev/null
+++ b/doc/api_samples/all_extensions/server-action-confirmresize.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<confirmResize
+ xmlns="http://docs.openstack.org/compute/api/v1.1"/> \ No newline at end of file
diff --git a/doc/api_samples/all_extensions/server-action-createimage.json b/doc/api_samples/all_extensions/server-action-createimage.json
new file mode 100644
index 000000000..4cf0bb47c
--- /dev/null
+++ b/doc/api_samples/all_extensions/server-action-createimage.json
@@ -0,0 +1,8 @@
+{
+ "createImage" : {
+ "name" : "foo-image",
+ "metadata": {
+ "myvar": "foobar"
+ }
+ }
+} \ No newline at end of file
diff --git a/doc/api_samples/all_extensions/server-action-createimage.xml b/doc/api_samples/all_extensions/server-action-createimage.xml
new file mode 100644
index 000000000..faa6ae766
--- /dev/null
+++ b/doc/api_samples/all_extensions/server-action-createimage.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<createImage
+ xmlns="http://docs.openstack.org/compute/api/v1.1"
+ name="foo-image">
+ <metadata>
+ <meta key="myvar">foobar</meta>
+ </metadata>
+</createImage> \ No newline at end of file
diff --git a/doc/api_samples/all_extensions/server-action-reboot.json b/doc/api_samples/all_extensions/server-action-reboot.json
new file mode 100644
index 000000000..3920ea728
--- /dev/null
+++ b/doc/api_samples/all_extensions/server-action-reboot.json
@@ -0,0 +1,5 @@
+{
+ "reboot" : {
+ "type" : "SOFT"
+ }
+} \ No newline at end of file
diff --git a/doc/api_samples/all_extensions/server-action-reboot.xml b/doc/api_samples/all_extensions/server-action-reboot.xml
new file mode 100644
index 000000000..b36d35801
--- /dev/null
+++ b/doc/api_samples/all_extensions/server-action-reboot.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<reboot
+ xmlns="http://docs.openstack.org/compute/api/v1.1"
+ type="SOFT"/> \ No newline at end of file
diff --git a/doc/api_samples/all_extensions/server-action-rebuild-resp.json b/doc/api_samples/all_extensions/server-action-rebuild-resp.json
new file mode 100644
index 000000000..04ee1d4fb
--- /dev/null
+++ b/doc/api_samples/all_extensions/server-action-rebuild-resp.json
@@ -0,0 +1,56 @@
+{
+ "server": {
+ "OS-DCF:diskConfig": "AUTO",
+ "accessIPv4": "1.2.3.4",
+ "accessIPv6": "fe80::100",
+ "addresses": {
+ "private": [
+ {
+ "addr": "192.168.0.3",
+ "version": 4
+ }
+ ]
+ },
+ "adminPass": "seekr3t",
+ "created": "2012-09-25T13:36:08Z",
+ "flavor": {
+ "id": "1",
+ "links": [
+ {
+ "href": "http://openstack.example.com/openstack/flavors/1",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "hostId": "935dcd1019fd43814a1d2a6e9b320dcac352d3a02c69f8be7ba41002",
+ "id": "27568e59-cfb7-4283-a00e-4af933f2d539",
+ "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/27568e59-cfb7-4283-a00e-4af933f2d539",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/openstack/servers/27568e59-cfb7-4283-a00e-4af933f2d539",
+ "rel": "bookmark"
+ }
+ ],
+ "metadata": {
+ "meta var": "meta val"
+ },
+ "name": "foobar",
+ "progress": 0,
+ "status": "ACTIVE",
+ "tenant_id": "openstack",
+ "updated": "2012-09-25T13:36:09Z",
+ "user_id": "fake"
+ }
+} \ No newline at end of file
diff --git a/doc/api_samples/all_extensions/server-action-rebuild-resp.xml b/doc/api_samples/all_extensions/server-action-rebuild-resp.xml
new file mode 100644
index 000000000..c183f9e69
--- /dev/null
+++ b/doc/api_samples/all_extensions/server-action-rebuild-resp.xml
@@ -0,0 +1,19 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<server xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" status="ACTIVE" updated="2012-09-25T13:40:46Z" hostId="140a6675f54b67847d7ff7655a3a85f1483ea977e9024a1412f6d8ad" name="foobar" created="2012-09-25T13:40:45Z" userId="fake" tenantId="openstack" accessIPv4="1.2.3.4" accessIPv6="fe80::100" progress="0" id="1e1278ab-7011-4f0b-901f-eea5473b0824" adminPass="seekr3t" OS-DCF:diskConfig="AUTO">
+ <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/1e1278ab-7011-4f0b-901f-eea5473b0824" rel="self"/>
+ <atom:link href="http://openstack.example.com/openstack/servers/1e1278ab-7011-4f0b-901f-eea5473b0824" rel="bookmark"/>
+</server> \ No newline at end of file
diff --git a/doc/api_samples/all_extensions/server-action-rebuild.json b/doc/api_samples/all_extensions/server-action-rebuild.json
new file mode 100644
index 000000000..4a79989f4
--- /dev/null
+++ b/doc/api_samples/all_extensions/server-action-rebuild.json
@@ -0,0 +1,18 @@
+{
+ "rebuild" : {
+ "imageRef" : "http://openstack.example.com/v2/32278/images/70a599e0-31e7-49b7-b260-868f441e862b",
+ "name" : "foobar",
+ "adminPass" : "seekr3t",
+ "accessIPv4" : "1.2.3.4",
+ "accessIPv6" : "fe80::100",
+ "metadata" : {
+ "meta var" : "meta val"
+ },
+ "personality" : [
+ {
+ "path" : "/etc/banner.txt",
+ "contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6 b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/doc/api_samples/all_extensions/server-action-rebuild.xml b/doc/api_samples/all_extensions/server-action-rebuild.xml
new file mode 100644
index 000000000..d39b9d8a3
--- /dev/null
+++ b/doc/api_samples/all_extensions/server-action-rebuild.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rebuild
+ xmlns="http://docs.openstack.org/compute/api/v1.1"
+ name="foobar"
+ imageRef="http://openstack.example.com/v1.1/32278/images/70a599e0-31e7-49b7-b260-868f441e862b"
+ accessIPv4="1.2.3.4"
+ accessIPv6="fe80::100"
+ adminPass="seekr3t">
+ <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>
+</rebuild> \ No newline at end of file
diff --git a/doc/api_samples/all_extensions/server-action-resize.json b/doc/api_samples/all_extensions/server-action-resize.json
new file mode 100644
index 000000000..bdaa37a17
--- /dev/null
+++ b/doc/api_samples/all_extensions/server-action-resize.json
@@ -0,0 +1,5 @@
+{
+ "resize" : {
+ "flavorRef" : "2"
+ }
+} \ No newline at end of file
diff --git a/doc/api_samples/all_extensions/server-action-resize.xml b/doc/api_samples/all_extensions/server-action-resize.xml
new file mode 100644
index 000000000..8dfb53c6a
--- /dev/null
+++ b/doc/api_samples/all_extensions/server-action-resize.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resize
+ xmlns="http://docs.openstack.org/compute/api/v1.1"
+ flavorRef="2"/> \ No newline at end of file
diff --git a/doc/api_samples/all_extensions/server-action-revertresize.json b/doc/api_samples/all_extensions/server-action-revertresize.json
new file mode 100644
index 000000000..76c460242
--- /dev/null
+++ b/doc/api_samples/all_extensions/server-action-revertresize.json
@@ -0,0 +1,3 @@
+{
+ "revertResize" : null
+} \ No newline at end of file
diff --git a/doc/api_samples/all_extensions/server-action-revertresize.xml b/doc/api_samples/all_extensions/server-action-revertresize.xml
new file mode 100644
index 000000000..7981753e7
--- /dev/null
+++ b/doc/api_samples/all_extensions/server-action-revertresize.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<revertResize
+ xmlns="http://docs.openstack.org/compute/api/v1.1"/> \ No newline at end of file