fixing the flavor tests

Fixes Bug: 1157541

Change-Id: Ia77a71139fd96aadfe9618240c5c234ca552f167
This commit is contained in:
Craig Vyvial 2013-04-10 00:24:36 -05:00
parent b8e274685d
commit 2a30e1871b
3 changed files with 18 additions and 6 deletions

View File

@ -103,7 +103,7 @@ notifier_queue_port = 5672
notifier_queue_virtual_host = /
notifier_queue_transport = memory
api_paste_config=api-paste.ini.test
paste_config_file=api-paste.ini.test
[composite:reddwarf]
use = call:reddwarf.common.wsgi:versioned_urlmap

View File

@ -91,6 +91,16 @@
"id": 8,
"name": "m1.rd-smaller",
"ram": 768
},
{
"id": 9,
"name": "tinier",
"ram": 506
},
{
"id": 10,
"name": "m1.rd-tiny",
"ram": 512
}
],

View File

@ -59,13 +59,15 @@ class FakeFlavors(object):
def __init__(self):
self.db = {}
self._add(1, 0, "m1.tiny", 512)
self._add(2, 10, "m1.small", 2048)
self._add(3, 10, "m1.medium", 4096)
self._add(4, 10, "m1.large", 8192)
self._add(5, 10, "m1.xlarge", 16384)
self._add(2, 20, "m1.small", 2048)
self._add(3, 40, "m1.medium", 4096)
self._add(4, 80, "m1.large", 8192)
self._add(5, 160, "m1.xlarge", 16384)
self._add(6, 0, "m1.nano", 64)
self._add(7, 0, "m1.micro", 128)
self._add(8, 0, "m1.rd-smaller", 768)
self._add(8, 2, "m1.rd-smaller", 768)
self._add(9, 10, "tinier", 506)
self._add(10, 2, "m1.rd-tiny", 512)
def _add(self, *args, **kwargs):
new_flavor = FakeFlavor(*args, **kwargs)