From 2c4e0d4f8fe68d7668f665afeaf95e2ce7b17fd8 Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Wed, 30 Mar 2022 11:32:08 -0400 Subject: [PATCH] Remove unneeded volume_types.get_all_types_by_group method This is only used by the VolumeType object -- other users in Cinder should just call via the object instead of this method. Change-Id: I7adc1d1208fb36a9a0cc670d41f779486b137802 --- cinder/objects/volume_type.py | 2 +- cinder/volume/volume_types.py | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/cinder/objects/volume_type.py b/cinder/objects/volume_type.py index ff7a127d5e8..c784ef456cf 100644 --- a/cinder/objects/volume_type.py +++ b/cinder/objects/volume_type.py @@ -184,7 +184,7 @@ class VolumeTypeList(base.ObjectListBase, base.CinderObject): @classmethod def get_all_by_group(cls, context, group_id): # Generic volume group - types = volume_types.get_all_types_by_group( + types = db.volume_type_get_all_by_group( context.elevated(), group_id) expected_attrs = VolumeType._get_expected_attrs(context) return base.obj_make_list(context, cls(context), diff --git a/cinder/volume/volume_types.py b/cinder/volume/volume_types.py index a191db2db1e..f4846e02c3b 100644 --- a/cinder/volume/volume_types.py +++ b/cinder/volume/volume_types.py @@ -158,12 +158,6 @@ def get_all_types(context, inactive=0, filters=None, marker=None, return vol_types -def get_all_types_by_group(context, group_id): - """Get all volume_types in a group.""" - vol_types = db.volume_type_get_all_by_group(context, group_id) - return vol_types - - def get_volume_type(ctxt, id, expected_fields=None): """Retrieves single volume type by id.""" if id is None: