From 5df0cc45ee74620141d66e6204470a510128c461 Mon Sep 17 00:00:00 2001 From: Hans Lindgren Date: Fri, 13 Nov 2015 13:18:00 +0100 Subject: Remove flavors.get_flavor() only used in tests This method is only used in tests and all it really do is calling the object method Flavor.get_by_id(). Lets remove it and call with object method directly instead. Change-Id: I93d57b14cd60fe5c6a24573a74b691c01fb10563 --- nova/compute/flavors.py | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'nova/compute/flavors.py') diff --git a/nova/compute/flavors.py b/nova/compute/flavors.py index f7e010c869..b443d73f71 100644 --- a/nova/compute/flavors.py +++ b/nova/compute/flavors.py @@ -206,20 +206,6 @@ def get_default_flavor(): return get_flavor_by_name(name) -def get_flavor(instance_type_id, ctxt=None, inactive=False): - """Retrieves single flavor by id.""" - if instance_type_id is None: - return get_default_flavor() - - if ctxt is None: - ctxt = context.get_admin_context() - - if inactive: - ctxt = ctxt.elevated(read_deleted="yes") - - return objects.Flavor.get_by_id(ctxt, instance_type_id) - - def get_flavor_by_name(name, ctxt=None): """Retrieves single flavor by name.""" if name is None: -- cgit v1.2.1