]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Strip unnecessary overrides in extraroute_db mixin
authorKevin Benton <blak111@gmail.com>
Fri, 17 Apr 2015 11:18:56 +0000 (04:18 -0700)
committerKevin Benton <blak111@gmail.com>
Fri, 17 Apr 2015 11:18:56 +0000 (04:18 -0700)
The extra route DB mixin seemed to be overriding the
get_router and get_routers method for no reason. They
both just called the super version of themselves with
the same arguments.

This patch just pulls those functions out. Found in
tracebacks while working on a related bug.

Change-Id: Ifd1a0676073e91104db3a13df6fe1eb2189f20f5
Related-bug: #1445412

neutron/db/extraroute_db.py

index 5966439c96e5e5f2868ddc9880e2bb02764b2909..264bff163179e34e8399b9e46c02c093ea5bd79b 100644 (file)
@@ -157,21 +157,6 @@ class ExtraRoute_dbonly_mixin(l3_db.L3_NAT_dbonly_mixin):
             routes_dict[(route['destination'], route['nexthop'])] = route
         return routes, routes_dict
 
-    def get_router(self, context, id, fields=None):
-        with context.session.begin(subtransactions=True):
-            router = super(ExtraRoute_dbonly_mixin, self).get_router(
-                context, id, fields)
-            return router
-
-    def get_routers(self, context, filters=None, fields=None,
-                    sorts=None, limit=None, marker=None,
-                    page_reverse=False):
-        with context.session.begin(subtransactions=True):
-            routers = super(ExtraRoute_dbonly_mixin, self).get_routers(
-                context, filters, fields, sorts=sorts, limit=limit,
-                marker=marker, page_reverse=page_reverse)
-            return routers
-
     def _confirm_router_interface_not_in_use(self, context, router_id,
                                              subnet_id):
         super(ExtraRoute_dbonly_mixin,