Enable all extension for Flavor API sample tests

As extensions options has been deprecated, API sample tests
should run against all extension enable.

This commit enables all extensions for Flavor API tests and remove its specific
extensions tests and sample files.

Partially implements blueprint api-sample-tests-with-all-extensions

Change-Id: I9fc496a6a05f794a31b0b361cc98d2f4b2f79818
This commit is contained in:
ghanshyam 2016-06-09 10:25:21 +09:00
parent 030410dbe1
commit 8291e5e247
37 changed files with 55 additions and 1177 deletions

View File

@ -1,24 +0,0 @@
{
"flavor": {
"OS-FLV-DISABLED:disabled": false,
"OS-FLV-EXT-DATA:ephemeral": 0,
"disk": 1,
"id": "1",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/1",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/1",
"rel": "bookmark"
}
],
"name": "m1.tiny",
"os-flavor-access:is_public": true,
"ram": 512,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 1
}
}

View File

@ -1,114 +0,0 @@
{
"flavors": [
{
"OS-FLV-DISABLED:disabled": false,
"disk": 1,
"OS-FLV-EXT-DATA:ephemeral": 0,
"os-flavor-access:is_public": true,
"id": "1",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/1",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/1",
"rel": "bookmark"
}
],
"name": "m1.tiny",
"ram": 512,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 1
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 20,
"OS-FLV-EXT-DATA:ephemeral": 0,
"os-flavor-access:is_public": true,
"id": "2",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/2",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/2",
"rel": "bookmark"
}
],
"name": "m1.small",
"ram": 2048,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 1
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 40,
"OS-FLV-EXT-DATA:ephemeral": 0,
"os-flavor-access:is_public": true,
"id": "3",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/3",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/3",
"rel": "bookmark"
}
],
"name": "m1.medium",
"ram": 4096,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 2
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 80,
"OS-FLV-EXT-DATA:ephemeral": 0,
"os-flavor-access:is_public": true,
"id": "4",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/4",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/4",
"rel": "bookmark"
}
],
"name": "m1.large",
"ram": 8192,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 4
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 160,
"OS-FLV-EXT-DATA:ephemeral": 0,
"os-flavor-access:is_public": true,
"id": "5",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/5",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/5",
"rel": "bookmark"
}
],
"name": "m1.xlarge",
"ram": 16384,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 8
}
]
}

View File

@ -1,74 +0,0 @@
{
"flavors": [
{
"id": "1",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/1",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/1",
"rel": "bookmark"
}
],
"name": "m1.tiny"
},
{
"id": "2",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/2",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/2",
"rel": "bookmark"
}
],
"name": "m1.small"
},
{
"id": "3",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/3",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/3",
"rel": "bookmark"
}
],
"name": "m1.medium"
},
{
"id": "4",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/4",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/4",
"rel": "bookmark"
}
],
"name": "m1.large"
},
{
"id": "5",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/5",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/5",
"rel": "bookmark"
}
],
"name": "m1.xlarge"
}
]
}

View File

@ -1,23 +0,0 @@
{
"flavor": {
"OS-FLV-DISABLED:disabled": false,
"disk": 10,
"OS-FLV-EXT-DATA:ephemeral": 0,
"os-flavor-access:is_public": false,
"id": "10",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/10",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/10",
"rel": "bookmark"
}
],
"name": "test_flavor",
"ram": 1024,
"swap": "",
"vcpus": 2
}
}

View File

