diff options
| author | Joe Gordon <jogo@cloudscaling.com> | 2013-05-07 20:08:53 +0000 |
|---|---|---|
| committer | Joe Gordon <jogo@cloudscaling.com> | 2013-05-07 21:41:19 +0000 |
| commit | 3222d8bb021effb3156ed86e263cdc0ac64fd44a (patch) | |
| tree | 748c322d33532f654acee8659ab9cc4725e68d53 /nova/scheduler | |
| parent | f917d24bd333e7068ae17cc1027dd8e80896e5a5 (diff) | |
| download | nova-3222d8bb021effb3156ed86e263cdc0ac64fd44a.tar.gz nova-3222d8bb021effb3156ed86e263cdc0ac64fd44a.tar.xz nova-3222d8bb021effb3156ed86e263cdc0ac64fd44a.zip | |
Rename nova.compute.instance_types to flavors
First step in removing references to instance_types. Rename instnace_types.py
and update references to it. We currently use instance_type and flavor as
synonyms, to reduce confusion we are picking one. We are going with our own
terminology, flavors.
renamed: nova/compute/instance_types.py -> nova/compute/flavors.py
Partially implements bp flavor-instance-type-dedup
Change-Id: I9dc04cf311aa8813be4f5329f23729d2c43cae6d
Diffstat (limited to 'nova/scheduler')
| -rw-r--r-- | nova/scheduler/driver.py | 4 | ||||
| -rw-r--r-- | nova/scheduler/filter_scheduler.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/nova/scheduler/driver.py b/nova/scheduler/driver.py index 92c7779e8..506c77cff 100644 --- a/nova/scheduler/driver.py +++ b/nova/scheduler/driver.py @@ -25,7 +25,7 @@ import sys from oslo.config import cfg -from nova.compute import instance_types +from nova.compute import flavors from nova.compute import power_state from nova.compute import rpcapi as compute_rpcapi from nova.compute import utils as compute_utils @@ -257,7 +257,7 @@ class Scheduler(object): # If dest is not specified, have scheduler pick one. if dest is None: - instance_type = instance_types.extract_instance_type(instance_ref) + instance_type = flavors.extract_instance_type(instance_ref) image = self.image_service.show(context, instance_ref['image_ref']) request_spec = {'instance_properties': instance_ref, 'instance_type': instance_type, diff --git a/nova/scheduler/filter_scheduler.py b/nova/scheduler/filter_scheduler.py index 8f99db0ae..440492f40 100644 --- a/nova/scheduler/filter_scheduler.py +++ b/nova/scheduler/filter_scheduler.py @@ -23,7 +23,7 @@ import random from oslo.config import cfg -from nova.compute import instance_types +from nova.compute import flavors from nova import exception from nova.openstack.common import log as logging from nova.openstack.common.notifier import api as notifier @@ -380,7 +380,7 @@ class FilterScheduler(driver.Scheduler): host_state = self.host_manager.host_state_cls(dest, node) host_state.update_from_compute_node(compute) - instance_type = instance_types.extract_instance_type(instance_ref) + instance_type = flavors.extract_instance_type(instance_ref) filter_properties = {'instance_type': instance_type} hosts = self.host_manager.get_filtered_hosts([host_state], |
