summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-09-24 00:40:54 +0000
committerGerrit Code Review <review@openstack.org>2013-09-24 00:40:54 +0000
commit7130b668ff7eec0d1ba03fa50b746ba14e483734 (patch)
tree92d32bedf993893c7ffa75346f8d1e2f88edcc07
parenta753380cadc6a3651dcd2f4bb57f900dab89642b (diff)
parentc4b8dd6a3939491f9bf6a63f14138dccb95187ed (diff)
downloadnova-7130b668ff7eec0d1ba03fa50b746ba14e483734.tar.gz
Merge "Adds V3 API samples for remote consoles, deferred delete"
-rw-r--r--doc/v3/api_samples/os-deferred-delete/force-delete-post-req.json3
-rw-r--r--doc/v3/api_samples/os-deferred-delete/force-delete-post-req.xml2
-rw-r--r--doc/v3/api_samples/os-deferred-delete/restore-post-req.json3
-rw-r--r--doc/v3/api_samples/os-deferred-delete/restore-post-req.xml2
-rw-r--r--doc/v3/api_samples/os-deferred-delete/server-post-req.json16
-rw-r--r--doc/v3/api_samples/os-deferred-delete/server-post-req.xml19
-rw-r--r--doc/v3/api_samples/os-deferred-delete/server-post-resp.json16
-rw-r--r--doc/v3/api_samples/os-deferred-delete/server-post-resp.xml6
-rw-r--r--doc/v3/api_samples/os-remote-consoles/get-spice-console-post-req.json5
-rw-r--r--doc/v3/api_samples/os-remote-consoles/get-spice-console-post-req.xml4
-rw-r--r--doc/v3/api_samples/os-remote-consoles/get-spice-console-post-resp.json6
-rw-r--r--doc/v3/api_samples/os-remote-consoles/get-spice-console-post-resp.xml5
-rw-r--r--doc/v3/api_samples/os-remote-consoles/get-vnc-console-post-req.json5
-rw-r--r--doc/v3/api_samples/os-remote-consoles/get-vnc-console-post-req.xml4
-rw-r--r--doc/v3/api_samples/os-remote-consoles/get-vnc-console-post-resp.json6
-rw-r--r--doc/v3/api_samples/os-remote-consoles/get-vnc-console-post-resp.xml5
-rw-r--r--doc/v3/api_samples/os-remote-consoles/server-post-req.json16
-rw-r--r--doc/v3/api_samples/os-remote-consoles/server-post-req.xml19
-rw-r--r--doc/v3/api_samples/os-remote-consoles/server-post-resp.json16
-rw-r--r--doc/v3/api_samples/os-remote-consoles/server-post-resp.xml6
-rw-r--r--nova/tests/integrated/v3/api_samples/os-deferred-delete/force-delete-post-req.json.tpl3
-rw-r--r--nova/tests/integrated/v3/api_samples/os-deferred-delete/force-delete-post-req.xml.tpl2
-rw-r--r--nova/tests/integrated/v3/api_samples/os-deferred-delete/restore-post-req.json.tpl3
-rw-r--r--nova/tests/integrated/v3/api_samples/os-deferred-delete/restore-post-req.xml.tpl2
-rw-r--r--nova/tests/integrated/v3/api_samples/os-deferred-delete/server-post-req.json.tpl16
-rw-r--r--nova/tests/integrated/v3/api_samples/os-deferred-delete/server-post-req.xml.tpl19
-rw-r--r--nova/tests/integrated/v3/api_samples/os-deferred-delete/server-post-resp.json.tpl16
-rw-r--r--nova/tests/integrated/v3/api_samples/os-deferred-delete/server-post-resp.xml.tpl6
-rw-r--r--nova/tests/integrated/v3/api_samples/os-remote-consoles/get-spice-console-post-req.json.tpl5
-rw-r--r--nova/tests/integrated/v3/api_samples/os-remote-consoles/get-spice-console-post-req.xml.tpl4
-rw-r--r--nova/tests/integrated/v3/api_samples/os-remote-consoles/get-spice-console-post-resp.json.tpl6
-rw-r--r--nova/tests/integrated/v3/api_samples/os-remote-consoles/get-spice-console-post-resp.xml.tpl5
-rw-r--r--nova/tests/integrated/v3/api_samples/os-remote-consoles/get-vnc-console-post-req.json.tpl5
-rw-r--r--nova/tests/integrated/v3/api_samples/os-remote-consoles/get-vnc-console-post-req.xml.tpl4
-rw-r--r--nova/tests/integrated/v3/api_samples/os-remote-consoles/get-vnc-console-post-resp.json.tpl6
-rw-r--r--nova/tests/integrated/v3/api_samples/os-remote-consoles/get-vnc-console-post-resp.xml.tpl5
-rw-r--r--nova/tests/integrated/v3/api_samples/os-remote-consoles/server-post-req.json.tpl16
-rw-r--r--nova/tests/integrated/v3/api_samples/os-remote-consoles/server-post-req.xml.tpl19
-rw-r--r--nova/tests/integrated/v3/api_samples/os-remote-consoles/server-post-resp.json.tpl16
-rw-r--r--nova/tests/integrated/v3/api_samples/os-remote-consoles/server-post-resp.xml.tpl6
-rw-r--r--nova/tests/integrated/v3/test_deferred_delete.py47
-rw-r--r--nova/tests/integrated/v3/test_remote_consoles.py51
42 files changed, 426 insertions, 0 deletions
diff --git a/doc/v3/api_samples/os-deferred-delete/force-delete-post-req.json b/doc/v3/api_samples/os-deferred-delete/force-delete-post-req.json
new file mode 100644
index 0000000000..e1a585a698
--- /dev/null
+++ b/doc/v3/api_samples/os-deferred-delete/force-delete-post-req.json
@@ -0,0 +1,3 @@
+{
+ "force_delete": null
+} \ No newline at end of file
diff --git a/doc/v3/api_samples/os-deferred-delete/force-delete-post-req.xml b/doc/v3/api_samples/os-deferred-delete/force-delete-post-req.xml
new file mode 100644
index 0000000000..5ebae912bb
--- /dev/null
+++ b/doc/v3/api_samples/os-deferred-delete/force-delete-post-req.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<force_delete /> \ No newline at end of file
diff --git a/doc/v3/api_samples/os-deferred-delete/restore-post-req.json b/doc/v3/api_samples/os-deferred-delete/restore-post-req.json
new file mode 100644
index 0000000000..0e526ff641
--- /dev/null
+++ b/doc/v3/api_samples/os-deferred-delete/restore-post-req.json
@@ -0,0 +1,3 @@
+{
+ "restore": null
+} \ No newline at end of file
diff --git a/doc/v3/api_samples/os-deferred-delete/restore-post-req.xml b/doc/v3/api_samples/os-deferred-delete/restore-post-req.xml
new file mode 100644
index 0000000000..a43bef2f54
--- /dev/null
+++ b/doc/v3/api_samples/os-deferred-delete/restore-post-req.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<restore /> \ No newline at end of file
diff --git a/doc/v3/api_samples/os-deferred-delete/server-post-req.json b/doc/v3/api_samples/os-deferred-delete/server-post-req.json
new file mode 100644
index 0000000000..d41985a1bc
--- /dev/null
+++ b/doc/v3/api_samples/os-deferred-delete/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-deferred-delete/server-post-req.xml b/doc/v3/api_samples/os-deferred-delete/server-post-req.xml
new file mode 100644
index 0000000000..598839cf6a
--- /dev/null
+++ b/doc/v3/api_samples/os-deferred-delete/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-deferred-delete/server-post-resp.json b/doc/v3/api_samples/os-deferred-delete/server-post-resp.json
new file mode 100644
index 0000000000..ef30f2c09a
--- /dev/null
+++ b/doc/v3/api_samples/os-deferred-delete/server-post-resp.json
@@ -0,0 +1,16 @@
+{
+ "server": {
+ "admin_pass": "hqgU8QzT54wF",
+ "id": "4a3bde9b-fa37-408d-b167-68e1724c923e",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/servers/4a3bde9b-fa37-408d-b167-68e1724c923e",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/servers/4a3bde9b-fa37-408d-b167-68e1724c923e",
+ "rel": "bookmark"
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/doc/v3/api_samples/os-deferred-delete/server-post-resp.xml b/doc/v3/api_samples/os-deferred-delete/server-post-resp.xml
new file mode 100644
index 0000000000..72073fce53
--- /dev/null
+++ b/doc/v3/api_samples/os-deferred-delete/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="1259ad4e-7541-4079-9794-bf7cb8ec3579" admin_pass="JBxtVyh6ggbm">
+ <metadata/>
+ <atom:link href="http://openstack.example.com/v3/servers/1259ad4e-7541-4079-9794-bf7cb8ec3579" rel="self"/>
+ <atom:link href="http://openstack.example.com/servers/1259ad4e-7541-4079-9794-bf7cb8ec3579" rel="bookmark"/>
+</server> \ No newline at end of file
diff --git a/doc/v3/api_samples/os-remote-consoles/get-spice-console-post-req.json b/doc/v3/api_samples/os-remote-consoles/get-spice-console-post-req.json
new file mode 100644
index 0000000000..2ce7ff6258
--- /dev/null
+++ b/doc/v3/api_samples/os-remote-consoles/get-spice-console-post-req.json
@@ -0,0 +1,5 @@
+{
+ "get_spice_console": {
+ "type": "spice-html5"
+ }
+} \ No newline at end of file
diff --git a/doc/v3/api_samples/os-remote-consoles/get-spice-console-post-req.xml b/doc/v3/api_samples/os-remote-consoles/get-spice-console-post-req.xml
new file mode 100644
index 0000000000..1362442f16
--- /dev/null
+++ b/doc/v3/api_samples/os-remote-consoles/get-spice-console-post-req.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<get_spice_console>
+ <type>spice-html5</type>
+</get_spice_console> \ No newline at end of file
diff --git a/doc/v3/api_samples/os-remote-consoles/get-spice-console-post-resp.json b/doc/v3/api_samples/os-remote-consoles/get-spice-console-post-resp.json
new file mode 100644
index 0000000000..f0e09f47db
--- /dev/null
+++ b/doc/v3/api_samples/os-remote-consoles/get-spice-console-post-resp.json
@@ -0,0 +1,6 @@
+{
+ "console": {
+ "type": "spice-html5",
+ "url": "http://127.0.0.1:6082/spice_auto.html?token=a30e5d08-6a20-4043-958f-0852440c6af4"
+ }
+} \ No newline at end of file
diff --git a/doc/v3/api_samples/os-remote-consoles/get-spice-console-post-resp.xml b/doc/v3/api_samples/os-remote-consoles/get-spice-console-post-resp.xml
new file mode 100644
index 0000000000..c8f04b6341
--- /dev/null
+++ b/doc/v3/api_samples/os-remote-consoles/get-spice-console-post-resp.xml
@@ -0,0 +1,5 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<console>
+ <url>http://127.0.0.1:6082/spice_auto.html?token=45eb7f39-5157-4864-a443-41ac2d498748</url>
+ <type>spice-html5</type>
+</console> \ No newline at end of file
diff --git a/doc/v3/api_samples/os-remote-consoles/get-vnc-console-post-req.json b/doc/v3/api_samples/os-remote-consoles/get-vnc-console-post-req.json
new file mode 100644
index 0000000000..390e8d5890
--- /dev/null
+++ b/doc/v3/api_samples/os-remote-consoles/get-vnc-console-post-req.json
@@ -0,0 +1,5 @@
+{
+ "get_vnc_console": {
+ "type": "novnc"
+ }
+} \ No newline at end of file
diff --git a/doc/v3/api_samples/os-remote-consoles/get-vnc-console-post-req.xml b/doc/v3/api_samples/os-remote-consoles/get-vnc-console-post-req.xml
new file mode 100644
index 0000000000..9a7adc916f
--- /dev/null
+++ b/doc/v3/api_samples/os-remote-consoles/get-vnc-console-post-req.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<get_vnc_console>
+ <type>novnc</type>
+</get_vnc_console> \ No newline at end of file
diff --git a/doc/v3/api_samples/os-remote-consoles/get-vnc-console-post-resp.json b/doc/v3/api_samples/os-remote-consoles/get-vnc-console-post-resp.json
new file mode 100644
index 0000000000..fe15b77933
--- /dev/null
+++ b/doc/v3/api_samples/os-remote-consoles/get-vnc-console-post-resp.json
@@ -0,0 +1,6 @@
+{
+ "console": {
+ "type": "novnc",
+ "url": "http://127.0.0.1:6080/vnc_auto.html?token=191996c3-7b0f-42f3-95a7-f1839f2da6ed"
+ }
+} \ No newline at end of file
diff --git a/doc/v3/api_samples/os-remote-consoles/get-vnc-console-post-resp.xml b/doc/v3/api_samples/os-remote-consoles/get-vnc-console-post-resp.xml
new file mode 100644
index 0000000000..6c47bcc8be
--- /dev/null
+++ b/doc/v3/api_samples/os-remote-consoles/get-vnc-console-post-resp.xml
@@ -0,0 +1,5 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<console>
+ <url>http://127.0.0.1:6080/vnc_auto.html?token=ba493af2-559b-4893-951c-a835bdd3f823</url>
+ <type>novnc</type>
+</console> \ No newline at end of file
diff --git a/doc/v3/api_samples/os-remote-consoles/server-post-req.json b/doc/v3/api_samples/os-remote-consoles/server-post-req.json
new file mode 100644
index 0000000000..d41985a1bc
--- /dev/null
+++ b/doc/v3/api_samples/os-remote-consoles/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-remote-consoles/server-post-req.xml b/doc/v3/api_samples/os-remote-consoles/server-post-req.xml
new file mode 100644
index 0000000000..598839cf6a
--- /dev/null
+++ b/doc/v3/api_samples/os-remote-consoles/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-remote-consoles/server-post-resp.json b/doc/v3/api_samples/os-remote-consoles/server-post-resp.json
new file mode 100644
index 0000000000..d53218f005
--- /dev/null
+++ b/doc/v3/api_samples/os-remote-consoles/server-post-resp.json
@@ -0,0 +1,16 @@
+{
+ "server": {
+ "admin_pass": "Kwg5tff6KiUU",
+ "id": "8619225c-67c8-424f-9b46-cec5bad137a2",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/servers/8619225c-67c8-424f-9b46-cec5bad137a2",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/servers/8619225c-67c8-424f-9b46-cec5bad137a2",
+ "rel": "bookmark"
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/doc/v3/api_samples/os-remote-consoles/server-post-resp.xml b/doc/v3/api_samples/os-remote-consoles/server-post-resp.xml
new file mode 100644
index 0000000000..48b3c7aec1
--- /dev/null
+++ b/doc/v3/api_samples/os-remote-consoles/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="7cfaf61c-9b84-40b1-95f3-4ecd07b7b4db" admin_pass="cAKiM6sT5LaU">
+ <metadata/>
+ <atom:link href="http://openstack.example.com/v3/servers/7cfaf61c-9b84-40b1-95f3-4ecd07b7b4db" rel="self"/>
+ <atom:link href="http://openstack.example.com/servers/7cfaf61c-9b84-40b1-95f3-4ecd07b7b4db" rel="bookmark"/>
+</server> \ No newline at end of file
diff --git a/nova/tests/integrated/v3/api_samples/os-deferred-delete/force-delete-post-req.json.tpl b/nova/tests/integrated/v3/api_samples/os-deferred-delete/force-delete-post-req.json.tpl
new file mode 100644
index 0000000000..efe8678808
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-deferred-delete/force-delete-post-req.json.tpl
@@ -0,0 +1,3 @@
+{
+ "force_delete": null
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-deferred-delete/force-delete-post-req.xml.tpl b/nova/tests/integrated/v3/api_samples/os-deferred-delete/force-delete-post-req.xml.tpl
new file mode 100644
index 0000000000..3ece942d9e
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-deferred-delete/force-delete-post-req.xml.tpl
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<force_delete />
diff --git a/nova/tests/integrated/v3/api_samples/os-deferred-delete/restore-post-req.json.tpl b/nova/tests/integrated/v3/api_samples/os-deferred-delete/restore-post-req.json.tpl
new file mode 100644
index 0000000000..d38291fe08
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-deferred-delete/restore-post-req.json.tpl
@@ -0,0 +1,3 @@
+{
+ "restore": null
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-deferred-delete/restore-post-req.xml.tpl b/nova/tests/integrated/v3/api_samples/os-deferred-delete/restore-post-req.xml.tpl
new file mode 100644
index 0000000000..8a95b4fccf
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-deferred-delete/restore-post-req.xml.tpl
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<restore />
diff --git a/nova/tests/integrated/v3/api_samples/os-deferred-delete/server-post-req.json.tpl b/nova/tests/integrated/v3/api_samples/os-deferred-delete/server-post-req.json.tpl
new file mode 100644
index 0000000000..1dcb63e3b2
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-deferred-delete/server-post-req.json.tpl
@@ -0,0 +1,16 @@
+{
+ "server" : {
+ "name" : "new-server-test",
+ "image_ref" : "%(host)s/openstack/images/%(image_id)s",
+ "flavor_ref" : "%(host)s/openstack/flavors/1",
+ "metadata" : {
+ "My Server Name" : "Apache1"
+ },
+ "personality" : [
+ {
+ "path" : "/etc/banner.txt",
+ "contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVsc2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4gQnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRoZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlvdSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vyc2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
+ }
+ ]
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-deferred-delete/server-post-req.xml.tpl b/nova/tests/integrated/v3/api_samples/os-deferred-delete/server-post-req.xml.tpl
new file mode 100644
index 0000000000..ddb5ea78c4
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-deferred-delete/server-post-req.xml.tpl
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server xmlns="http://docs.openstack.org/compute/api/v1.1" image_ref="%(host)s/openstack/images/%(image_id)s" flavor_ref="%(host)s/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>
diff --git a/nova/tests/integrated/v3/api_samples/os-deferred-delete/server-post-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-deferred-delete/server-post-resp.json.tpl
new file mode 100644
index 0000000000..d061e9cb2e
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-deferred-delete/server-post-resp.json.tpl
@@ -0,0 +1,16 @@
+{
+ "server": {
+ "admin_pass": "%(password)s",
+ "id": "%(id)s",
+ "links": [
+ {
+ "href": "%(host)s/v3/servers/%(uuid)s",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/servers/%(uuid)s",
+ "rel": "bookmark"
+ }
+ ]
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-deferred-delete/server-post-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-deferred-delete/server-post-resp.xml.tpl
new file mode 100644
index 0000000000..3470373e17
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-deferred-delete/server-post-resp.xml.tpl
@@ -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="%(id)s" admin_pass="%(password)s">
+ <metadata/>
+ <atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
+ <atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>
+</server>
diff --git a/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-spice-console-post-req.json.tpl b/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-spice-console-post-req.json.tpl
new file mode 100644
index 0000000000..dffe8f1388
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-spice-console-post-req.json.tpl
@@ -0,0 +1,5 @@
+{
+ "get_spice_console": {
+ "type": "spice-html5"
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-spice-console-post-req.xml.tpl b/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-spice-console-post-req.xml.tpl
new file mode 100644
index 0000000000..42b8a8437f
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-spice-console-post-req.xml.tpl
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<get_spice_console>
+ <type>spice-html5</type>
+</get_spice_console>
diff --git a/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-spice-console-post-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-spice-console-post-resp.json.tpl
new file mode 100644
index 0000000000..65b72a866f
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-spice-console-post-resp.json.tpl
@@ -0,0 +1,6 @@
+{
+ "console": {
+ "type": "spice-html5",
+ "url": "http://127.0.0.1:6082/spice_auto.html?token=%(uuid)s"
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-spice-console-post-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-spice-console-post-resp.xml.tpl
new file mode 100644
index 0000000000..6fd06d7eec
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-spice-console-post-resp.xml.tpl
@@ -0,0 +1,5 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<console>
+ <url>http://127.0.0.1:6082/spice_auto.html?token=%(uuid)s</url>
+ <type>spice-html5</type>
+</console>
diff --git a/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-vnc-console-post-req.json.tpl b/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-vnc-console-post-req.json.tpl
new file mode 100644
index 0000000000..54be90040c
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-vnc-console-post-req.json.tpl
@@ -0,0 +1,5 @@
+{
+ "get_vnc_console": {
+ "type": "novnc"
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-vnc-console-post-req.xml.tpl b/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-vnc-console-post-req.xml.tpl
new file mode 100644
index 0000000000..794e3b8b89
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-vnc-console-post-req.xml.tpl
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<get_vnc_console>
+ <type>novnc</type>
+</get_vnc_console>
diff --git a/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-vnc-console-post-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-vnc-console-post-resp.json.tpl
new file mode 100644
index 0000000000..2eeee7c543
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-vnc-console-post-resp.json.tpl
@@ -0,0 +1,6 @@
+{
+ "console": {
+ "type": "novnc",
+ "url": "http://127.0.0.1:6080/vnc_auto.html?token=%(uuid)s"
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-vnc-console-post-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-vnc-console-post-resp.xml.tpl
new file mode 100644
index 0000000000..4efaf45064
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-remote-consoles/get-vnc-console-post-resp.xml.tpl
@@ -0,0 +1,5 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<console>
+ <url>http://127.0.0.1:6080/vnc_auto.html?token=%(uuid)s</url>
+ <type>novnc</type>
+</console>
diff --git a/nova/tests/integrated/v3/api_samples/os-remote-consoles/server-post-req.json.tpl b/nova/tests/integrated/v3/api_samples/os-remote-consoles/server-post-req.json.tpl
new file mode 100644
index 0000000000..1dcb63e3b2
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-remote-consoles/server-post-req.json.tpl
@@ -0,0 +1,16 @@
+{
+ "server" : {
+ "name" : "new-server-test",
+ "image_ref" : "%(host)s/openstack/images/%(image_id)s",
+ "flavor_ref" : "%(host)s/openstack/flavors/1",
+ "metadata" : {
+ "My Server Name" : "Apache1"
+ },
+ "personality" : [
+ {
+ "path" : "/etc/banner.txt",
+ "contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVsc2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4gQnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRoZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlvdSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vyc2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
+ }
+ ]
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-remote-consoles/server-post-req.xml.tpl b/nova/tests/integrated/v3/api_samples/os-remote-consoles/server-post-req.xml.tpl
new file mode 100644
index 0000000000..ddb5ea78c4
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-remote-consoles/server-post-req.xml.tpl
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server xmlns="http://docs.openstack.org/compute/api/v1.1" image_ref="%(host)s/openstack/images/%(image_id)s" flavor_ref="%(host)s/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>
diff --git a/nova/tests/integrated/v3/api_samples/os-remote-consoles/server-post-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-remote-consoles/server-post-resp.json.tpl
new file mode 100644
index 0000000000..d061e9cb2e
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-remote-consoles/server-post-resp.json.tpl
@@ -0,0 +1,16 @@
+{
+ "server": {
+ "admin_pass": "%(password)s",
+ "id": "%(id)s",
+ "links": [
+ {
+ "href": "%(host)s/v3/servers/%(uuid)s",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/servers/%(uuid)s",
+ "rel": "bookmark"
+ }
+ ]
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-remote-consoles/server-post-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-remote-consoles/server-post-resp.xml.tpl
new file mode 100644
index 0000000000..3470373e17
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-remote-consoles/server-post-resp.xml.tpl
@@ -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="%(id)s" admin_pass="%(password)s">
+ <metadata/>
+ <atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
+ <atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>
+</server>
diff --git a/nova/tests/integrated/v3/test_deferred_delete.py b/nova/tests/integrated/v3/test_deferred_delete.py
new file mode 100644
index 0000000000..39ff0cfcf2
--- /dev/null
+++ b/nova/tests/integrated/v3/test_deferred_delete.py
@@ -0,0 +1,47 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+# Copyright 2012 Nebula, Inc.
+# Copyright 2013 IBM Corp.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+from nova.tests.integrated.v3 import test_servers
+
+
+class DeferredDeleteSampleJsonTests(test_servers.ServersSampleBase):
+ extension_name = "os-deferred-delete"
+
+ def setUp(self):
+ super(DeferredDeleteSampleJsonTests, self).setUp()
+ self.flags(reclaim_instance_interval=1)
+
+ def test_restore(self):
+ uuid = self._post_server()
+ response = self._do_delete('servers/%s' % uuid)
+
+ response = self._do_post('servers/%s/action' % uuid,
+ 'restore-post-req', {})
+ self.assertEqual(response.status, 202)
+ self.assertEqual(response.read(), '')
+
+ def test_force_delete(self):
+ uuid = self._post_server()
+ response = self._do_delete('servers/%s' % uuid)
+
+ response = self._do_post('servers/%s/action' % uuid,
+ 'force-delete-post-req', {})
+ self.assertEqual(response.status, 202)
+ self.assertEqual(response.read(), '')
+
+
+class DeferredDeleteSampleXmlTests(DeferredDeleteSampleJsonTests):
+ ctype = 'xml'
diff --git a/nova/tests/integrated/v3/test_remote_consoles.py b/nova/tests/integrated/v3/test_remote_consoles.py
new file mode 100644
index 0000000000..4abc660d57
--- /dev/null
+++ b/nova/tests/integrated/v3/test_remote_consoles.py
@@ -0,0 +1,51 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+# Copyright 2012 Nebula, Inc.
+# Copyright 2013 IBM Corp.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+from nova.tests.integrated.v3 import test_servers
+
+
+class ConsolesSampleJsonTests(test_servers.ServersSampleBase):
+ extension_name = "os-remote-consoles"
+
+ def setUp(self):
+ super(ConsolesSampleJsonTests, self).setUp()
+ self.flags(vnc_enabled=True)
+ self.flags(enabled=True, group='spice')
+
+ def test_get_vnc_console(self):
+ uuid = self._post_server()
+ response = self._do_post('servers/%s/action' % uuid,
+ 'get-vnc-console-post-req',
+ {'action': 'os-getVNCConsole'})
+ subs = self._get_regexes()
+ subs["url"] = \
+ "((https?):((//)|(\\\\))+([\w\d:#@%/;$()~_?\+-=\\\.&](#!)?)*)"
+ self._verify_response('get-vnc-console-post-resp', subs, response, 200)
+
+ def test_get_spice_console(self):
+ uuid = self._post_server()
+ response = self._do_post('servers/%s/action' % uuid,
+ 'get-spice-console-post-req',
+ {'action': 'os-getSPICEConsole'})
+ subs = self._get_regexes()
+ subs["url"] = \
+ "((https?):((//)|(\\\\))+([\w\d:#@%/;$()~_?\+-=\\\.&](#!)?)*)"
+ self._verify_response('get-spice-console-post-resp', subs,
+ response, 200)
+
+
+class ConsolesSampleXmlTests(ConsolesSampleJsonTests):
+ ctype = 'xml'