@ -1,109 +0,0 @@
{
"flavors": [
{
"OS-FLV-DISABLED:disabled": false,
"disk": 1,
"OS-FLV-EXT-DATA:ephemeral": 0,
"os-flavor-access:is_public": true,
"id": "1",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/1",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/1",
"rel": "bookmark"
}
],
"name": "m1.tiny",
"ram": 512,
"swap": "",
"vcpus": 1
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 20,
"OS-FLV-EXT-DATA:ephemeral": 0,
"os-flavor-access:is_public": true,
"id": "2",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/2",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/2",
"rel": "bookmark"
}
],
"name": "m1.small",
"ram": 2048,
"swap": "",
"vcpus": 1
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 40,
"OS-FLV-EXT-DATA:ephemeral": 0,
"os-flavor-access:is_public": true,
"id": "3",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/3",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/3",
"rel": "bookmark"
}
],
"name": "m1.medium",
"ram": 4096,
"swap": "",
"vcpus": 2
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 80,
"OS-FLV-EXT-DATA:ephemeral": 0,
"os-flavor-access:is_public": true,
"id": "4",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/4",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/4",
"rel": "bookmark"
}
],
"name": "m1.large",
"ram": 8192,
"swap": "",
"vcpus": 4
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 160,
"OS-FLV-EXT-DATA:ephemeral": 0,
"os-flavor-access:is_public": true,
"id": "5",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/5",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/5",
"rel": "bookmark"
}
],
"name": "m1.xlarge",
"ram": 16384,
"swap": "",
"vcpus": 8
}
]
}

View File

@ -1,23 +0,0 @@
{
"flavor": {
"OS-FLV-DISABLED:disabled": false,
"disk": 1,
"OS-FLV-EXT-DATA:ephemeral": 0,
"os-flavor-access:is_public": true,
"id": "1",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/1",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/1",
"rel": "bookmark"
}
],
"name": "m1.tiny",
"ram": 512,
"swap": "",
"vcpus": 1
}
}

View File

@ -4,6 +4,7 @@
"ram": 1024,
"vcpus": 2,
"disk": 10,
"id": "10"
"id": "10",
"rxtx_factor": 2.0
}
}

View File

@ -18,6 +18,7 @@
"name": "test_flavor",
"ram": 1024,
"swap": "",
"rxtx_factor": 2.0,
"vcpus": 2
}
}

View File

@ -18,6 +18,7 @@
"name": "m1.tiny",
"ram": 512,
"swap": "",
"vcpus": 1
"vcpus": 1,
"rxtx_factor": 1.0
}
}

View File

@ -19,7 +19,8 @@
"name": "m1.tiny",
"ram": 512,
"swap": "",
"vcpus": 1
"vcpus": 1,
"rxtx_factor": 1.0
},
{
"OS-FLV-DISABLED:disabled": false,
@ -40,7 +41,8 @@
"name": "m1.small",
"ram": 2048,
"swap": "",
"vcpus": 1
"vcpus": 1,
"rxtx_factor": 1.0
},
{
"OS-FLV-DISABLED:disabled": false,
@ -61,7 +63,8 @@
"name": "m1.medium",
"ram": 4096,
"swap": "",
"vcpus": 2
"vcpus": 2,
"rxtx_factor": 1.0
},
{
"OS-FLV-DISABLED:disabled": false,
@ -82,7 +85,8 @@
"name": "m1.large",
"ram": 8192,
"swap": "",
"vcpus": 4
"vcpus": 4,
"rxtx_factor": 1.0
},
{
"OS-FLV-DISABLED:disabled": false,
@ -103,7 +107,8 @@
"name": "m1.xlarge",
"ram": 16384,
"swap": "",
"vcpus": 8
"vcpus": 8,
"rxtx_factor": 1.0
}
]
}

View File

@ -1,24 +0,0 @@
{
"flavor": {
"OS-FLV-DISABLED:disabled": false,
"disk": 1,
"OS-FLV-EXT-DATA:ephemeral": 0,
"os-flavor-access:is_public": true,
"id": "1",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/1",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/1",
"rel": "bookmark"
}
],
"name": "m1.tiny",
"ram": 512,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 1
}
}

View File

