From b7fe4e206b54f5f43d520c1e9504f268fc1dff9a Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Fri, 17 May 2013 22:01:03 -0700 Subject: 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 --- nova/cmd/manage.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'nova/cmd') diff --git a/nova/cmd/manage.py b/nova/cmd/manage.py index 599b9a299..1dc57aea0 100644 --- a/nova/cmd/manage.py +++ b/nova/cmd/manage.py @@ -617,7 +617,7 @@ class VmCommands(object): context.get_admin_context(), host) for instance in instances: - instance_type = flavors.extract_instance_type(instance) + instance_type = flavors.extract_flavor(instance) print ("%-10s %-15s %-10s %-10s %-26s %-9s %-9s %-9s" " %-10s %-10s %-10s %-5d" % (instance['display_name'], instance['host'], @@ -928,9 +928,9 @@ class InstanceTypeCommands(object): """Lists all active or specific instance types / flavors.""" try: if name is None: - inst_types = flavors.get_all_types() + inst_types = flavors.get_all_flavors() else: - inst_types = flavors.get_instance_type_by_name(name) + inst_types = flavors.get_flavor_by_name(name) except db_exc.DBError as e: _db_error(e) if isinstance(inst_types.values()[0], dict): @@ -946,7 +946,7 @@ class InstanceTypeCommands(object): """Add key/value pair to specified instance type's extra_specs.""" try: try: - inst_type = flavors.get_instance_type_by_name(name) + inst_type = flavors.get_flavor_by_name(name) except exception.InstanceTypeNotFoundByName as e: print e return(2) @@ -968,7 +968,7 @@ class InstanceTypeCommands(object): """Delete the specified extra spec for instance type.""" try: try: - inst_type = flavors.get_instance_type_by_name(name) + inst_type = flavors.get_flavor_by_name(name) except exception.InstanceTypeNotFoundByName as e: print e return(2) -- cgit