diff --git a/doc/v3/api_samples/os-agents/agent-post-req.json b/doc/v3/api_samples/os-agents/agent-post-req.json
new file mode 100644
index 0000000000..217993b17f
--- /dev/null
+++ b/doc/v3/api_samples/os-agents/agent-post-req.json
@@ -0,0 +1,10 @@
+{
+ "agent": {
+ "hypervisor": "hypervisor",
+ "os": "os",
+ "architecture": "x86",
+ "version": "8.0",
+ "md5hash": "add6bb58e139be103324d04d82d8f545",
+ "url": "xxxxxxxxxxxx"
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-agents/agent-post-req.xml b/doc/v3/api_samples/os-agents/agent-post-req.xml
new file mode 100644
index 0000000000..be93e97ce4
--- /dev/null
+++ b/doc/v3/api_samples/os-agents/agent-post-req.xml
@@ -0,0 +1,9 @@
+
+
+ hypervisor
+ os
+ x86
+ 8.0
+ add6bb58e139be103324d04d82d8f545
+ xxxxxxxxxxxx
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-agents/agent-post-resp.json b/doc/v3/api_samples/os-agents/agent-post-resp.json
new file mode 100644
index 0000000000..418d11f504
--- /dev/null
+++ b/doc/v3/api_samples/os-agents/agent-post-resp.json
@@ -0,0 +1,11 @@
+{
+ "agent": {
+ "agent_id": "1",
+ "architecture": "x86",
+ "hypervisor": "hypervisor",
+ "md5hash": "add6bb58e139be103324d04d82d8f545",
+ "os": "os",
+ "url": "xxxxxxxxxxxx",
+ "version": "8.0"
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-agents/agent-post-resp.xml b/doc/v3/api_samples/os-agents/agent-post-resp.xml
new file mode 100644
index 0000000000..79f62b7fb9
--- /dev/null
+++ b/doc/v3/api_samples/os-agents/agent-post-resp.xml
@@ -0,0 +1,10 @@
+
+
+ xxxxxxxxxxxx
+ hypervisor
+ add6bb58e139be103324d04d82d8f545
+ 8.0
+ x86
+ os
+ 1
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-agents/agent-update-put-req.json b/doc/v3/api_samples/os-agents/agent-update-put-req.json
new file mode 100644
index 0000000000..e4eaf53525
--- /dev/null
+++ b/doc/v3/api_samples/os-agents/agent-update-put-req.json
@@ -0,0 +1,7 @@
+{
+ "para": {
+ "url": "xxx://xxxx/xxx/xxx",
+ "md5hash": "add6bb58e139be103324d04d82d8f545",
+ "version": "7.0"
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-agents/agent-update-put-req.xml b/doc/v3/api_samples/os-agents/agent-update-put-req.xml
new file mode 100644
index 0000000000..f759880c17
--- /dev/null
+++ b/doc/v3/api_samples/os-agents/agent-update-put-req.xml
@@ -0,0 +1,6 @@
+
+
+ 7.0
+ xxx://xxxx/xxx/xxx
+ add6bb58e139be103324d04d82d8f545
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-agents/agent-update-put-resp.json b/doc/v3/api_samples/os-agents/agent-update-put-resp.json
new file mode 100644
index 0000000000..6b67222c8c
--- /dev/null
+++ b/doc/v3/api_samples/os-agents/agent-update-put-resp.json
@@ -0,0 +1,8 @@
+{
+ "agent": {
+ "agent_id": "1",
+ "md5hash": "add6bb58e139be103324d04d82d8f545",
+ "url": "xxx://xxxx/xxx/xxx",
+ "version": "7.0"
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-agents/agent-update-put-resp.xml b/doc/v3/api_samples/os-agents/agent-update-put-resp.xml
new file mode 100644
index 0000000000..badf2750ea
--- /dev/null
+++ b/doc/v3/api_samples/os-agents/agent-update-put-resp.xml
@@ -0,0 +1,7 @@
+
+
+ xxx://xxxx/xxx/xxx
+ 7.0
+ 1
+ add6bb58e139be103324d04d82d8f545
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-agents/agents-get-resp.json b/doc/v3/api_samples/os-agents/agents-get-resp.json
new file mode 100644
index 0000000000..36eac4ced7
--- /dev/null
+++ b/doc/v3/api_samples/os-agents/agents-get-resp.json
@@ -0,0 +1,13 @@
+{
+ "agents": [
+ {
+ "agent_id": "1",
+ "architecture": "x86",
+ "hypervisor": "hypervisor",
+ "md5hash": "add6bb58e139be103324d04d82d8f545",
+ "os": "os",
+ "url": "xxxxxxxxxxxx",
+ "version": "8.0"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-agents/agents-get-resp.xml b/doc/v3/api_samples/os-agents/agents-get-resp.xml
new file mode 100644
index 0000000000..4194f62c96
--- /dev/null
+++ b/doc/v3/api_samples/os-agents/agents-get-resp.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregate-add-host-post-req.json b/doc/v3/api_samples/os-aggregates/aggregate-add-host-post-req.json
new file mode 100644
index 0000000000..ea156ada84
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregate-add-host-post-req.json
@@ -0,0 +1,6 @@
+{
+ "add_host":
+ {
+ "host": "21549b2f665945baaa7101926a00143c"
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregate-add-host-post-req.xml b/doc/v3/api_samples/os-aggregates/aggregate-add-host-post-req.xml
new file mode 100644
index 0000000000..d6d0fd19a8
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregate-add-host-post-req.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregate-metadata-post-req.json b/doc/v3/api_samples/os-aggregates/aggregate-metadata-post-req.json
new file mode 100644
index 0000000000..7331e06a8c
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregate-metadata-post-req.json
@@ -0,0 +1,9 @@
+{
+ "set_metadata":
+ {
+ "metadata":
+ {
+ "key": "value"
+ }
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregate-metadata-post-req.xml b/doc/v3/api_samples/os-aggregates/aggregate-metadata-post-req.xml
new file mode 100644
index 0000000000..d9b935fd45
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregate-metadata-post-req.xml
@@ -0,0 +1,6 @@
+
+
+
+ value
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregate-post-req.json b/doc/v3/api_samples/os-aggregates/aggregate-post-req.json
new file mode 100644
index 0000000000..82272c2936
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregate-post-req.json
@@ -0,0 +1,7 @@
+{
+ "aggregate":
+ {
+ "name": "name",
+ "availability_zone": "nova"
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregate-post-req.xml b/doc/v3/api_samples/os-aggregates/aggregate-post-req.xml
new file mode 100644
index 0000000000..d25f5f848c
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregate-post-req.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregate-post-resp.json b/doc/v3/api_samples/os-aggregates/aggregate-post-resp.json
new file mode 100644
index 0000000000..ab469313b6
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregate-post-resp.json
@@ -0,0 +1,11 @@
+{
+ "aggregate": {
+ "availability_zone": "nova",
+ "created_at": "2013-08-18T12:17:55.751757",
+ "deleted": 0,
+ "deleted_at": null,
+ "id": 1,
+ "name": "name",
+ "updated_at": null
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregate-post-resp.xml b/doc/v3/api_samples/os-aggregates/aggregate-post-resp.xml
new file mode 100644
index 0000000000..58a1d17702
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregate-post-resp.xml
@@ -0,0 +1,10 @@
+
+
+ name
+ nova
+ False
+ 2013-08-18 12:17:56.757058
+ None
+ None
+ 1
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregate-remove-host-post-req.json b/doc/v3/api_samples/os-aggregates/aggregate-remove-host-post-req.json
new file mode 100644
index 0000000000..c50aadcf67
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregate-remove-host-post-req.json
@@ -0,0 +1,6 @@
+{
+ "remove_host":
+ {
+ "host": "bf1454b3d71145d49fca2101c56c728d"
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregate-remove-host-post-req.xml b/doc/v3/api_samples/os-aggregates/aggregate-remove-host-post-req.xml
new file mode 100644
index 0000000000..174e15a1d7
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregate-remove-host-post-req.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregate-update-post-req.json b/doc/v3/api_samples/os-aggregates/aggregate-update-post-req.json
new file mode 100644
index 0000000000..0af1a37a4d
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregate-update-post-req.json
@@ -0,0 +1,7 @@
+{
+ "aggregate":
+ {
+ "name": "newname",
+ "availability_zone": "nova2"
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregate-update-post-req.xml b/doc/v3/api_samples/os-aggregates/aggregate-update-post-req.xml
new file mode 100644
index 0000000000..1eb9c38fdb
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregate-update-post-req.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregate-update-post-resp.json b/doc/v3/api_samples/os-aggregates/aggregate-update-post-resp.json
new file mode 100644
index 0000000000..7ff2909885
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregate-update-post-resp.json
@@ -0,0 +1,15 @@
+{
+ "aggregate": {
+ "availability_zone": "nova2",
+ "created_at": "2013-08-18T12:17:56.259751",
+ "deleted": 0,
+ "deleted_at": null,
+ "hosts": [],
+ "id": 1,
+ "metadata": {
+ "availability_zone": "nova2"
+ },
+ "name": "newname",
+ "updated_at": "2013-08-18T12:17:56.286720"
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregate-update-post-resp.xml b/doc/v3/api_samples/os-aggregates/aggregate-update-post-resp.xml
new file mode 100644
index 0000000000..004011fac7
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregate-update-post-resp.xml
@@ -0,0 +1,14 @@
+
+
+ newname
+ nova2
+ False
+ 2013-08-18 12:17:57.655769
+ 2013-08-18 12:17:57.683956
+
+ None
+ 1
+
+ nova2
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregates-add-host-post-resp.json b/doc/v3/api_samples/os-aggregates/aggregates-add-host-post-resp.json
new file mode 100644
index 0000000000..493e48c7cc
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregates-add-host-post-resp.json
@@ -0,0 +1,17 @@
+{
+ "aggregate": {
+ "availability_zone": "nova",
+ "created_at": "2013-08-18T12:17:56.297823",
+ "deleted": 0,
+ "deleted_at": null,
+ "hosts": [
+ "21549b2f665945baaa7101926a00143c"
+ ],
+ "id": 1,
+ "metadata": {
+ "availability_zone": "nova"
+ },
+ "name": "name",
+ "updated_at": null
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregates-add-host-post-resp.xml b/doc/v3/api_samples/os-aggregates/aggregates-add-host-post-resp.xml
new file mode 100644
index 0000000000..c9cee55c06
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregates-add-host-post-resp.xml
@@ -0,0 +1,16 @@
+
+
+ name
+ nova
+ False
+ 2013-08-18 12:17:57.255783
+ None
+
+ bdb794e5cdd3447c9132ddd8e5cc3d0b
+
+ None
+ 1
+
+ nova
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregates-get-resp.json b/doc/v3/api_samples/os-aggregates/aggregates-get-resp.json
new file mode 100644
index 0000000000..42fd78bf28
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregates-get-resp.json
@@ -0,0 +1,15 @@
+{
+ "aggregate": {
+ "availability_zone": "nova",
+ "created_at": "2013-08-18T12:17:56.380226",
+ "deleted": 0,
+ "deleted_at": null,
+ "hosts": [],
+ "id": 1,
+ "metadata": {
+ "availability_zone": "nova"
+ },
+ "name": "name",
+ "updated_at": null
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregates-get-resp.xml b/doc/v3/api_samples/os-aggregates/aggregates-get-resp.xml
new file mode 100644
index 0000000000..b5574fa2dd
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregates-get-resp.xml
@@ -0,0 +1,14 @@
+
+
+ name
+ nova
+ False
+ 2013-08-18 12:17:56.757058
+ None
+
+ None
+ 1
+
+ nova
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregates-list-get-resp.json b/doc/v3/api_samples/os-aggregates/aggregates-list-get-resp.json
new file mode 100644
index 0000000000..d65dee1734
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregates-list-get-resp.json
@@ -0,0 +1,17 @@
+{
+ "aggregates": [
+ {
+ "availability_zone": "nova",
+ "created_at": "2013-08-18T12:17:56.856455",
+ "deleted": 0,
+ "deleted_at": null,
+ "hosts": [],
+ "id": 1,
+ "metadata": {
+ "availability_zone": "nova"
+ },
+ "name": "name",
+ "updated_at": null
+ }
+ ]
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregates-list-get-resp.xml b/doc/v3/api_samples/os-aggregates/aggregates-list-get-resp.xml
new file mode 100644
index 0000000000..3e91a78eb8
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregates-list-get-resp.xml
@@ -0,0 +1,16 @@
+
+
+
+ name
+ nova
+ False
+ 2013-08-18 12:17:57.241412
+ None
+
+ None
+ 1
+
+ nova
+
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregates-metadata-post-resp.json b/doc/v3/api_samples/os-aggregates/aggregates-metadata-post-resp.json
new file mode 100644
index 0000000000..c0800eb97c
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregates-metadata-post-resp.json
@@ -0,0 +1,16 @@
+{
+ "aggregate": {
+ "availability_zone": "nova",
+ "created_at": "2013-08-18T12:17:55.959571",
+ "deleted": 0,
+ "deleted_at": null,
+ "hosts": [],
+ "id": 1,
+ "metadata": {
+ "availability_zone": "nova",
+ "key": "value"
+ },
+ "name": "name",
+ "updated_at": null
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregates-metadata-post-resp.xml b/doc/v3/api_samples/os-aggregates/aggregates-metadata-post-resp.xml
new file mode 100644
index 0000000000..ea11da51cd
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregates-metadata-post-resp.xml
@@ -0,0 +1,15 @@
+
+
+ name
+ nova
+ False
+ 2013-08-18 12:17:56.891817
+ None
+
+ None
+ 1
+
+ value
+ nova
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregates-remove-host-post-resp.json b/doc/v3/api_samples/os-aggregates/aggregates-remove-host-post-resp.json
new file mode 100644
index 0000000000..7ada72640d
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregates-remove-host-post-resp.json
@@ -0,0 +1,15 @@
+{
+ "aggregate": {
+ "availability_zone": "nova",
+ "created_at": "2013-08-18T12:17:56.990581",
+ "deleted": 0,
+ "deleted_at": null,
+ "hosts": [],
+ "id": 1,
+ "metadata": {
+ "availability_zone": "nova"
+ },
+ "name": "name",
+ "updated_at": null
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-aggregates/aggregates-remove-host-post-resp.xml b/doc/v3/api_samples/os-aggregates/aggregates-remove-host-post-resp.xml
new file mode 100644
index 0000000000..c9f67ed451
--- /dev/null
+++ b/doc/v3/api_samples/os-aggregates/aggregates-remove-host-post-resp.xml
@@ -0,0 +1,14 @@
+
+
+ name
+ nova
+ False
+ 2013-08-18 12:17:57.255783
+ None
+
+ None
+ 1
+
+ nova
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-certificates/certificate-create-req.json b/doc/v3/api_samples/os-certificates/certificate-create-req.json
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/doc/v3/api_samples/os-certificates/certificate-create-req.xml b/doc/v3/api_samples/os-certificates/certificate-create-req.xml
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/doc/v3/api_samples/os-certificates/certificate-create-resp.json b/doc/v3/api_samples/os-certificates/certificate-create-resp.json
new file mode 100644
index 0000000000..02997cd78f
--- /dev/null
+++ b/doc/v3/api_samples/os-certificates/certificate-create-resp.json
@@ -0,0 +1,6 @@
+{
+ "certificate": {
+ "data": "Certificate:\n Data:\n Version: 1 (0x0)\n Serial Number: 1018 (0x3fa)\n Signature Algorithm: md5WithRSAEncryption\n Issuer: O=NOVA ROOT, L=Mountain View, ST=California, C=US\n Validity\n Not Before: Aug 12 07:20:30 2013 GMT\n Not After : Aug 12 07:20:30 2014 GMT\n Subject: C=US, ST=California, O=OpenStack, OU=NovaDev, CN=openstack-fake-2013-08-12T07:20:30Z\n Subject Public Key Info:\n Public Key Algorithm: rsaEncryption\n Public-Key: (1024 bit)\n Modulus:\n 00:ac:ff:b1:d1:ed:54:4e:35:6c:34:b4:8f:0b:04:\n 50:25:a3:e2:4f:02:4c:4f:26:59:bd:f3:fd:eb:da:\n 18:c2:36:aa:63:42:72:1f:88:4f:3a:ec:e7:9f:8e:\n 44:2a:d3:b8:94:7b:20:41:f8:48:02:57:91:4c:16:\n 62:f1:21:d4:f2:40:b5:86:50:d9:61:f0:be:ff:d8:\n 8d:9f:4b:aa:6a:07:38:a2:7f:87:21:fc:e6:6e:1d:\n 0a:95:1a:90:0e:60:c2:24:e9:8e:e8:68:1b:e9:f3:\n c6:b0:7c:da:c5:20:66:9b:85:ea:f5:c9:a7:de:ee:\n 16:b1:51:a0:4d:e3:95:98:df\n Exponent: 65537 (0x10001)\n Signature Algorithm: md5WithRSAEncryption\n 15:42:ca:71:cc:32:af:dc:cf:45:91:df:8a:b8:30:c4:7f:78:\n 80:a7:25:c2:d9:81:3e:b3:dd:22:cc:3b:f8:94:e7:8f:04:f6:\n 93:04:9e:85:d4:10:40:ff:5a:07:47:24:b5:ae:93:ad:8d:e1:\n e6:54:4a:8d:4a:29:53:c4:8d:04:6b:0b:f6:af:38:78:02:c5:\n 05:19:89:82:2d:ba:fd:11:3c:1e:18:c9:0c:3d:03:93:6e:bc:\n 66:70:34:ee:03:78:8a:1d:3d:64:e8:20:2f:90:81:8e:49:1d:\n 07:37:15:66:42:cb:58:39:ad:56:ce:ed:47:c6:78:0b:0e:75:\n 29:ca\n-----BEGIN CERTIFICATE-----\nMIICNDCCAZ0CAgP6MA0GCSqGSIb3DQEBBAUAME4xEjAQBgNVBAoTCU5PVkEgUk9P\nVDEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzETMBEGA1UECBMKQ2FsaWZvcm5pYTEL\nMAkGA1UEBhMCVVMwHhcNMTMwODEyMDcyMDMwWhcNMTQwODEyMDcyMDMwWjB2MQsw\nCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTESMBAGA1UECgwJT3BlblN0\nYWNrMRAwDgYDVQQLDAdOb3ZhRGV2MSwwKgYDVQQDDCNvcGVuc3RhY2stZmFrZS0y\nMDEzLTA4LTEyVDA3OjIwOjMwWjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA\nrP+x0e1UTjVsNLSPCwRQJaPiTwJMTyZZvfP969oYwjaqY0JyH4hPOuznn45EKtO4\nlHsgQfhIAleRTBZi8SHU8kC1hlDZYfC+/9iNn0uqagc4on+HIfzmbh0KlRqQDmDC\nJOmO6Ggb6fPGsHzaxSBmm4Xq9cmn3u4WsVGgTeOVmN8CAwEAATANBgkqhkiG9w0B\nAQQFAAOBgQAVQspxzDKv3M9Fkd+KuDDEf3iApyXC2YE+s90izDv4lOePBPaTBJ6F\n1BBA/1oHRyS1rpOtjeHmVEqNSilTxI0Eawv2rzh4AsUFGYmCLbr9ETweGMkMPQOT\nbrxmcDTuA3iKHT1k6CAvkIGOSR0HNxVmQstYOa1Wzu1HxngLDnUpyg==\n-----END CERTIFICATE-----\n",
+ "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIICXgIBAAKBgQCs/7HR7VRONWw0tI8LBFAlo+JPAkxPJlm98/3r2hjCNqpjQnIf\niE867OefjkQq07iUeyBB+EgCV5FMFmLxIdTyQLWGUNlh8L7/2I2fS6pqBziif4ch\n/OZuHQqVGpAOYMIk6Y7oaBvp88awfNrFIGabher1yafe7haxUaBN45WY3wIDAQAB\nAoGBAIrcr2I/KyWf0hw4Nn10V9TuyE/9Gz2JHg3QFKjFJox2DqygADT5WAeHc6Bq\nNKNf0NA2SL1LSpm+ql01tvOw4VjE5TF6OHiIzHuTTnXggG6vuA8rxp6L24HtkAcC\n0CBno9ggSX6jVornJPBfxpkwITYSvH57BUFVD7ovbPyWGzS5AkEA1JeUtL6zxwps\nWRr1aJ8Ill2uQk/RUIvSZOU61s+B190zvHikFy8LD8CI6vvBmjC/IZuZVedufjqs\n4vX82uDO3QJBANBSh2b2dyB4AGVFY9vXMRtALAspJHbLHy+zTKxlGPFiuz7Se3ps\n8Kehz4C/CBXgQkk194dwFSGE19/PQfyJROsCQQCFFDJZhrtBUMwMZ2zSRiN5BUGt\nbwuncS+OS1Su3Yz5VRYq2BZYEPHKtYrAFkLWQ8eRwTaWaN5pFE/fb38OgQXdAkA4\nDm0W/K0zlHbuyUxEpNQ28/6mBi0ktiWvLT0tioq6sYmXLwZA/D2JrhXrG/xt/ol3\nr8jqrfNRsLByLhAgh0N/AkEAl2eR0O97lTEgFNqzIQwVmIAn9mBO3cnf3tycvlDU\nm6eb2CS242y4QalfCCAEjxoJURdfsm3/D1iFo00X+IWF+A==\n-----END RSA PRIVATE KEY-----\n"
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-certificates/certificate-create-resp.xml b/doc/v3/api_samples/os-certificates/certificate-create-resp.xml
new file mode 100644
index 0000000000..a6cd027393
--- /dev/null
+++ b/doc/v3/api_samples/os-certificates/certificate-create-resp.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-certificates/certificate-get-root-resp.json b/doc/v3/api_samples/os-certificates/certificate-get-root-resp.json
new file mode 100644
index 0000000000..456d9d32b3
--- /dev/null
+++ b/doc/v3/api_samples/os-certificates/certificate-get-root-resp.json
@@ -0,0 +1,6 @@
+{
+ "certificate": {
+ "data": "-----BEGIN CERTIFICATE-----\nMIICyzCCAjSgAwIBAgIJAJ8zSIxUp/m4MA0GCSqGSIb3DQEBBAUAME4xEjAQBgNV\nBAoTCU5PVkEgUk9PVDEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzETMBEGA1UECBMK\nQ2FsaWZvcm5pYTELMAkGA1UEBhMCVVMwHhcNMTIxMDE3MDEzMzM5WhcNMTMxMDE3\nMDEzMzM5WjBOMRIwEAYDVQQKEwlOT1ZBIFJPT1QxFjAUBgNVBAcTDU1vdW50YWlu\nIFZpZXcxEzARBgNVBAgTCkNhbGlmb3JuaWExCzAJBgNVBAYTAlVTMIGfMA0GCSqG\nSIb3DQEBAQUAA4GNADCBiQKBgQDXW4QfQQxJG4MqurqK8nU/Lge0mfNKxXj/Gwvg\n2sQVwxzmKfoxih8Nn6yt0yHMNjhoji1UoWI03TXUnPZRAZmsypGKZeBd7Y1ZOCPB\nXGZVGrQm+PB2kZU+3cD8fVKcueMLLeZ+LRt5d0njnoKhc5xjqMlfFPimHMba4OL6\nTnYzPQIDAQABo4GwMIGtMAwGA1UdEwQFMAMBAf8wHQYDVR0OBBYEFKyoKu4SMOFM\ngx5Ec7p0nrCkabvxMH4GA1UdIwR3MHWAFKyoKu4SMOFMgx5Ec7p0nrCkabvxoVKk\nUDBOMRIwEAYDVQQKEwlOT1ZBIFJPT1QxFjAUBgNVBAcTDU1vdW50YWluIFZpZXcx\nEzARBgNVBAgTCkNhbGlmb3JuaWExCzAJBgNVBAYTAlVTggkAnzNIjFSn+bgwDQYJ\nKoZIhvcNAQEEBQADgYEAXuvXlu1o/SVvykSLhHW8QiAY00yzN/eDzYmZGomgiuoO\n/x+ayVzbrz1UWZnBD+lC4hll2iELSmf22LjLoF+s/9NyPqHxGL3FrfatBkndaiF8\nAx/TMEyCPl7IQWi+3zzatqOKHSHiG7a9SGn/7o2aNTIWKVulfy5GvmbBjBM/0UE=\n-----END CERTIFICATE-----\n",
+ "private_key": null
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-certificates/certificate-get-root-resp.xml b/doc/v3/api_samples/os-certificates/certificate-get-root-resp.xml
new file mode 100644
index 0000000000..9ff6c09085
--- /dev/null
+++ b/doc/v3/api_samples/os-certificates/certificate-get-root-resp.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/nova/tests/integrated/v3/api_samples/os-agents/agent-post-req.json.tpl b/nova/tests/integrated/v3/api_samples/os-agents/agent-post-req.json.tpl
new file mode 100644
index 0000000000..6dbd2f17cb
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-agents/agent-post-req.json.tpl
@@ -0,0 +1,10 @@
+{
+ "agent": {
+ "hypervisor": "%(hypervisor)s",
+ "os": "%(os)s",
+ "architecture": "%(architecture)s",
+ "version": "%(version)s",
+ "md5hash": "%(md5hash)s",
+ "url": "%(url)s"
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-agents/agent-post-req.xml.tpl b/nova/tests/integrated/v3/api_samples/os-agents/agent-post-req.xml.tpl
new file mode 100644
index 0000000000..5c777749a2
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-agents/agent-post-req.xml.tpl
@@ -0,0 +1,9 @@
+
+
+ %(hypervisor)s
+ %(os)s
+ %(architecture)s
+ %(version)s
+ %(md5hash)s
+ %(url)s
+
diff --git a/nova/tests/integrated/v3/api_samples/os-agents/agent-post-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-agents/agent-post-resp.json.tpl
new file mode 100644
index 0000000000..418d11f504
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-agents/agent-post-resp.json.tpl
@@ -0,0 +1,11 @@
+{
+ "agent": {
+ "agent_id": "1",
+ "architecture": "x86",
+ "hypervisor": "hypervisor",
+ "md5hash": "add6bb58e139be103324d04d82d8f545",
+ "os": "os",
+ "url": "xxxxxxxxxxxx",
+ "version": "8.0"
+ }
+}
\ No newline at end of file
diff --git a/nova/tests/integrated/v3/api_samples/os-agents/agent-post-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-agents/agent-post-resp.xml.tpl
new file mode 100644
index 0000000000..79f62b7fb9
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-agents/agent-post-resp.xml.tpl
@@ -0,0 +1,10 @@
+
+
+ xxxxxxxxxxxx
+ hypervisor
+ add6bb58e139be103324d04d82d8f545
+ 8.0
+ x86
+ os
+ 1
+
\ No newline at end of file
diff --git a/nova/tests/integrated/v3/api_samples/os-agents/agent-update-put-req.json.tpl b/nova/tests/integrated/v3/api_samples/os-agents/agent-update-put-req.json.tpl
new file mode 100644
index 0000000000..f660b35e0a
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-agents/agent-update-put-req.json.tpl
@@ -0,0 +1,7 @@
+{
+ "agent": {
+ "url": "%(url)s",
+ "md5hash": "%(md5hash)s",
+ "version": "%(version)s"
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-agents/agent-update-put-req.xml.tpl b/nova/tests/integrated/v3/api_samples/os-agents/agent-update-put-req.xml.tpl
new file mode 100644
index 0000000000..aa61255946
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-agents/agent-update-put-req.xml.tpl
@@ -0,0 +1,6 @@
+
+
+ %(version)s
+ %(url)s
+ %(md5hash)s
+
diff --git a/nova/tests/integrated/v3/api_samples/os-agents/agent-update-put-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-agents/agent-update-put-resp.json.tpl
new file mode 100644
index 0000000000..6b67222c8c
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-agents/agent-update-put-resp.json.tpl
@@ -0,0 +1,8 @@
+{
+ "agent": {
+ "agent_id": "1",
+ "md5hash": "add6bb58e139be103324d04d82d8f545",
+ "url": "xxx://xxxx/xxx/xxx",
+ "version": "7.0"
+ }
+}
\ No newline at end of file
diff --git a/nova/tests/integrated/v3/api_samples/os-agents/agent-update-put-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-agents/agent-update-put-resp.xml.tpl
new file mode 100644
index 0000000000..badf2750ea
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-agents/agent-update-put-resp.xml.tpl
@@ -0,0 +1,7 @@
+
+
+ xxx://xxxx/xxx/xxx
+ 7.0
+ 1
+ add6bb58e139be103324d04d82d8f545
+
\ No newline at end of file
diff --git a/nova/tests/integrated/v3/api_samples/os-agents/agents-get-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-agents/agents-get-resp.json.tpl
new file mode 100644
index 0000000000..36eac4ced7
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-agents/agents-get-resp.json.tpl
@@ -0,0 +1,13 @@
+{
+ "agents": [
+ {
+ "agent_id": "1",
+ "architecture": "x86",
+ "hypervisor": "hypervisor",
+ "md5hash": "add6bb58e139be103324d04d82d8f545",
+ "os": "os",
+ "url": "xxxxxxxxxxxx",
+ "version": "8.0"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/nova/tests/integrated/v3/api_samples/os-agents/agents-get-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-agents/agents-get-resp.xml.tpl
new file mode 100644
index 0000000000..4194f62c96
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-agents/agents-get-resp.xml.tpl
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-add-host-post-req.json.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-add-host-post-req.json.tpl
new file mode 100644
index 0000000000..2a84101a16
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-add-host-post-req.json.tpl
@@ -0,0 +1,6 @@
+{
+ "add_host":
+ {
+ "host": "%(host_name)s"
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-add-host-post-req.xml.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-add-host-post-req.xml.tpl
new file mode 100644
index 0000000000..4454134efb
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-add-host-post-req.xml.tpl
@@ -0,0 +1,2 @@
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-metadata-post-req.json.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-metadata-post-req.json.tpl
new file mode 100644
index 0000000000..63a2921cac
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-metadata-post-req.json.tpl
@@ -0,0 +1,9 @@
+{
+ "set_metadata":
+ {
+ "metadata":
+ {
+ "key": "value"
+ }
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-metadata-post-req.xml.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-metadata-post-req.xml.tpl
new file mode 100644
index 0000000000..72b1e742aa
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-metadata-post-req.xml.tpl
@@ -0,0 +1,6 @@
+
+
+
+ value
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-post-req.json.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-post-req.json.tpl
new file mode 100644
index 0000000000..fc806061e8
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-post-req.json.tpl
@@ -0,0 +1,7 @@
+{
+ "aggregate":
+ {
+ "name": "name",
+ "availability_zone": "nova"
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-post-req.xml.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-post-req.xml.tpl
new file mode 100644
index 0000000000..4931476ae5
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-post-req.xml.tpl
@@ -0,0 +1,2 @@
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-post-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-post-resp.json.tpl
new file mode 100644
index 0000000000..c1657b8481
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-post-resp.json.tpl
@@ -0,0 +1,11 @@
+{
+ "aggregate": {
+ "availability_zone": "nova",
+ "created_at": "%(timestamp)s",
+ "deleted": 0,
+ "deleted_at": null,
+ "id": %(aggregate_id)s,
+ "name": "name",
+ "updated_at": null
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-post-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-post-resp.xml.tpl
new file mode 100644
index 0000000000..f8603ac33f
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-post-resp.xml.tpl
@@ -0,0 +1,10 @@
+
+
+ name
+ nova
+ False
+ %(timestamp)s
+ None
+ None
+ %(aggregate_id)s
+
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-remove-host-post-req.json.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-remove-host-post-req.json.tpl
new file mode 100644
index 0000000000..66ecf30cd6
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-remove-host-post-req.json.tpl
@@ -0,0 +1,6 @@
+{
+ "remove_host":
+ {
+ "host": "%(host_name)s"
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-remove-host-post-req.xml.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-remove-host-post-req.xml.tpl
new file mode 100644
index 0000000000..bc2896835f
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-remove-host-post-req.xml.tpl
@@ -0,0 +1,2 @@
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-update-post-req.json.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-update-post-req.json.tpl
new file mode 100644
index 0000000000..55e4b09346
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-update-post-req.json.tpl
@@ -0,0 +1,7 @@
+{
+ "aggregate":
+ {
+ "name": "newname",
+ "availability_zone": "nova2"
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-update-post-req.xml.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-update-post-req.xml.tpl
new file mode 100644
index 0000000000..04ce4fba58
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-update-post-req.xml.tpl
@@ -0,0 +1,2 @@
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-update-post-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-update-post-resp.json.tpl
new file mode 100644
index 0000000000..c5481c041d
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-update-post-resp.json.tpl
@@ -0,0 +1,15 @@
+{
+ "aggregate": {
+ "availability_zone": "nova2",
+ "created_at": "%(timestamp)s",
+ "deleted": 0,
+ "deleted_at": null,
+ "hosts": [],
+ "id": 1,
+ "metadata": {
+ "availability_zone": "nova2"
+ },
+ "name": "newname",
+ "updated_at": "%(timestamp)s"
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-update-post-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-update-post-resp.xml.tpl
new file mode 100644
index 0000000000..071e1c43a6
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregate-update-post-resp.xml.tpl
@@ -0,0 +1,14 @@
+
+
+ newname
+ nova2
+ False
+ %(timestamp)s
+ %(timestamp)s
+
+ None
+ 1
+
+ nova2
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-add-host-post-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-add-host-post-resp.json.tpl
new file mode 100644
index 0000000000..aae068526b
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-add-host-post-resp.json.tpl
@@ -0,0 +1,17 @@
+{
+ "aggregate": {
+ "availability_zone": "nova",
+ "created_at": "%(timestamp)s",
+ "deleted": 0,
+ "deleted_at": null,
+ "hosts": [
+ "%(compute_host)s"
+ ],
+ "id": 1,
+ "metadata": {
+ "availability_zone": "nova"
+ },
+ "name": "name",
+ "updated_at": null
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-add-host-post-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-add-host-post-resp.xml.tpl
new file mode 100644
index 0000000000..a45a017894
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-add-host-post-resp.xml.tpl
@@ -0,0 +1,16 @@
+
+
+ name
+ nova
+ False
+ %(timestamp)s
+ None
+
+ %(compute_host)s
+
+ None
+ 1
+
+ nova
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-get-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-get-resp.json.tpl
new file mode 100644
index 0000000000..348414a757
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-get-resp.json.tpl
@@ -0,0 +1,15 @@
+{
+ "aggregate": {
+ "availability_zone": "nova",
+ "created_at": "%(timestamp)s",
+ "deleted": 0,
+ "deleted_at": null,
+ "hosts": [],
+ "id": 1,
+ "metadata": {
+ "availability_zone": "nova"
+ },
+ "name": "name",
+ "updated_at": null
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-get-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-get-resp.xml.tpl
new file mode 100644
index 0000000000..d59d10a842
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-get-resp.xml.tpl
@@ -0,0 +1,14 @@
+
+
+ name
+ nova
+ False
+ %(timestamp)s
+ None
+
+ None
+ 1
+
+ nova
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-list-get-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-list-get-resp.json.tpl
new file mode 100644
index 0000000000..9b5fe1fdd2
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-list-get-resp.json.tpl
@@ -0,0 +1,17 @@
+{
+ "aggregates": [
+ {
+ "availability_zone": "nova",
+ "created_at": "%(timestamp)s",
+ "deleted": 0,
+ "deleted_at": null,
+ "hosts": [],
+ "id": 1,
+ "metadata": {
+ "availability_zone": "nova"
+ },
+ "name": "name",
+ "updated_at": null
+ }
+ ]
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-list-get-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-list-get-resp.xml.tpl
new file mode 100644
index 0000000000..0a6173a0ba
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-list-get-resp.xml.tpl
@@ -0,0 +1,16 @@
+
+
+
+ name
+ nova
+ False
+ %(timestamp)s
+ None
+
+ None
+ 1
+
+ nova
+
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-metadata-post-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-metadata-post-resp.json.tpl
new file mode 100644
index 0000000000..92ab5b6241
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-metadata-post-resp.json.tpl
@@ -0,0 +1,16 @@
+{
+ "aggregate": {
+ "availability_zone": "nova",
+ "created_at": "%(timestamp)s",
+ "deleted": 0,
+ "deleted_at": null,
+ "hosts": [],
+ "id": 1,
+ "metadata": {
+ "availability_zone": "nova",
+ "key": "value"
+ },
+ "name": "name",
+ "updated_at": null
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-metadata-post-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-metadata-post-resp.xml.tpl
new file mode 100644
index 0000000000..5b229cfc9e
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-metadata-post-resp.xml.tpl
@@ -0,0 +1,15 @@
+
+
+ name
+ nova
+ False
+ %(timestamp)s
+ None
+
+ None
+ 1
+
+ value
+ nova
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-remove-host-post-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-remove-host-post-resp.json.tpl
new file mode 100644
index 0000000000..348414a757
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-remove-host-post-resp.json.tpl
@@ -0,0 +1,15 @@
+{
+ "aggregate": {
+ "availability_zone": "nova",
+ "created_at": "%(timestamp)s",
+ "deleted": 0,
+ "deleted_at": null,
+ "hosts": [],
+ "id": 1,
+ "metadata": {
+ "availability_zone": "nova"
+ },
+ "name": "name",
+ "updated_at": null
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-remove-host-post-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-remove-host-post-resp.xml.tpl
new file mode 100644
index 0000000000..d59d10a842
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-aggregates/aggregates-remove-host-post-resp.xml.tpl
@@ -0,0 +1,14 @@
+
+
+ name
+ nova
+ False
+ %(timestamp)s
+ None
+
+ None
+ 1
+
+ nova
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-certificates/certificate-create-req.json.tpl b/nova/tests/integrated/v3/api_samples/os-certificates/certificate-create-req.json.tpl
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/nova/tests/integrated/v3/api_samples/os-certificates/certificate-create-req.xml.tpl b/nova/tests/integrated/v3/api_samples/os-certificates/certificate-create-req.xml.tpl
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/nova/tests/integrated/v3/api_samples/os-certificates/certificate-create-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-certificates/certificate-create-resp.json.tpl
new file mode 100644
index 0000000000..35c063c820
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-certificates/certificate-create-resp.json.tpl
@@ -0,0 +1,6 @@
+{
+ "certificate": {
+ "data": "%(text)s",
+ "private_key": "%(text)s"
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-certificates/certificate-create-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-certificates/certificate-create-resp.xml.tpl
new file mode 100644
index 0000000000..75f2d5d7f4
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-certificates/certificate-create-resp.xml.tpl
@@ -0,0 +1,2 @@
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-certificates/certificate-get-root-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-certificates/certificate-get-root-resp.json.tpl
new file mode 100644
index 0000000000..4938e92fba
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-certificates/certificate-get-root-resp.json.tpl
@@ -0,0 +1,6 @@
+{
+ "certificate": {
+ "data": "%(text)s",
+ "private_key": null
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-certificates/certificate-get-root-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-certificates/certificate-get-root-resp.xml.tpl
new file mode 100644
index 0000000000..bbc54284a5
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-certificates/certificate-get-root-resp.xml.tpl
@@ -0,0 +1,2 @@
+
+
diff --git a/nova/tests/integrated/v3/test_agents.py b/nova/tests/integrated/v3/test_agents.py
new file mode 100644
index 0000000000..7b053c518f
--- /dev/null
+++ b/nova/tests/integrated/v3/test_agents.py
@@ -0,0 +1,114 @@
+# 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 import db
+from nova.db.sqlalchemy import models
+from nova.tests.integrated.v3 import api_sample_base
+
+
+class AgentsJsonTest(api_sample_base.ApiSampleTestBaseV3):
+ extension_name = "os-agents"
+
+ def setUp(self):
+ super(AgentsJsonTest, self).setUp()
+
+ fake_agents_list = [{'url': 'xxxxxxxxxxxx',
+ 'hypervisor': 'hypervisor',
+ 'architecture': 'x86',
+ 'os': 'os',
+ 'version': '8.0',
+ 'md5hash': 'add6bb58e139be103324d04d82d8f545',
+ 'id': '1'}]
+
+ def fake_agent_build_create(context, values):
+ values['id'] = '1'
+ agent_build_ref = models.AgentBuild()
+ agent_build_ref.update(values)
+ return agent_build_ref
+
+ def fake_agent_build_get_all(context, hypervisor):
+ agent_build_all = []
+ for agent in fake_agents_list:
+ if hypervisor and hypervisor != agent['hypervisor']:
+ continue
+ agent_build_ref = models.AgentBuild()
+ agent_build_ref.update(agent)
+ agent_build_all.append(agent_build_ref)
+ return agent_build_all
+
+ def fake_agent_build_update(context, agent_build_id, values):
+ pass
+
+ def fake_agent_build_destroy(context, agent_update_id):
+ pass
+
+ self.stubs.Set(db, "agent_build_create",
+ fake_agent_build_create)
+ self.stubs.Set(db, "agent_build_get_all",
+ fake_agent_build_get_all)
+ self.stubs.Set(db, "agent_build_update",
+ fake_agent_build_update)
+ self.stubs.Set(db, "agent_build_destroy",
+ fake_agent_build_destroy)
+
+ def test_agent_create(self):
+ # Creates a new agent build.
+ project = {'url': 'xxxxxxxxxxxx',
+ 'hypervisor': 'hypervisor',
+ 'architecture': 'x86',
+ 'os': 'os',
+ 'version': '8.0',
+ 'md5hash': 'add6bb58e139be103324d04d82d8f545'
+ }
+ response = self._do_post('os-agents', 'agent-post-req',
+ project)
+ project['agent_id'] = 1
+ self._verify_response('agent-post-resp', project, response, 201)
+ return project
+
+ def test_agent_list(self):
+ # Return a list of all agent builds.
+ response = self._do_get('os-agents')
+ project = {'url': 'xxxxxxxxxxxx',
+ 'hypervisor': 'hypervisor',
+ 'architecture': 'x86',
+ 'os': 'os',
+ 'version': '8.0',
+ 'md5hash': 'add6bb58e139be103324d04d82d8f545',
+ 'agent_id': 1
+ }
+ self._verify_response('agents-get-resp', project, response, 200)
+
+ def test_agent_update(self):
+ # Update an existing agent build.
+ agent_id = 1
+ subs = {'version': '7.0',
+ 'url': 'xxx://xxxx/xxx/xxx',
+ 'md5hash': 'add6bb58e139be103324d04d82d8f545'}
+ response = self._do_put('os-agents/%s' % agent_id,
+ 'agent-update-put-req', subs)
+ subs['agent_id'] = 1
+ self._verify_response('agent-update-put-resp', subs, response, 200)
+
+ def test_agent_delete(self):
+ # Deletes an existing agent build.
+ agent_id = 1
+ response = self._do_delete('os-agents/%s' % agent_id)
+ self.assertEqual(response.status, 204)
+
+
+class AgentsXmlTest(AgentsJsonTest):
+ ctype = "xml"
diff --git a/nova/tests/integrated/v3/test_aggregates.py b/nova/tests/integrated/v3/test_aggregates.py
new file mode 100644
index 0000000000..79f5752b7d
--- /dev/null
+++ b/nova/tests/integrated/v3/test_aggregates.py
@@ -0,0 +1,85 @@
+# 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 api_sample_base
+
+
+class AggregatesSampleJsonTest(api_sample_base.ApiSampleTestBaseV3):
+ extension_name = "os-aggregates"
+
+ def test_aggregate_create(self):
+ subs = {
+ "aggregate_id": '(?P\d+)'
+ }
+ response = self._do_post('os-aggregates', 'aggregate-post-req', subs)
+ subs.update(self._get_regexes())
+ return self._verify_response('aggregate-post-resp',
+ subs, response, 201)
+
+ def test_list_aggregates(self):
+ self.test_aggregate_create()
+ response = self._do_get('os-aggregates')
+ subs = self._get_regexes()
+ self._verify_response('aggregates-list-get-resp', subs, response, 200)
+
+ def test_aggregate_get(self):
+ agg_id = self.test_aggregate_create()
+ response = self._do_get('os-aggregates/%s' % agg_id)
+ subs = self._get_regexes()
+ self._verify_response('aggregates-get-resp', subs, response, 200)
+
+ def test_add_metadata(self):
+ agg_id = self.test_aggregate_create()
+ response = self._do_post('os-aggregates/%s/action' % agg_id,
+ 'aggregate-metadata-post-req',
+ {'action': 'set_metadata'})
+ subs = self._get_regexes()
+ self._verify_response('aggregates-metadata-post-resp', subs,
+ response, 200)
+
+ def test_add_host(self):
+ aggregate_id = self.test_aggregate_create()
+ subs = {
+ "host_name": self.compute.host,
+ }
+ response = self._do_post('os-aggregates/%s/action' % aggregate_id,
+ 'aggregate-add-host-post-req', subs)
+ subs.update(self._get_regexes())
+ self._verify_response('aggregates-add-host-post-resp', subs,
+ response, 200)
+
+ def test_remove_host(self):
+ self.test_add_host()
+ subs = {
+ "host_name": self.compute.host,
+ }
+ response = self._do_post('os-aggregates/1/action',
+ 'aggregate-remove-host-post-req', subs)
+ subs.update(self._get_regexes())
+ self._verify_response('aggregates-remove-host-post-resp',
+ subs, response, 200)
+
+ def test_update_aggregate(self):
+ aggregate_id = self.test_aggregate_create()
+ response = self._do_put('os-aggregates/%s' % aggregate_id,
+ 'aggregate-update-post-req', {})
+ subs = self._get_regexes()
+ self._verify_response('aggregate-update-post-resp',
+ subs, response, 200)
+
+
+class AggregatesSampleXmlTest(AggregatesSampleJsonTest):
+ ctype = 'xml'
diff --git a/nova/tests/integrated/v3/test_certificates.py b/nova/tests/integrated/v3/test_certificates.py
new file mode 100644
index 0000000000..f5613019bc
--- /dev/null
+++ b/nova/tests/integrated/v3/test_certificates.py
@@ -0,0 +1,36 @@
+# 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 api_sample_base
+
+
+class CertificatesSamplesJsonTest(api_sample_base.ApiSampleTestBaseV3):
+ extension_name = "os-certificates"
+
+ def test_create_certificates(self):
+ response = self._do_post('os-certificates',
+ 'certificate-create-req', {})
+ subs = self._get_regexes()
+ self._verify_response('certificate-create-resp', subs, response, 201)
+
+ def test_get_root_certificate(self):
+ response = self._do_get('os-certificates/root')
+ subs = self._get_regexes()
+ self._verify_response('certificate-get-root-resp', subs, response, 200)
+
+
+class CertificatesSamplesXmlTest(CertificatesSamplesJsonTest):
+ ctype = 'xml'