diff --git a/doc/v3/api_samples/server-ips/server-ips-network-resp.json b/doc/v3/api_samples/server-ips/server-ips-network-resp.json
new file mode 100644
index 000000000000..0c13588eb09b
--- /dev/null
+++ b/doc/v3/api_samples/server-ips/server-ips-network-resp.json
@@ -0,0 +1,10 @@
+{
+ "private": [
+ {
+ "addr": "192.168.0.3",
+ "mac_addr": "aa:bb:cc:dd:ee:ff",
+ "type": "fixed",
+ "version": 4
+ }
+ ]
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/server-ips/server-ips-network-resp.xml b/doc/v3/api_samples/server-ips/server-ips-network-resp.xml
new file mode 100644
index 000000000000..1577ec482511
--- /dev/null
+++ b/doc/v3/api_samples/server-ips/server-ips-network-resp.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/server-ips/server-ips-resp.json b/doc/v3/api_samples/server-ips/server-ips-resp.json
new file mode 100644
index 000000000000..bb2ae0ab474f
--- /dev/null
+++ b/doc/v3/api_samples/server-ips/server-ips-resp.json
@@ -0,0 +1,12 @@
+{
+ "addresses": {
+ "private": [
+ {
+ "addr": "192.168.0.3",
+ "mac_addr": "aa:bb:cc:dd:ee:ff",
+ "type": "fixed",
+ "version": 4
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/server-ips/server-ips-resp.xml b/doc/v3/api_samples/server-ips/server-ips-resp.xml
new file mode 100644
index 000000000000..5184898e73a2
--- /dev/null
+++ b/doc/v3/api_samples/server-ips/server-ips-resp.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/server-ips/server-post-req.json b/doc/v3/api_samples/server-ips/server-post-req.json
new file mode 100644
index 000000000000..d41985a1bc39
--- /dev/null
+++ b/doc/v3/api_samples/server-ips/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/server-ips/server-post-req.xml b/doc/v3/api_samples/server-ips/server-post-req.xml
new file mode 100644
index 000000000000..598839cf6a3a
--- /dev/null
+++ b/doc/v3/api_samples/server-ips/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/v3/api_samples/server-ips/server-post-resp.json b/doc/v3/api_samples/server-ips/server-post-resp.json
new file mode 100644
index 000000000000..4edce34c637a
--- /dev/null
+++ b/doc/v3/api_samples/server-ips/server-post-resp.json
@@ -0,0 +1,16 @@
+{
+ "server": {
+ "admin_pass": "Ag463BYwnXEf",
+ "id": "0813a7dc-8e97-42df-9634-957109499bf0",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/servers/0813a7dc-8e97-42df-9634-957109499bf0",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/servers/0813a7dc-8e97-42df-9634-957109499bf0",
+ "rel": "bookmark"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/server-ips/server-post-resp.xml b/doc/v3/api_samples/server-ips/server-post-resp.xml
new file mode 100644
index 000000000000..fca0e9c02516
--- /dev/null
+++ b/doc/v3/api_samples/server-ips/server-post-resp.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/server-metadata/server-metadata-all-req.json b/doc/v3/api_samples/server-metadata/server-metadata-all-req.json
new file mode 100644
index 000000000000..03925e4a4a0f
--- /dev/null
+++ b/doc/v3/api_samples/server-metadata/server-metadata-all-req.json
@@ -0,0 +1,5 @@
+{
+ "metadata" : {
+ "foo" : "Foo Value"
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/server-metadata/server-metadata-all-req.xml b/doc/v3/api_samples/server-metadata/server-metadata-all-req.xml
new file mode 100644
index 000000000000..72811e302531
--- /dev/null
+++ b/doc/v3/api_samples/server-metadata/server-metadata-all-req.xml
@@ -0,0 +1,5 @@
+
+
+
+ Foo Value
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/server-metadata/server-metadata-all-resp.json b/doc/v3/api_samples/server-metadata/server-metadata-all-resp.json
new file mode 100644
index 000000000000..81cd4eb94a72
--- /dev/null
+++ b/doc/v3/api_samples/server-metadata/server-metadata-all-resp.json
@@ -0,0 +1,5 @@
+{
+ "metadata": {
+ "foo": "Foo Value"
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/server-metadata/server-metadata-all-resp.xml b/doc/v3/api_samples/server-metadata/server-metadata-all-resp.xml
new file mode 100644
index 000000000000..55c949c5770c
--- /dev/null
+++ b/doc/v3/api_samples/server-metadata/server-metadata-all-resp.xml
@@ -0,0 +1,4 @@
+
+
+ Foo Value
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/server-metadata/server-metadata-req.json b/doc/v3/api_samples/server-metadata/server-metadata-req.json
new file mode 100644
index 000000000000..b9a8ac208629
--- /dev/null
+++ b/doc/v3/api_samples/server-metadata/server-metadata-req.json
@@ -0,0 +1,5 @@
+{
+ "metadata" : {
+ "foo" : "Bar Value"
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/server-metadata/server-metadata-req.xml b/doc/v3/api_samples/server-metadata/server-metadata-req.xml
new file mode 100644
index 000000000000..3f23eeb49556
--- /dev/null
+++ b/doc/v3/api_samples/server-metadata/server-metadata-req.xml
@@ -0,0 +1,3 @@
+
+
+Bar Value
\ No newline at end of file
diff --git a/doc/v3/api_samples/server-metadata/server-metadata-resp.json b/doc/v3/api_samples/server-metadata/server-metadata-resp.json
new file mode 100644
index 000000000000..81cd4eb94a72
--- /dev/null
+++ b/doc/v3/api_samples/server-metadata/server-metadata-resp.json
@@ -0,0 +1,5 @@
+{
+ "metadata": {
+ "foo": "Foo Value"
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/server-metadata/server-metadata-resp.xml b/doc/v3/api_samples/server-metadata/server-metadata-resp.xml
new file mode 100644
index 000000000000..90436729abf0
--- /dev/null
+++ b/doc/v3/api_samples/server-metadata/server-metadata-resp.xml
@@ -0,0 +1,2 @@
+
+Foo Value
\ No newline at end of file
diff --git a/doc/v3/api_samples/server-metadata/server-post-req.json b/doc/v3/api_samples/server-metadata/server-post-req.json
new file mode 100644
index 000000000000..d41985a1bc39
--- /dev/null
+++ b/doc/v3/api_samples/server-metadata/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/server-metadata/server-post-req.xml b/doc/v3/api_samples/server-metadata/server-post-req.xml
new file mode 100644
index 000000000000..598839cf6a3a
--- /dev/null
+++ b/doc/v3/api_samples/server-metadata/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/v3/api_samples/server-metadata/server-post-resp.json b/doc/v3/api_samples/server-metadata/server-post-resp.json
new file mode 100644
index 000000000000..8d9d896219f9
--- /dev/null
+++ b/doc/v3/api_samples/server-metadata/server-post-resp.json
@@ -0,0 +1,16 @@
+{
+ "server": {
+ "admin_pass": "ys9M8HQXvwEJ",
+ "id": "a6ebe5b4-b68b-420b-9c1e-620c4d3e0389",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/servers/a6ebe5b4-b68b-420b-9c1e-620c4d3e0389",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/servers/a6ebe5b4-b68b-420b-9c1e-620c4d3e0389",
+ "rel": "bookmark"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/server-metadata/server-post-resp.xml b/doc/v3/api_samples/server-metadata/server-post-resp.xml
new file mode 100644
index 000000000000..026abd69401d
--- /dev/null
+++ b/doc/v3/api_samples/server-metadata/server-post-resp.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/nova/tests/integrated/v3/api_samples/server-ips/server-ips-network-resp.json.tpl b/nova/tests/integrated/v3/api_samples/server-ips/server-ips-network-resp.json.tpl
new file mode 100644
index 000000000000..8df9796e9c70
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/server-ips/server-ips-network-resp.json.tpl
@@ -0,0 +1,10 @@
+{
+ "private": [
+ {
+ "addr": "%(ip)s",
+ "mac_addr": "aa:bb:cc:dd:ee:ff",
+ "type": "fixed",
+ "version": 4
+ }
+ ]
+}
diff --git a/nova/tests/integrated/v3/api_samples/server-ips/server-ips-network-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/server-ips/server-ips-network-resp.xml.tpl
new file mode 100644
index 000000000000..b5c5e00e8b5d
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/server-ips/server-ips-network-resp.xml.tpl
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/nova/tests/integrated/v3/api_samples/server-ips/server-ips-resp.json.tpl b/nova/tests/integrated/v3/api_samples/server-ips/server-ips-resp.json.tpl
new file mode 100644
index 000000000000..a2eab422f288
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/server-ips/server-ips-resp.json.tpl
@@ -0,0 +1,12 @@
+{
+ "addresses": {
+ "private": [
+ {
+ "addr": "%(ip)s",
+ "mac_addr": "aa:bb:cc:dd:ee:ff",
+ "type": "fixed",
+ "version": 4
+ }
+ ]
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/server-ips/server-ips-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/server-ips/server-ips-resp.xml.tpl
new file mode 100644
index 000000000000..9b071abca152
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/server-ips/server-ips-resp.xml.tpl
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/nova/tests/integrated/v3/api_samples/server-ips/server-post-req.json.tpl b/nova/tests/integrated/v3/api_samples/server-ips/server-post-req.json.tpl
new file mode 100644
index 000000000000..1dcb63e3b2ae
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/server-ips/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/server-ips/server-post-req.xml.tpl b/nova/tests/integrated/v3/api_samples/server-ips/server-post-req.xml.tpl
new file mode 100644
index 000000000000..ddb5ea78c4b5
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/server-ips/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/v3/api_samples/server-ips/server-post-resp.json.tpl b/nova/tests/integrated/v3/api_samples/server-ips/server-post-resp.json.tpl
new file mode 100644
index 000000000000..6c3100fbec86
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/server-ips/server-post-resp.json.tpl
@@ -0,0 +1,16 @@
+{
+ "server": {
+ "admin_pass": "%(password)s",
+ "id": "%(id)s",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/servers/%(uuid)s",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/servers/%(uuid)s",
+ "rel": "bookmark"
+ }
+ ]
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/server-ips/server-post-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/server-ips/server-post-resp.xml.tpl
new file mode 100644
index 000000000000..3470373e171f
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/server-ips/server-post-resp.xml.tpl
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-all-req.json.tpl b/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-all-req.json.tpl
new file mode 100644
index 000000000000..2278d2afd806
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-all-req.json.tpl
@@ -0,0 +1,5 @@
+{
+ "metadata" : {
+ "foo" : "%(value)s"
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-all-req.xml.tpl b/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-all-req.xml.tpl
new file mode 100644
index 000000000000..e74270673657
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-all-req.xml.tpl
@@ -0,0 +1,5 @@
+
+
+
+ %(value)s
+
diff --git a/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-all-resp.json.tpl b/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-all-resp.json.tpl
new file mode 100644
index 000000000000..3812a26c8860
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-all-resp.json.tpl
@@ -0,0 +1,5 @@
+{
+ "metadata": {
+ "foo": "%(value)s"
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-all-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-all-resp.xml.tpl
new file mode 100644
index 000000000000..eae6d765830b
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-all-resp.xml.tpl
@@ -0,0 +1,4 @@
+
+
+ %(value)s
+
diff --git a/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-req.json.tpl b/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-req.json.tpl
new file mode 100644
index 000000000000..2278d2afd806
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-req.json.tpl
@@ -0,0 +1,5 @@
+{
+ "metadata" : {
+ "foo" : "%(value)s"
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-req.xml.tpl b/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-req.xml.tpl
new file mode 100644
index 000000000000..9b1cd6e4830c
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-req.xml.tpl
@@ -0,0 +1,2 @@
+
+%(value)s
diff --git a/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-resp.json.tpl b/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-resp.json.tpl
new file mode 100644
index 000000000000..3812a26c8860
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-resp.json.tpl
@@ -0,0 +1,5 @@
+{
+ "metadata": {
+ "foo": "%(value)s"
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-resp.xml.tpl
new file mode 100644
index 000000000000..13d368f09139
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/server-metadata/server-metadata-resp.xml.tpl
@@ -0,0 +1,2 @@
+
+%(value)s
diff --git a/nova/tests/integrated/v3/api_samples/server-metadata/server-post-req.json.tpl b/nova/tests/integrated/v3/api_samples/server-metadata/server-post-req.json.tpl
new file mode 100644
index 000000000000..1dcb63e3b2ae
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/server-metadata/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/server-metadata/server-post-req.xml.tpl b/nova/tests/integrated/v3/api_samples/server-metadata/server-post-req.xml.tpl
new file mode 100644
index 000000000000..ddb5ea78c4b5
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/server-metadata/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/v3/api_samples/server-metadata/server-post-resp.json.tpl b/nova/tests/integrated/v3/api_samples/server-metadata/server-post-resp.json.tpl
new file mode 100644
index 000000000000..6c3100fbec86
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/server-metadata/server-post-resp.json.tpl
@@ -0,0 +1,16 @@
+{
+ "server": {
+ "admin_pass": "%(password)s",
+ "id": "%(id)s",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/servers/%(uuid)s",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/servers/%(uuid)s",
+ "rel": "bookmark"
+ }
+ ]
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/server-metadata/server-post-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/server-metadata/server-post-resp.xml.tpl
new file mode 100644
index 000000000000..3470373e171f
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/server-metadata/server-post-resp.xml.tpl
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/nova/tests/integrated/v3/test_server_metadata.py b/nova/tests/integrated/v3/test_server_metadata.py
new file mode 100644
index 000000000000..e23c4641cce1
--- /dev/null
+++ b/nova/tests/integrated/v3/test_server_metadata.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 test_servers
+
+
+class ServersMetadataJsonTest(test_servers.ServersSampleBase):
+ extends_name = 'core_only'
+ sample_dir = 'server-metadata'
+
+ def _create_and_set(self, subs):
+ uuid = self._post_server()
+ response = self._do_put('servers/%s/metadata' % uuid,
+ 'server-metadata-all-req',
+ subs)
+ self._verify_response('server-metadata-all-resp', subs, response, 200)
+ return uuid
+
+ def generalize_subs(self, subs, vanilla_regexes):
+ subs['value'] = '(Foo|Bar) Value'
+ return subs
+
+ def test_metadata_put_all(self):
+ # Test setting all metadata for a server.
+ subs = {'value': 'Foo Value'}
+ self._create_and_set(subs)
+
+ def test_metadata_post_all(self):
+ # Test updating all metadata for a server.
+ subs = {'value': 'Foo Value'}
+ uuid = self._create_and_set(subs)
+ subs['value'] = 'Bar Value'
+ response = self._do_post('servers/%s/metadata' % uuid,
+ 'server-metadata-all-req',
+ subs)
+ self._verify_response('server-metadata-all-resp', subs, response, 201)
+
+ def test_metadata_get_all(self):
+ # Test getting all metadata for a server.
+ subs = {'value': 'Foo Value'}
+ uuid = self._create_and_set(subs)
+ response = self._do_get('servers/%s/metadata' % uuid)
+ self._verify_response('server-metadata-all-resp', subs, response, 200)
+
+ def test_metadata_put(self):
+ # Test putting an individual metadata item for a server.
+ subs = {'value': 'Foo Value'}
+ uuid = self._create_and_set(subs)
+ subs['value'] = 'Bar Value'
+ response = self._do_put('servers/%s/metadata/foo' % uuid,
+ 'server-metadata-req',
+ subs)
+ self._verify_response('server-metadata-resp', subs, response, 200)
+
+ def test_metadata_get(self):
+ # Test getting an individual metadata item for a server.
+ subs = {'value': 'Foo Value'}
+ uuid = self._create_and_set(subs)
+ response = self._do_get('servers/%s/metadata/foo' % uuid)
+ self._verify_response('server-metadata-resp', subs, response, 200)
+
+ def test_metadata_delete(self):
+ # Test deleting an individual metadata item for a server.
+ subs = {'value': 'Foo Value'}
+ uuid = self._create_and_set(subs)
+ response = self._do_delete('servers/%s/metadata/foo' % uuid)
+ self.assertEqual(response.status, 204)
+ self.assertEqual(response.read(), '')
+
+
+class ServersMetadataXmlTest(ServersMetadataJsonTest):
+ ctype = 'xml'
diff --git a/nova/tests/integrated/v3/test_servers_ips.py b/nova/tests/integrated/v3/test_servers_ips.py
new file mode 100644
index 000000000000..76991ffc757b
--- /dev/null
+++ b/nova/tests/integrated/v3/test_servers_ips.py
@@ -0,0 +1,40 @@
+# 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 ServersIpsJsonTest(test_servers.ServersSampleBase):
+ extends_name = 'core_only'
+ sample_dir = 'server-ips'
+
+ def test_get(self):
+ # Test getting a server's IP information.
+ uuid = self._post_server()
+ response = self._do_get('servers/%s/ips' % uuid)
+ subs = self._get_regexes()
+ self._verify_response('server-ips-resp', subs, response, 200)
+
+ def test_get_by_network(self):
+ # Test getting a server's IP information by network id.
+ uuid = self._post_server()
+ response = self._do_get('servers/%s/ips/private' % uuid)
+ subs = self._get_regexes()
+ self._verify_response('server-ips-network-resp', subs, response, 200)
+
+
+class ServersIpsXmlTest(ServersIpsJsonTest):
+ ctype = 'xml'