diff --git a/doc/v3/api_samples/flavors/flavor-get-resp.json b/doc/v3/api_samples/flavors/flavor-get-resp.json
new file mode 100644
index 000000000000..b3d12c974d40
--- /dev/null
+++ b/doc/v3/api_samples/flavors/flavor-get-resp.json
@@ -0,0 +1,22 @@
+{
+ "flavor": {
+ "disabled": false,
+ "disk": 1,
+ "ephemeral": "",
+ "id": "1",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/1",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/1",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.tiny",
+ "ram": 512,
+ "swap": "",
+ "vcpus": 1
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/flavors/flavor-get-resp.xml b/doc/v3/api_samples/flavors/flavor-get-resp.xml
new file mode 100644
index 000000000000..76ddabef74e9
--- /dev/null
+++ b/doc/v3/api_samples/flavors/flavor-get-resp.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/flavors/flavors-detail-resp.json b/doc/v3/api_samples/flavors/flavors-detail-resp.json
new file mode 100644
index 000000000000..ced3ec078977
--- /dev/null
+++ b/doc/v3/api_samples/flavors/flavors-detail-resp.json
@@ -0,0 +1,104 @@
+{
+ "flavors": [
+ {
+ "disabled": false,
+ "disk": 1,
+ "ephemeral": "",
+ "id": "1",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/1",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/1",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.tiny",
+ "ram": 512,
+ "swap": "",
+ "vcpus": 1
+ },
+ {
+ "disabled": false,
+ "disk": 20,
+ "ephemeral": "",
+ "id": "2",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/2",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/2",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.small",
+ "ram": 2048,
+ "swap": "",
+ "vcpus": 1
+ },
+ {
+ "disabled": false,
+ "disk": 40,
+ "ephemeral": "",
+ "id": "3",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/3",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/3",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.medium",
+ "ram": 4096,
+ "swap": "",
+ "vcpus": 2
+ },
+ {
+ "disabled": false,
+ "disk": 80,
+ "ephemeral": "",
+ "id": "4",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/4",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/4",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.large",
+ "ram": 8192,
+ "swap": "",
+ "vcpus": 4
+ },
+ {
+ "disabled": false,
+ "disk": 160,
+ "ephemeral": "",
+ "id": "5",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/5",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/5",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.xlarge",
+ "ram": 16384,
+ "swap": "",
+ "vcpus": 8
+ }
+ ]
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/flavors/flavors-detail-resp.xml b/doc/v3/api_samples/flavors/flavors-detail-resp.xml
new file mode 100644
index 000000000000..c27d906fb5b4
--- /dev/null
+++ b/doc/v3/api_samples/flavors/flavors-detail-resp.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/flavors/flavors-list-resp.json b/doc/v3/api_samples/flavors/flavors-list-resp.json
new file mode 100644
index 000000000000..2a3f26b0193e
--- /dev/null
+++ b/doc/v3/api_samples/flavors/flavors-list-resp.json
@@ -0,0 +1,74 @@
+{
+ "flavors": [
+ {
+ "id": "1",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/1",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/1",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.tiny"
+ },
+ {
+ "id": "2",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/2",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/2",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.small"
+ },
+ {
+ "id": "3",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/3",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/3",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.medium"
+ },
+ {
+ "id": "4",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/4",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/4",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.large"
+ },
+ {
+ "id": "5",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/5",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/5",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.xlarge"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/flavors/flavors-list-resp.xml b/doc/v3/api_samples/flavors/flavors-list-resp.xml
new file mode 100644
index 000000000000..a05d55806f82
--- /dev/null
+++ b/doc/v3/api_samples/flavors/flavors-list-resp.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-access/flavor-access-add-tenant-req.json b/doc/v3/api_samples/os-flavor-access/flavor-access-add-tenant-req.json
new file mode 100644
index 000000000000..12aa4032c0f9
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-access/flavor-access-add-tenant-req.json
@@ -0,0 +1,5 @@
+{
+ "add_tenant_access": {
+ "tenant_id": "fake_tenant"
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-access/flavor-access-add-tenant-req.xml b/doc/v3/api_samples/os-flavor-access/flavor-access-add-tenant-req.xml
new file mode 100644
index 000000000000..e335f869d107
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-access/flavor-access-add-tenant-req.xml
@@ -0,0 +1,4 @@
+
+
+ fake_tenant
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-access/flavor-access-add-tenant-resp.json b/doc/v3/api_samples/os-flavor-access/flavor-access-add-tenant-resp.json
new file mode 100644
index 000000000000..b6c1bc77df37
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-access/flavor-access-add-tenant-resp.json
@@ -0,0 +1,8 @@
+{
+ "flavor_access": [
+ {
+ "flavor_id": "10",
+ "tenant_id": "fake_tenant"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-access/flavor-access-add-tenant-resp.xml b/doc/v3/api_samples/os-flavor-access/flavor-access-add-tenant-resp.xml
new file mode 100644
index 000000000000..1e55ad2f958c
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-access/flavor-access-add-tenant-resp.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-access/flavor-access-create-req.json b/doc/v3/api_samples/os-flavor-access/flavor-access-create-req.json
new file mode 100644
index 000000000000..77c51d7e43bc
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-access/flavor-access-create-req.json
@@ -0,0 +1,10 @@
+{
+ "flavor": {
+ "name": "test_flavor",
+ "ram": 1024,
+ "vcpus": 2,
+ "disk": 10,
+ "id": "10",
+ "os-flavor-access:is_public": false
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-access/flavor-access-create-req.xml b/doc/v3/api_samples/os-flavor-access/flavor-access-create-req.xml
new file mode 100644
index 000000000000..e463b902ce7e
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-access/flavor-access-create-req.xml
@@ -0,0 +1,10 @@
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-access/flavor-access-create-resp.json b/doc/v3/api_samples/os-flavor-access/flavor-access-create-resp.json
new file mode 100644
index 000000000000..e53389f93382
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-access/flavor-access-create-resp.json
@@ -0,0 +1,23 @@
+{
+ "flavor": {
+ "disabled": false,
+ "disk": 10,
+ "ephemeral": "",
+ "id": "10",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/10",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/10",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "test_flavor",
+ "os-flavor-access:is_public": false,
+ "ram": 1024,
+ "swap": "",
+ "vcpus": 2
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-access/flavor-access-create-resp.xml b/doc/v3/api_samples/os-flavor-access/flavor-access-create-resp.xml
new file mode 100644
index 000000000000..9ec27997aae1
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-access/flavor-access-create-resp.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-access/flavor-access-detail-resp.json b/doc/v3/api_samples/os-flavor-access/flavor-access-detail-resp.json
new file mode 100644
index 000000000000..f1b0caa2fd73
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-access/flavor-access-detail-resp.json
@@ -0,0 +1,109 @@
+{
+ "flavors": [
+ {
+ "disabled": false,
+ "disk": 1,
+ "ephemeral": "",
+ "id": "1",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/1",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/1",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.tiny",
+ "os-flavor-access:is_public": true,
+ "ram": 512,
+ "swap": "",
+ "vcpus": 1
+ },
+ {
+ "disabled": false,
+ "disk": 20,
+ "ephemeral": "",
+ "id": "2",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/2",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/2",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.small",
+ "os-flavor-access:is_public": true,
+ "ram": 2048,
+ "swap": "",
+ "vcpus": 1
+ },
+ {
+ "disabled": false,
+ "disk": 40,
+ "ephemeral": "",
+ "id": "3",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/3",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/3",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.medium",
+ "os-flavor-access:is_public": true,
+ "ram": 4096,
+ "swap": "",
+ "vcpus": 2
+ },
+ {
+ "disabled": false,
+ "disk": 80,
+ "ephemeral": "",
+ "id": "4",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/4",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/4",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.large",
+ "os-flavor-access:is_public": true,
+ "ram": 8192,
+ "swap": "",
+ "vcpus": 4
+ },
+ {
+ "disabled": false,
+ "disk": 160,
+ "ephemeral": "",
+ "id": "5",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/5",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/5",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.xlarge",
+ "os-flavor-access:is_public": true,
+ "ram": 16384,
+ "swap": "",
+ "vcpus": 8
+ }
+ ]
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-access/flavor-access-detail-resp.xml b/doc/v3/api_samples/os-flavor-access/flavor-access-detail-resp.xml
new file mode 100644
index 000000000000..110e6d347e33
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-access/flavor-access-detail-resp.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-access/flavor-access-list-resp.json b/doc/v3/api_samples/os-flavor-access/flavor-access-list-resp.json
new file mode 100644
index 000000000000..b6c1bc77df37
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-access/flavor-access-list-resp.json
@@ -0,0 +1,8 @@
+{
+ "flavor_access": [
+ {
+ "flavor_id": "10",
+ "tenant_id": "fake_tenant"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-access/flavor-access-list-resp.xml b/doc/v3/api_samples/os-flavor-access/flavor-access-list-resp.xml
new file mode 100644
index 000000000000..1e55ad2f958c
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-access/flavor-access-list-resp.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-req.json b/doc/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-req.json
new file mode 100644
index 000000000000..32fecc88e542
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-req.json
@@ -0,0 +1,5 @@
+{
+ "remove_tenant_access": {
+ "tenant_id": "fake_tenant"
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-req.xml b/doc/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-req.xml
new file mode 100644
index 000000000000..8dbd83e6648b
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-req.xml
@@ -0,0 +1,4 @@
+
+
+ fake_tenant
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-resp.json b/doc/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-resp.json
new file mode 100644
index 000000000000..5cab03334d89
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-resp.json
@@ -0,0 +1,3 @@
+{
+ "flavor_access": []
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-resp.xml b/doc/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-resp.xml
new file mode 100644
index 000000000000..862e02872492
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-resp.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-access/flavor-access-show-resp.json b/doc/v3/api_samples/os-flavor-access/flavor-access-show-resp.json
new file mode 100644
index 000000000000..3fb35aad8c5b
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-access/flavor-access-show-resp.json
@@ -0,0 +1,23 @@
+{
+ "flavor": {
+ "disabled": false,
+ "disk": 1,
+ "ephemeral": "",
+ "id": "1",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/1",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/1",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.tiny",
+ "os-flavor-access:is_public": true,
+ "ram": 512,
+ "swap": "",
+ "vcpus": 1
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-access/flavor-access-show-resp.xml b/doc/v3/api_samples/os-flavor-access/flavor-access-show-resp.xml
new file mode 100644
index 000000000000..74d96b725f99
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-access/flavor-access-show-resp.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-get-resp.json b/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-get-resp.json
new file mode 100644
index 000000000000..589bca049b83
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-get-resp.json
@@ -0,0 +1,23 @@
+{
+ "flavor": {
+ "disabled": false,
+ "disk": 1,
+ "ephemeral": "",
+ "id": "1",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/1",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/1",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.tiny",
+ "ram": 512,
+ "rxtx_factor": 1.0,
+ "swap": "",
+ "vcpus": 1
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-get-resp.xml b/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-get-resp.xml
new file mode 100644
index 000000000000..ce276ef9fbb6
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-get-resp.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-list-resp.json b/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-list-resp.json
new file mode 100644
index 000000000000..1865c8e77b27
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-list-resp.json
@@ -0,0 +1,109 @@
+{
+ "flavors": [
+ {
+ "disabled": false,
+ "disk": 1,
+ "ephemeral": "",
+ "id": "1",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/1",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/1",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.tiny",
+ "ram": 512,
+ "rxtx_factor": 1.0,
+ "swap": "",
+ "vcpus": 1
+ },
+ {
+ "disabled": false,
+ "disk": 20,
+ "ephemeral": "",
+ "id": "2",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/2",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/2",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.small",
+ "ram": 2048,
+ "rxtx_factor": 1.0,
+ "swap": "",
+ "vcpus": 1
+ },
+ {
+ "disabled": false,
+ "disk": 40,
+ "ephemeral": "",
+ "id": "3",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/3",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/3",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.medium",
+ "ram": 4096,
+ "rxtx_factor": 1.0,
+ "swap": "",
+ "vcpus": 2
+ },
+ {
+ "disabled": false,
+ "disk": 80,
+ "ephemeral": "",
+ "id": "4",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/4",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/4",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.large",
+ "ram": 8192,
+ "rxtx_factor": 1.0,
+ "swap": "",
+ "vcpus": 4
+ },
+ {
+ "disabled": false,
+ "disk": 160,
+ "ephemeral": "",
+ "id": "5",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/5",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/5",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.xlarge",
+ "ram": 16384,
+ "rxtx_factor": 1.0,
+ "swap": "",
+ "vcpus": 8
+ }
+ ]
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-list-resp.xml b/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-list-resp.xml
new file mode 100644
index 000000000000..74b66eaae2e4
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-list-resp.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-req.json b/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-req.json
new file mode 100644
index 000000000000..b86a63df694a
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-req.json
@@ -0,0 +1,10 @@
+{
+ "flavor": {
+ "name": "flavortest",
+ "ram": 1024,
+ "vcpus": 2,
+ "disk": 10,
+ "id": "100",
+ "rxtx_factor": 2.0
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-req.xml b/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-req.xml
new file mode 100644
index 000000000000..3e4e03b6c1bd
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-req.xml
@@ -0,0 +1,8 @@
+
+
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-resp.json b/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-resp.json
new file mode 100644
index 000000000000..ee9c70b33aab
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-resp.json
@@ -0,0 +1,23 @@
+{
+ "flavor": {
+ "disabled": false,
+ "disk": 10,
+ "ephemeral": "",
+ "id": "100",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/100",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/100",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "flavortest",
+ "ram": 1024,
+ "rxtx_factor": 2.0,
+ "swap": "",
+ "vcpus": 2
+ }
+}
\ No newline at end of file
diff --git a/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-resp.xml b/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-resp.xml
new file mode 100644
index 000000000000..4e5bbe0408cc
--- /dev/null
+++ b/doc/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-resp.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/nova/tests/integrated/v3/api_samples/flavors/flavor-get-resp.json.tpl b/nova/tests/integrated/v3/api_samples/flavors/flavor-get-resp.json.tpl
new file mode 100644
index 000000000000..73657dbb29e3
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/flavors/flavor-get-resp.json.tpl
@@ -0,0 +1,22 @@
+{
+ "flavor": {
+ "disk": 1,
+ "id": "1",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/1",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/1",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.tiny",
+ "ram": 512,
+ "vcpus": 1,
+ "disabled": false,
+ "ephemeral": "",
+ "swap": ""
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/flavors/flavor-get-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/flavors/flavor-get-resp.xml.tpl
new file mode 100644
index 000000000000..aab6ecf14fe5
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/flavors/flavor-get-resp.xml.tpl
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/nova/tests/integrated/v3/api_samples/flavors/flavors-detail-resp.json.tpl b/nova/tests/integrated/v3/api_samples/flavors/flavors-detail-resp.json.tpl
new file mode 100644
index 000000000000..b523b517d47e
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/flavors/flavors-detail-resp.json.tpl
@@ -0,0 +1,104 @@
+{
+ "flavors": [
+ {
+ "disabled": false,
+ "disk": 1,
+ "ephemeral": "",
+ "id": "1",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/1",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/1",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.tiny",
+ "ram": 512,
+ "swap": "",
+ "vcpus": 1
+ },
+ {
+ "disabled": false,
+ "disk": 20,
+ "ephemeral": "",
+ "id": "2",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/2",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/2",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.small",
+ "ram": 2048,
+ "swap": "",
+ "vcpus": 1
+ },
+ {
+ "disabled": false,
+ "disk": 40,
+ "ephemeral": "",
+ "id": "3",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/3",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/3",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.medium",
+ "ram": 4096,
+ "swap": "",
+ "vcpus": 2
+ },
+ {
+ "disabled": false,
+ "disk": 80,
+ "ephemeral": "",
+ "id": "4",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/4",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/4",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.large",
+ "ram": 8192,
+ "swap": "",
+ "vcpus": 4
+ },
+ {
+ "disabled": false,
+ "disk": 160,
+ "ephemeral": "",
+ "id": "5",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/5",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/5",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.xlarge",
+ "ram": 16384,
+ "swap": "",
+ "vcpus": 8
+ }
+ ]
+}
diff --git a/nova/tests/integrated/v3/api_samples/flavors/flavors-detail-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/flavors/flavors-detail-resp.xml.tpl
new file mode 100644
index 000000000000..a25ff9944441
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/flavors/flavors-detail-resp.xml.tpl
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/nova/tests/integrated/v3/api_samples/flavors/flavors-list-resp.json.tpl b/nova/tests/integrated/v3/api_samples/flavors/flavors-list-resp.json.tpl
new file mode 100644
index 000000000000..fed996690921
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/flavors/flavors-list-resp.json.tpl
@@ -0,0 +1,74 @@
+{
+ "flavors": [
+ {
+ "id": "1",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/1",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/1",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.tiny"
+ },
+ {
+ "id": "2",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/2",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/2",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.small"
+ },
+ {
+ "id": "3",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/3",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/3",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.medium"
+ },
+ {
+ "id": "4",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/4",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/4",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.large"
+ },
+ {
+ "id": "5",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/5",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/5",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.xlarge"
+ }
+ ]
+}
diff --git a/nova/tests/integrated/v3/api_samples/flavors/flavors-list-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/flavors/flavors-list-resp.xml.tpl
new file mode 100644
index 000000000000..a05d55806f82
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/flavors/flavors-list-resp.xml.tpl
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-add-tenant-req.json.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-add-tenant-req.json.tpl
new file mode 100644
index 000000000000..411d2e3ce956
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-add-tenant-req.json.tpl
@@ -0,0 +1,5 @@
+{
+ "add_tenant_access": {
+ "tenant_id": "%(tenant_id)s"
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-add-tenant-req.xml.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-add-tenant-req.xml.tpl
new file mode 100644
index 000000000000..602428530879
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-add-tenant-req.xml.tpl
@@ -0,0 +1,4 @@
+
+
+ %(tenant_id)s
+
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-add-tenant-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-add-tenant-resp.json.tpl
new file mode 100644
index 000000000000..d797155795e5
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-add-tenant-resp.json.tpl
@@ -0,0 +1,8 @@
+{
+ "flavor_access": [
+ {
+ "flavor_id": "%(flavor_id)s",
+ "tenant_id": "%(tenant_id)s"
+ }
+ ]
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-add-tenant-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-add-tenant-resp.xml.tpl
new file mode 100644
index 000000000000..2223052aaefd
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-add-tenant-resp.xml.tpl
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-create-req.json.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-create-req.json.tpl
new file mode 100644
index 000000000000..02ac4e695df7
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-create-req.json.tpl
@@ -0,0 +1,10 @@
+{
+ "flavor": {
+ "name": "%(flavor_name)s",
+ "ram": 1024,
+ "vcpus": 2,
+ "disk": 10,
+ "id": "%(flavor_id)s",
+ "os-flavor-access:is_public": false
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-create-req.xml.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-create-req.xml.tpl
new file mode 100644
index 000000000000..25bd8c3eb082
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-create-req.xml.tpl
@@ -0,0 +1,10 @@
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-create-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-create-resp.json.tpl
new file mode 100644
index 000000000000..16cdfc4cb662
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-create-resp.json.tpl
@@ -0,0 +1,23 @@
+{
+ "flavor": {
+ "disk": 10,
+ "id": "%(flavor_id)s",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/%(flavor_id)s",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/%(flavor_id)s",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "%(flavor_name)s",
+ "os-flavor-access:is_public": false,
+ "ram": 1024,
+ "vcpus": 2,
+ "disabled": false,
+ "ephemeral": "",
+ "swap": ""
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-create-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-create-resp.xml.tpl
new file mode 100644
index 000000000000..4405a19e3f13
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-create-resp.xml.tpl
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-detail-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-detail-resp.json.tpl
new file mode 100644
index 000000000000..88104204def5
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-detail-resp.json.tpl
@@ -0,0 +1,109 @@
+{
+ "flavors": [
+ {
+ "disabled": false,
+ "disk": 1,
+ "ephemeral": "",
+ "id": "1",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/1",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/1",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.tiny",
+ "os-flavor-access:is_public": true,
+ "ram": 512,
+ "swap": "",
+ "vcpus": 1
+ },
+ {
+ "disabled": false,
+ "disk": 20,
+ "ephemeral": "",
+ "id": "2",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/2",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/2",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.small",
+ "os-flavor-access:is_public": true,
+ "ram": 2048,
+ "swap": "",
+ "vcpus": 1
+ },
+ {
+ "disabled": false,
+ "disk": 40,
+ "ephemeral": "",
+ "id": "3",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/3",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/3",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.medium",
+ "os-flavor-access:is_public": true,
+ "ram": 4096,
+ "swap": "",
+ "vcpus": 2
+ },
+ {
+ "disabled": false,
+ "disk": 80,
+ "ephemeral": "",
+ "id": "4",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/4",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/4",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.large",
+ "os-flavor-access:is_public": true,
+ "ram": 8192,
+ "swap": "",
+ "vcpus": 4
+ },
+ {
+ "disabled": false,
+ "disk": 160,
+ "ephemeral": "",
+ "id": "5",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/5",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/5",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.xlarge",
+ "os-flavor-access:is_public": true,
+ "ram": 16384,
+ "swap": "",
+ "vcpus": 8
+ }
+ ]
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-detail-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-detail-resp.xml.tpl
new file mode 100644
index 000000000000..098c7bd8ac84
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-detail-resp.xml.tpl
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-list-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-list-resp.json.tpl
new file mode 100644
index 000000000000..a6b6dbdcda07
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-list-resp.json.tpl
@@ -0,0 +1,8 @@
+{
+ "flavor_access": [
+ {
+ "flavor_id": "%(flavor_id)s",
+ "tenant_id": "fake_tenant"
+ }
+ ]
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-list-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-list-resp.xml.tpl
new file mode 100644
index 000000000000..2223052aaefd
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-list-resp.xml.tpl
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-req.json.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-req.json.tpl
new file mode 100644
index 000000000000..f81e0154a67c
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-req.json.tpl
@@ -0,0 +1,5 @@
+{
+ "remove_tenant_access": {
+ "tenant_id": "%(tenant_id)s"
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-req.xml.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-req.xml.tpl
new file mode 100644
index 000000000000..13fcbafe3d52
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-req.xml.tpl
@@ -0,0 +1,4 @@
+
+
+ %(tenant_id)s
+
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-resp.json.tpl
new file mode 100644
index 000000000000..5cab03334d89
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-resp.json.tpl
@@ -0,0 +1,3 @@
+{
+ "flavor_access": []
+}
\ No newline at end of file
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-resp.xml.tpl
new file mode 100644
index 000000000000..80d1ecc48c3a
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-remove-tenant-resp.xml.tpl
@@ -0,0 +1,2 @@
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-show-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-show-resp.json.tpl
new file mode 100644
index 000000000000..ffe309be48cb
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-show-resp.json.tpl
@@ -0,0 +1,23 @@
+{
+ "flavor": {
+ "disk": 1,
+ "id": "%(flavor_id)s",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/%(flavor_id)s",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/%(flavor_id)s",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.tiny",
+ "os-flavor-access:is_public": true,
+ "ram": 512,
+ "vcpus": 1,
+ "disabled": false,
+ "ephemeral": "",
+ "swap": ""
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-show-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-show-resp.xml.tpl
new file mode 100644
index 000000000000..73c9a69a81bc
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-access/flavor-access-show-resp.xml.tpl
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-get-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-get-resp.json.tpl
new file mode 100644
index 000000000000..4fa78396b7df
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-get-resp.json.tpl
@@ -0,0 +1,23 @@
+{
+ "flavor": {
+ "disk": 1,
+ "id": "1",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/1",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/1",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.tiny",
+ "ram": 512,
+ "vcpus": 1,
+ "disabled": false,
+ "ephemeral": "",
+ "swap": "",
+ "rxtx_factor": 1.0
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-get-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-get-resp.xml.tpl
new file mode 100644
index 000000000000..75a10a519d57
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-get-resp.xml.tpl
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-get-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-get-resp.json.tpl
new file mode 100644
index 000000000000..589bca049b83
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-get-resp.json.tpl
@@ -0,0 +1,23 @@
+{
+ "flavor": {
+ "disabled": false,
+ "disk": 1,
+ "ephemeral": "",
+ "id": "1",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/1",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/1",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.tiny",
+ "ram": 512,
+ "rxtx_factor": 1.0,
+ "swap": "",
+ "vcpus": 1
+ }
+}
\ No newline at end of file
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-get-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-get-resp.xml.tpl
new file mode 100644
index 000000000000..ce276ef9fbb6
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-get-resp.xml.tpl
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-list-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-list-resp.json.tpl
new file mode 100644
index 000000000000..1865c8e77b27
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-list-resp.json.tpl
@@ -0,0 +1,109 @@
+{
+ "flavors": [
+ {
+ "disabled": false,
+ "disk": 1,
+ "ephemeral": "",
+ "id": "1",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/1",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/1",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.tiny",
+ "ram": 512,
+ "rxtx_factor": 1.0,
+ "swap": "",
+ "vcpus": 1
+ },
+ {
+ "disabled": false,
+ "disk": 20,
+ "ephemeral": "",
+ "id": "2",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/2",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/2",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.small",
+ "ram": 2048,
+ "rxtx_factor": 1.0,
+ "swap": "",
+ "vcpus": 1
+ },
+ {
+ "disabled": false,
+ "disk": 40,
+ "ephemeral": "",
+ "id": "3",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/3",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/3",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.medium",
+ "ram": 4096,
+ "rxtx_factor": 1.0,
+ "swap": "",
+ "vcpus": 2
+ },
+ {
+ "disabled": false,
+ "disk": 80,
+ "ephemeral": "",
+ "id": "4",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/4",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/4",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.large",
+ "ram": 8192,
+ "rxtx_factor": 1.0,
+ "swap": "",
+ "vcpus": 4
+ },
+ {
+ "disabled": false,
+ "disk": 160,
+ "ephemeral": "",
+ "id": "5",
+ "links": [
+ {
+ "href": "http://openstack.example.com/v3/flavors/5",
+ "rel": "self"
+ },
+ {
+ "href": "http://openstack.example.com/flavors/5",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.xlarge",
+ "ram": 16384,
+ "rxtx_factor": 1.0,
+ "swap": "",
+ "vcpus": 8
+ }
+ ]
+}
\ No newline at end of file
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-list-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-list-resp.xml.tpl
new file mode 100644
index 000000000000..74b66eaae2e4
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-list-resp.xml.tpl
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-req.json.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-req.json.tpl
new file mode 100644
index 000000000000..70d0a57de878
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-req.json.tpl
@@ -0,0 +1,10 @@
+{
+ "flavor": {
+ "name": "%(flavor_name)s",
+ "ram": 1024,
+ "vcpus": 2,
+ "disk": 10,
+ "id": "%(flavor_id)s",
+ "rxtx_factor": 2.0
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-req.xml.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-req.xml.tpl
new file mode 100644
index 000000000000..7af57cb2d562
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-req.xml.tpl
@@ -0,0 +1,8 @@
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-resp.json.tpl
new file mode 100644
index 000000000000..bda2aa6f9f86
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-resp.json.tpl
@@ -0,0 +1,23 @@
+{
+ "flavor": {
+ "disk": 10,
+ "id": "%(flavor_id)s",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/%(flavor_id)s",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/%(flavor_id)s",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "%(flavor_name)s",
+ "ram": 1024,
+ "rxtx_factor": 2.0,
+ "vcpus": 2,
+ "disabled": false,
+ "ephemeral": "",
+ "swap": ""
+ }
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-resp.xml.tpl
new file mode 100644
index 000000000000..2ad1dfe73944
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavor-rxtx-post-resp.xml.tpl
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavors-detail-resp.json.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavors-detail-resp.json.tpl
new file mode 100644
index 000000000000..5a28eba436d5
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavors-detail-resp.json.tpl
@@ -0,0 +1,109 @@
+{
+ "flavors": [
+ {
+ "disabled": false,
+ "disk": 1,
+ "ephemeral": "",
+ "id": "1",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/1",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/1",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.tiny",
+ "ram": 512,
+ "swap": "",
+ "vcpus": 1,
+ "rxtx_factor": 1.0
+ },
+ {
+ "disabled": false,
+ "disk": 20,
+ "ephemeral": "",
+ "id": "2",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/2",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/2",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.small",
+ "ram": 2048,
+ "swap": "",
+ "vcpus": 1,
+ "rxtx_factor": 1.0
+ },
+ {
+ "disabled": false,
+ "disk": 40,
+ "ephemeral": "",
+ "id": "3",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/3",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/3",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.medium",
+ "ram": 4096,
+ "swap": "",
+ "vcpus": 2,
+ "rxtx_factor": 1.0
+ },
+ {
+ "disabled": false,
+ "disk": 80,
+ "ephemeral": "",
+ "id": "4",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/4",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/4",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.large",
+ "ram": 8192,
+ "swap": "",
+ "vcpus": 4,
+ "rxtx_factor": 1.0
+ },
+ {
+ "disabled": false,
+ "disk": 160,
+ "ephemeral": "",
+ "id": "5",
+ "links": [
+ {
+ "href": "%(host)s/v3/flavors/5",
+ "rel": "self"
+ },
+ {
+ "href": "%(host)s/flavors/5",
+ "rel": "bookmark"
+ }
+ ],
+ "name": "m1.xlarge",
+ "ram": 16384,
+ "swap": "",
+ "vcpus": 8,
+ "rxtx_factor": 1.0
+ }
+ ]
+}
diff --git a/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavors-detail-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavors-detail-resp.xml.tpl
new file mode 100644
index 000000000000..80612ecca738
--- /dev/null
+++ b/nova/tests/integrated/v3/api_samples/os-flavor-rxtx/flavors-detail-resp.xml.tpl
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/nova/tests/integrated/v3/test_flavor_access.py b/nova/tests/integrated/v3/test_flavor_access.py
new file mode 100644
index 000000000000..53799de27ea6
--- /dev/null
+++ b/nova/tests/integrated/v3/test_flavor_access.py
@@ -0,0 +1,91 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+# 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 FlavorAccessSampleJsonTests(api_sample_base.ApiSampleTestBaseV3):
+ extension_name = 'os-flavor-access'
+ extra_extensions_to_load = ['flavor-manage']
+
+ def _add_tenant(self):
+ subs = {
+ 'tenant_id': 'fake_tenant',
+ 'flavor_id': 10,
+ }
+ response = self._do_post('flavors/10/action',
+ 'flavor-access-add-tenant-req',
+ subs)
+ self._verify_response('flavor-access-add-tenant-resp',
+ subs, response, 200)
+
+ def _create_flavor(self):
+ subs = {
+ 'flavor_id': 10,
+ 'flavor_name': 'test_flavor'
+ }
+ response = self._do_post("flavors",
+ "flavor-access-create-req",
+ subs)
+ subs.update(self._get_regexes())
+ self._verify_response("flavor-access-create-resp", subs, response, 200)
+
+ def test_flavor_access_create(self):
+ self._create_flavor()
+
+ def test_flavor_access_detail(self):
+ response = self._do_get('flavors/detail')
+ subs = self._get_regexes()
+ self._verify_response('flavor-access-detail-resp', subs, response, 200)
+
+ def test_flavor_access_list(self):
+ self._create_flavor()
+ self._add_tenant()
+ flavor_id = 10
+ response = self._do_get('flavors/%s/os-flavor-access' % flavor_id)
+ subs = {
+ 'flavor_id': flavor_id,
+ 'tenant_id': 'fake_tenant',
+ }
+ self._verify_response('flavor-access-list-resp', subs, response, 200)
+
+ def test_flavor_access_show(self):
+ flavor_id = 1
+ response = self._do_get('flavors/%s' % flavor_id)
+ subs = {
+ 'flavor_id': flavor_id
+ }
+ subs.update(self._get_regexes())
+ self._verify_response('flavor-access-show-resp', subs, response, 200)
+
+ def test_flavor_access_add_tenant(self):
+ self._create_flavor()
+ self._add_tenant()
+
+ def test_flavor_access_remove_tenant(self):
+ self._create_flavor()
+ self._add_tenant()
+ subs = {
+ 'tenant_id': 'fake_tenant',
+ }
+ response = self._do_post('flavors/10/action',
+ "flavor-access-remove-tenant-req",
+ subs)
+ self._verify_response('flavor-access-remove-tenant-resp',
+ {}, response, 200)
+
+
+class FlavorAccessSampleXmlTests(FlavorAccessSampleJsonTests):
+ ctype = 'xml'
diff --git a/nova/tests/integrated/v3/test_flavor_rxtx.py b/nova/tests/integrated/v3/test_flavor_rxtx.py
new file mode 100644
index 000000000000..8298b798911d
--- /dev/null
+++ b/nova/tests/integrated/v3/test_flavor_rxtx.py
@@ -0,0 +1,52 @@
+# 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 FlavorRxtxJsonTest(api_sample_base.ApiSampleTestBaseV3):
+ extension_name = 'os-flavor-rxtx'
+ extra_extensions_to_load = ['flavor-manage']
+
+ def test_flavor_rxtx_get(self):
+ flavor_id = 1
+ response = self._do_get('flavors/%s' % flavor_id)
+ subs = {
+ 'flavor_id': flavor_id,
+ 'flavor_name': 'm1.tiny'
+ }
+ subs.update(self._get_regexes())
+ self._verify_response('flavor-rxtx-get-resp', subs, response, 200)
+
+ def test_flavors_rxtx_detail(self):
+ response = self._do_get('flavors/detail')
+ subs = self._get_regexes()
+ self._verify_response('flavor-rxtx-list-resp', subs, response, 200)
+
+ def test_flavors_rxtx_create(self):
+ subs = {
+ 'flavor_id': 100,
+ 'flavor_name': 'flavortest'
+ }
+ response = self._do_post('flavors',
+ 'flavor-rxtx-post-req',
+ subs)
+ subs.update(self._get_regexes())
+ self._verify_response('flavor-rxtx-post-resp', subs, response, 200)
+
+
+class FlavorRxtxXmlTest(FlavorRxtxJsonTest):
+ ctype = 'xml'
diff --git a/nova/tests/integrated/v3/test_flavors.py b/nova/tests/integrated/v3/test_flavors.py
new file mode 100644
index 000000000000..25801cdd22b8
--- /dev/null
+++ b/nova/tests/integrated/v3/test_flavors.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 api_sample_base
+
+
+class FlavorsSampleJsonTest(api_sample_base.ApiSampleTestBaseV3):
+ sample_dir = 'flavors'
+
+ def test_flavors_get(self):
+ response = self._do_get('flavors/1')
+ subs = self._get_regexes()
+ self._verify_response('flavor-get-resp', subs, response, 200)
+
+ def test_flavors_list(self):
+ response = self._do_get('flavors')
+ subs = self._get_regexes()
+ self._verify_response('flavors-list-resp', subs, response, 200)
+
+ def test_flavors_detail(self):
+ response = self._do_get('flavors/detail')
+ subs = self._get_regexes()
+ self._verify_response('flavors-detail-resp', subs, response, 200)
+
+
+class FlavorsSampleXmlTest(FlavorsSampleJsonTest):
+ ctype = 'xml'