summaryrefslogtreecommitdiffstats
path: root/nova/tests/conductor
diff options
context:
space:
mode:
authorJoe Gordon <joe.gordon0@gmail.com>2013-05-17 22:01:03 -0700
committerJoe Gordon <joe.gordon0@gmail.com>2013-06-11 10:36:39 -0700
commitb7fe4e206b54f5f43d520c1e9504f268fc1dff9a (patch)
tree4858654bf5f34b6d2686df69be095f5f46c32434 /nova/tests/conductor
parent685228d96b7d40f537cf6144014234e24e8cd7fd (diff)
downloadnova-b7fe4e206b54f5f43d520c1e9504f268fc1dff9a.tar.gz
nova-b7fe4e206b54f5f43d520c1e9504f268fc1dff9a.tar.xz
nova-b7fe4e206b54f5f43d520c1e9504f268fc1dff9a.zip
Rename functions in nova.compute.flavors from instance_type
Second step in removing references to instance_types. Remove all references to instance_type in nova.compute.flavors. Also update compute devref to reflect changed name. Partially implements bp flavor-instance-type-dedup renamed: nova/tests/test_instance_types.py -> test_flavors.py Change-Id: I7413bf832c61d04ab90ec8b1370d3f01372c4172
Diffstat (limited to 'nova/tests/conductor')
-rw-r--r--nova/tests/conductor/test_conductor.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/nova/tests/conductor/test_conductor.py b/nova/tests/conductor/test_conductor.py
index e5abd1182..03896ee3a 100644
--- a/nova/tests/conductor/test_conductor.py
+++ b/nova/tests/conductor/test_conductor.py
@@ -79,7 +79,7 @@ class _BaseTestCase(object):
inst['user_id'] = self.user_id
inst['project_id'] = self.project_id
inst['host'] = 'fake_host'
- type_id = flavors.get_instance_type_by_name(type_name)['id']
+ type_id = flavors.get_flavor_by_name(type_name)['id']
inst['instance_type_id'] = type_id
inst['ami_launch_index'] = 0
inst['memory_mb'] = 0
@@ -357,7 +357,7 @@ class _BaseTestCase(object):
fake_instance,
fake_values)
- def test_instance_type_get(self):
+ def test_flavor_get(self):
self.mox.StubOutWithMock(db, 'instance_type_get')
db.instance_type_get(self.context, 'fake-id').AndReturn('fake-type')
self.mox.ReplayAll()
@@ -1197,11 +1197,11 @@ class _BaseTaskTestCase(object):
self.context, None, None, True, False, "dummy", None, None)
def test_build_instances(self):
- instance_type = flavors.get_default_instance_type()
- system_metadata = flavors.save_instance_type_info({}, instance_type)
+ instance_type = flavors.get_default_flavor()
+ system_metadata = flavors.save_flavor_info({}, instance_type)
# NOTE(alaski): instance_type -> system_metadata -> instance_type loses
# some data (extra_specs) so we need both for testing.
- instance_type_extract = flavors.extract_instance_type(
+ instance_type_extract = flavors.extract_flavor(
{'system_metadata': system_metadata})
self.mox.StubOutWithMock(self.conductor_manager.scheduler_rpcapi,
'run_instance')