Merge "Fix V3 API flavor returning empty string for attributes"

This commit is contained in:
Jenkins 2013-10-07 18:48:29 +00:00 committed by Gerrit Code Review
commit a49083d79f
44 changed files with 185 additions and 175 deletions

View File

@ -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
}
}

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="test_flavor" ram="1024" ephemeral="" disabled="False" vcpus="2" swap="" disk="10" id="10">
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="test_flavor" ram="1024" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="10" id="10">
<atom:link href="http://openstack.example.com/v3/flavors/10" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/10" rel="bookmark"/>
</flavor>

View File

@ -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
}
}

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="m1.tiny" ram="512" ephemeral="" disabled="False" vcpus="1" swap="" disk="1" id="1">
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1">
<atom:link href="http://openstack.example.com/v3/flavors/1" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/1" rel="bookmark"/>
</flavor>

View File

@ -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
}
]

View File

@ -1,22 +1,22 @@
<?xml version='1.0' encoding='UTF-8'?>
<flavors xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
<flavor name="m1.tiny" ram="512" ephemeral="" disabled="False" vcpus="1" swap="" disk="1" id="1">
<flavor name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1">
<atom:link href="http://openstack.example.com/v3/flavors/1" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/1" rel="bookmark"/>
</flavor>
<flavor name="m1.small" ram="2048" ephemeral="" disabled="False" vcpus="1" swap="" disk="20" id="2">
<flavor name="m1.small" ram="2048" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="20" id="2">
<atom:link href="http://openstack.example.com/v3/flavors/2" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/2" rel="bookmark"/>
</flavor>
<flavor name="m1.medium" ram="4096" ephemeral="" disabled="False" vcpus="2" swap="" disk="40" id="3">
<flavor name="m1.medium" ram="4096" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="40" id="3">
<atom:link href="http://openstack.example.com/v3/flavors/3" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/3" rel="bookmark"/>
</flavor>
<flavor name="m1.large" ram="8192" ephemeral="" disabled="False" vcpus="4" swap="" disk="80" id="4">
<flavor name="m1.large" ram="8192" ephemeral="0" disabled="False" vcpus="4" swap="0" disk="80" id="4">
<atom:link href="http://openstack.example.com/v3/flavors/4" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/4" rel="bookmark"/>
</flavor>
<flavor name="m1.xlarge" ram="16384" ephemeral="" disabled="False" vcpus="8" swap="" disk="160" id="5">
<flavor name="m1.xlarge" ram="16384" ephemeral="0" disabled="False" vcpus="8" swap="0" disk="160" id="5">
<atom:link href="http://openstack.example.com/v3/flavors/5" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/5" rel="bookmark"/>
</flavor>

View File

@ -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
}
}

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<flavor xmlns:os-flavor-access="http://docs.openstack.org/compute/ext/os-flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="test_flavor" ram="1024" ephemeral="" disabled="False" vcpus="2" swap="" disk="10" id="10" os-flavor-access:is_public="False">
<flavor xmlns:os-flavor-access="http://docs.openstack.org/compute/ext/os-flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="test_flavor" ram="1024" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="10" id="10" os-flavor-access:is_public="False">
<atom:link href="http://openstack.example.com/v3/flavors/10" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/10" rel="bookmark"/>
</flavor>

View File

@ -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
}
]

View File

@ -1,22 +1,22 @@
<?xml version='1.0' encoding='UTF-8'?>
<flavors xmlns:os-flavor-access="http://docs.openstack.org/compute/ext/os-flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
<flavor name="m1.tiny" ram="512" ephemeral="" disabled="False" vcpus="1" swap="" disk="1" id="1" os-flavor-access:is_public="True">
<flavor name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" os-flavor-access:is_public="True">
<atom:link href="http://openstack.example.com/v3/flavors/1" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/1" rel="bookmark"/>
</flavor>
<flavor name="m1.small" ram="2048" ephemeral="" disabled="False" vcpus="1" swap="" disk="20" id="2" os-flavor-access:is_public="True">
<flavor name="m1.small" ram="2048" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="20" id="2" os-flavor-access:is_public="True">
<atom:link href="http://openstack.example.com/v3/flavors/2" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/2" rel="bookmark"/>
</flavor>
<flavor name="m1.medium" ram="4096" ephemeral="" disabled="False" vcpus="2" swap="" disk="40" id="3" os-flavor-access:is_public="True">
<flavor name="m1.medium" ram="4096" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="40" id="3" os-flavor-access:is_public="True">
<atom:link href="http://openstack.example.com/v3/flavors/3" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/3" rel="bookmark"/>
</flavor>
<flavor name="m1.large" ram="8192" ephemeral="" disabled="False" vcpus="4" swap="" disk="80" id="4" os-flavor-access:is_public="True">
<flavor name="m1.large" ram="8192" ephemeral="0" disabled="False" vcpus="4" swap="0" disk="80" id="4" os-flavor-access:is_public="True">
<atom:link href="http://openstack.example.com/v3/flavors/4" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/4" rel="bookmark"/>
</flavor>
<flavor name="m1.xlarge" ram="16384" ephemeral="" disabled="False" vcpus="8" swap="" disk="160" id="5" os-flavor-access:is_public="True">
<flavor name="m1.xlarge" ram="16384" ephemeral="0" disabled="False" vcpus="8" swap="0" disk="160" id="5" os-flavor-access:is_public="True">
<atom:link href="http://openstack.example.com/v3/flavors/5" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/5" rel="bookmark"/>
</flavor>

View File

@ -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
}
}

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<flavor xmlns:os-flavor-access="http://docs.openstack.org/compute/ext/os-flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="m1.tiny" ram="512" ephemeral="" disabled="False" vcpus="1" swap="" disk="1" id="1" os-flavor-access:is_public="True">
<flavor xmlns:os-flavor-access="http://docs.openstack.org/compute/ext/os-flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" os-flavor-access:is_public="True">
<atom:link href="http://openstack.example.com/v3/flavors/1" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/1" rel="bookmark"/>
</flavor>

View File

@ -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
}
}

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="m1.tiny" ram="512" ephemeral="" disabled="False" vcpus="1" swap="" disk="1" id="1" rxtx_factor="1.0">
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" rxtx_factor="1.0">
<atom:link href="http://openstack.example.com/v3/flavors/1" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/1" rel="bookmark"/>
</flavor>

View File

@ -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
}
]

View File

@ -1,22 +1,22 @@
<?xml version='1.0' encoding='UTF-8'?>
<flavors xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
<flavor name="m1.tiny" ram="512" ephemeral="" disabled="False" vcpus="1" swap="" disk="1" id="1" rxtx_factor="1.0">
<flavor name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" rxtx_factor="1.0">
<atom:link href="http://openstack.example.com/v3/flavors/1" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/1" rel="bookmark"/>
</flavor>
<flavor name="m1.small" ram="2048" ephemeral="" disabled="False" vcpus="1" swap="" disk="20" id="2" rxtx_factor="1.0">
<flavor name="m1.small" ram="2048" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="20" id="2" rxtx_factor="1.0">
<atom:link href="http://openstack.example.com/v3/flavors/2" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/2" rel="bookmark"/>
</flavor>
<flavor name="m1.medium" ram="4096" ephemeral="" disabled="False" vcpus="2" swap="" disk="40" id="3" rxtx_factor="1.0">
<flavor name="m1.medium" ram="4096" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="40" id="3" rxtx_factor="1.0">
<atom:link href="http://openstack.example.com/v3/flavors/3" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/3" rel="bookmark"/>
</flavor>
<flavor name="m1.large" ram="8192" ephemeral="" disabled="False" vcpus="4" swap="" disk="80" id="4" rxtx_factor="1.0">
<flavor name="m1.large" ram="8192" ephemeral="0" disabled="False" vcpus="4" swap="0" disk="80" id="4" rxtx_factor="1.0">
<atom:link href="http://openstack.example.com/v3/flavors/4" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/4" rel="bookmark"/>
</flavor>
<flavor name="m1.xlarge" ram="16384" ephemeral="" disabled="False" vcpus="8" swap="" disk="160" id="5" rxtx_factor="1.0">
<flavor name="m1.xlarge" ram="16384" ephemeral="0" disabled="False" vcpus="8" swap="0" disk="160" id="5" rxtx_factor="1.0">
<atom:link href="http://openstack.example.com/v3/flavors/5" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/5" rel="bookmark"/>
</flavor>

View File

@ -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
}
}

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="flavortest" ram="1024" ephemeral="" disabled="False" vcpus="2" swap="" disk="10" id="100" rxtx_factor="2.0">
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="flavortest" ram="1024" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="10" id="100" rxtx_factor="2.0">
<atom:link href="http://openstack.example.com/v3/flavors/100" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/100" rel="bookmark"/>
</flavor>

View File

@ -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')

View File

@ -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

View File

@ -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,
},
}

View File

@ -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,

View File

@ -16,7 +16,7 @@
"ram": 1024,
"vcpus": 2,
"disabled": false,
"ephemeral": "",
"swap": ""
"ephemeral": 0,
"swap": 0
}
}

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="10" vcpus="2" ram="1024" name="%(flavor_name)s" id="%(flavor_id)s" disabled="False" ephemeral="" swap="">
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="10" vcpus="2" ram="1024" name="%(flavor_name)s" id="%(flavor_id)s" disabled="False" ephemeral="0" swap="0">
<atom:link href="%(host)s/v3/flavors/%(flavor_id)s" rel="self"/>
<atom:link href="%(host)s/flavors/%(flavor_id)s" rel="bookmark"/>
</flavor>

View File

@ -16,7 +16,7 @@
"ram": 512,
"vcpus": 1,
"disabled": false,
"ephemeral": "",
"swap": ""
"ephemeral": 0,
"swap": 0
}
}

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="m1.tiny" ram="512" vcpus="1" disk="1" id="1" disabled="False" ephemeral="" swap="">
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="m1.tiny" ram="512" vcpus="1" disk="1" id="1" disabled="False" ephemeral="0" swap="0">
<atom:link href="%(host)s/v3/flavors/1" rel="self"/>
<atom:link href="%(host)s/flavors/1" rel="bookmark"/>
</flavor>

View File

@ -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
}
]

View File

@ -1,22 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<flavors xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
<flavor name="m1.tiny" ram="512" ephemeral="" disabled="False" vcpus="1" swap="" disk="1" id="1">
<flavor name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1">
<atom:link href="%(host)s/v3/flavors/1" rel="self"/>
<atom:link href="%(host)s/flavors/1" rel="bookmark"/>
</flavor>
<flavor name="m1.small" ram="2048" ephemeral="" disabled="False" vcpus="1" swap="" disk="20" id="2">
<flavor name="m1.small" ram="2048" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="20" id="2">
<atom:link href="%(host)s/v3/flavors/2" rel="self"/>
<atom:link href="%(host)s/flavors/2" rel="bookmark"/>
</flavor>
<flavor name="m1.medium" ram="4096" ephemeral="" disabled="False" vcpus="2" swap="" disk="40" id="3">
<flavor name="m1.medium" ram="4096" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="40" id="3">
<atom:link href="%(host)s/v3/flavors/3" rel="self"/>
<atom:link href="%(host)s/flavors/3" rel="bookmark"/>
</flavor>
<flavor name="m1.large" ram="8192" ephemeral="" disabled="False" vcpus="4" swap="" disk="80" id="4">
<flavor name="m1.large" ram="8192" ephemeral="0" disabled="False" vcpus="4" swap="0" disk="80" id="4">
<atom:link href="%(host)s/v3/flavors/4" rel="self"/>
<atom:link href="%(host)s/flavors/4" rel="bookmark"/>
</flavor>
<flavor name="m1.xlarge" ram="16384" ephemeral="" disabled="False" vcpus="8" swap="" disk="160" id="5">
<flavor name="m1.xlarge" ram="16384" ephemeral="0" disabled="False" vcpus="8" swap="0" disk="160" id="5">
<atom:link href="%(host)s/v3/flavors/5" rel="self"/>
<atom:link href="%(host)s/flavors/5" rel="bookmark"/>
</flavor>

View File

@ -17,7 +17,7 @@
"ram": 1024,
"vcpus": 2,
"disabled": false,
"ephemeral": "",
"swap": ""
"ephemeral": 0,
"swap": 0
}
}

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<flavor xmlns:os-flavor-access="http://docs.openstack.org/compute/ext/os-flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="10" vcpus="2" ram="1024" name="%(flavor_name)s" id="%(flavor_id)s" os-flavor-access:is_public="False" disabled="False" ephemeral="" swap="">
<flavor xmlns:os-flavor-access="http://docs.openstack.org/compute/ext/os-flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="10" vcpus="2" ram="1024" name="%(flavor_name)s" id="%(flavor_id)s" os-flavor-access:is_public="False" disabled="False" ephemeral="0" swap="0">
<atom:link href="%(host)s/v3/flavors/%(flavor_id)s" rel="self"/>
<atom:link href="%(host)s/flavors/%(flavor_id)s" rel="bookmark"/>
</flavor>

View File

@ -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
}
]

View File