@ -1,114 +0,0 @@
{
"flavors": [
{
"OS-FLV-DISABLED:disabled": false,
"disk": 1,
"OS-FLV-EXT-DATA:ephemeral": 0,
"os-flavor-access:is_public": true,
"id": "1",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/1",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/1",
"rel": "bookmark"
}
],
"name": "m1.tiny",
"ram": 512,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 1
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 20,
"OS-FLV-EXT-DATA:ephemeral": 0,
"os-flavor-access:is_public": true,
"id": "2",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/2",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/2",
"rel": "bookmark"
}
],
"name": "m1.small",
"ram": 2048,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 1
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 40,
"OS-FLV-EXT-DATA:ephemeral": 0,
"os-flavor-access:is_public": true,
"id": "3",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/3",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/3",
"rel": "bookmark"
}
],
"name": "m1.medium",
"ram": 4096,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 2
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 80,
"OS-FLV-EXT-DATA:ephemeral": 0,
"os-flavor-access:is_public": true,
"id": "4",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/4",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/4",
"rel": "bookmark"
}
],
"name": "m1.large",
"ram": 8192,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 4
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 160,
"OS-FLV-EXT-DATA:ephemeral": 0,
"os-flavor-access:is_public": true,
"id": "5",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/5",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/5",
"rel": "bookmark"
}
],
"name": "m1.xlarge",
"ram": 16384,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 8
}
]
}

View File

@ -1,10 +0,0 @@
{
"flavor": {
"name": "flavortest",
"ram": 1024,
"vcpus": 2,
"disk": 10,
"id": "100",
"rxtx_factor": 2.0
}
}

View File

@ -1,24 +0,0 @@
{
"flavor": {
"OS-FLV-DISABLED:disabled": false,
"disk": 10,
"OS-FLV-EXT-DATA:ephemeral": 0,
"os-flavor-access:is_public": true,
"id": "100",
"links": [
{
"href": "http://openstack.example.com/v2/6f70656e737461636b20342065766572/flavors/100",
"rel": "self"
},
{
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/flavors/100",
"rel": "bookmark"
}
],
"name": "flavortest",
"ram": 1024,
"rxtx_factor": 2.0,
"swap": "",
"vcpus": 2
}
}

View File

@ -1,24 +0,0 @@
{
"flavor": {
"OS-FLV-DISABLED:disabled": false,
"OS-FLV-EXT-DATA:ephemeral": 0,
"disk": 1,
"id": "1",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/1",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/1",
"rel": "bookmark"
}
],
"name": "m1.tiny",
"os-flavor-access:is_public": true,
"ram": 512,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 1
}
}

View File

@ -1,114 +0,0 @@
{
"flavors": [
{
"OS-FLV-DISABLED:disabled": false,
"disk": 1,
"OS-FLV-EXT-DATA:ephemeral": 0,
"id": "1",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/1",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/1",
"rel": "bookmark"
}
],
"name": "m1.tiny",
"os-flavor-access:is_public": true,
"ram": 512,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 1
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 20,
"OS-FLV-EXT-DATA:ephemeral": 0,
"id": "2",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/2",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/2",
"rel": "bookmark"
}
],
"name": "m1.small",
"os-flavor-access:is_public": true,
"ram": 2048,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 1
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 40,
"OS-FLV-EXT-DATA:ephemeral": 0,
"id": "3",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/3",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/3",
"rel": "bookmark"
}
],
"name": "m1.medium",
"os-flavor-access:is_public": true,
"ram": 4096,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 2
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 80,
"OS-FLV-EXT-DATA:ephemeral": 0,
"id": "4",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/4",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/4",
"rel": "bookmark"
}
],
"name": "m1.large",
"os-flavor-access:is_public": true,
"ram": 8192,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 4
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 160,
"OS-FLV-EXT-DATA:ephemeral": 0,
"id": "5",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/5",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/5",
"rel": "bookmark"
}
],
"name": "m1.xlarge",
"os-flavor-access:is_public": true,
"ram": 16384,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 8
}
]
}

View File

@ -1,74 +0,0 @@
{
"flavors": [
{
"id": "1",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/1",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/1",
"rel": "bookmark"
}
],
"name": "m1.tiny"
},
{
"id": "2",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/2",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/2",
"rel": "bookmark"
}
],
"name": "m1.small"
},
{
"id": "3",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/3",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/3",
"rel": "bookmark"
}
],
"name": "m1.medium"
},
{
"id": "4",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/4",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/4",
"rel": "bookmark"
}
],
"name": "m1.large"
},
{
"id": "5",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/5",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/5",
"rel": "bookmark"
}
],
"name": "m1.xlarge"
}
]
}

View File

