From c9d5cafe990a5e29d84f53712af22f48c6f18e6b Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Fri, 21 Nov 2014 22:01:08 +0100 Subject: [PATCH] Migrate to oslo.i18n Mostly trivial import changes. - oslo.i18n no longer provide install() method to inject _() into globals(), so removed all calls to it; - removed Babel from dependencies (it will now be grabbed by oslo.i18n); - updated tox.ini to ignore import violations for oslo.i18n. Change-Id: I6623d551f512fb7fe9bf35ee734ed6d4c6cbc287 --- .../services/firewall/agents/l3reference/firewall_l3_agent.py | 2 +- neutron/services/firewall/agents/varmour/varmour_api.py | 2 +- neutron/services/firewall/agents/varmour/varmour_router.py | 2 +- neutron/services/firewall/drivers/linux/iptables_fwaas.py | 2 +- neutron/services/firewall/drivers/varmour/varmour_fwaas.py | 2 +- neutron/services/firewall/fwaas_plugin.py | 2 +- openstack-common.conf | 1 - requirements.txt | 1 - tox.ini | 2 +- 9 files changed, 7 insertions(+), 9 deletions(-) diff --git a/neutron/services/firewall/agents/l3reference/firewall_l3_agent.py b/neutron/services/firewall/agents/l3reference/firewall_l3_agent.py index e5f43568a..b4b80c05e 100644 --- a/neutron/services/firewall/agents/l3reference/firewall_l3_agent.py +++ b/neutron/services/firewall/agents/l3reference/firewall_l3_agent.py @@ -21,7 +21,7 @@ from neutron.agent.linux import ip_lib from neutron.common import topics from neutron import context from neutron.extensions import firewall as fw_ext -from neutron.openstack.common.gettextutils import _LE +from neutron.i18n import _LE from neutron.openstack.common import log as logging from neutron.plugins.common import constants from neutron.services.firewall.agents import firewall_agent_api as api diff --git a/neutron/services/firewall/agents/varmour/varmour_api.py b/neutron/services/firewall/agents/varmour/varmour_api.py index f30547c40..5cb885e17 100755 --- a/neutron/services/firewall/agents/varmour/varmour_api.py +++ b/neutron/services/firewall/agents/varmour/varmour_api.py @@ -19,7 +19,7 @@ import httplib2 from oslo.config import cfg from oslo.serialization import jsonutils -from neutron.openstack.common.gettextutils import _LE +from neutron.i18n import _LE from neutron.openstack.common import log as logging from neutron.services.firewall.agents.varmour import varmour_utils as va_utils diff --git a/neutron/services/firewall/agents/varmour/varmour_router.py b/neutron/services/firewall/agents/varmour/varmour_router.py index 886c981ff..59cb524f8 100755 --- a/neutron/services/firewall/agents/varmour/varmour_router.py +++ b/neutron/services/firewall/agents/varmour/varmour_router.py @@ -30,7 +30,7 @@ from neutron.agent.linux import ip_lib from neutron.common import config as common_config from neutron.common import constants as l3_constants from neutron.common import topics -from neutron.openstack.common.gettextutils import _LW +from neutron.i18n import _LW from neutron.openstack.common import log as logging from neutron.openstack.common import service from neutron import service as neutron_service diff --git a/neutron/services/firewall/drivers/linux/iptables_fwaas.py b/neutron/services/firewall/drivers/linux/iptables_fwaas.py index 68c17ea54..4e0dea769 100644 --- a/neutron/services/firewall/drivers/linux/iptables_fwaas.py +++ b/neutron/services/firewall/drivers/linux/iptables_fwaas.py @@ -15,7 +15,7 @@ from neutron.agent.linux import iptables_manager from neutron.extensions import firewall as fw_ext -from neutron.openstack.common.gettextutils import _LE +from neutron.i18n import _LE from neutron.openstack.common import log as logging from neutron.services.firewall.drivers import fwaas_base diff --git a/neutron/services/firewall/drivers/varmour/varmour_fwaas.py b/neutron/services/firewall/drivers/varmour/varmour_fwaas.py index 2456bafdc..d0ecba8b2 100755 --- a/neutron/services/firewall/drivers/varmour/varmour_fwaas.py +++ b/neutron/services/firewall/drivers/varmour/varmour_fwaas.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.openstack.common.gettextutils import _LW +from neutron.i18n import _LW from neutron.openstack.common import log as logging from neutron.services.firewall.agents.varmour import varmour_api from neutron.services.firewall.agents.varmour import varmour_utils as va_utils diff --git a/neutron/services/firewall/fwaas_plugin.py b/neutron/services/firewall/fwaas_plugin.py index d7ea63317..fa03eb325 100644 --- a/neutron/services/firewall/fwaas_plugin.py +++ b/neutron/services/firewall/fwaas_plugin.py @@ -22,7 +22,7 @@ from neutron.common import topics from neutron import context as neutron_context from neutron.db.firewall import firewall_db from neutron.extensions import firewall as fw_ext -from neutron.openstack.common.gettextutils import _LW +from neutron.i18n import _LW from neutron.openstack.common import log as logging from neutron.plugins.common import constants as const diff --git a/openstack-common.conf b/openstack-common.conf index 56f22ee7d..7bba50dfa 100644 --- a/openstack-common.conf +++ b/openstack-common.conf @@ -5,7 +5,6 @@ module=context module=eventlet_backdoor module=fileutils module=fixture -module=gettextutils module=install_venv_common module=local module=lockutils diff --git a/requirements.txt b/requirements.txt index 241a73c27..f0785a5d8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,6 @@ PasteDeploy>=1.5.0 Routes>=1.12.3,!=2.0 anyjson>=0.3.3 argparse -Babel>=1.3 eventlet>=0.15.2 greenlet>=0.3.2 httplib2>=0.7.5 diff --git a/tox.ini b/tox.ini index 7e16f19ca..1135abc87 100644 --- a/tox.ini +++ b/tox.ini @@ -88,5 +88,5 @@ commands = pylint --rcfile=.pylintrc --output-format=colorized {posargs:neutron} [hacking] -import_exceptions = neutron.openstack.common.gettextutils +import_exceptions = neutron.i18n local-check-factory = neutron.hacking.checks.factory