@ -1,22 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<flavors xmlns:os-flavor-access="http://docs.openstack.org/compute/ext/os-flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
<flavor name="m1.tiny" ram="512" ephemeral="" disabled="False" vcpus="1" swap="" disk="1" id="1" os-flavor-access:is_public="True">
<flavor name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" os-flavor-access:is_public="True">
<atom:link href="%(host)s/v3/flavors/1" rel="self"/>
<atom:link href="%(host)s/flavors/1" rel="bookmark"/>
</flavor>
<flavor name="m1.small" ram="2048" ephemeral="" disabled="False" vcpus="1" swap="" disk="20" id="2" os-flavor-access:is_public="True">
<flavor name="m1.small" ram="2048" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="20" id="2" os-flavor-access:is_public="True">
<atom:link href="%(host)s/v3/flavors/2" rel="self"/>
<atom:link href="%(host)s/flavors/2" rel="bookmark"/>
</flavor>
<flavor name="m1.medium" ram="4096" ephemeral="" disabled="False" vcpus="2" swap="" disk="40" id="3" os-flavor-access:is_public="True">
<flavor name="m1.medium" ram="4096" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="40" id="3" os-flavor-access:is_public="True">
<atom:link href="%(host)s/v3/flavors/3" rel="self"/>
<atom:link href="%(host)s/flavors/3" rel="bookmark"/>
</flavor>
<flavor name="m1.large" ram="8192" ephemeral="" disabled="False" vcpus="4" swap="" disk="80" id="4" os-flavor-access:is_public="True">
<flavor name="m1.large" ram="8192" ephemeral="0" disabled="False" vcpus="4" swap="0" disk="80" id="4" os-flavor-access:is_public="True">
<atom:link href="%(host)s/v3/flavors/4" rel="self"/>
<atom:link href="%(host)s/flavors/4" rel="bookmark"/>
</flavor>
<flavor name="m1.xlarge" ram="16384" ephemeral="" disabled="False" vcpus="8" swap="" disk="160" id="5" os-flavor-access:is_public="True">
<flavor name="m1.xlarge" ram="16384" ephemeral="0" disabled="False" vcpus="8" swap="0" disk="160" id="5" os-flavor-access:is_public="True">
<atom:link href="%(host)s/v3/flavors/5" rel="self"/>
<atom:link href="%(host)s/flavors/5" rel="bookmark"/>
</flavor>

View File

@ -17,7 +17,7 @@
"ram": 512,
"vcpus": 1,
"disabled": false,
"ephemeral": "",
"swap": ""
"ephemeral": 0,
"swap": 0
}
}

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<flavor xmlns:os-flavor-access="http://docs.openstack.org/compute/ext/os-flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="1" vcpus="1" ram="512" name="m1.tiny" id="%(flavor_id)s" disabled="False" ephemeral="" swap="" os-flavor-access:is_public="True">
<flavor xmlns:os-flavor-access="http://docs.openstack.org/compute/ext/os-flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="1" vcpus="1" ram="512" name="m1.tiny" id="%(flavor_id)s" disabled="False" ephemeral="0" swap="0" os-flavor-access:is_public="True">
<atom:link href="%(host)s/v3/flavors/%(flavor_id)s" rel="self"/>
<atom:link href="%(host)s/flavors/%(flavor_id)s" rel="bookmark"/>
</flavor>

View File

@ -16,8 +16,8 @@
"ram": 512,
"vcpus": 1,
"disabled": false,
"ephemeral": "",
"swap": "",
"ephemeral": 0,
"swap": 0,
"rxtx_factor": 1.0
}
}

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="m1.tiny" ram="512" vcpus="1" disk="1" id="1" disabled="False" ephemeral="" swap="" rxtx_factor="1.0">
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="m1.tiny" ram="512" vcpus="1" disk="1" id="1" disabled="False" ephemeral="0" swap="0" rxtx_factor="1.0">
<atom:link href="%(host)s/v3/flavors/1" rel="self"/>
<atom:link href="%(host)s/flavors/1" rel="bookmark"/>
</flavor>

View File

@ -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
}
}
}

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="m1.tiny" ram="512" ephemeral="" disabled="False" vcpus="1" swap="" disk="1" id="1" rxtx_factor="1.0">
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" rxtx_factor="1.0">
<atom:link href="http://openstack.example.com/v3/flavors/1" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/1" rel="bookmark"/>
</flavor>
</flavor>

View File

@ -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
}
]
}
}

View File

