From adbef046291f40f59e673f26b9126522f5d2d6f1 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Thu, 8 Feb 2018 20:53:58 -0800 Subject: [PATCH] Remove redundant get_object call when creating fip qos binding We try to fetch binding (and doing it wrong by passing incorrect OVO class), and then return the result to callers. But no callers care about the result, so it's useless work (and bad code). TrivialFix Change-Id: I68b436c9a0665d276bcda30f414a79f4d83e3758 Related-Bug: #1746996 --- neutron/db/l3_fip_qos.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/neutron/db/l3_fip_qos.py b/neutron/db/l3_fip_qos.py index fad3204806a..4476d90a99d 100644 --- a/neutron/db/l3_fip_qos.py +++ b/neutron/db/l3_fip_qos.py @@ -17,7 +17,6 @@ from neutron_lib.services.qos import constants as qos_consts from neutron.common import exceptions as n_exc from neutron.db import _resource_extend as resource_extend -from neutron.objects.db import api as obj_db_api from neutron.objects.qos import policy as policy_object @@ -44,8 +43,6 @@ class FloatingQoSDbMixin(object): def _create_fip_qos_db(self, context, fip_id, policy_id): policy = self._get_policy_obj(context, policy_id) policy.attach_floatingip(fip_id) - binding_db_obj = obj_db_api.get_object(policy, context, fip_id=fip_id) - return binding_db_obj def _delete_fip_qos_db(self, context, fip_id, policy_id): policy = self._get_policy_obj(context, policy_id)