@ -1,23 +0,0 @@
{
"flavor": {
"disk": 10,
"id": "%(flavor_id)s",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/%(flavor_id)s",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/%(flavor_id)s",
"rel": "bookmark"
}
],
"name": "%(flavor_name)s",
"os-flavor-access:is_public": false,
"ram": 1024,
"vcpus": 2,
"OS-FLV-DISABLED:disabled": false,
"OS-FLV-EXT-DATA:ephemeral": 0,
"swap": ""
}
}

View File

@ -1,109 +0,0 @@
{
"flavors": [
{
"OS-FLV-DISABLED:disabled": false,
"disk": 1,
"OS-FLV-EXT-DATA:ephemeral": 0,
"id": "1",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/1",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/1",
"rel": "bookmark"
}
],
"name": "m1.tiny",
"os-flavor-access:is_public": true,
"ram": 512,
"swap": "",
"vcpus": 1
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 20,
"OS-FLV-EXT-DATA:ephemeral": 0,
"id": "2",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/2",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/2",
"rel": "bookmark"
}
],
"name": "m1.small",
"os-flavor-access:is_public": true,
"ram": 2048,
"swap": "",
"vcpus": 1
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 40,
"OS-FLV-EXT-DATA:ephemeral": 0,
"id": "3",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/3",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/3",
"rel": "bookmark"
}
],
"name": "m1.medium",
"os-flavor-access:is_public": true,
"ram": 4096,
"swap": "",
"vcpus": 2
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 80,
"OS-FLV-EXT-DATA:ephemeral": 0,
"id": "4",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/4",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/4",
"rel": "bookmark"
}
],
"name": "m1.large",
"os-flavor-access:is_public": true,
"ram": 8192,
"swap": "",
"vcpus": 4
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 160,
"OS-FLV-EXT-DATA:ephemeral": 0,
"id": "5",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/5",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/5",
"rel": "bookmark"
}
],
"name": "m1.xlarge",
"os-flavor-access:is_public": true,
"ram": 16384,
"swap": "",
"vcpus": 8
}
]
}

View File

@ -1,23 +0,0 @@
{
"flavor": {
"disk": 1,
"id": "%(flavor_id)s",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/%(flavor_id)s",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/%(flavor_id)s",
"rel": "bookmark"
}
],
"name": "m1.tiny",
"os-flavor-access:is_public": true,
"ram": 512,
"vcpus": 1,
"OS-FLV-DISABLED:disabled": false,
"OS-FLV-EXT-DATA:ephemeral": 0,
"swap": ""
}
}

View File

@ -4,6 +4,7 @@
"ram": 1024,
"vcpus": 2,
"disk": 10,
"id": "%(flavor_id)s"
"id": "%(flavor_id)s",
"rxtx_factor": 2.0
}
}

View File

@ -18,6 +18,7 @@
"vcpus": 2,
"OS-FLV-DISABLED:disabled": false,
"OS-FLV-EXT-DATA:ephemeral": 0,
"swap": ""
"swap": "",
"rxtx_factor": 2.0
}
}

View File

@ -18,6 +18,7 @@
"vcpus": 1,
"OS-FLV-DISABLED:disabled": false,
"OS-FLV-EXT-DATA:ephemeral": 0,
"swap": ""
"swap": "",
"rxtx_factor": 1.0
}
}

View File

@ -19,7 +19,8 @@
"os-flavor-access:is_public": true,
"ram": 512,
"swap": "",
"vcpus": 1
"vcpus": 1,
"rxtx_factor": 1.0
},
{
"OS-FLV-DISABLED:disabled": false,
@ -40,7 +41,8 @@
"os-flavor-access:is_public": true,
"ram": 2048,
"swap": "",
"vcpus": 1
"vcpus": 1,
"rxtx_factor": 1.0
},
{
"OS-FLV-DISABLED:disabled": false,
@ -61,7 +63,8 @@
"os-flavor-access:is_public": true,
"ram": 4096,
"swap": "",
"vcpus": 2
"vcpus": 2,
"rxtx_factor": 1.0
},
{
"OS-FLV-DISABLED:disabled": false,
@ -82,7 +85,8 @@
"os-flavor-access:is_public": true,
"ram": 8192,
"swap": "",
"vcpus": 4
"vcpus": 4,
"rxtx_factor": 1.0
},
{
"OS-FLV-DISABLED:disabled": false,
@ -103,7 +107,8 @@
"os-flavor-access:is_public": true,
"ram": 16384,
"swap": "",
"vcpus": 8
"vcpus": 8,
"rxtx_factor": 1.0
}
]
}

