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
This commit is contained in:
Ihar Hrachyshka 2018-02-08 20:53:58 -08:00
parent 6f83466307
commit adbef04629
1 changed files with 0 additions and 3 deletions

View File

@ -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)