diff --git a/doc/api_samples/OS-DCF/image-get-resp.json b/doc/api_samples/OS-DCF/image-get-resp.json
new file mode 100644
index 000000000000..feae88fb740c
--- /dev/null
+++ b/doc/api_samples/OS-DCF/image-get-resp.json
@@ -0,0 +1,34 @@
+{
+ "image": {
+ "OS-DCF:diskConfig": "AUTO",
+ "created": "2011-01-01T01:02:03Z",
+ "id": "70a599e0-31e7-49b7-b260-868f441e862b",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v2/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
+ "rel": "bookmark"
+ },
+ {
+ "href": "http://glance.openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
+ "rel": "alternate",
+ "type": "application/vnd.openstack.image"
+ }
+ ],
+ "metadata": {
+ "architecture": "x86_64",
+ "auto_disk_config": "True",
+ "kernel_id": "nokernel",
+ "ramdisk_id": "nokernel"
+ },
+ "minDisk": 0,
+ "minRam": 0,
+ "name": "fakeimage7",
+ "progress": 100,
+ "status": "ACTIVE",
+ "updated": "2011-01-01T01:02:03Z"
+ }
+}
\ No newline at end of file
diff --git a/doc/api_samples/OS-DCF/image-get-resp.xml b/doc/api_samples/OS-DCF/image-get-resp.xml
new file mode 100644
index 000000000000..fc0317742af2
--- /dev/null
+++ b/doc/api_samples/OS-DCF/image-get-resp.xml
@@ -0,0 +1,12 @@
+
+
+
+ nokernel
+ True
+ nokernel
+ x86_64
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/api_samples/OS-DCF/image-list-resp.json b/doc/api_samples/OS-DCF/image-list-resp.json
new file mode 100644
index 000000000000..fe18205f8581
--- /dev/null
+++ b/doc/api_samples/OS-DCF/image-list-resp.json
@@ -0,0 +1,214 @@
+{
+ "images": [
+ {
+ "OS-DCF:diskConfig": "AUTO",
+ "created": "2011-01-01T01:02:03Z",
+ "id": "70a599e0-31e7-49b7-b260-868f441e862b",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v2/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
+ "rel": "bookmark"
+ },
+ {
+ "href": "http://glance.openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
+ "rel": "alternate",
+ "type": "application/vnd.openstack.image"
+ }
+ ],
+ "metadata": {
+ "architecture": "x86_64",
+ "auto_disk_config": "True",
+ "kernel_id": "nokernel",
+ "ramdisk_id": "nokernel"
+ },
+ "minDisk": 0,
+ "minRam": 0,
+ "name": "fakeimage7",
+ "progress": 100,
+ "status": "ACTIVE",
+ "updated": "2011-01-01T01:02:03Z"
+ },
+ {
+ "created": "2011-01-01T01:02:03Z",
+ "id": "155d900f-4e14-4e4c-a73d-069cbf4541e6",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v2/openstack/images/155d900f-4e14-4e4c-a73d-069cbf4541e6",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/openstack/images/155d900f-4e14-4e4c-a73d-069cbf4541e6",
+ "rel": "bookmark"
+ },
+ {
+ "href": "http://glance.openstack.example.com/openstack/images/155d900f-4e14-4e4c-a73d-069cbf4541e6",
+ "rel": "alternate",
+ "type": "application/vnd.openstack.image"
+ }
+ ],
+ "metadata": {
+ "architecture": "x86_64",
+ "kernel_id": "nokernel",
+ "ramdisk_id": "nokernel"
+ },
+ "minDisk": 0,
+ "minRam": 0,
+ "name": "fakeimage123456",
+ "progress": 100,
+ "status": "ACTIVE",
+ "updated": "2011-01-01T01:02:03Z"
+ },
+ {
+ "created": "2011-01-01T01:02:03Z",
+ "id": "a2459075-d96c-40d5-893e-577ff92e721c",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v2/openstack/images/a2459075-d96c-40d5-893e-577ff92e721c",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/openstack/images/a2459075-d96c-40d5-893e-577ff92e721c",
+ "rel": "bookmark"
+ },
+ {
+ "href": "http://glance.openstack.example.com/openstack/images/a2459075-d96c-40d5-893e-577ff92e721c",
+ "rel": "alternate",
+ "type": "application/vnd.openstack.image"
+ }
+ ],
+ "metadata": {
+ "kernel_id": "nokernel",
+ "ramdisk_id": "nokernel"
+ },
+ "minDisk": 0,
+ "minRam": 0,
+ "name": "fakeimage123456",
+ "progress": 100,
+ "status": "ACTIVE",
+ "updated": "2011-01-01T01:02:03Z"
+ },
+ {
+ "OS-DCF:diskConfig": "MANUAL",
+ "created": "2011-01-01T01:02:03Z",
+ "id": "a440c04b-79fa-479c-bed1-0b816eaec379",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v2/openstack/images/a440c04b-79fa-479c-bed1-0b816eaec379",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/openstack/images/a440c04b-79fa-479c-bed1-0b816eaec379",
+ "rel": "bookmark"
+ },
+ {
+ "href": "http://glance.openstack.example.com/openstack/images/a440c04b-79fa-479c-bed1-0b816eaec379",
+ "rel": "alternate",
+ "type": "application/vnd.openstack.image"
+ }
+ ],
+ "metadata": {
+ "architecture": "x86_64",
+ "auto_disk_config": "False",
+ "kernel_id": "nokernel",
+ "ramdisk_id": "nokernel"
+ },
+ "minDisk": 0,
+ "minRam": 0,
+ "name": "fakeimage6",
+ "progress": 100,
+ "status": "ACTIVE",
+ "updated": "2011-01-01T01:02:03Z"
+ },
+ {
+ "created": "2011-01-01T01:02:03Z",
+ "id": "c905cedb-7281-47e4-8a62-f26bc5fc4c77",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v2/openstack/images/c905cedb-7281-47e4-8a62-f26bc5fc4c77",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/openstack/images/c905cedb-7281-47e4-8a62-f26bc5fc4c77",
+ "rel": "bookmark"
+ },
+ {
+ "href": "http://glance.openstack.example.com/openstack/images/c905cedb-7281-47e4-8a62-f26bc5fc4c77",
+ "rel": "alternate",
+ "type": "application/vnd.openstack.image"
+ }
+ ],
+ "metadata": {
+ "kernel_id": "155d900f-4e14-4e4c-a73d-069cbf4541e6",
+ "ramdisk_id": null
+ },
+ "minDisk": 0,
+ "minRam": 0,
+ "name": "fakeimage123456",
+ "progress": 100,
+ "status": "ACTIVE",
+ "updated": "2011-01-01T01:02:03Z"
+ },
+ {
+ "created": "2011-01-01T01:02:03Z",
+ "id": "cedef40a-ed67-4d10-800e-17455edce175",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v2/openstack/images/cedef40a-ed67-4d10-800e-17455edce175",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/openstack/images/cedef40a-ed67-4d10-800e-17455edce175",
+ "rel": "bookmark"
+ },
+ {
+ "href": "http://glance.openstack.example.com/openstack/images/cedef40a-ed67-4d10-800e-17455edce175",
+ "rel": "alternate",
+ "type": "application/vnd.openstack.image"
+ }
+ ],
+ "metadata": {
+ "kernel_id": "nokernel",
+ "ramdisk_id": "nokernel"
+ },
+ "minDisk": 0,
+ "minRam": 0,
+ "name": "fakeimage123456",
+ "progress": 100,
+ "status": "ACTIVE",
+ "updated": "2011-01-01T01:02:03Z"
+ },
+ {
+ "created": "2011-01-01T01:02:03Z",
+ "id": "76fa36fc-c930-4bf3-8c8a-ea2a2420deb6",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v2/openstack/images/76fa36fc-c930-4bf3-8c8a-ea2a2420deb6",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/openstack/images/76fa36fc-c930-4bf3-8c8a-ea2a2420deb6",
+ "rel": "bookmark"
+ },
+ {
+ "href": "http://glance.openstack.example.com/openstack/images/76fa36fc-c930-4bf3-8c8a-ea2a2420deb6",
+ "rel": "alternate",
+ "type": "application/vnd.openstack.image"
+ }
+ ],
+ "metadata": {
+ "kernel_id": "nokernel",
+ "ramdisk_id": "nokernel"
+ },
+ "minDisk": 0,
+ "minRam": 0,
+ "name": "fakeimage123456",
+ "progress": 100,
+ "status": "ACTIVE",
+ "updated": "2011-01-01T01:02:03Z"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/doc/api_samples/OS-DCF/image-list-resp.xml b/doc/api_samples/OS-DCF/image-list-resp.xml
new file mode 100644
index 000000000000..f5c463e25d44
--- /dev/null
+++ b/doc/api_samples/OS-DCF/image-list-resp.xml
@@ -0,0 +1,71 @@
+
+
+
+
+ nokernel
+ True
+ nokernel
+ x86_64
+
+
+
+
+
+
+
+ nokernel
+ nokernel
+ x86_64
+
+
+
+
+
+
+
+ nokernel
+ nokernel
+
+
+
+
+
+
+
+ nokernel
+ False
+ nokernel
+ x86_64
+
+
+
+
+
+
+
+ 155d900f-4e14-4e4c-a73d-069cbf4541e6
+ None
+
+
+
+
+
+
+
+ nokernel
+ nokernel
+
+
+
+
+
+
+
+ nokernel
+ nokernel
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/api_samples/OS-DCF/list-servers-detail-get.json b/doc/api_samples/OS-DCF/list-servers-detail-get.json
new file mode 100644
index 000000000000..7aea51e195a8
--- /dev/null
+++ b/doc/api_samples/OS-DCF/list-servers-detail-get.json
@@ -0,0 +1,57 @@
+{
+ "servers": [
+ {
+ "OS-DCF:diskConfig": "AUTO",
+ "accessIPv4": "",
+ "accessIPv6": "",
+ "addresses": {
+ "private": [
+ {
+ "addr": "192.168.0.3",
+ "version": 4
+ }
+ ]
+ },
+ "created": "2012-12-02T02:11:55Z",
+ "flavor": {
+ "id": "1",
+ "links": [
+ {
+ "href": "http://openstack.example.com/openstack/flavors/1",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "hostId": "99428f32351a5d89d0f7727c6eec68c1777c545a0972aaac645508dc",
+ "id": "05372e62-05b9-4ee2-9343-9a1fdf2a5fda",
+ "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/05372e62-05b9-4ee2-9343-9a1fdf2a5fda",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/openstack/servers/05372e62-05b9-4ee2-9343-9a1fdf2a5fda",
+ "rel": "bookmark"
+ }
+ ],
+ "metadata": {
+ "My Server Name": "Apache1"
+ },
+ "name": "new-server-test",
+ "progress": 0,
+ "status": "ACTIVE",
+ "tenant_id": "openstack",
+ "updated": "2012-12-02T02:11:56Z",
+ "user_id": "fake"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/doc/api_samples/OS-DCF/list-servers-detail-get.xml b/doc/api_samples/OS-DCF/list-servers-detail-get.xml
new file mode 100644
index 000000000000..1675b511bfa9
--- /dev/null
+++ b/doc/api_samples/OS-DCF/list-servers-detail-get.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+ Apache1
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/api_samples/OS-DCF/server-action-rebuild-req.json b/doc/api_samples/OS-DCF/server-action-rebuild-req.json
new file mode 100644
index 000000000000..514607f6d244
--- /dev/null
+++ b/doc/api_samples/OS-DCF/server-action-rebuild-req.json
@@ -0,0 +1,6 @@
+{
+ "rebuild": {
+ "imageRef" : "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
+ "OS-DCF:diskConfig": "AUTO"
+ }
+}
\ No newline at end of file
diff --git a/doc/api_samples/OS-DCF/server-action-rebuild-req.xml b/doc/api_samples/OS-DCF/server-action-rebuild-req.xml
new file mode 100644
index 000000000000..1c0fcaa5c431
--- /dev/null
+++ b/doc/api_samples/OS-DCF/server-action-rebuild-req.xml
@@ -0,0 +1,6 @@
+
+
\ No newline at end of file
diff --git a/doc/api_samples/OS-DCF/server-action-rebuild-resp.json b/doc/api_samples/OS-DCF/server-action-rebuild-resp.json
new file mode 100644
index 000000000000..24e1e5d04276
--- /dev/null
+++ b/doc/api_samples/OS-DCF/server-action-rebuild-resp.json
@@ -0,0 +1,56 @@
+{
+ "server": {
+ "OS-DCF:diskConfig": "AUTO",
+ "accessIPv4": "",
+ "accessIPv6": "",
+ "addresses": {
+ "private": [
+ {
+ "addr": "192.168.0.3",
+ "version": 4
+ }
+ ]
+ },
+ "adminPass": "NBjMaJoFL4EF",
+ "created": "2012-12-02T02:11:56Z",
+ "flavor": {
+ "id": "1",
+ "links": [
+ {
+ "href": "http://openstack.example.com/openstack/flavors/1",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "hostId": "c076393ad900d62c4805a42df10d9b364f629842681c00cce035487f",
+ "id": "63a8aa13-60fe-41c4-b079-77f6fdf3c841",
+ "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/63a8aa13-60fe-41c4-b079-77f6fdf3c841",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/openstack/servers/63a8aa13-60fe-41c4-b079-77f6fdf3c841",
+ "rel": "bookmark"
+ }
+ ],
+ "metadata": {
+ "My Server Name": "Apache1"
+ },
+ "name": "new-server-test",
+ "progress": 0,
+ "status": "ACTIVE",
+ "tenant_id": "openstack",
+ "updated": "2012-12-02T02:11:56Z",
+ "user_id": "fake"
+ }
+}
\ No newline at end of file
diff --git a/doc/api_samples/OS-DCF/server-action-rebuild-resp.xml b/doc/api_samples/OS-DCF/server-action-rebuild-resp.xml
new file mode 100644
index 000000000000..1d7b3267c6df
--- /dev/null
+++ b/doc/api_samples/OS-DCF/server-action-rebuild-resp.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+ Apache1
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/api_samples/OS-DCF/server-get-resp.json b/doc/api_samples/OS-DCF/server-get-resp.json
new file mode 100644
index 000000000000..4ad77036f5be
--- /dev/null
+++ b/doc/api_samples/OS-DCF/server-get-resp.json
@@ -0,0 +1,55 @@
+{
+ "server": {
+ "OS-DCF:diskConfig": "AUTO",
+ "accessIPv4": "",
+ "accessIPv6": "",
+ "addresses": {
+ "private": [
+ {
+ "addr": "192.168.0.3",
+ "version": 4
+ }
+ ]
+ },
+ "created": "2012-12-02T02:11:55Z",
+ "flavor": {
+ "id": "1",
+ "links": [
+ {
+ "href": "http://openstack.example.com/openstack/flavors/1",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "hostId": "c949ab4256cea23b6089b710aa2df48bf6577ed915278b62e33ad8bb",
+ "id": "5046e2f2-3b33-4041-b3cf-e085f73e78e7",
+ "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/5046e2f2-3b33-4041-b3cf-e085f73e78e7",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/openstack/servers/5046e2f2-3b33-4041-b3cf-e085f73e78e7",
+ "rel": "bookmark"
+ }
+ ],
+ "metadata": {
+ "My Server Name": "Apache1"
+ },
+ "name": "new-server-test",
+ "progress": 0,
+ "status": "ACTIVE",
+ "tenant_id": "openstack",
+ "updated": "2012-12-02T02:11:55Z",
+ "user_id": "fake"
+ }
+}
\ No newline at end of file
diff --git a/doc/api_samples/OS-DCF/server-get-resp.xml b/doc/api_samples/OS-DCF/server-get-resp.xml
new file mode 100644
index 000000000000..3acba49eb5dc
--- /dev/null
+++ b/doc/api_samples/OS-DCF/server-get-resp.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+ Apache1
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/api_samples/OS-DCF/server-post-req.json b/doc/api_samples/OS-DCF/server-post-req.json
new file mode 100644
index 000000000000..d88eb4122223
--- /dev/null
+++ b/doc/api_samples/OS-DCF/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-DCF/server-post-req.xml b/doc/api_samples/OS-DCF/server-post-req.xml
new file mode 100644
index 000000000000..0a3c8bb5303d
--- /dev/null
+++ b/doc/api_samples/OS-DCF/server-post-req.xml
@@ -0,0 +1,19 @@
+
+
+
+ Apache1
+
+
+
+ ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
+ dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k
+ IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
+ c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g
+ QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
+ ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv
+ dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
+ c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6
+ b25zLiINCg0KLVJpY2hhcmQgQmFjaA==
+
+
+
\ No newline at end of file
diff --git a/doc/api_samples/OS-DCF/server-post-resp.json b/doc/api_samples/OS-DCF/server-post-resp.json
new file mode 100644
index 000000000000..f5c1a70f1cea
--- /dev/null
+++ b/doc/api_samples/OS-DCF/server-post-resp.json
@@ -0,0 +1,17 @@
+{
+ "server": {
+ "OS-DCF:diskConfig": "AUTO",
+ "adminPass": "CQH9gWzgkVno",
+ "id": "324dfb7d-f4a9-419a-9a19-237df04b443b",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v2/openstack/servers/324dfb7d-f4a9-419a-9a19-237df04b443b",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/openstack/servers/324dfb7d-f4a9-419a-9a19-237df04b443b",
+ "rel": "bookmark"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/doc/api_samples/OS-DCF/server-post-resp.xml b/doc/api_samples/OS-DCF/server-post-resp.xml
new file mode 100644
index 000000000000..c9439943c31b
--- /dev/null
+++ b/doc/api_samples/OS-DCF/server-post-resp.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/api_samples/OS-DCF/server-resize-post-req.json b/doc/api_samples/OS-DCF/server-resize-post-req.json
new file mode 100644
index 000000000000..55e11a31ed89
--- /dev/null
+++ b/doc/api_samples/OS-DCF/server-resize-post-req.json
@@ -0,0 +1,6 @@
+{
+ "resize": {
+ "flavorRef": "3",
+ "OS-DCF:diskConfig": "AUTO"
+ }
+}
\ No newline at end of file
diff --git a/doc/api_samples/OS-DCF/server-resize-post-req.xml b/doc/api_samples/OS-DCF/server-resize-post-req.xml
new file mode 100644
index 000000000000..f0a299bca457
--- /dev/null
+++ b/doc/api_samples/OS-DCF/server-resize-post-req.xml
@@ -0,0 +1,6 @@
+
+
\ No newline at end of file
diff --git a/doc/api_samples/OS-DCF/server-update-put-req.json b/doc/api_samples/OS-DCF/server-update-put-req.json
new file mode 100644
index 000000000000..898ab886ad8d
--- /dev/null
+++ b/doc/api_samples/OS-DCF/server-update-put-req.json
@@ -0,0 +1,5 @@
+{
+ "server": {
+ "OS-DCF:diskConfig": "AUTO"
+ }
+}
\ No newline at end of file
diff --git a/doc/api_samples/OS-DCF/server-update-put-req.xml b/doc/api_samples/OS-DCF/server-update-put-req.xml
new file mode 100644
index 000000000000..f48d8e73dcb5
--- /dev/null
+++ b/doc/api_samples/OS-DCF/server-update-put-req.xml
@@ -0,0 +1,5 @@
+
+
\ No newline at end of file
diff --git a/doc/api_samples/OS-DCF/server-update-put-resp.json b/doc/api_samples/OS-DCF/server-update-put-resp.json
new file mode 100644
index 000000000000..ce6e08455a42
--- /dev/null
+++ b/doc/api_samples/OS-DCF/server-update-put-resp.json
@@ -0,0 +1,55 @@
+{
+ "server": {
+ "OS-DCF:diskConfig": "AUTO",
+ "accessIPv4": "",
+ "accessIPv6": "",
+ "addresses": {
+ "private": [
+ {
+ "addr": "192.168.0.3",
+ "version": 4
+ }
+ ]
+ },
+ "created": "2012-12-02T02:11:57Z",
+ "flavor": {
+ "id": "1",
+ "links": [
+ {
+ "href": "http://openstack.example.com/openstack/flavors/1",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "hostId": "6e84af987b4e7ec1c039b16d21f508f4a505672bd94fb0218b668d07",
+ "id": "324dfb7d-f4a9-419a-9a19-237df04b443b",
+ "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/324dfb7d-f4a9-419a-9a19-237df04b443b",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/openstack/servers/324dfb7d-f4a9-419a-9a19-237df04b443b",
+ "rel": "bookmark"
+ }
+ ],
+ "metadata": {
+ "My Server Name": "Apache1"
+ },
+ "name": "new-server-test",
+ "progress": 0,
+ "status": "ACTIVE",
+ "tenant_id": "openstack",
+ "updated": "2012-12-02T02:11:58Z",
+ "user_id": "fake"
+ }
+}
\ No newline at end of file
diff --git a/doc/api_samples/OS-DCF/server-update-put-resp.xml b/doc/api_samples/OS-DCF/server-update-put-resp.xml
new file mode 100644
index 000000000000..cd5ff556167f
--- /dev/null
+++ b/doc/api_samples/OS-DCF/server-update-put-resp.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+ Apache1
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/nova/tests/integrated/api_samples/OS-DCF/image-get-resp.json.tpl b/nova/tests/integrated/api_samples/OS-DCF/image-get-resp.json.tpl
new file mode 100644
index 000000000000..3c7e804973ca
--- /dev/null
+++ b/nova/tests/integrated/api_samples/OS-DCF/image-get-resp.json.tpl
@@ -0,0 +1,34 @@
+{
+ "image": {
+ "OS-DCF:diskConfig": "AUTO",
+ "created": "%(timestamp)s",
+ "id": "%(image_id)s",
+ "links": [
+ {
+ "href": "%(host)s/v2/openstack/images/%(image_id)s",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/openstack/images/%(image_id)s",
+ "rel": "bookmark"
+ },
+ {
+ "href": "%(glance_host)s/openstack/images/%(image_id)s",
+ "rel": "alternate",
+ "type": "application/vnd.openstack.image"
+ }
+ ],
+ "metadata": {
+ "architecture": "x86_64",
+ "auto_disk_config": "True",
+ "kernel_id": "nokernel",
+ "ramdisk_id": "nokernel"
+ },
+ "minDisk": 0,
+ "minRam": 0,
+ "name": "fakeimage7",
+ "progress": 100,
+ "status": "ACTIVE",
+ "updated": "%(timestamp)s"
+ }
+}
diff --git a/nova/tests/integrated/api_samples/OS-DCF/image-get-resp.xml.tpl b/nova/tests/integrated/api_samples/OS-DCF/image-get-resp.xml.tpl
new file mode 100644
index 000000000000..a68b578e9915
--- /dev/null
+++ b/nova/tests/integrated/api_samples/OS-DCF/image-get-resp.xml.tpl
@@ -0,0 +1,12 @@
+
+
+
+ nokernel
+ True
+ nokernel
+ x86_64
+
+
+
+
+
diff --git a/nova/tests/integrated/api_samples/OS-DCF/image-list-resp.json.tpl b/nova/tests/integrated/api_samples/OS-DCF/image-list-resp.json.tpl
new file mode 100644
index 000000000000..fc10c3315539
--- /dev/null
+++ b/nova/tests/integrated/api_samples/OS-DCF/image-list-resp.json.tpl
@@ -0,0 +1,214 @@
+{
+ "images": [
+ {
+ "OS-DCF:diskConfig": "AUTO",
+ "created": "%(timestamp)s",
+ "id": "%(id)s",
+ "links": [
+ {
+ "href": "%(host)s/v2/openstack/images/%(id)s",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/openstack/images/%(id)s",
+ "rel": "bookmark"
+ },
+ {
+ "href": "%(glance_host)s/openstack/images/%(id)s",
+ "rel": "alternate",
+ "type": "application/vnd.openstack.image"
+ }
+ ],
+ "metadata": {
+ "architecture": "x86_64",
+ "auto_disk_config": "True",
+ "kernel_id": "nokernel",
+ "ramdisk_id": "nokernel"
+ },
+ "minDisk": 0,
+ "minRam": 0,
+ "name": "fakeimage7",
+ "progress": 100,
+ "status": "ACTIVE",
+ "updated": "%(timestamp)s"
+ },
+ {
+ "created": "%(timestamp)s",
+ "id": "%(id)s",
+ "links": [
+ {
+ "href": "%(host)s/v2/openstack/images/%(id)s",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/openstack/images/%(id)s",
+ "rel": "bookmark"
+ },
+ {
+ "href": "%(glance_host)s/openstack/images/%(id)s",
+ "rel": "alternate",
+ "type": "application/vnd.openstack.image"
+ }
+ ],
+ "metadata": {
+ "architecture": "x86_64",
+ "kernel_id": "nokernel",
+ "ramdisk_id": "nokernel"
+ },
+ "minDisk": 0,
+ "minRam": 0,
+ "name": "fakeimage123456",
+ "progress": 100,
+ "status": "ACTIVE",
+ "updated": "%(timestamp)s"
+ },
+ {
+ "created": "%(timestamp)s",
+ "id": "%(uuid)s",
+ "links": [
+ {
+ "href": "%(host)s/v2/openstack/images/%(uuid)s",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/openstack/images/%(uuid)s",
+ "rel": "bookmark"
+ },
+ {
+ "href": "%(glance_host)s/openstack/images/%(uuid)s",
+ "rel": "alternate",
+ "type": "application/vnd.openstack.image"
+ }
+ ],
+ "metadata": {
+ "kernel_id": "nokernel",
+ "ramdisk_id": "nokernel"
+ },
+ "minDisk": 0,
+ "minRam": 0,
+ "name": "fakeimage123456",
+ "progress": 100,
+ "status": "ACTIVE",
+ "updated": "%(timestamp)s"
+ },
+ {
+ "OS-DCF:diskConfig": "MANUAL",
+ "created": "%(timestamp)s",
+ "id": "%(uuid)s",
+ "links": [
+ {
+ "href": "%(host)s/v2/openstack/images/%(uuid)s",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/openstack/images/%(uuid)s",
+ "rel": "bookmark"
+ },
+ {
+ "href": "%(glance_host)s/openstack/images/%(uuid)s",
+ "rel": "alternate",
+ "type": "application/vnd.openstack.image"
+ }
+ ],
+ "metadata": {
+ "architecture": "x86_64",
+ "auto_disk_config": "False",
+ "kernel_id": "nokernel",
+ "ramdisk_id": "nokernel"
+ },
+ "minDisk": 0,
+ "minRam": 0,
+ "name": "fakeimage6",
+ "progress": 100,
+ "status": "ACTIVE",
+ "updated": "%(timestamp)s"
+ },
+ {
+ "created": "%(timestamp)s",
+ "id": "%(id)s",
+ "links": [
+ {
+ "href": "%(host)s/v2/openstack/images/%(id)s",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/openstack/images/%(id)s",
+ "rel": "bookmark"
+ },
+ {
+ "href": "%(glance_host)s/openstack/images/%(id)s",
+ "rel": "alternate",
+ "type": "application/vnd.openstack.image"
+ }
+ ],
+ "metadata": {
+ "kernel_id": "%(id)s",
+ "ramdisk_id": null
+ },
+ "minDisk": 0,
+ "minRam": 0,
+ "name": "fakeimage123456",
+ "progress": 100,
+ "status": "ACTIVE",
+ "updated": "%(timestamp)s"
+ },
+ {
+ "created": "%(timestamp)s",
+ "id": "%(id)s",
+ "links": [
+ {
+ "href": "%(host)s/v2/openstack/images/%(id)s",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/openstack/images/%(id)s",
+ "rel": "bookmark"
+ },
+ {
+ "href": "%(glance_host)s/openstack/images/%(id)s",
+ "rel": "alternate",
+ "type": "application/vnd.openstack.image"
+ }
+ ],
+ "metadata": {
+ "kernel_id": "nokernel",
+ "ramdisk_id": "nokernel"
+ },
+ "minDisk": 0,
+ "minRam": 0,
+ "name": "fakeimage123456",
+ "progress": 100,
+ "status": "ACTIVE",
+ "updated": "%(timestamp)s"
+ },
+ {
+ "created": "%(timestamp)s",
+ "id": "%(id)s",
+ "links": [
+ {
+ "href": "%(host)s/v2/openstack/images/%(id)s",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/openstack/images/%(id)s",
+ "rel": "bookmark"
+ },
+ {
+ "href": "%(glance_host)s/openstack/images/%(id)s",
+ "rel": "alternate",
+ "type": "application/vnd.openstack.image"
+ }
+ ],
+ "metadata": {
+ "kernel_id": "nokernel",
+ "ramdisk_id": "nokernel"
+ },
+ "minDisk": 0,
+ "minRam": 0,
+ "name": "fakeimage123456",
+ "progress": 100,
+ "status": "ACTIVE",
+ "updated": "%(timestamp)s"
+ }
+ ]
+}
diff --git a/nova/tests/integrated/api_samples/OS-DCF/image-list-resp.xml.tpl b/nova/tests/integrated/api_samples/OS-DCF/image-list-resp.xml.tpl
new file mode 100644
index 000000000000..b0d5218b5af9
--- /dev/null
+++ b/nova/tests/integrated/api_samples/OS-DCF/image-list-resp.xml.tpl
@@ -0,0 +1,71 @@
+
+
+
+
+ nokernel
+ True
+ nokernel
+ x86_64
+
+
+
+
+
+
+
+ nokernel
+ nokernel
+ x86_64
+
+
+
+
+
+
+
+ nokernel
+ nokernel
+
+
+
+
+
+
+
+ nokernel
+ False
+ nokernel
+ x86_64
+
+
+
+
+
+
+
+ %(id)s
+ None
+
+
+
+
+
+
+
+ nokernel
+ nokernel
+
+
+
+
+
+
+
+ nokernel
+ nokernel
+
+
+
+
+
+
diff --git a/nova/tests/integrated/api_samples/OS-DCF/list-servers-detail-get.json.tpl b/nova/tests/integrated/api_samples/OS-DCF/list-servers-detail-get.json.tpl
new file mode 100644
index 000000000000..acb9bf53100c
--- /dev/null
+++ b/nova/tests/integrated/api_samples/OS-DCF/list-servers-detail-get.json.tpl
@@ -0,0 +1,57 @@
+{
+ "servers": [
+ {
+ "OS-DCF:diskConfig": "AUTO",
+ "accessIPv4": "",
+ "accessIPv6": "",
+ "addresses": {
+ "private": [
+ {
+ "addr": "%(ip)s",
+ "version": 4
+ }
+ ]
+ },
+ "created": "%(timestamp)s",
+ "flavor": {
+ "id": "1",
+ "links": [
+ {
+ "href": "%(host)s/openstack/flavors/1",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "hostId": "%(hostid)s",
+ "id": "%(id)s",
+ "image": {
+ "id": "%(uuid)s",
+ "links": [
+ {
+ "href": "%(host)s/openstack/images/%(uuid)s",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "links": [
+ {
+ "href": "%(host)s/v2/openstack/servers/%(id)s",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/openstack/servers/%(id)s",
+ "rel": "bookmark"
+ }
+ ],
+ "metadata": {
+ "My Server Name": "Apache1"
+ },
+ "name": "new-server-test",
+ "progress": 0,
+ "status": "ACTIVE",
+ "tenant_id": "openstack",
+ "updated": "%(timestamp)s",
+ "user_id": "fake"
+ }
+ ]
+}
diff --git a/nova/tests/integrated/api_samples/OS-DCF/list-servers-detail-get.xml.tpl b/nova/tests/integrated/api_samples/OS-DCF/list-servers-detail-get.xml.tpl
new file mode 100644
index 000000000000..52e1a520342b
--- /dev/null
+++ b/nova/tests/integrated/api_samples/OS-DCF/list-servers-detail-get.xml.tpl
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+ Apache1
+
+
+
+
+
+
+
+
+
+
diff --git a/nova/tests/integrated/api_samples/OS-DCF/server-action-rebuild-req.json.tpl b/nova/tests/integrated/api_samples/OS-DCF/server-action-rebuild-req.json.tpl
new file mode 100644
index 000000000000..b239818a8a5f
--- /dev/null
+++ b/nova/tests/integrated/api_samples/OS-DCF/server-action-rebuild-req.json.tpl
@@ -0,0 +1,6 @@
+{
+ "rebuild": {
+ "imageRef" : "%(host)s/openstack/images/%(image_id)s",
+ "OS-DCF:diskConfig": "AUTO"
+ }
+}
diff --git a/nova/tests/integrated/api_samples/OS-DCF/server-action-rebuild-req.xml.tpl b/nova/tests/integrated/api_samples/OS-DCF/server-action-rebuild-req.xml.tpl
new file mode 100644
index 000000000000..93bfb0d4e9b4
--- /dev/null
+++ b/nova/tests/integrated/api_samples/OS-DCF/server-action-rebuild-req.xml.tpl
@@ -0,0 +1,6 @@
+
+
diff --git a/nova/tests/integrated/api_samples/OS-DCF/server-action-rebuild-resp.json.tpl b/nova/tests/integrated/api_samples/OS-DCF/server-action-rebuild-resp.json.tpl
new file mode 100644
index 000000000000..1608b9f6b0f3
--- /dev/null
+++ b/nova/tests/integrated/api_samples/OS-DCF/server-action-rebuild-resp.json.tpl
@@ -0,0 +1,56 @@
+{
+ "server": {
+ "OS-DCF:diskConfig": "AUTO",
+ "accessIPv4": "",
+ "accessIPv6": "",
+ "addresses": {
+ "private": [
+ {
+ "addr": "%(ip)s",
+ "version": 4
+ }
+ ]
+ },
+ "adminPass": "%(password)s",
+ "created": "%(timestamp)s",
+ "flavor": {
+ "id": "1",
+ "links": [
+ {
+ "href": "%(host)s/openstack/flavors/1",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "hostId": "%(hostid)s",
+ "id": "%(id)s",
+ "image": {
+ "id": "%(uuid)s",
+ "links": [
+ {
+ "href": "%(host)s/openstack/images/%(uuid)s",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "links": [
+ {
+ "href": "%(host)s/v2/openstack/servers/%(id)s",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/openstack/servers/%(id)s",
+ "rel": "bookmark"
+ }
+ ],
+ "metadata": {
+ "My Server Name": "Apache1"
+ },
+ "name": "new-server-test",
+ "progress": 0,
+ "status": "ACTIVE",
+ "tenant_id": "openstack",
+ "updated": "%(timestamp)s",
+ "user_id": "fake"
+ }
+}
diff --git a/nova/tests/integrated/api_samples/OS-DCF/server-action-rebuild-resp.xml.tpl b/nova/tests/integrated/api_samples/OS-DCF/server-action-rebuild-resp.xml.tpl
new file mode 100644
index 000000000000..b760fe5ebe23
--- /dev/null
+++ b/nova/tests/integrated/api_samples/OS-DCF/server-action-rebuild-resp.xml.tpl
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+ Apache1
+
+
+
+
+
+
+
+
+
diff --git a/nova/tests/integrated/api_samples/OS-DCF/server-get-resp.json.tpl b/nova/tests/integrated/api_samples/OS-DCF/server-get-resp.json.tpl
new file mode 100644
index 000000000000..25e51a878051
--- /dev/null
+++ b/nova/tests/integrated/api_samples/OS-DCF/server-get-resp.json.tpl
@@ -0,0 +1,55 @@
+{
+ "server": {
+ "OS-DCF:diskConfig": "AUTO",
+ "accessIPv4": "",
+ "accessIPv6": "",
+ "addresses": {
+ "private": [
+ {
+ "addr": "%(ip)s",
+ "version": 4
+ }
+ ]
+ },
+ "created": "%(timestamp)s",
+ "flavor": {
+ "id": "1",
+ "links": [
+ {
+ "href": "%(host)s/openstack/flavors/1",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "hostId": "%(hostid)s",
+ "id": "%(id)s",
+ "image": {
+ "id": "%(uuid)s",
+ "links": [
+ {
+ "href": "%(host)s/openstack/images/%(uuid)s",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "links": [
+ {
+ "href": "%(host)s/v2/openstack/servers/%(id)s",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/openstack/servers/%(id)s",
+ "rel": "bookmark"
+ }
+ ],
+ "metadata": {
+ "My Server Name": "Apache1"
+ },
+ "name": "new-server-test",
+ "progress": 0,
+ "status": "ACTIVE",
+ "tenant_id": "openstack",
+ "updated": "%(timestamp)s",
+ "user_id": "fake"
+ }
+}
diff --git a/nova/tests/integrated/api_samples/OS-DCF/server-get-resp.xml.tpl b/nova/tests/integrated/api_samples/OS-DCF/server-get-resp.xml.tpl
new file mode 100644
index 000000000000..2671e2b5142b
--- /dev/null
+++ b/nova/tests/integrated/api_samples/OS-DCF/server-get-resp.xml.tpl
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+ Apache1
+
+
+
+
+
+
+
+
+
diff --git a/nova/tests/integrated/api_samples/OS-DCF/server-post-req.json.tpl b/nova/tests/integrated/api_samples/OS-DCF/server-post-req.json.tpl
new file mode 100644
index 000000000000..81b89adf23db
--- /dev/null
+++ b/nova/tests/integrated/api_samples/OS-DCF/server-post-req.json.tpl
@@ -0,0 +1,17 @@
+{
+ "server" : {
+ "OS-DCF:diskConfig": "AUTO",
+ "name" : "new-server-test",
+ "imageRef" : "%(host)s/openstack/images/%(image_id)s",
+ "flavorRef" : "%(host)s/openstack/flavors/1",
+ "metadata" : {
+ "My Server Name" : "Apache1"
+ },
+ "personality" : [
+ {
+ "path" : "/etc/banner.txt",
+ "contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVsc2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4gQnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRoZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlvdSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vyc2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
+ }
+ ]
+ }
+}
diff --git a/nova/tests/integrated/api_samples/OS-DCF/server-post-req.xml.tpl b/nova/tests/integrated/api_samples/OS-DCF/server-post-req.xml.tpl
new file mode 100644
index 000000000000..f92614984242
--- /dev/null
+++ b/nova/tests/integrated/api_samples/OS-DCF/server-post-req.xml.tpl
@@ -0,0 +1,19 @@
+
+
+
+ Apache1
+
+
+
+ ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
+ dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k
+ IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
+ c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g
+ QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
+ ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv
+ dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
+ c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6
+ b25zLiINCg0KLVJpY2hhcmQgQmFjaA==
+
+
+
diff --git a/nova/tests/integrated/api_samples/OS-DCF/server-post-resp.json.tpl b/nova/tests/integrated/api_samples/OS-DCF/server-post-resp.json.tpl
new file mode 100644
index 000000000000..7c8371f16104
--- /dev/null
+++ b/nova/tests/integrated/api_samples/OS-DCF/server-post-resp.json.tpl
@@ -0,0 +1,17 @@
+{
+ "server": {
+ "OS-DCF:diskConfig": "AUTO",
+ "adminPass": "%(password)s",
+ "id": "%(id)s",
+ "links": [
+ {
+ "href": "%(host)s/v2/openstack/servers/%(uuid)s",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/openstack/servers/%(uuid)s",
+ "rel": "bookmark"
+ }
+ ]
+ }
+}
diff --git a/nova/tests/integrated/api_samples/OS-DCF/server-post-resp.xml.tpl b/nova/tests/integrated/api_samples/OS-DCF/server-post-resp.xml.tpl
new file mode 100644
index 000000000000..1309e6dfeecc
--- /dev/null
+++ b/nova/tests/integrated/api_samples/OS-DCF/server-post-resp.xml.tpl
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/nova/tests/integrated/api_samples/OS-DCF/server-resize-post-req.json.tpl b/nova/tests/integrated/api_samples/OS-DCF/server-resize-post-req.json.tpl
new file mode 100644
index 000000000000..a290485e1c26
--- /dev/null
+++ b/nova/tests/integrated/api_samples/OS-DCF/server-resize-post-req.json.tpl
@@ -0,0 +1,6 @@
+{
+ "resize": {
+ "flavorRef": "3",
+ "OS-DCF:diskConfig": "AUTO"
+ }
+}
diff --git a/nova/tests/integrated/api_samples/OS-DCF/server-resize-post-req.xml.tpl b/nova/tests/integrated/api_samples/OS-DCF/server-resize-post-req.xml.tpl
new file mode 100644
index 000000000000..aa0b0b67a32b
--- /dev/null
+++ b/nova/tests/integrated/api_samples/OS-DCF/server-resize-post-req.xml.tpl
@@ -0,0 +1,6 @@
+
+
diff --git a/nova/tests/integrated/api_samples/OS-DCF/server-update-put-req.json.tpl b/nova/tests/integrated/api_samples/OS-DCF/server-update-put-req.json.tpl
new file mode 100644
index 000000000000..4ac22820df3b
--- /dev/null
+++ b/nova/tests/integrated/api_samples/OS-DCF/server-update-put-req.json.tpl
@@ -0,0 +1,5 @@
+{
+ "server": {
+ "OS-DCF:diskConfig": "AUTO"
+ }
+}
diff --git a/nova/tests/integrated/api_samples/OS-DCF/server-update-put-req.xml.tpl b/nova/tests/integrated/api_samples/OS-DCF/server-update-put-req.xml.tpl
new file mode 100644
index 000000000000..808884698723
--- /dev/null
+++ b/nova/tests/integrated/api_samples/OS-DCF/server-update-put-req.xml.tpl
@@ -0,0 +1,5 @@
+
+
diff --git a/nova/tests/integrated/api_samples/OS-DCF/server-update-put-resp.json.tpl b/nova/tests/integrated/api_samples/OS-DCF/server-update-put-resp.json.tpl
new file mode 100644
index 000000000000..25e51a878051
--- /dev/null
+++ b/nova/tests/integrated/api_samples/OS-DCF/server-update-put-resp.json.tpl
@@ -0,0 +1,55 @@
+{
+ "server": {
+ "OS-DCF:diskConfig": "AUTO",
+ "accessIPv4": "",
+ "accessIPv6": "",
+ "addresses": {
+ "private": [
+ {
+ "addr": "%(ip)s",
+ "version": 4
+ }
+ ]
+ },
+ "created": "%(timestamp)s",
+ "flavor": {
+ "id": "1",
+ "links": [
+ {
+ "href": "%(host)s/openstack/flavors/1",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "hostId": "%(hostid)s",
+ "id": "%(id)s",
+ "image": {
+ "id": "%(uuid)s",
+ "links": [
+ {
+ "href": "%(host)s/openstack/images/%(uuid)s",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "links": [
+ {
+ "href": "%(host)s/v2/openstack/servers/%(id)s",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/openstack/servers/%(id)s",
+ "rel": "bookmark"
+ }
+ ],
+ "metadata": {
+ "My Server Name": "Apache1"
+ },
+ "name": "new-server-test",
+ "progress": 0,
+ "status": "ACTIVE",
+ "tenant_id": "openstack",
+ "updated": "%(timestamp)s",
+ "user_id": "fake"
+ }
+}
diff --git a/nova/tests/integrated/api_samples/OS-DCF/server-update-put-resp.xml.tpl b/nova/tests/integrated/api_samples/OS-DCF/server-update-put-resp.xml.tpl
new file mode 100644
index 000000000000..3d565b0b343d
--- /dev/null
+++ b/nova/tests/integrated/api_samples/OS-DCF/server-update-put-resp.xml.tpl
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+ Apache1
+
+
+
+
+
+
+
+
+
diff --git a/nova/tests/integrated/test_api_samples.py b/nova/tests/integrated/test_api_samples.py
index 6648fa896fb9..9d1551daec7c 100644
--- a/nova/tests/integrated/test_api_samples.py
+++ b/nova/tests/integrated/test_api_samples.py
@@ -1896,3 +1896,78 @@ class FlavorManageSampleJsonTests(ApiSampleTestBase):
class FlavorManageSampleXmlTests(FlavorManageSampleJsonTests):
ctype = "xml"
+
+
+class DiskConfigJsonTest(ServersSampleBase):
+ extension_name = ("nova.api.openstack.compute.contrib.disk_config."
+ "Disk_config")
+
+ def test_list_servers_detail(self):
+ uuid = self._post_server()
+ response = self._do_get('servers/detail')
+ self.assertEqual(response.status, 200)
+ subs = self._get_regexes()
+ subs['hostid'] = '[a-f0-9]+'
+ subs['id'] = uuid
+ return self._verify_response('list-servers-detail-get',
+ subs, response)
+
+ def test_get_server(self):
+ uuid = self._post_server()
+ response = self._do_get('servers/%s' % uuid)
+ self.assertEqual(response.status, 200)
+ subs = self._get_regexes()
+ subs['hostid'] = '[a-f0-9]+'
+ return self._verify_response('server-get-resp', subs, response)
+
+ def test_update_server(self):
+ uuid = self._post_server()
+ response = self._do_put('servers/%s' % uuid,
+ 'server-update-put-req', {})
+ self.assertEqual(response.status, 200)
+ subs = self._get_regexes()
+ subs['hostid'] = '[a-f0-9]+'
+ return self._verify_response('server-update-put-resp',
+ subs, response)
+
+ def test_resize_server(self):
+ self.flags(allow_resize_to_same_host=True)
+ uuid = self._post_server()
+ response = self._do_post('servers/%s/action' % uuid,
+ 'server-resize-post-req', {})
+ self.assertEqual(response.status, 202)
+ # NOTE(tmello): Resize does not return response body
+ # Bug #1085213.
+ self.assertEqual(response.read(), "")
+
+ def test_rebuild_server(self):
+ uuid = self._post_server()
+ subs = {
+ 'image_id': fake.get_valid_image_id(),
+ 'host': self._get_host(),
+ }
+ response = self._do_post('servers/%s/action' % uuid,
+ 'server-action-rebuild-req', subs)
+ self.assertEqual(response.status, 202)
+ subs = self._get_regexes()
+ subs['hostid'] = '[a-f0-9]+'
+ return self._verify_response('server-action-rebuild-resp',
+ subs, response)
+
+ def test_get_image(self):
+ image_id = fake.get_valid_image_id()
+ response = self._do_get('images/%s' % image_id)
+ self.assertEqual(response.status, 200)
+ subs = self._get_regexes()
+ subs['image_id'] = image_id
+ return self._verify_response('image-get-resp', subs, response)
+
+ def test_list_images(self):
+ response = self._do_get('images/detail')
+ self.assertEqual(response.status, 200)
+ subs = self._get_regexes()
+ return self._verify_response('image-list-resp', subs, response)
+
+
+class DiskConfigXmlTest(DiskConfigJsonTest):
+ ctype = 'xml'