View File

@ -1,24 +0,0 @@
{
"flavor": {
"OS-FLV-DISABLED:disabled": false,
"disk": 1,
"OS-FLV-EXT-DATA:ephemeral": 0,
"id": "1",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/1",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/1",
"rel": "bookmark"
}
],
"name": "m1.tiny",
"os-flavor-access:is_public": true,
"ram": 512,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 1
}
}

View File

@ -1,114 +0,0 @@
{
"flavors": [
{
"OS-FLV-DISABLED:disabled": false,
"disk": 1,
"OS-FLV-EXT-DATA:ephemeral": 0,
"id": "1",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/1",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/1",
"rel": "bookmark"
}
],
"name": "m1.tiny",
"os-flavor-access:is_public": true,
"ram": 512,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 1
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 20,
"OS-FLV-EXT-DATA:ephemeral": 0,
"id": "2",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/2",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/2",
"rel": "bookmark"
}
],
"name": "m1.small",
"os-flavor-access:is_public": true,
"ram": 2048,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 1
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 40,
"OS-FLV-EXT-DATA:ephemeral": 0,
"id": "3",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/3",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/3",
"rel": "bookmark"
}
],
"name": "m1.medium",
"os-flavor-access:is_public": true,
"ram": 4096,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 2
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 80,
"OS-FLV-EXT-DATA:ephemeral": 0,
"id": "4",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/4",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/4",
"rel": "bookmark"
}
],
"name": "m1.large",
"os-flavor-access:is_public": true,
"ram": 8192,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 4
},
{
"OS-FLV-DISABLED:disabled": false,
"disk": 160,
"OS-FLV-EXT-DATA:ephemeral": 0,
"id": "5",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/5",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/5",
"rel": "bookmark"
}
],
"name": "m1.xlarge",
"os-flavor-access:is_public": true,
"ram": 16384,
"rxtx_factor": 1.0,
"swap": "",
"vcpus": 8
}
]
}

View File

@ -1,10 +0,0 @@
{
"flavor": {
"name": "%(flavor_name)s",
"ram": 1024,
"vcpus": 2,
"disk": 10,
"id": "%(flavor_id)s",
"rxtx_factor": 2.0
}
}

View File

@ -1,24 +0,0 @@
{
"flavor": {
"disk": 10,
"id": "%(flavor_id)s",
"links": [
{
"href": "%(versioned_compute_endpoint)s/flavors/%(flavor_id)s",
"rel": "self"
},
{
"href": "%(compute_endpoint)s/flavors/%(flavor_id)s",
"rel": "bookmark"
}
],
"name": "%(flavor_name)s",
"os-flavor-access:is_public": true,
"ram": 1024,
"rxtx_factor": 2.0,
"vcpus": 2,
"OS-FLV-DISABLED:disabled": false,
"OS-FLV-EXT-DATA:ephemeral": 0,
"swap": ""
}
}

View File

