summaryrefslogtreecommitdiff
path: root/nova/compute/flavors.py
diff options
context:
space:
mode:
authorHans Lindgren <hanlind@kth.se>2015-11-13 13:18:00 +0100
committerHans Lindgren <hanlind@kth.se>2015-11-13 14:17:06 +0100
commit5df0cc45ee74620141d66e6204470a510128c461 (patch)
tree82a2e16a54530f63e34b9b84c7b31366bb3732e2 /nova/compute/flavors.py
parentccc87a0d5bcee7f0aa8b3354809001d5524783ed (diff)
downloadnova-5df0cc45ee74620141d66e6204470a510128c461.tar.gz
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
Diffstat (limited to 'nova/compute/flavors.py')
-rw-r--r--nova/compute/flavors.py14
1 files changed, 0 insertions, 14 deletions
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: