]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
L3 DB: set get_assoc_data to be an internal method
authorGary Kotton <gkotton@vmware.com>
Wed, 9 Dec 2015 10:01:24 +0000 (02:01 -0800)
committerGary Kotton <gkotton@vmware.com>
Wed, 9 Dec 2015 10:01:24 +0000 (02:01 -0800)
Use an _ to indicate the method is only used internally.
This will help avoid confusion if this method is updated.

TrivailFix

Change-Id: I8a34ddddf0b4d445ec14438ef0044fdafc810268

neutron/db/l3_db.py

index 7984330247cd4e7b3a689ccccb8adaf3f2ba9a98..c7a45ca6642f433da4077214fb24bb20a29ffb51 100644 (file)
@@ -893,7 +893,7 @@ class L3_NAT_dbonly_mixin(l3.RouterPluginBase):
             internal_subnet_id = ipv4_fixed_ips[0]['subnet_id']
         return internal_port, internal_subnet_id, internal_ip_address
 
-    def get_assoc_data(self, context, fip, floating_network_id):
+    def _get_assoc_data(self, context, fip, floating_network_id):
         """Determine/extract data associated with the internal port.
 
         When a floating IP is associated with an internal port,
@@ -917,7 +917,7 @@ class L3_NAT_dbonly_mixin(l3.RouterPluginBase):
             msg = _("fixed_ip_address cannot be specified without a port_id")
             raise n_exc.BadRequest(resource='floatingip', msg=msg)
         if fip.get('port_id'):
-            port_id, internal_ip_address, router_id = self.get_assoc_data(
+            port_id, internal_ip_address, router_id = self._get_assoc_data(
                 context,
                 fip,
                 floatingip_db['floating_network_id'])