@ -17,7 +17,10 @@ from nova.tests.functional.api_sample_tests import api_sample_base
class FlavorAccessTestsBase(api_sample_base.ApiSampleTestBaseV21):
ADMIN_API = True
extension_name = 'flavor-access'
sample_dir = 'flavor-access'
# TODO(gmann): This will be removed once all API tests runs for
# all extension enable.
all_extensions = True
def _add_tenant(self):
subs = {
@ -35,18 +38,13 @@ class FlavorAccessTestsBase(api_sample_base.ApiSampleTestBaseV21):
'flavor_id': '10',
'flavor_name': 'test_flavor'
}
response = self._do_post("flavors",
"flavor-access-create-req",
subs)
self._verify_response("flavor-access-create-resp", subs, response, 200)
self._do_post("flavors",
"flavor-create-req",
subs)
class FlavorAccessSampleJsonTests(FlavorAccessTestsBase):
def test_flavor_access_detail(self):
response = self._do_get('flavors/detail')
self._verify_response('flavor-access-detail-resp', {}, response, 200)
def test_flavor_access_list(self):
self._create_flavor()
self._add_tenant()
@ -58,14 +56,6 @@ class FlavorAccessSampleJsonTests(FlavorAccessTestsBase):
}
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
}
self._verify_response('flavor-access-show-resp', subs, response, 200)
def test_flavor_access_add_tenant(self):
self._create_flavor()
self._add_tenant()
@ -97,15 +87,7 @@ class FlavorAccessV27SampleJsonTests(FlavorAccessTestsBase):
self.api.microversion = self.microversion
def test_add_tenant_access_to_public_flavor(self):
subs = {
'flavor_id': '10',
'flavor_name': 'test_flavor'
}
# Create public flavor
response = self._do_post("flavors",
"flavor-access-create-req",
subs)
self.assertEqual(200, response.status_code)
self._create_flavor()
subs = {
'flavor_id': '10',

View File

@ -18,7 +18,11 @@ from nova.tests.functional.api_sample_tests import api_sample_base
class FlavorExtraSpecsSampleJsonTests(api_sample_base.ApiSampleTestBaseV21):
ADMIN_API = True
extension_name = 'flavor-extra-specs'
sample_dir = 'flavor-extra-specs'
# TODO(gmann): This will be removed once all API tests runs for
# all extension enable.
all_extensions = True
def _flavor_extra_specs_create(self):
subs = {'value1': 'value1',

View File

@ -18,7 +18,11 @@ from nova.tests.functional.api_sample_tests import api_sample_base
class FlavorManageSampleJsonTests(api_sample_base.ApiSampleTestBaseV21):
ADMIN_API = True
extension_name = 'flavor-manage'
sample_dir = 'flavor-manage'
# TODO(gmann): This will be removed once all API tests runs for
# all extension enable.
all_extensions = True
def _create_flavor(self):
"""Create a flavor."""
@ -31,13 +35,8 @@ class FlavorManageSampleJsonTests(api_sample_base.ApiSampleTestBaseV21):
subs)
self._verify_response("flavor-create-post-resp", subs, response, 200)
# TODO(sdague): remove duplication
def test_create_flavor(self):
# Get api sample to create a flavor.
self._create_flavor()
def test_delete_flavor(self):
# Get api sample to delete a flavor.
def test_create_delete_flavor(self):
# Get api sample to create and delete a flavor.
self._create_flavor()
response = self._do_delete("flavors/10")
self.assertEqual(202, response.status_code)

View File

@ -1,44 +0,0 @@
# 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.functional.api_sample_tests import api_sample_base
class FlavorRxtxJsonTest(api_sample_base.ApiSampleTestBaseV21):
ADMIN_API = True
extension_name = 'os-flavor-rxtx'
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'
}
self._verify_response('flavor-rxtx-get-resp', subs, response, 200)
def test_flavors_rxtx_detail(self):
response = self._do_get('flavors/detail')
self._verify_response('flavor-rxtx-list-resp', {}, 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)
self._verify_response('flavor-rxtx-post-resp', subs, response, 200)

View File

@ -19,6 +19,10 @@ from nova.tests.functional.api_sample_tests import api_sample_base
class FlavorsSampleJsonTest(api_sample_base.ApiSampleTestBaseV21):
sample_dir = 'flavors'
# TODO(gmann): This will be removed once all API tests runs for
# all extension enable.
all_extensions = True
def test_flavors_get(self):
response = self._do_get('flavors/1')
self._verify_response('flavor-get-resp', {}, response, 200)
@ -30,8 +34,3 @@ class FlavorsSampleJsonTest(api_sample_base.ApiSampleTestBaseV21):
def test_flavors_detail(self):
response = self._do_get('flavors/detail')
self._verify_response('flavors-detail-resp', {}, response, 200)
class FlavorsSampleAllExtensionJsonTest(FlavorsSampleJsonTest):
all_extensions = True
sample_dir = None