]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
l3_agent: avoid name conflict with context
authorIsaku Yamahata <isaku.yamahata@intel.com>
Thu, 16 Oct 2014 06:31:03 +0000 (15:31 +0900)
committerIsaku Yamahata <isaku.yamahata@intel.com>
Thu, 16 Oct 2014 06:35:00 +0000 (15:35 +0900)
module name, context, conflicts with argument name in many place in
l3_agent. In order to avoid such conflict, import context as n_context
following Neutron practice.

Change-Id: Ic3754818f84064d2c8da04914826fc912437b2f0
Closes-Bug: #1381900

neutron/agent/l3_agent.py

index e23b600fbbd5b6f40c8715bbc4a9ea40b9e981b4..112bf77ad27184c876b865f2aec329e2ce0052fe 100644 (file)
@@ -40,7 +40,7 @@ from neutron.common import ipv6_utils
 from neutron.common import rpc as n_rpc
 from neutron.common import topics
 from neutron.common import utils as common_utils
-from neutron import context
+from neutron import context as n_context
 from neutron import manager
 from neutron.openstack.common import excutils
 from neutron.openstack.common.gettextutils import _LE, _LW
@@ -521,7 +521,7 @@ class L3NATAgent(firewall_l3_agent.FWaaSL3AgentRpcCallback,
             LOG.error(msg)
             raise SystemExit(1)
 
-        self.context = context.get_admin_context_without_session()
+        self.context = n_context.get_admin_context_without_session()
         self.plugin_rpc = L3PluginApi(topics.L3PLUGIN, host)
         self.fullsync = True
         self.sync_progress = False