def get_all_by_group(cls, context, group_id): # Generic volume 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), objects.VolumeType, types, expected_attrs=expected_attrs)
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