Commit 313c9e3c authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

cyclades: Rename 'cpu' to 'vcpus' to flavor API

Rename attribute of GET /flavors response, from 'cpu' to 'vcpus'.

Refs #3768
parent f6a63054
......@@ -59,7 +59,7 @@ def flavor_to_dict(flavor, detail=True):
if detail:
d['ram'] = flavor.ram
d['disk'] = flavor.disk
d['cpu'] = flavor.cpu
d['vcpus'] = flavor.cpu
d['SNF:disk_template'] = flavor.disk_template
return d
......
......@@ -71,7 +71,7 @@ class FlavorAPITest(BaseAPITest):
for i in range(0, len(db_flavors)):
api_flavor = api_flavors[i]
db_flavor = Flavor.objects.get(id=db_flavors[i].id)
self.assertEqual(api_flavor['cpu'], db_flavor.cpu)
self.assertEqual(api_flavor['vcpus'], db_flavor.cpu)
self.assertEqual(api_flavor['id'], db_flavor.id)
self.assertEqual(api_flavor['disk'], db_flavor.disk)
self.assertEqual(api_flavor['name'], db_flavor.name)
......@@ -88,7 +88,7 @@ class FlavorAPITest(BaseAPITest):
api_flavor = json.loads(response.content)['flavor']
db_flavor = Flavor.objects.get(id=flavor.id)
self.assertEqual(api_flavor['cpu'], db_flavor.cpu)
self.assertEqual(api_flavor['vcpus'], db_flavor.cpu)
self.assertEqual(api_flavor['id'], db_flavor.id)
self.assertEqual(api_flavor['disk'], db_flavor.disk)
self.assertEqual(api_flavor['name'], db_flavor.name)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment