diff --git a/doc/v3/api_samples/flavor-manage/flavor-create-post-resp.json b/doc/v3/api_samples/flavor-manage/flavor-create-post-resp.json index 3b5372cad2f4..2b90c412aa2c 100644 --- a/doc/v3/api_samples/flavor-manage/flavor-create-post-resp.json +++ b/doc/v3/api_samples/flavor-manage/flavor-create-post-resp.json @@ -2,7 +2,7 @@ "flavor": { "disabled": false, "disk": 10, - "ephemeral": "", + "ephemeral": 0, "id": "10", "links": [ { @@ -16,7 +16,7 @@ ], "name": "test_flavor", "ram": 1024, - "swap": "", + "swap": 0, "vcpus": 2 } } \ No newline at end of file diff --git a/doc/v3/api_samples/flavor-manage/flavor-create-post-resp.xml b/doc/v3/api_samples/flavor-manage/flavor-create-post-resp.xml index 9eb5c86b2dd7..c1db11c7c752 100644 --- a/doc/v3/api_samples/flavor-manage/flavor-create-post-resp.xml +++ b/doc/v3/api_samples/flavor-manage/flavor-create-post-resp.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/doc/v3/api_samples/flavors/flavor-get-resp.json b/doc/v3/api_samples/flavors/flavor-get-resp.json index b3d12c974d40..cd4589bcd66f 100644 --- a/doc/v3/api_samples/flavors/flavor-get-resp.json +++ b/doc/v3/api_samples/flavors/flavor-get-resp.json @@ -2,7 +2,7 @@ "flavor": { "disabled": false, "disk": 1, - "ephemeral": "", + "ephemeral": 0, "id": "1", "links": [ { @@ -16,7 +16,7 @@ ], "name": "m1.tiny", "ram": 512, - "swap": "", + "swap": 0, "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 index 76ddabef74e9..62ce0969e8bb 100644 --- a/doc/v3/api_samples/flavors/flavor-get-resp.xml +++ b/doc/v3/api_samples/flavors/flavor-get-resp.xml @@ -1,5 +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 index ced3ec078977..5e204f3696c0 100644 --- a/doc/v3/api_samples/flavors/flavors-detail-resp.json +++ b/doc/v3/api_samples/flavors/flavors-detail-resp.json @@ -3,7 +3,7 @@ { "disabled": false, "disk": 1, - "ephemeral": "", + "ephemeral": 0, "id": "1", "links": [ { @@ -17,13 +17,13 @@ ], "name": "m1.tiny", "ram": 512, - "swap": "", + "swap": 0, "vcpus": 1 }, { "disabled": false, "disk": 20, - "ephemeral": "", + "ephemeral": 0, "id": "2", "links": [ { @@ -37,13 +37,13 @@ ], "name": "m1.small", "ram": 2048, - "swap": "", + "swap": 0, "vcpus": 1 }, { "disabled": false, "disk": 40, - "ephemeral": "", + "ephemeral": 0, "id": "3", "links": [ { @@ -57,13 +57,13 @@ ], "name": "m1.medium", "ram": 4096, - "swap": "", + "swap": 0, "vcpus": 2 }, { "disabled": false, "disk": 80, - "ephemeral": "", + "ephemeral": 0, "id": "4", "links": [ { @@ -77,13 +77,13 @@ ], "name": "m1.large", "ram": 8192, - "swap": "", + "swap": 0, "vcpus": 4 }, { "disabled": false, "disk": 160, - "ephemeral": "", + "ephemeral": 0, "id": "5", "links": [ { @@ -97,7 +97,7 @@ ], "name": "m1.xlarge", "ram": 16384, - "swap": "", + "swap": 0, "vcpus": 8 } ] diff --git a/doc/v3/api_samples/flavors/flavors-detail-resp.xml b/doc/v3/api_samples/flavors/flavors-detail-resp.xml index c27d906fb5b4..2c74e6da2212 100644 --- a/doc/v3/api_samples/flavors/flavors-detail-resp.xml +++ b/doc/v3/api_samples/flavors/flavors-detail-resp.xml @@ -1,22 +1,22 @@ - + - + - + - + - + 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 index e53389f93382..2a3f87526e8e 100644 --- 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 @@ -2,7 +2,7 @@ "flavor": { "disabled": false, "disk": 10, - "ephemeral": "", + "ephemeral": 0, "id": "10", "links": [ { @@ -17,7 +17,7 @@ "name": "test_flavor", "os-flavor-access:is_public": false, "ram": 1024, - "swap": "", + "swap": 0, "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 index 9ec27997aae1..0fe92c17958e 100644 --- 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 @@ -1,5 +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 index f1b0caa2fd73..8b1dac90a525 100644 --- 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 @@ -3,7 +3,7 @@ { "disabled": false, "disk": 1, - "ephemeral": "", + "ephemeral": 0, "id": "1", "links": [ { @@ -18,13 +18,13 @@ "name": "m1.tiny", "os-flavor-access:is_public": true, "ram": 512, - "swap": "", + "swap": 0, "vcpus": 1 }, { "disabled": false, "disk": 20, - "ephemeral": "", + "ephemeral": 0, "id": "2", "links": [ { @@ -39,13 +39,13 @@ "name": "m1.small", "os-flavor-access:is_public": true, "ram": 2048, - "swap": "", + "swap": 0, "vcpus": 1 }, { "disabled": false, "disk": 40, - "ephemeral": "", + "ephemeral": 0, "id": "3", "links": [ { @@ -60,13 +60,13 @@ "name": "m1.medium", "os-flavor-access:is_public": true, "ram": 4096, - "swap": "", + "swap": 0, "vcpus": 2 }, { "disabled": false, "disk": 80, - "ephemeral": "", + "ephemeral": 0, "id": "4", "links": [ { @@ -81,13 +81,13 @@ "name": "m1.large", "os-flavor-access:is_public": true, "ram": 8192, - "swap": "", + "swap": 0, "vcpus": 4 }, { "disabled": false, "disk": 160, - "ephemeral": "", + "ephemeral": 0, "id": "5", "links": [ { @@ -102,7 +102,7 @@ "name": "m1.xlarge", "os-flavor-access:is_public": true, "ram": 16384, - "swap": "", + "swap": 0, "vcpus": 8 } ] 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 index 110e6d347e33..b9682318be92 100644 --- 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 @@ -1,22 +1,22 @@ - + - + - + - + - + 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 index 3fb35aad8c5b..0bdb4cbb7a78 100644 --- 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 @@ -2,7 +2,7 @@ "flavor": { "disabled": false, "disk": 1, - "ephemeral": "", + "ephemeral": 0, "id": "1", "links": [ { @@ -17,7 +17,7 @@ "name": "m1.tiny", "os-flavor-access:is_public": true, "ram": 512, - "swap": "", + "swap": 0, "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 index 74d96b725f99..5fd938f5c0aa 100644 --- 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 @@ -1,5 +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 index 589bca049b83..5cd8f19cf43b 100644 --- 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 @@ -2,7 +2,7 @@ "flavor": { "disabled": false, "disk": 1, - "ephemeral": "", + "ephemeral": 0, "id": "1", "links": [ { @@ -17,7 +17,7 @@ "name": "m1.tiny", "ram": 512, "rxtx_factor": 1.0, - "swap": "", + "swap": 0, "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 index ce276ef9fbb6..111c8722798f 100644 --- 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 @@ -1,5 +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 index 1865c8e77b27..53436703a8e5 100644 --- 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 @@ -3,7 +3,7 @@ { "disabled": false, "disk": 1, - "ephemeral": "", + "ephemeral": 0, "id": "1", "links": [ { @@ -18,13 +18,13 @@ "name": "m1.tiny", "ram": 512, "rxtx_factor": 1.0, - "swap": "", + "swap": 0, "vcpus": 1 }, { "disabled": false, "disk": 20, - "ephemeral": "", + "ephemeral": 0, "id": "2", "links": [ { @@ -39,13 +39,13 @@ "name": "m1.small", "ram": 2048, "rxtx_factor": 1.0, - "swap": "", + "swap": 0, "vcpus": 1 }, { "disabled": false, "disk": 40, - "ephemeral": "", + "ephemeral": 0, "id": "3", "links": [ { @@ -60,13 +60,13 @@ "name": "m1.medium", "ram": 4096, "rxtx_factor": 1.0, - "swap": "", + "swap": 0, "vcpus": 2 }, { "disabled": false, "disk": 80, - "ephemeral": "", + "ephemeral": 0, "id": "4", "links": [ { @@ -81,13 +81,13 @@ "name": "m1.large", "ram": 8192, "rxtx_factor": 1.0, - "swap": "", + "swap": 0, "vcpus": 4 }, { "disabled": false, "disk": 160, - "ephemeral": "", + "ephemeral": 0, "id": "5", "links": [ { @@ -102,7 +102,7 @@ "name": "m1.xlarge", "ram": 16384, "rxtx_factor": 1.0, - "swap": "", + "swap": 0, "vcpus": 8 } ] 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 index 74b66eaae2e4..a741e6b2ce6b 100644 --- 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 @@ -1,22 +1,22 @@ - + - + - + - + - + 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 index ee9c70b33aab..e910ac406fd2 100644 --- 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 @@ -2,7 +2,7 @@ "flavor": { "disabled": false, "disk": 10, - "ephemeral": "", + "ephemeral": 0, "id": "100", "links": [ { @@ -17,7 +17,7 @@ "name": "flavortest", "ram": 1024, "rxtx_factor": 2.0, - "swap": "", + "swap": 0, "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 index 4e5bbe0408cc..2e74911618d9 100644 --- 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 @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/nova/api/openstack/compute/plugins/v3/flavors.py b/nova/api/openstack/compute/plugins/v3/flavors.py index 9250d9b68e49..f1ac3a5822b4 100644 --- a/nova/api/openstack/compute/plugins/v3/flavors.py +++ b/nova/api/openstack/compute/plugins/v3/flavors.py @@ -34,10 +34,9 @@ def make_flavor(elem, detailed=False): if detailed: elem.set('ram') elem.set('disk') - elem.set('vcpus', xmlutil.EmptyStringSelector('vcpus')) - # NOTE(vish): this was originally added without a namespace - elem.set('swap', xmlutil.EmptyStringSelector('swap')) - elem.set('ephemeral', xmlutil.EmptyStringSelector('ephemeral')) + elem.set('vcpus') + elem.set('swap') + elem.set('ephemeral') elem.set('disabled') xmlutil.make_links(elem, 'links') diff --git a/nova/api/openstack/compute/views/flavors.py b/nova/api/openstack/compute/views/flavors.py index bc83d67819a9..5a82f32113d3 100644 --- a/nova/api/openstack/compute/views/flavors.py +++ b/nova/api/openstack/compute/views/flavors.py @@ -76,8 +76,9 @@ class V3ViewBuilder(ViewBuilder): def show(self, request, flavor): flavor_dict = super(V3ViewBuilder, self).show(request, flavor) flavor_dict['flavor'].update({ - "swap": flavor.get("swap") or "", - "ephemeral": flavor.get("ephemeral_gb") or "", - "disabled": flavor.get("disabled", False) + "swap": flavor["swap"], + "ephemeral": flavor["ephemeral_gb"], + "disabled": flavor["disabled"], + "vcpus": flavor["vcpus"], }) return flavor_dict diff --git a/nova/tests/api/openstack/compute/plugins/v3/test_flavor_rxtx.py b/nova/tests/api/openstack/compute/plugins/v3/test_flavor_rxtx.py index e357e68c7240..bcbd69b5fdb9 100644 --- a/nova/tests/api/openstack/compute/plugins/v3/test_flavor_rxtx.py +++ b/nova/tests/api/openstack/compute/plugins/v3/test_flavor_rxtx.py @@ -27,6 +27,10 @@ FAKE_FLAVORS = { "memory_mb": '256', "root_gb": '10', "rxtx_factor": '1.0', + "swap": 0, + "ephemeral_gb": 0, + "vcpus": 1, + "disabled": False, }, 'flavor 2': { "flavorid": '2', @@ -34,6 +38,10 @@ FAKE_FLAVORS = { "memory_mb": '512', "root_gb": '10', "rxtx_factor": None, + "swap": 0, + "vcpus": 1, + "ephemeral_gb": 0, + "disabled": False, }, } diff --git a/nova/tests/api/openstack/compute/plugins/v3/test_flavors.py b/nova/tests/api/openstack/compute/plugins/v3/test_flavors.py index b003dc827fd5..25fddae69873 100644 --- a/nova/tests/api/openstack/compute/plugins/v3/test_flavors.py +++ b/nova/tests/api/openstack/compute/plugins/v3/test_flavors.py @@ -42,8 +42,9 @@ FAKE_FLAVORS = { "name": 'flavor 1', "memory_mb": '256', "root_gb": '10', - "swap": '512', - "ephemeral_gb": '1', + "swap": 0, + "ephemeral_gb": 0, + "vcpus": 0, "disabled": False, }, 'flavor 2': { @@ -51,8 +52,9 @@ FAKE_FLAVORS = { "name": 'flavor 2', "memory_mb": '512', "root_gb": '20', - "swap": '1024', - "ephemeral_gb": '10', + "swap": 1024, + "ephemeral_gb": 10, + "vcpus": 0, "disabled": True, }, } @@ -133,9 +135,9 @@ class FlavorsTest(test.TestCase): "name": "flavor 1", "ram": "256", "disk": "10", - "vcpus": "", - "swap": '512', - "ephemeral": "1", + "vcpus": 0, + "swap": 0, + "ephemeral": 0, "disabled": False, "links": [ { @@ -162,9 +164,9 @@ class FlavorsTest(test.TestCase): "name": "flavor 1", "ram": "256", "disk": "10", - "vcpus": "", - "swap": '512', - "ephemeral": "1", + "vcpus": 0, + "swap": 0, + "ephemeral": 0, "disabled": False, "links": [ { @@ -331,9 +333,9 @@ class FlavorsTest(test.TestCase): "name": "flavor 1", "ram": "256", "disk": "10", - "vcpus": "", - "swap": '512', - "ephemeral": "1", + "vcpus": 0, + "swap": 0, + "ephemeral": 0, "disabled": False, "links": [ { @@ -351,9 +353,9 @@ class FlavorsTest(test.TestCase): "name": "flavor 2", "ram": "512", "disk": "20", - "vcpus": "", - "swap": '1024', - "ephemeral": "10", + "vcpus": 0, + "swap": 1024, + "ephemeral": 10, "disabled": True, "links": [ { @@ -453,9 +455,9 @@ class FlavorsTest(test.TestCase): "name": "flavor 2", "ram": "512", "disk": "20", - "vcpus": "", - "swap": '1024', - "ephemeral": "10", + "vcpus": 0, + "swap": 1024, + "ephemeral": 10, "disabled": True, "links": [ { @@ -539,7 +541,7 @@ class FlavorsXMLSerializationTest(test.TestCase): "name": "asdf", "ram": "256", "disk": "10", - "vcpus": "", + "vcpus": 0, "swap": "512", "ephemeral": "512", "disabled": False, diff --git a/nova/tests/integrated/v3/api_samples/flavor-manage/flavor-create-post-resp.json.tpl b/nova/tests/integrated/v3/api_samples/flavor-manage/flavor-create-post-resp.json.tpl index a8bddbdbf682..42825dcc44c3 100644 --- a/nova/tests/integrated/v3/api_samples/flavor-manage/flavor-create-post-resp.json.tpl +++ b/nova/tests/integrated/v3/api_samples/flavor-manage/flavor-create-post-resp.json.tpl @@ -16,7 +16,7 @@ "ram": 1024, "vcpus": 2, "disabled": false, - "ephemeral": "", - "swap": "" + "ephemeral": 0, + "swap": 0 } } diff --git a/nova/tests/integrated/v3/api_samples/flavor-manage/flavor-create-post-resp.xml.tpl b/nova/tests/integrated/v3/api_samples/flavor-manage/flavor-create-post-resp.xml.tpl index 5550529fad16..e4910b49718c 100644 --- a/nova/tests/integrated/v3/api_samples/flavor-manage/flavor-create-post-resp.xml.tpl +++ b/nova/tests/integrated/v3/api_samples/flavor-manage/flavor-create-post-resp.xml.tpl @@ -1,5 +1,5 @@ - + 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 index 73657dbb29e3..e6415aa61902 100644 --- 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 @@ -16,7 +16,7 @@ "ram": 512, "vcpus": 1, "disabled": false, - "ephemeral": "", - "swap": "" + "ephemeral": 0, + "swap": 0 } } 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 index aab6ecf14fe5..25f79e51da17 100644 --- 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 @@ -1,5 +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 index b523b517d47e..34bc739c0353 100644 --- 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 @@ -3,7 +3,7 @@ { "disabled": false, "disk": 1, - "ephemeral": "", + "ephemeral": 0, "id": "1", "links": [ { @@ -17,13 +17,13 @@ ], "name": "m1.tiny", "ram": 512, - "swap": "", + "swap": 0, "vcpus": 1 }, { "disabled": false, "disk": 20, - "ephemeral": "", + "ephemeral": 0, "id": "2", "links": [ { @@ -37,13 +37,13 @@ ], "name": "m1.small", "ram": 2048, - "swap": "", + "swap": 0, "vcpus": 1 }, { "disabled": false, "disk": 40, - "ephemeral": "", + "ephemeral": 0, "id": "3", "links": [ { @@ -57,13 +57,13 @@ ], "name": "m1.medium", "ram": 4096, - "swap": "", + "swap": 0, "vcpus": 2 }, { "disabled": false, "disk": 80, - "ephemeral": "", + "ephemeral": 0, "id": "4", "links": [ { @@ -77,13 +77,13 @@ ], "name": "m1.large", "ram": 8192, - "swap": "", + "swap": 0, "vcpus": 4 }, { "disabled": false, "disk": 160, - "ephemeral": "", + "ephemeral": 0, "id": "5", "links": [ { @@ -97,7 +97,7 @@ ], "name": "m1.xlarge", "ram": 16384, - "swap": "", + "swap": 0, "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 index a25ff9944441..20508af04971 100644 --- 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 @@ -1,22 +1,22 @@ - + - + - + - + - + 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 index 16cdfc4cb662..1e1f0cd4d0b0 100644 --- 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 @@ -17,7 +17,7 @@ "ram": 1024, "vcpus": 2, "disabled": false, - "ephemeral": "", - "swap": "" + "ephemeral": 0, + "swap": 0 } } 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 index 4405a19e3f13..4cbf2a96c6c2 100644 --- 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 @@ -1,5 +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 index 88104204def5..c3c0eacea844 100644 --- 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 @@ -3,7 +3,7 @@ { "disabled": false, "disk": 1, - "ephemeral": "", + "ephemeral": 0, "id": "1", "links": [ { @@ -18,13 +18,13 @@ "name": "m1.tiny", "os-flavor-access:is_public": true, "ram": 512, - "swap": "", + "swap": 0, "vcpus": 1 }, { "disabled": false, "disk": 20, - "ephemeral": "", + "ephemeral": 0, "id": "2", "links": [ { @@ -39,13 +39,13 @@ "name": "m1.small", "os-flavor-access:is_public": true, "ram": 2048, - "swap": "", + "swap": 0, "vcpus": 1 }, { "disabled": false, "disk": 40, - "ephemeral": "", + "ephemeral": 0, "id": "3", "links": [ { @@ -60,13 +60,13 @@ "name": "m1.medium", "os-flavor-access:is_public": true, "ram": 4096, - "swap": "", + "swap": 0, "vcpus": 2 }, { "disabled": false, "disk": 80, - "ephemeral": "", + "ephemeral": 0, "id": "4", "links": [ { @@ -81,13 +81,13 @@ "name": "m1.large", "os-flavor-access:is_public": true, "ram": 8192, - "swap": "", + "swap": 0, "vcpus": 4 }, { "disabled": false, "disk": 160, - "ephemeral": "", + "ephemeral": 0, "id": "5", "links": [ { @@ -102,7 +102,7 @@ "name": "m1.xlarge", "os-flavor-access:is_public": true, "ram": 16384, - "swap": "", + "swap": 0, "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 index 098c7bd8ac84..7ff85f9da51c 100644 --- 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 @@ -1,22 +1,22 @@ - + - + - + - + - + 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 index ffe309be48cb..771e9a58fa8c 100644 --- 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 @@ -17,7 +17,7 @@ "ram": 512, "vcpus": 1, "disabled": false, - "ephemeral": "", - "swap": "" + "ephemeral": 0, + "swap": 0 } } 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 index 73c9a69a81bc..dc67551ba64c 100644 --- 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 @@ -1,5 +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 index 4fa78396b7df..427febfbe5d5 100644 --- 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 @@ -16,8 +16,8 @@ "ram": 512, "vcpus": 1, "disabled": false, - "ephemeral": "", - "swap": "", + "ephemeral": 0, + "swap": 0, "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 index 75a10a519d57..2cbcc53376bc 100644 --- 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 @@ -1,5 +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 index 589bca049b83..b9d1375be1c8 100644 --- 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 @@ -2,7 +2,7 @@ "flavor": { "disabled": false, "disk": 1, - "ephemeral": "", + "ephemeral": 0, "id": "1", "links": [ { @@ -17,7 +17,7 @@ "name": "m1.tiny", "ram": 512, "rxtx_factor": 1.0, - "swap": "", + "swap": 0, "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 index ce276ef9fbb6..ae0324d3e1fb 100644 --- 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 @@ -1,5 +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 index 1865c8e77b27..d4fe93a815c8 100644 --- 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 @@ -3,7 +3,7 @@ { "disabled": false, "disk": 1, - "ephemeral": "", + "ephemeral": 0, "id": "1", "links": [ { @@ -18,13 +18,13 @@ "name": "m1.tiny", "ram": 512, "rxtx_factor": 1.0, - "swap": "", + "swap": 0, "vcpus": 1 }, { "disabled": false, "disk": 20, - "ephemeral": "", + "ephemeral": 0, "id": "2", "links": [ { @@ -39,13 +39,13 @@ "name": "m1.small", "ram": 2048, "rxtx_factor": 1.0, - "swap": "", + "swap": 0, "vcpus": 1 }, { "disabled": false, "disk": 40, - "ephemeral": "", + "ephemeral": 0, "id": "3", "links": [ { @@ -60,13 +60,13 @@ "name": "m1.medium", "ram": 4096, "rxtx_factor": 1.0, - "swap": "", + "swap": 0, "vcpus": 2 }, { "disabled": false, "disk": 80, - "ephemeral": "", + "ephemeral": 0, "id": "4", "links": [ { @@ -81,13 +81,13 @@ "name": "m1.large", "ram": 8192, "rxtx_factor": 1.0, - "swap": "", + "swap": 0, "vcpus": 4 }, { "disabled": false, "disk": 160, - "ephemeral": "", + "ephemeral": 0, "id": "5", "links": [ { @@ -102,8 +102,8 @@ "name": "m1.xlarge", "ram": 16384, "rxtx_factor": 1.0, - "swap": "", + "swap": 0, "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 index 74b66eaae2e4..475fd4a717b8 100644 --- 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 @@ -1,23 +1,23 @@ - + - + - + - + - + - \ No newline at end of file + 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 index bda2aa6f9f86..69bf80ebf632 100644 --- 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 @@ -17,7 +17,7 @@ "rxtx_factor": 2.0, "vcpus": 2, "disabled": false, - "ephemeral": "", - "swap": "" + "ephemeral": 0, + "swap": 0 } } 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 index 2ad1dfe73944..b0a0e30b614d 100644 --- 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 @@ -1,5 +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 index 5a28eba436d5..cc49efe9f4f3 100644 --- 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 @@ -3,7 +3,7 @@ { "disabled": false, "disk": 1, - "ephemeral": "", + "ephemeral": 0, "id": "1", "links": [ { @@ -17,14 +17,14 @@ ], "name": "m1.tiny", "ram": 512, - "swap": "", + "swap": 0, "vcpus": 1, "rxtx_factor": 1.0 }, { "disabled": false, "disk": 20, - "ephemeral": "", + "ephemeral": 0, "id": "2", "links": [ { @@ -38,14 +38,14 @@ ], "name": "m1.small", "ram": 2048, - "swap": "", + "swap": 0, "vcpus": 1, "rxtx_factor": 1.0 }, { "disabled": false, "disk": 40, - "ephemeral": "", + "ephemeral": 0, "id": "3", "links": [ { @@ -59,14 +59,14 @@ ], "name": "m1.medium", "ram": 4096, - "swap": "", + "swap": 0, "vcpus": 2, "rxtx_factor": 1.0 }, { "disabled": false, "disk": 80, - "ephemeral": "", + "ephemeral": 0, "id": "4", "links": [ { @@ -80,14 +80,14 @@ ], "name": "m1.large", "ram": 8192, - "swap": "", + "swap": 0, "vcpus": 4, "rxtx_factor": 1.0 }, { "disabled": false, "disk": 160, - "ephemeral": "", + "ephemeral": 0, "id": "5", "links": [ { @@ -101,7 +101,7 @@ ], "name": "m1.xlarge", "ram": 16384, - "swap": "", + "swap": 0, "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 index 80612ecca738..8ec762a2a258 100644 --- 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 @@ -1,22 +1,22 @@ - + - + - + - + - +