@ -1,23 +1,23 @@
<?xml version='1.0' encoding='UTF-8'?>
<flavors xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
<flavor name="m1.tiny" ram="512" ephemeral="" disabled="False" vcpus="1" swap="" disk="1" id="1" rxtx_factor="1.0">
<flavor name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" rxtx_factor="1.0">
<atom:link href="http://openstack.example.com/v3/flavors/1" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/1" rel="bookmark"/>
</flavor>
<flavor name="m1.small" ram="2048" ephemeral="" disabled="False" vcpus="1" swap="" disk="20" id="2" rxtx_factor="1.0">
<flavor name="m1.small" ram="2048" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="20" id="2" rxtx_factor="1.0">
<atom:link href="http://openstack.example.com/v3/flavors/2" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/2" rel="bookmark"/>
</flavor>
<flavor name="m1.medium" ram="4096" ephemeral="" disabled="False" vcpus="2" swap="" disk="40" id="3" rxtx_factor="1.0">
<flavor name="m1.medium" ram="4096" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="40" id="3" rxtx_factor="1.0">
<atom:link href="http://openstack.example.com/v3/flavors/3" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/3" rel="bookmark"/>
</flavor>
<flavor name="m1.large" ram="8192" ephemeral="" disabled="False" vcpus="4" swap="" disk="80" id="4" rxtx_factor="1.0">
<flavor name="m1.large" ram="8192" ephemeral="0" disabled="False" vcpus="4" swap="0" disk="80" id="4" rxtx_factor="1.0">
<atom:link href="http://openstack.example.com/v3/flavors/4" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/4" rel="bookmark"/>
</flavor>
<flavor name="m1.xlarge" ram="16384" ephemeral="" disabled="False" vcpus="8" swap="" disk="160" id="5" rxtx_factor="1.0">
<flavor name="m1.xlarge" ram="16384" ephemeral="0" disabled="False" vcpus="8" swap="0" disk="160" id="5" rxtx_factor="1.0">
<atom:link href="http://openstack.example.com/v3/flavors/5" rel="self"/>
<atom:link href="http://openstack.example.com/flavors/5" rel="bookmark"/>
</flavor>
</flavors>
</flavors>

View File

@ -17,7 +17,7 @@
"rxtx_factor": 2.0,
"vcpus": 2,
"disabled": false,
"ephemeral": "",
"swap": ""
"ephemeral": 0,
"swap": 0
}
}

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="10" vcpus="2" ram="1024" name="%(flavor_name)s" id="%(flavor_id)s" disabled="False" ephemeral="" swap="" rxtx_factor="2.0">
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="10" vcpus="2" ram="1024" name="%(flavor_name)s" id="%(flavor_id)s" disabled="False" ephemeral="0" swap="0" rxtx_factor="2.0">
<atom:link href="%(host)s/v3/flavors/%(flavor_id)s" rel="self"/>
<atom:link href="%(host)s/flavors/%(flavor_id)s" rel="bookmark"/>
</flavor>

View File

@ -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
}

View File

@ -1,22 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<flavors xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
<flavor name="m1.tiny" ram="512" ephemeral="" disabled="False" vcpus="1" swap="" disk="1" id="1" rxtx_factor="1.0">
<flavor name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" rxtx_factor="1.0">
<atom:link href="%(host)s/v3/flavors/1" rel="self"/>
<atom:link href="%(host)s/flavors/1" rel="bookmark"/>
</flavor>
<flavor name="m1.small" ram="2048" ephemeral="" disabled="False" vcpus="1" swap="" disk="20" id="2" rxtx_factor="1.0">
<flavor name="m1.small" ram="2048" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="20" id="2" rxtx_factor="1.0">
<atom:link href="%(host)s/v3/flavors/2" rel="self"/>
<atom:link href="%(host)s/flavors/2" rel="bookmark"/>
</flavor>
<flavor name="m1.medium" ram="4096" ephemeral="" disabled="False" vcpus="2" swap="" disk="40" id="3" rxtx_factor="1.0">
<flavor name="m1.medium" ram="4096" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="40" id="3" rxtx_factor="1.0">
<atom:link href="%(host)s/v3/flavors/3" rel="self"/>
<atom:link href="%(host)s/flavors/3" rel="bookmark"/>
</flavor>
<flavor name="m1.large" ram="8192" ephemeral="" disabled="False" vcpus="4" swap="" disk="80" id="4" rxtx_factor="1.0">
<flavor name="m1.large" ram="8192" ephemeral="0" disabled="False" vcpus="4" swap="0" disk="80" id="4" rxtx_factor="1.0">
<atom:link href="%(host)s/v3/flavors/4" rel="self"/>
<atom:link href="%(host)s/flavors/4" rel="bookmark"/>
</flavor>
<flavor name="m1.xlarge" ram="16384" ephemeral="" disabled="False" vcpus="8" swap="" disk="160" id="5" rxtx_factor="1.0">
<flavor name="m1.xlarge" ram="16384" ephemeral="0" disabled="False" vcpus="8" swap="0" disk="160" id="5" rxtx_factor="1.0">
<atom:link href="%(host)s/v3/flavors/5" rel="self"/>
<atom:link href="%(host)s/flavors/5" rel="bookmark"/>
</flavor>