diff --git a/doc/v3/api_samples/os-access-ips/server-action-rebuild-resp.json b/doc/v3/api_samples/os-access-ips/server-action-rebuild-resp.json
new file mode 100644
index 000000000000..3d926167167f
--- /dev/null
+++ b/doc/v3/api_samples/os-access-ips/server-action-rebuild-resp.json
@@ -0,0 +1,57 @@
+{
+ "server": {
+ "addresses": {
+ "private": [
+ {
+ "addr": "192.168.0.3",
+ "mac_addr": "aa:bb:cc:dd:ee:ff",
+ "type": "fixed",
+ "version": 4
+ }
+ ]
+ },
+ "admin_password": "99WHAxN8gpvg",
+ "created": "2013-11-06T07:51:09Z",
+ "flavor": {
+ "id": "1",
+ "links": [
+ {
+ "href": "http://openstack.example.com/flavors/1",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "host_id": "5c8072dbcda8ce3f26deb6662bd7718e1a6d349bdf2296911d1be4ac",
+ "id": "53a63a19-c145-47f8-9ae5-b39d6bff33ec",
+ "image": {
+ "id": "70a599e0-31e7-49b7-b260-868f441e862b",
+ "links": [
+ {
+ "href": "http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/servers/53a63a19-c145-47f8-9ae5-b39d6bff33ec",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/servers/53a63a19-c145-47f8-9ae5-b39d6bff33ec",
+ "rel": "bookmark"
+ }
+ ],
+ "metadata": {
+ "meta_var": "meta_val"
+ },
+ "name": "new-server-test",
+ "os-access-ips:access_ip_v4": "4.3.2.1",
+ "os-access-ips:access_ip_v6": "80fe::",
+ "progress": 0,
+ "status": "ACTIVE",
+ "tenant_id": "openstack",
+ "updated": "2013-11-06T07:51:11Z",
+ "user_id": "fake"
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-access-ips/server-action-rebuild-resp.xml b/doc/v3/api_samples/os-access-ips/server-action-rebuild-resp.xml
new file mode 100644
index 000000000000..b4252dcd1ad4
--- /dev/null
+++ b/doc/v3/api_samples/os-access-ips/server-action-rebuild-resp.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+ meta_val
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-access-ips/server-action-rebuild.json b/doc/v3/api_samples/os-access-ips/server-action-rebuild.json
new file mode 100644
index 000000000000..678bd647bae4
--- /dev/null
+++ b/doc/v3/api_samples/os-access-ips/server-action-rebuild.json
@@ -0,0 +1,17 @@
+{
+ "rebuild" : {
+ "os-access-ips:access_ip_v4": "4.3.2.1",
+ "os-access-ips:access_ip_v6": "80fe::",
+ "image_ref" : "http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b",
+ "name" : "new-server-test",
+ "metadata" : {
+ "meta_var" : "meta_val"
+ },
+ "personality" : [
+ {
+ "path" : "/etc/banner.txt",
+ "contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6 b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-access-ips/server-action-rebuild.xml b/doc/v3/api_samples/os-access-ips/server-action-rebuild.xml
new file mode 100644
index 000000000000..1d3635ba469c
--- /dev/null
+++ b/doc/v3/api_samples/os-access-ips/server-action-rebuild.xml
@@ -0,0 +1,24 @@
+
+
+
+ meta_val
+
+
+
+ ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
+ dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k
+ IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
+ c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g
+ QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
+ ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv
+ dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
+ c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6
+ b25zLiINCg0KLVJpY2hhcmQgQmFjaA==
+
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-access-ips/server-get-resp.json b/doc/v3/api_samples/os-access-ips/server-get-resp.json
new file mode 100644
index 000000000000..5810f469ad98
--- /dev/null
+++ b/doc/v3/api_samples/os-access-ips/server-get-resp.json
@@ -0,0 +1,57 @@
+{
+ "server": {
+ "addresses": {
+ "private": [
+ {
+ "addr": "192.168.0.3",
+ "mac_addr": "aa:bb:cc:dd:ee:ff",
+ "type": "fixed",
+ "version": 4
+ }
+ ]
+ },
+ "created": "2013-09-11T03:23:12Z",
+ "flavor": {
+ "id": "1",
+ "links": [
+ {
+ "href": "http://openstack.example.com/flavors/1",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "host_id": "b3a6fd97c027e18d6d9c7506eea8a236cf2ceca420cfdfe0239a64a8",
+ "id": "5eedbf0c-c303-4ed3-933a-a4d3732cfa0a",
+ "image": {
+ "id": "70a599e0-31e7-49b7-b260-868f441e862b",
+ "links": [
+ {
+ "href": "http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/servers/5eedbf0c-c303-4ed3-933a-a4d3732cfa0a",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/servers/5eedbf0c-c303-4ed3-933a-a4d3732cfa0a",
+ "rel": "bookmark"
+ }
+ ],
+ "metadata": {
+ "My Server Name": "Apache1"
+ },
+ "name": "new-server-test",
+ "os-access-ips:access_ip_v4": "1.2.3.4",
+ "os-access-ips:access_ip_v6": "fe80::",
+ "progress": 0,
+ "status": "ACTIVE",
+ "tenant_id": "openstack",
+ "updated": "2013-09-11T03:23:13Z",
+ "user_id": "fake",
+ "key_name": null
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-access-ips/server-get-resp.xml b/doc/v3/api_samples/os-access-ips/server-get-resp.xml
new file mode 100644
index 000000000000..b921440b0f10
--- /dev/null
+++ b/doc/v3/api_samples/os-access-ips/server-get-resp.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+ Apache1
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-access-ips/server-post-req.json b/doc/v3/api_samples/os-access-ips/server-post-req.json
new file mode 100644
index 000000000000..b0f0e90e5395
--- /dev/null
+++ b/doc/v3/api_samples/os-access-ips/server-post-req.json
@@ -0,0 +1,18 @@
+{
+ "server" : {
+ "os-access-ips:access_ip_v4": "1.2.3.4",
+ "os-access-ips:access_ip_v6": "fe80::",
+ "name" : "new-server-test",
+ "image_ref" : "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
+ "flavor_ref" : "http://openstack.example.com/openstack/flavors/1",
+ "metadata" : {
+ "My Server Name" : "Apache1"
+ },
+ "personality" : [
+ {
+ "path" : "/etc/banner.txt",
+ "contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVsc2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4gQnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRoZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlvdSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vyc2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-access-ips/server-post-req.xml b/doc/v3/api_samples/os-access-ips/server-post-req.xml
new file mode 100644
index 000000000000..30c4691cc83d
--- /dev/null
+++ b/doc/v3/api_samples/os-access-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/os-access-ips/server-post-resp.json b/doc/v3/api_samples/os-access-ips/server-post-resp.json
new file mode 100644
index 000000000000..d3edc5eb41fe
--- /dev/null
+++ b/doc/v3/api_samples/os-access-ips/server-post-resp.json
@@ -0,0 +1,18 @@
+{
+ "server": {
+ "admin_password": "n7JGBda664QG",
+ "id": "934760e1-2b0b-4f9e-a916-eac1e69839dc",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/servers/934760e1-2b0b-4f9e-a916-eac1e69839dc",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/servers/934760e1-2b0b-4f9e-a916-eac1e69839dc",
+ "rel": "bookmark"
+ }
+ ],
+ "os-access-ips:access_ip_v4": "1.2.3.4",
+ "os-access-ips:access_ip_v6": "fe80::"
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-access-ips/server-post-resp.xml b/doc/v3/api_samples/os-access-ips/server-post-resp.xml
new file mode 100644
index 000000000000..76cbf1386471
--- /dev/null
+++ b/doc/v3/api_samples/os-access-ips/server-post-resp.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-access-ips/server-put-req.json b/doc/v3/api_samples/os-access-ips/server-put-req.json
new file mode 100644
index 000000000000..bb3e1ce91f63
--- /dev/null
+++ b/doc/v3/api_samples/os-access-ips/server-put-req.json
@@ -0,0 +1,6 @@
+{
+ "server": {
+ "os-access-ips:access_ip_v4": "4.3.2.1",
+ "os-access-ips:access_ip_v6": "80fe::"
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-access-ips/server-put-req.xml b/doc/v3/api_samples/os-access-ips/server-put-req.xml
new file mode 100644
index 000000000000..ea3ce328e125
--- /dev/null
+++ b/doc/v3/api_samples/os-access-ips/server-put-req.xml
@@ -0,0 +1,5 @@
+
+
+4.3.2.1
+80fe::
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-access-ips/server-put-resp.json b/doc/v3/api_samples/os-access-ips/server-put-resp.json
new file mode 100644
index 000000000000..620574c5c609
--- /dev/null
+++ b/doc/v3/api_samples/os-access-ips/server-put-resp.json
@@ -0,0 +1,56 @@
+{
+ "server": {
+ "addresses": {
+ "private": [
+ {
+ "addr": "192.168.0.3",
+ "mac_addr": "aa:bb:cc:dd:ee:ff",
+ "type": "fixed",
+ "version": 4
+ }
+ ]
+ },
+ "created": "2013-11-06T08:11:57Z",
+ "flavor": {
+ "id": "1",
+ "links": [
+ {
+ "href": "http://openstack.example.com/flavors/1",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "host_id": "ea0fd522e5bc2fea872429b331304a6f930f2d9aa2a5dc95b3c6061a",
+ "id": "fea9595c-ce6e-4565-987e-2d301fe056ac",
+ "image": {
+ "id": "70a599e0-31e7-49b7-b260-868f441e862b",
+ "links": [
+ {
+ "href": "http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/servers/fea9595c-ce6e-4565-987e-2d301fe056ac",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/servers/fea9595c-ce6e-4565-987e-2d301fe056ac",
+ "rel": "bookmark"
+ }
+ ],
+ "metadata": {
+ "My Server Name": "Apache1"
+ },
+ "name": "new-server-test",
+ "os-access-ips:access_ip_v4": "4.3.2.1",
+ "os-access-ips:access_ip_v6": "80fe::",
+ "progress": 0,
+ "status": "ACTIVE",
+ "tenant_id": "openstack",
+ "updated": "2013-11-06T08:11:58Z",
+ "user_id": "fake"
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-access-ips/server-put-resp.xml b/doc/v3/api_samples/os-access-ips/server-put-resp.xml
new file mode 100644
index 000000000000..ffaed7cee02b
--- /dev/null
+++ b/doc/v3/api_samples/os-access-ips/server-put-resp.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+ Apache1
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-access-ips/servers-details-resp.json b/doc/v3/api_samples/os-access-ips/servers-details-resp.json
new file mode 100644
index 000000000000..c757662332b5
--- /dev/null
+++ b/doc/v3/api_samples/os-access-ips/servers-details-resp.json
@@ -0,0 +1,59 @@
+{
+ "servers": [
+ {
+ "addresses": {
+ "private": [
+ {
+ "addr": "192.168.0.3",
+ "mac_addr": "aa:bb:cc:dd:ee:ff",
+ "type": "fixed",
+ "version": 4
+ }
+ ]
+ },
+ "created": "2013-09-11T03:23:11Z",
+ "flavor": {
+ "id": "1",
+ "links": [
+ {
+ "href": "http://openstack.example.com/flavors/1",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "host_id": "9896cb12c9845becf1b9b06c8ff5b131d20300f83e2cdffc92e3f4a4",
+ "id": "934760e1-2b0b-4f9e-a916-eac1e69839dc",
+ "image": {
+ "id": "70a599e0-31e7-49b7-b260-868f441e862b",
+ "links": [
+ {
+ "href": "http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/servers/934760e1-2b0b-4f9e-a916-eac1e69839dc",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/servers/934760e1-2b0b-4f9e-a916-eac1e69839dc",
+ "rel": "bookmark"
+ }
+ ],
+ "metadata": {
+ "My Server Name": "Apache1"
+ },
+ "name": "new-server-test",
+ "os-access-ips:access_ip_v4": "1.2.3.4",
+ "os-access-ips:access_ip_v6": "fe80::",
+ "progress": 0,
+ "status": "ACTIVE",
+ "tenant_id": "openstack",
+ "updated": "2013-09-11T03:23:12Z",
+ "user_id": "fake",
+ "key_name": null
+ }
+ ]
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-access-ips/servers-details-resp.xml b/doc/v3/api_samples/os-access-ips/servers-details-resp.xml
new file mode 100644
index 000000000000..58ccf3ac407b
--- /dev/null
+++ b/doc/v3/api_samples/os-access-ips/servers-details-resp.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+ Apache1
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/nova/tests/integrated/v3/api_samples/os-access-ips/server-action-rebuild-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-access-ips/server-action-rebuild-resp.json.tpl
new file mode 100644
index 000000000000..289f031adab8
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-access-ips/server-action-rebuild-resp.json.tpl
@@ -0,0 +1,57 @@
+{
+ "server": {
+ "addresses": {
+ "private": [
+ {
+ "addr": "%(ip)s",
+ "version": 4,
+ "mac_addr": "aa:bb:cc:dd:ee:ff",
+ "type": "fixed"
+ }
+ ]
+ },
+ "admin_password": "%(password)s",
+ "created": "%(timestamp)s",
+ "flavor": {
+ "id": "1",
+ "links": [
+ {
+ "href": "%(host)s/flavors/1",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "host_id": "%(hostid)s",
+ "id": "%(uuid)s",
+ "image": {
+ "id": "%(image_id)s",
+ "links": [
+ {
+ "href": "%(glance_host)s/images/%(image_id)s",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "links": [
+ {
+ "href": "%(host)s/v3/servers/%(uuid)s",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/servers/%(uuid)s",
+ "rel": "bookmark"
+ }
+ ],
+ "metadata": {
+ "meta_var": "meta_val"
+ },
+ "name": "new-server-test",
+ "progress": 0,
+ "status": "ACTIVE",
+ "tenant_id": "openstack",
+ "updated": "%(timestamp)s",
+ "user_id": "fake",
+ "os-access-ips:access_ip_v4": "%(access_ip_v4)s",
+ "os-access-ips:access_ip_v6": "%(access_ip_v6)s"
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-access-ips/server-action-rebuild-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-access-ips/server-action-rebuild-resp.xml.tpl
new file mode 100644
index 000000000000..eb220ac8f067
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-access-ips/server-action-rebuild-resp.xml.tpl
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+ meta_val
+
+
+
+
+
+
+
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-access-ips/server-action-rebuild.json.tpl b/nova/tests/integrated/v3/api_samples/os-access-ips/server-action-rebuild.json.tpl
new file mode 100644
index 000000000000..544edbf3fbef
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-access-ips/server-action-rebuild.json.tpl
@@ -0,0 +1,17 @@
+{
+ "rebuild" : {
+ "os-access-ips:access_ip_v4": "%(access_ip_v4)s",
+ "os-access-ips:access_ip_v6": "%(access_ip_v6)s",
+ "image_ref" : "%(glance_host)s/images/%(image_id)s",
+ "name" : "new-server-test",
+ "metadata" : {
+ "meta_var" : "meta_val"
+ },
+ "personality" : [
+ {
+ "path" : "/etc/banner.txt",
+ "contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6 b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
+ }
+ ]
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-access-ips/server-action-rebuild.xml.tpl b/nova/tests/integrated/v3/api_samples/os-access-ips/server-action-rebuild.xml.tpl
new file mode 100644
index 000000000000..161146c32ada
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-access-ips/server-action-rebuild.xml.tpl
@@ -0,0 +1,24 @@
+
+
+
+ meta_val
+
+
+
+ ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
+ dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k
+ IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
+ c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g
+ QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
+ ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv
+ dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
+ c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6
+ b25zLiINCg0KLVJpY2hhcmQgQmFjaA==
+
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-access-ips/server-get-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-access-ips/server-get-resp.json.tpl
new file mode 100644
index 000000000000..48d6991f1489
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-access-ips/server-get-resp.json.tpl
@@ -0,0 +1,57 @@
+{
+ "server": {
+ "os-access-ips:access_ip_v4": "%(access_ip_v4)s",
+ "os-access-ips:access_ip_v6": "%(access_ip_v6)s",
+ "addresses": {
+ "private": [
+ {
+ "addr": "%(ip)s",
+ "mac_addr": "aa:bb:cc:dd:ee:ff",
+ "type": "fixed",
+ "version": 4
+ }
+ ]
+ },
+ "created": "%(timestamp)s",
+ "flavor": {
+ "id": "1",
+ "links": [
+ {
+ "href": "%(host)s/flavors/1",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "host_id": "%(hostid)s",
+ "id": "%(id)s",
+ "image": {
+ "id": "%(uuid)s",
+ "links": [
+ {
+ "href": "%(glance_host)s/images/%(uuid)s",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "links": [
+ {
+ "href": "%(host)s/v3/servers/%(uuid)s",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/servers/%(uuid)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",
+ "key_name": null
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-access-ips/server-get-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-access-ips/server-get-resp.xml.tpl
new file mode 100644
index 000000000000..bad42f14f4d0
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-access-ips/server-get-resp.xml.tpl
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+ Apache1
+
+
+
+
+
+
+
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-access-ips/server-post-req.json.tpl b/nova/tests/integrated/v3/api_samples/os-access-ips/server-post-req.json.tpl
new file mode 100644
index 000000000000..d1f9852611fb
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-access-ips/server-post-req.json.tpl
@@ -0,0 +1,18 @@
+{
+ "server" : {
+ "os-access-ips:access_ip_v4": "%(access_ip_v4)s",
+ "os-access-ips:access_ip_v6": "%(access_ip_v6)s",
+ "name" : "new-server-test",
+ "image_ref" : "%(host)s/openstack/images/%(image_id)s",
+ "flavor_ref" : "%(host)s/openstack/flavors/1",
+ "metadata" : {
+ "My Server Name" : "Apache1"
+ },
+ "personality" : [
+ {
+ "path" : "/etc/banner.txt",
+ "contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVsc2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4gQnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRoZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlvdSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vyc2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
+ }
+ ]
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-access-ips/server-post-req.xml.tpl b/nova/tests/integrated/v3/api_samples/os-access-ips/server-post-req.xml.tpl
new file mode 100644
index 000000000000..f8dd3b88c9a0
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-access-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/os-access-ips/server-post-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-access-ips/server-post-resp.json.tpl
new file mode 100644
index 000000000000..835bf9a813ff
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-access-ips/server-post-resp.json.tpl
@@ -0,0 +1,18 @@
+{
+ "server": {
+ "os-access-ips:access_ip_v4": "%(access_ip_v4)s",
+ "os-access-ips:access_ip_v6": "%(access_ip_v6)s",
+ "admin_password": "%(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/os-access-ips/server-post-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-access-ips/server-post-resp.xml.tpl
new file mode 100644
index 000000000000..ec9976182cd9
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-access-ips/server-post-resp.xml.tpl
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-access-ips/server-put-req.json.tpl b/nova/tests/integrated/v3/api_samples/os-access-ips/server-put-req.json.tpl
new file mode 100644
index 000000000000..8a24a79dfafa
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-access-ips/server-put-req.json.tpl
@@ -0,0 +1,6 @@
+{
+ "server": {
+ "os-access-ips:access_ip_v4": "%(access_ip_v4)s",
+ "os-access-ips:access_ip_v6": "%(access_ip_v6)s"
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-access-ips/server-put-req.xml.tpl b/nova/tests/integrated/v3/api_samples/os-access-ips/server-put-req.xml.tpl
new file mode 100644
index 000000000000..cdc5fc6a3458
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-access-ips/server-put-req.xml.tpl
@@ -0,0 +1,5 @@
+
+
+ %(access_ip_v4)s
+ %(access_ip_v6)s
+
\ No newline at end of file
diff --git a/nova/tests/integrated/v3/api_samples/os-access-ips/server-put-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-access-ips/server-put-resp.json.tpl
new file mode 100644
index 000000000000..5f20a4270f67
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-access-ips/server-put-resp.json.tpl
@@ -0,0 +1,56 @@
+{
+ "server": {
+ "os-access-ips:access_ip_v4": "%(access_ip_v4)s",
+ "os-access-ips:access_ip_v6": "%(access_ip_v6)s",
+ "addresses": {
+ "private": [
+ {
+ "addr": "%(ip)s",
+ "mac_addr": "aa:bb:cc:dd:ee:ff",
+ "type": "fixed",
+ "version": 4
+ }
+ ]
+ },
+ "created": "%(timestamp)s",
+ "flavor": {
+ "id": "1",
+ "links": [
+ {
+ "href": "%(host)s/flavors/1",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "host_id": "%(hostid)s",
+ "id": "%(id)s",
+ "image": {
+ "id": "%(uuid)s",
+ "links": [
+ {
+ "href": "%(glance_host)s/images/%(uuid)s",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "links": [
+ {
+ "href": "%(host)s/v3/servers/%(uuid)s",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/servers/%(uuid)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/v3/api_samples/os-access-ips/server-put-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-access-ips/server-put-resp.xml.tpl
new file mode 100644
index 000000000000..f2eddb8238ba
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-access-ips/server-put-resp.xml.tpl
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+ Apache1
+
+
+
+
+
+
+
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-access-ips/servers-details-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-access-ips/servers-details-resp.json.tpl
new file mode 100644
index 000000000000..1ae3d9464915
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-access-ips/servers-details-resp.json.tpl
@@ -0,0 +1,59 @@
+{
+ "servers": [
+ {
+ "os-access-ips:access_ip_v4": "%(access_ip_v4)s",
+ "os-access-ips:access_ip_v6": "%(access_ip_v6)s",
+ "addresses": {
+ "private": [
+ {
+ "addr": "%(ip)s",
+ "mac_addr": "aa:bb:cc:dd:ee:ff",
+ "type": "fixed",
+ "version": 4
+ }
+ ]
+ },
+ "created": "%(timestamp)s",
+ "flavor": {
+ "id": "1",
+ "links": [
+ {
+ "href": "%(host)s/flavors/1",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "host_id": "%(hostid)s",
+ "id": "%(id)s",
+ "image": {
+ "id": "%(uuid)s",
+ "links": [
+ {
+ "href": "%(glance_host)s/images/%(uuid)s",
+ "rel": "bookmark"
+ }
+ ]
+ },
+ "links": [
+ {
+ "href": "%(host)s/v3/servers/%(uuid)s",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/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",
+ "key_name": null
+ }
+ ]
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-access-ips/servers-details-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-access-ips/servers-details-resp.xml.tpl
new file mode 100644
index 000000000000..f0dd81fc8787
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-access-ips/servers-details-resp.xml.tpl
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+ Apache1
+
+
+
+
+
+
+
+
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-access-ips/servers-list-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-access-ips/servers-list-resp.json.tpl
new file mode 100644
index 000000000000..8797266b68f9
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-access-ips/servers-list-resp.json.tpl
@@ -0,0 +1,18 @@
+{
+ "servers": [
+ {
+ "id": "%(id)s",
+ "links": [
+ {
+ "href": "%(host)s/v3/servers/%(id)s",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/servers/%(id)s",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "new-server-test"
+ }
+ ]
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-access-ips/servers-list-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-access-ips/servers-list-resp.xml.tpl
new file mode 100644
index 000000000000..421eb28d5321
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-access-ips/servers-list-resp.xml.tpl
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/nova/tests/integrated/v3/test_access_ips.py b/nova/tests/integrated/v3/test_access_ips.py
new file mode 100644
index 000000000000..f909a08c0da8
--- /dev/null
+++ b/nova/tests/integrated/v3/test_access_ips.py
@@ -0,0 +1,98 @@
+# 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.image import fake
+from nova.tests.integrated.v3 import api_sample_base
+
+
+class AccessIPsSampleJsonTest(api_sample_base.ApiSampleTestBaseV3):
+ extension_name = 'os-access-ips'
+
+ def _servers_post(self, subs):
+ response = self._do_post('servers', 'server-post-req', subs)
+ subs.update(self._get_regexes())
+ return self._verify_response('server-post-resp', subs, response, 202)
+
+ def test_servers_post(self):
+ subs = {
+ 'image_id': fake.get_valid_image_id(),
+ 'host': self._get_host(),
+ 'access_ip_v4': '1.2.3.4',
+ 'access_ip_v6': 'fe80::'
+ }
+ self._servers_post(subs)
+
+ def test_servers_get(self):
+ subs = {
+ 'image_id': fake.get_valid_image_id(),
+ 'host': self._get_host(),
+ 'access_ip_v4': '1.2.3.4',
+ 'access_ip_v6': 'fe80::'
+ }
+ uuid = self._servers_post(subs)
+ response = self._do_get('servers/%s' % uuid)
+ subs['hostid'] = '[a-f0-9]+'
+ subs['id'] = uuid
+ self._verify_response('server-get-resp', subs, response, 200)
+
+ def test_servers_details(self):
+ subs = {
+ 'image_id': fake.get_valid_image_id(),
+ 'host': self._get_host(),
+ 'access_ip_v4': '1.2.3.4',
+ 'access_ip_v6': 'fe80::'
+ }
+ uuid = self._servers_post(subs)
+ response = self._do_get('servers/detail')
+ subs['hostid'] = '[a-f0-9]+'
+ subs['id'] = uuid
+ self._verify_response('servers-details-resp', subs, response, 200)
+
+ def test_servers_rebuild(self):
+ subs = {
+ 'image_id': fake.get_valid_image_id(),
+ 'host': self._get_host(),
+ 'access_ip_v4': '1.2.3.4',
+ 'access_ip_v6': 'fe80::'
+ }
+ uuid = self._servers_post(subs)
+ subs['access_ip_v4'] = "4.3.2.1"
+ subs['access_ip_v6'] = '80fe::'
+ response = self._do_post('servers/%s/action' % uuid,
+ 'server-action-rebuild', subs)
+ subs['hostid'] = '[a-f0-9]+'
+ subs['id'] = uuid
+ self._verify_response('server-action-rebuild-resp',
+ subs, response, 202)
+
+ def test_servers_update(self):
+ subs = {
+ 'image_id': fake.get_valid_image_id(),
+ 'host': self._get_host(),
+ 'access_ip_v4': '1.2.3.4',
+ 'access_ip_v6': 'fe80::'
+ }
+ uuid = self._servers_post(subs)
+ subs['access_ip_v4'] = "4.3.2.1"
+ subs['access_ip_v6'] = '80fe::'
+ response = self._do_put('servers/%s' % uuid, 'server-put-req', subs)
+ subs['hostid'] = '[a-f0-9]+'
+ subs['id'] = uuid
+ self._verify_response('server-put-resp', subs, response, 200)
+
+
+class AccessIPsSampleXmlTest(AccessIPsSampleJsonTest):
+ ctype = 'xml'