From a67d0ad9bd6115ec5f0ebc4fa10265870836290b Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Sun, 6 Dec 2015 06:59:18 -0800 Subject: [PATCH] Use the correct _ from vmware_nsx._i18n file Ensure that the correct _ method is used. Change-Id: I7ff4cb24bbde47e480dc6dd410b122693bd63ad3 --- vmware_nsx/api_client/__init__.py | 2 ++ vmware_nsx/api_client/eventlet_request.py | 2 +- vmware_nsx/api_client/exception.py | 2 ++ vmware_nsx/api_client/request.py | 2 +- vmware_nsx/check_nsx_config.py | 2 ++ vmware_nsx/common/config.py | 2 +- vmware_nsx/common/exceptions.py | 2 ++ vmware_nsx/common/sync.py | 2 +- vmware_nsx/db/networkgw_db.py | 1 + vmware_nsx/dhcp_meta/lsnmanager.py | 2 +- vmware_nsx/dhcp_meta/migration.py | 2 +- vmware_nsx/dhcp_meta/nsx.py | 2 +- vmware_nsx/dhcpmeta_modes.py | 2 +- vmware_nsx/extensions/networkgw.py | 2 ++ vmware_nsx/extensions/qos.py | 1 + vmware_nsx/nsx_cluster.py | 2 +- vmware_nsx/nsxlib/mh/__init__.py | 1 + vmware_nsx/nsxlib/mh/lsn.py | 1 + vmware_nsx/nsxlib/mh/router.py | 2 +- vmware_nsx/nsxlib/mh/switch.py | 2 +- vmware_nsx/nsxlib/mh/versioning.py | 1 + vmware_nsx/nsxlib/v3/__init__.py | 2 +- vmware_nsx/nsxlib/v3/client.py | 2 +- vmware_nsx/nsxlib/v3/resources.py | 2 ++ vmware_nsx/nsxlib/v3/router.py | 2 +- vmware_nsx/plugins/dvs/plugin.py | 2 +- vmware_nsx/plugins/nsx_mh/plugin.py | 2 +- vmware_nsx/plugins/nsx_v/drivers/exclusive_router_driver.py | 1 + vmware_nsx/plugins/nsx_v/drivers/shared_router_driver.py | 2 ++ vmware_nsx/plugins/nsx_v/managers.py | 2 +- vmware_nsx/plugins/nsx_v/md_proxy.py | 2 +- vmware_nsx/plugins/nsx_v/plugin.py | 2 +- vmware_nsx/plugins/nsx_v/vshield/common/exceptions.py | 2 ++ vmware_nsx/plugins/nsx_v/vshield/edge_ipsecvpn_driver.py | 2 +- vmware_nsx/plugins/nsx_v/vshield/edge_utils.py | 4 ++-- vmware_nsx/plugins/nsx_v/vshield/tasks/tasks.py | 2 +- vmware_nsx/plugins/nsx_v3/plugin.py | 2 +- vmware_nsx/services/l2gateway/nsx_v/driver.py | 2 +- vmware_nsx/services/l2gateway/nsx_v3/driver.py | 2 +- vmware_nsx/services/lbaas/nsx_v/lbaas_common.py | 1 + .../services/lbaas/nsx_v/v1/edge_loadbalancer_driver.py | 2 +- vmware_nsx/services/lbaas/nsx_v/v2/listener_mgr.py | 2 +- vmware_nsx/shell/commands.py | 2 ++ vmware_nsx/tests/unit/nsx_v/test_plugin.py | 1 + vmware_nsx/tests/unit/nsx_v/vshield/fake_vcns.py | 1 + 45 files changed, 55 insertions(+), 28 deletions(-) diff --git a/vmware_nsx/api_client/__init__.py b/vmware_nsx/api_client/__init__.py index 6bc9fcffd4..a356eacb9a 100644 --- a/vmware_nsx/api_client/__init__.py +++ b/vmware_nsx/api_client/__init__.py @@ -17,6 +17,8 @@ from six.moves import http_client as httplib +from vmware_nsx._i18n import _ + def ctrl_conn_to_str(conn): """Returns a string representing a connection URL to the controller.""" diff --git a/vmware_nsx/api_client/eventlet_request.py b/vmware_nsx/api_client/eventlet_request.py index 284808b519..2d169e80e3 100644 --- a/vmware_nsx/api_client/eventlet_request.py +++ b/vmware_nsx/api_client/eventlet_request.py @@ -21,7 +21,7 @@ from oslo_serialization import jsonutils from six.moves import http_client as httplib from six.moves.urllib import parse -from vmware_nsx._i18n import _LI, _LW +from vmware_nsx._i18n import _, _LI, _LW from vmware_nsx.api_client import request LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/api_client/exception.py b/vmware_nsx/api_client/exception.py index b3facfcaa5..6e62a7804e 100644 --- a/vmware_nsx/api_client/exception.py +++ b/vmware_nsx/api_client/exception.py @@ -15,6 +15,8 @@ # under the License. # +from vmware_nsx._i18n import _ + class NsxApiException(Exception): """Base NSX API Client Exception. diff --git a/vmware_nsx/api_client/request.py b/vmware_nsx/api_client/request.py index 19b4c62b2f..60381018f6 100644 --- a/vmware_nsx/api_client/request.py +++ b/vmware_nsx/api_client/request.py @@ -27,7 +27,7 @@ import six from six.moves import http_client as httplib import six.moves.urllib.parse as urlparse -from vmware_nsx._i18n import _LI, _LW +from vmware_nsx._i18n import _, _LI, _LW from vmware_nsx import api_client LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/check_nsx_config.py b/vmware_nsx/check_nsx_config.py index 6ca75ef037..c4fd50dfe7 100644 --- a/vmware_nsx/check_nsx_config.py +++ b/vmware_nsx/check_nsx_config.py @@ -20,6 +20,8 @@ import sys from oslo_config import cfg from neutron.common import config + +from vmware_nsx._i18n import _ from vmware_nsx.common import config as nsx_config # noqa from vmware_nsx.common import nsx_utils from vmware_nsx.nsxlib import mh as nsxlib diff --git a/vmware_nsx/common/config.py b/vmware_nsx/common/config.py index 32bf58f8b8..c6dc71260f 100644 --- a/vmware_nsx/common/config.py +++ b/vmware_nsx/common/config.py @@ -16,7 +16,7 @@ import logging from oslo_config import cfg -from vmware_nsx._i18n import _LW +from vmware_nsx._i18n import _, _LW from vmware_nsx.common import exceptions as nsx_exc from vmware_nsx.extensions import routersize diff --git a/vmware_nsx/common/exceptions.py b/vmware_nsx/common/exceptions.py index d5f4e2a10c..da87113e4b 100644 --- a/vmware_nsx/common/exceptions.py +++ b/vmware_nsx/common/exceptions.py @@ -16,6 +16,8 @@ from neutron.common import exceptions as n_exc +from vmware_nsx._i18n import _ + class NsxPluginException(n_exc.NeutronException): message = _("An unexpected error occurred in the NSX Plugin: %(err_msg)s") diff --git a/vmware_nsx/common/sync.py b/vmware_nsx/common/sync.py index 2d76df2568..d95e286c7d 100644 --- a/vmware_nsx/common/sync.py +++ b/vmware_nsx/common/sync.py @@ -29,7 +29,7 @@ from neutron.db import l3_db from neutron.db import models_v2 from neutron.extensions import l3 -from vmware_nsx._i18n import _LE, _LI, _LW +from vmware_nsx._i18n import _, _LE, _LI, _LW from vmware_nsx.api_client import exception as api_exc from vmware_nsx.common import exceptions as nsx_exc from vmware_nsx.common import nsx_utils diff --git a/vmware_nsx/db/networkgw_db.py b/vmware_nsx/db/networkgw_db.py index 5e51572eef..18b0e25228 100644 --- a/vmware_nsx/db/networkgw_db.py +++ b/vmware_nsx/db/networkgw_db.py @@ -21,6 +21,7 @@ from oslo_log import log as logging from oslo_utils import uuidutils import six +from vmware_nsx._i18n import _ from vmware_nsx.db import nsx_models from vmware_nsx.extensions import networkgw diff --git a/vmware_nsx/dhcp_meta/lsnmanager.py b/vmware_nsx/dhcp_meta/lsnmanager.py index b7c219f82c..c21cb0c898 100644 --- a/vmware_nsx/dhcp_meta/lsnmanager.py +++ b/vmware_nsx/dhcp_meta/lsnmanager.py @@ -21,7 +21,7 @@ from oslo_db import exception as db_exc from oslo_log import log as logging from oslo_utils import excutils -from vmware_nsx._i18n import _LE, _LW +from vmware_nsx._i18n import _, _LE, _LW from vmware_nsx.api_client import exception as api_exc from vmware_nsx.common import exceptions as p_exc from vmware_nsx.common import nsx_utils diff --git a/vmware_nsx/dhcp_meta/migration.py b/vmware_nsx/dhcp_meta/migration.py index 729960888c..1554017ecf 100644 --- a/vmware_nsx/dhcp_meta/migration.py +++ b/vmware_nsx/dhcp_meta/migration.py @@ -20,7 +20,7 @@ from neutron.common import exceptions as n_exc from neutron.extensions import external_net from oslo_log import log as logging -from vmware_nsx._i18n import _LE +from vmware_nsx._i18n import _, _LE from vmware_nsx.common import exceptions as p_exc from vmware_nsx.dhcp_meta import nsx from vmware_nsx.dhcp_meta import rpc diff --git a/vmware_nsx/dhcp_meta/nsx.py b/vmware_nsx/dhcp_meta/nsx.py index 7d0ff7c47e..a36e42792c 100644 --- a/vmware_nsx/dhcp_meta/nsx.py +++ b/vmware_nsx/dhcp_meta/nsx.py @@ -26,7 +26,7 @@ from neutron.db import db_base_plugin_v2 from neutron.db import l3_db from neutron.extensions import external_net -from vmware_nsx._i18n import _LE, _LI +from vmware_nsx._i18n import _, _LE, _LI from vmware_nsx.common import exceptions as p_exc from vmware_nsx.dhcp_meta import constants as d_const from vmware_nsx.nsxlib.mh import lsn as lsn_api diff --git a/vmware_nsx/dhcpmeta_modes.py b/vmware_nsx/dhcpmeta_modes.py index eb0252ceae..7a7bf607a1 100644 --- a/vmware_nsx/dhcpmeta_modes.py +++ b/vmware_nsx/dhcpmeta_modes.py @@ -28,7 +28,7 @@ from neutron.common import rpc as n_rpc from neutron.common import topics from neutron.db import agents_db -from vmware_nsx._i18n import _LW +from vmware_nsx._i18n import _, _LW from vmware_nsx.common import config from vmware_nsx.common import exceptions as nsx_exc from vmware_nsx.dhcp_meta import combined diff --git a/vmware_nsx/extensions/networkgw.py b/vmware_nsx/extensions/networkgw.py index aac070360a..6f0e0c014c 100644 --- a/vmware_nsx/extensions/networkgw.py +++ b/vmware_nsx/extensions/networkgw.py @@ -21,6 +21,8 @@ from neutron.api import extensions from neutron.api.v2 import attributes from neutron.api.v2 import resource_helper +from vmware_nsx._i18n import _ + GATEWAY_RESOURCE_NAME = "network_gateway" DEVICE_RESOURCE_NAME = "gateway_device" # Use dash for alias and collection name diff --git a/vmware_nsx/extensions/qos.py b/vmware_nsx/extensions/qos.py index fe1ac6ee3b..efd692c8be 100644 --- a/vmware_nsx/extensions/qos.py +++ b/vmware_nsx/extensions/qos.py @@ -22,6 +22,7 @@ from neutron.api.v2 import base from neutron.common import exceptions as nexception from neutron import manager +from vmware_nsx._i18n import _ # For policy.json/Auth qos_queue_create = "create_qos_queue" diff --git a/vmware_nsx/nsx_cluster.py b/vmware_nsx/nsx_cluster.py index 566cb121d1..3552348d80 100644 --- a/vmware_nsx/nsx_cluster.py +++ b/vmware_nsx/nsx_cluster.py @@ -17,7 +17,7 @@ from oslo_config import cfg from oslo_log import log as logging import six -from vmware_nsx._i18n import _LI +from vmware_nsx._i18n import _, _LI from vmware_nsx.common import exceptions LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/nsxlib/mh/__init__.py b/vmware_nsx/nsxlib/mh/__init__.py index 19abe24c05..51d51d52e9 100644 --- a/vmware_nsx/nsxlib/mh/__init__.py +++ b/vmware_nsx/nsxlib/mh/__init__.py @@ -19,6 +19,7 @@ from oslo_log import log from oslo_serialization import jsonutils import six +from vmware_nsx._i18n import _ from vmware_nsx.api_client import exception as api_exc from vmware_nsx.common import exceptions as nsx_exc diff --git a/vmware_nsx/nsxlib/mh/lsn.py b/vmware_nsx/nsxlib/mh/lsn.py index c623f13004..12f39c6e52 100644 --- a/vmware_nsx/nsxlib/mh/lsn.py +++ b/vmware_nsx/nsxlib/mh/lsn.py @@ -18,6 +18,7 @@ from oslo_log import log from oslo_serialization import jsonutils import six +from vmware_nsx._i18n import _ from vmware_nsx.api_client import exception as api_exc from vmware_nsx.common import exceptions as nsx_exc from vmware_nsx.common import utils diff --git a/vmware_nsx/nsxlib/mh/router.py b/vmware_nsx/nsxlib/mh/router.py index bc50662205..c9ef0a5af1 100644 --- a/vmware_nsx/nsxlib/mh/router.py +++ b/vmware_nsx/nsxlib/mh/router.py @@ -20,7 +20,7 @@ from oslo_serialization import jsonutils from oslo_utils import excutils import six -from vmware_nsx._i18n import _LE, _LI, _LW +from vmware_nsx._i18n import _, _LE, _LI, _LW from vmware_nsx.api_client import exception as api_exc from vmware_nsx.common import exceptions as nsx_exc from vmware_nsx.common import utils diff --git a/vmware_nsx/nsxlib/mh/switch.py b/vmware_nsx/nsxlib/mh/switch.py index 736a716df1..12867936f8 100644 --- a/vmware_nsx/nsxlib/mh/switch.py +++ b/vmware_nsx/nsxlib/mh/switch.py @@ -21,7 +21,7 @@ from oslo_serialization import jsonutils from neutron.common import constants from neutron.common import exceptions as exception -from vmware_nsx._i18n import _LE, _LI, _LW +from vmware_nsx._i18n import _, _LE, _LI, _LW from vmware_nsx.api_client import exception as api_exc from vmware_nsx.common import exceptions as nsx_exc from vmware_nsx.common import utils diff --git a/vmware_nsx/nsxlib/mh/versioning.py b/vmware_nsx/nsxlib/mh/versioning.py index a6aada0c76..1fda3da470 100644 --- a/vmware_nsx/nsxlib/mh/versioning.py +++ b/vmware_nsx/nsxlib/mh/versioning.py @@ -15,6 +15,7 @@ import inspect +from vmware_nsx._i18n import _ from vmware_nsx.api_client import exception DEFAULT_VERSION = -1 diff --git a/vmware_nsx/nsxlib/v3/__init__.py b/vmware_nsx/nsxlib/v3/__init__.py index 3ac66c74b5..81135ed208 100644 --- a/vmware_nsx/nsxlib/v3/__init__.py +++ b/vmware_nsx/nsxlib/v3/__init__.py @@ -16,7 +16,7 @@ from oslo_config import cfg from oslo_log import log -from vmware_nsx._i18n import _LW +from vmware_nsx._i18n import _, _LW from vmware_nsx.common import exceptions as nsx_exc from vmware_nsx.common import nsx_constants from vmware_nsx.common import utils diff --git a/vmware_nsx/nsxlib/v3/client.py b/vmware_nsx/nsxlib/v3/client.py index e78451348c..f387acbe18 100644 --- a/vmware_nsx/nsxlib/v3/client.py +++ b/vmware_nsx/nsxlib/v3/client.py @@ -19,7 +19,7 @@ from oslo_config import cfg from oslo_log import log from oslo_serialization import jsonutils -from vmware_nsx._i18n import _LW, _ +from vmware_nsx._i18n import _, _LW from vmware_nsx.common import exceptions as nsx_exc LOG = log.getLogger(__name__) diff --git a/vmware_nsx/nsxlib/v3/resources.py b/vmware_nsx/nsxlib/v3/resources.py index 6daf4de53f..890ca55524 100644 --- a/vmware_nsx/nsxlib/v3/resources.py +++ b/vmware_nsx/nsxlib/v3/resources.py @@ -18,6 +18,8 @@ import collections import six from oslo_config import cfg + +from vmware_nsx._i18n import _ from vmware_nsx.common import exceptions as nsx_exc from vmware_nsx.common import nsx_constants from vmware_nsx.common import utils diff --git a/vmware_nsx/nsxlib/v3/router.py b/vmware_nsx/nsxlib/v3/router.py index 7f6c50c76d..be5dcbd9e1 100644 --- a/vmware_nsx/nsxlib/v3/router.py +++ b/vmware_nsx/nsxlib/v3/router.py @@ -22,7 +22,7 @@ import random from neutron.common import exceptions as n_exc from oslo_log import log -from vmware_nsx._i18n import _LW +from vmware_nsx._i18n import _, _LW from vmware_nsx.common import exceptions as nsx_exc from vmware_nsx.common import nsx_constants from vmware_nsx.nsxlib import v3 as nsxlib diff --git a/vmware_nsx/plugins/dvs/plugin.py b/vmware_nsx/plugins/dvs/plugin.py index 10e18dbf1f..4ade73e0f2 100644 --- a/vmware_nsx/plugins/dvs/plugin.py +++ b/vmware_nsx/plugins/dvs/plugin.py @@ -39,7 +39,7 @@ from neutron.plugins.common import constants from neutron.plugins.common import utils import vmware_nsx -from vmware_nsx._i18n import _LE, _LW +from vmware_nsx._i18n import _, _LE, _LW from vmware_nsx.common import config # noqa from vmware_nsx.common import exceptions as nsx_exc from vmware_nsx.common import nsx_constants diff --git a/vmware_nsx/plugins/nsx_mh/plugin.py b/vmware_nsx/plugins/nsx_mh/plugin.py index f3e0fc9d22..5d0693c0ca 100644 --- a/vmware_nsx/plugins/nsx_mh/plugin.py +++ b/vmware_nsx/plugins/nsx_mh/plugin.py @@ -59,7 +59,7 @@ from neutron.plugins.common import constants as plugin_const from neutron.plugins.common import utils import vmware_nsx -from vmware_nsx._i18n import _LE, _LI, _LW +from vmware_nsx._i18n import _, _LE, _LI, _LW from vmware_nsx.api_client import exception as api_exc from vmware_nsx.common import config # noqa from vmware_nsx.common import exceptions as nsx_exc diff --git a/vmware_nsx/plugins/nsx_v/drivers/exclusive_router_driver.py b/vmware_nsx/plugins/nsx_v/drivers/exclusive_router_driver.py index ef42f2400b..c73406b209 100644 --- a/vmware_nsx/plugins/nsx_v/drivers/exclusive_router_driver.py +++ b/vmware_nsx/plugins/nsx_v/drivers/exclusive_router_driver.py @@ -16,6 +16,7 @@ from oslo_log import log as logging from neutron.api.v2 import attributes as attr +from vmware_nsx._i18n import _ from vmware_nsx.common import exceptions as nsxv_exc from vmware_nsx.common import locking from vmware_nsx.db import nsxv_db diff --git a/vmware_nsx/plugins/nsx_v/drivers/shared_router_driver.py b/vmware_nsx/plugins/nsx_v/drivers/shared_router_driver.py index 409138be37..34b190c737 100644 --- a/vmware_nsx/plugins/nsx_v/drivers/shared_router_driver.py +++ b/vmware_nsx/plugins/nsx_v/drivers/shared_router_driver.py @@ -19,6 +19,8 @@ from neutron.api.v2 import attributes as attr from neutron.db import l3_db from neutron.db import models_v2 from oslo_log import log as logging + +from vmware_nsx._i18n import _ from vmware_nsx.common import exceptions as nsx_exc from vmware_nsx.common import locking from vmware_nsx.db import nsxv_db diff --git a/vmware_nsx/plugins/nsx_v/managers.py b/vmware_nsx/plugins/nsx_v/managers.py index 7b2aeaca1e..e74460fba1 100644 --- a/vmware_nsx/plugins/nsx_v/managers.py +++ b/vmware_nsx/plugins/nsx_v/managers.py @@ -18,7 +18,7 @@ import stevedore from oslo_log import log -from vmware_nsx._i18n import _LE, _LI +from vmware_nsx._i18n import _, _LE, _LI from vmware_nsx.common import exceptions as nsx_exc LOG = log.getLogger(__name__) diff --git a/vmware_nsx/plugins/nsx_v/md_proxy.py b/vmware_nsx/plugins/nsx_v/md_proxy.py index 3ef392c685..0dc367f667 100644 --- a/vmware_nsx/plugins/nsx_v/md_proxy.py +++ b/vmware_nsx/plugins/nsx_v/md_proxy.py @@ -24,7 +24,7 @@ from neutron import context as neutron_context from oslo_config import cfg from oslo_log import log as logging -from vmware_nsx._i18n import _LE +from vmware_nsx._i18n import _, _LE from vmware_nsx.common import exceptions as nsxv_exc from vmware_nsx.common import locking from vmware_nsx.common import nsxv_constants diff --git a/vmware_nsx/plugins/nsx_v/plugin.py b/vmware_nsx/plugins/nsx_v/plugin.py index 5fda410532..5fb567f06c 100644 --- a/vmware_nsx/plugins/nsx_v/plugin.py +++ b/vmware_nsx/plugins/nsx_v/plugin.py @@ -52,7 +52,7 @@ from neutron.plugins.common import constants as plugin_const from neutron.plugins.common import utils import vmware_nsx -from vmware_nsx._i18n import _LE, _LI, _LW +from vmware_nsx._i18n import _, _LE, _LI, _LW from vmware_nsx.common import config # noqa from vmware_nsx.common import exceptions as nsx_exc from vmware_nsx.common import locking diff --git a/vmware_nsx/plugins/nsx_v/vshield/common/exceptions.py b/vmware_nsx/plugins/nsx_v/vshield/common/exceptions.py index 9c61994b42..47e35fee57 100644 --- a/vmware_nsx/plugins/nsx_v/vshield/common/exceptions.py +++ b/vmware_nsx/plugins/nsx_v/vshield/common/exceptions.py @@ -14,6 +14,8 @@ from neutron.common import exceptions +from vmware_nsx._i18n import _ + class VcnsException(exceptions.NeutronException): pass diff --git a/vmware_nsx/plugins/nsx_v/vshield/edge_ipsecvpn_driver.py b/vmware_nsx/plugins/nsx_v/vshield/edge_ipsecvpn_driver.py index 45ec7f3bc0..7079b5c224 100644 --- a/vmware_nsx/plugins/nsx_v/vshield/edge_ipsecvpn_driver.py +++ b/vmware_nsx/plugins/nsx_v/vshield/edge_ipsecvpn_driver.py @@ -15,7 +15,7 @@ from oslo_log import log as logging from oslo_utils import excutils -from vmware_nsx._i18n import _LE, _LW +from vmware_nsx._i18n import _, _LE, _LW from vmware_nsx.plugins.nsx_v.vshield.common import ( exceptions as vcns_exc) diff --git a/vmware_nsx/plugins/nsx_v/vshield/edge_utils.py b/vmware_nsx/plugins/nsx_v/vshield/edge_utils.py index 669db69a34..b74c46c797 100644 --- a/vmware_nsx/plugins/nsx_v/vshield/edge_utils.py +++ b/vmware_nsx/plugins/nsx_v/vshield/edge_utils.py @@ -31,7 +31,7 @@ from neutron import context as q_context from neutron.extensions import l3 from neutron.plugins.common import constants as plugin_const -from vmware_nsx._i18n import _LE, _LW +from vmware_nsx._i18n import _, _LE, _LW from vmware_nsx.common import exceptions as nsx_exc from vmware_nsx.common import locking from vmware_nsx.common import nsxv_constants @@ -334,7 +334,7 @@ class EdgeManager(object): 'networkType': 'Isolation'} config_spec = {'networkSpec': portgroup} dvs_id = self._get_physical_provider_network(context, network_id) - _, port_group_id = self.nsxv_manager.vcns.create_port_group( + pg, port_group_id = self.nsxv_manager.vcns.create_port_group( dvs_id, config_spec) interface = { diff --git a/vmware_nsx/plugins/nsx_v/vshield/tasks/tasks.py b/vmware_nsx/plugins/nsx_v/vshield/tasks/tasks.py index 0050910afe..8642a8b87f 100644 --- a/vmware_nsx/plugins/nsx_v/vshield/tasks/tasks.py +++ b/vmware_nsx/plugins/nsx_v/vshield/tasks/tasks.py @@ -23,7 +23,7 @@ from oslo_log import log as logging from oslo_service import loopingcall import six -from vmware_nsx._i18n import _LE, _LI +from vmware_nsx._i18n import _, _LE, _LI from vmware_nsx.plugins.nsx_v.vshield.tasks import constants DEFAULT_INTERVAL = 1000 diff --git a/vmware_nsx/plugins/nsx_v3/plugin.py b/vmware_nsx/plugins/nsx_v3/plugin.py index 987b707506..c6c71f9f46 100644 --- a/vmware_nsx/plugins/nsx_v3/plugin.py +++ b/vmware_nsx/plugins/nsx_v3/plugin.py @@ -57,7 +57,7 @@ from oslo_utils import excutils from oslo_utils import importutils from oslo_utils import uuidutils -from vmware_nsx._i18n import _LE, _LI, _LW +from vmware_nsx._i18n import _, _LE, _LI, _LW from vmware_nsx.common import config # noqa from vmware_nsx.common import exceptions as nsx_exc from vmware_nsx.common import locking diff --git a/vmware_nsx/services/l2gateway/nsx_v/driver.py b/vmware_nsx/services/l2gateway/nsx_v/driver.py index 81bea5db63..eccd222b42 100644 --- a/vmware_nsx/services/l2gateway/nsx_v/driver.py +++ b/vmware_nsx/services/l2gateway/nsx_v/driver.py @@ -24,7 +24,7 @@ from oslo_log import log as logging from oslo_utils import excutils from oslo_utils import uuidutils -from vmware_nsx._i18n import _LE +from vmware_nsx._i18n import _, _LE from vmware_nsx.common import exceptions as nsx_exc from vmware_nsx.common import nsxv_constants from vmware_nsx.db import db as nsx_db diff --git a/vmware_nsx/services/l2gateway/nsx_v3/driver.py b/vmware_nsx/services/l2gateway/nsx_v3/driver.py index 64447d4be3..dad82a2bda 100644 --- a/vmware_nsx/services/l2gateway/nsx_v3/driver.py +++ b/vmware_nsx/services/l2gateway/nsx_v3/driver.py @@ -33,7 +33,7 @@ from neutron.extensions import providernet from neutron import manager from neutron.plugins.common import utils as n_utils -from vmware_nsx._i18n import _LE, _LI +from vmware_nsx._i18n import _, _LE, _LI from vmware_nsx.common import exceptions as nsx_exc from vmware_nsx.common import nsx_constants from vmware_nsx.common import utils as nsx_utils diff --git a/vmware_nsx/services/lbaas/nsx_v/lbaas_common.py b/vmware_nsx/services/lbaas/nsx_v/lbaas_common.py index 6781ee7d7a..c0c3ba6a47 100644 --- a/vmware_nsx/services/lbaas/nsx_v/lbaas_common.py +++ b/vmware_nsx/services/lbaas/nsx_v/lbaas_common.py @@ -18,6 +18,7 @@ import xml.etree.ElementTree as et from neutron.common import exceptions as n_exc +from vmware_nsx._i18n import _ from vmware_nsx.common import locking from vmware_nsx.db import nsxv_db from vmware_nsx.plugins.nsx_v.vshield import vcns as nsxv_api diff --git a/vmware_nsx/services/lbaas/nsx_v/v1/edge_loadbalancer_driver.py b/vmware_nsx/services/lbaas/nsx_v/v1/edge_loadbalancer_driver.py index 2532ff8d18..23a8e5b5cb 100644 --- a/vmware_nsx/services/lbaas/nsx_v/v1/edge_loadbalancer_driver.py +++ b/vmware_nsx/services/lbaas/nsx_v/v1/edge_loadbalancer_driver.py @@ -19,7 +19,7 @@ from neutron.plugins.common import constants from oslo_log import log as logging from oslo_utils import excutils -from vmware_nsx._i18n import _LE +from vmware_nsx._i18n import _, _LE from vmware_nsx.common import locking from vmware_nsx.plugins.nsx_v.vshield.common import exceptions as nsxv_exc from vmware_nsx.services.lbaas.nsx_v import lbaas_common as lb_common diff --git a/vmware_nsx/services/lbaas/nsx_v/v2/listener_mgr.py b/vmware_nsx/services/lbaas/nsx_v/v2/listener_mgr.py index bdd225ffba..0e63c0edbd 100644 --- a/vmware_nsx/services/lbaas/nsx_v/v2/listener_mgr.py +++ b/vmware_nsx/services/lbaas/nsx_v/v2/listener_mgr.py @@ -17,7 +17,7 @@ from oslo_log import helpers as log_helpers from oslo_log import log as logging from oslo_utils import excutils -from vmware_nsx._i18n import _LE +from vmware_nsx._i18n import _, _LE from vmware_nsx.common import exceptions as nsxv_exc from vmware_nsx.common import locking from vmware_nsx.db import nsxv_db diff --git a/vmware_nsx/shell/commands.py b/vmware_nsx/shell/commands.py index bd6706ff8d..3c3d31a498 100644 --- a/vmware_nsx/shell/commands.py +++ b/vmware_nsx/shell/commands.py @@ -17,6 +17,8 @@ from neutronclient.neutron import v2_0 as client +from vmware_nsx._i18n import _ + LSN_PATH = '/lsns' diff --git a/vmware_nsx/tests/unit/nsx_v/test_plugin.py b/vmware_nsx/tests/unit/nsx_v/test_plugin.py index 9646b7694e..f1498fe60e 100644 --- a/vmware_nsx/tests/unit/nsx_v/test_plugin.py +++ b/vmware_nsx/tests/unit/nsx_v/test_plugin.py @@ -45,6 +45,7 @@ from oslo_utils import uuidutils import six import webob.exc +from vmware_nsx._i18n import _ from vmware_nsx.common import nsx_constants from vmware_nsx.db import nsxv_db from vmware_nsx.extensions import ( diff --git a/vmware_nsx/tests/unit/nsx_v/vshield/fake_vcns.py b/vmware_nsx/tests/unit/nsx_v/vshield/fake_vcns.py index 1e88bdec41..c369b97586 100644 --- a/vmware_nsx/tests/unit/nsx_v/vshield/fake_vcns.py +++ b/vmware_nsx/tests/unit/nsx_v/vshield/fake_vcns.py @@ -19,6 +19,7 @@ from oslo_utils import uuidutils import six import xml.etree.ElementTree as ET +from vmware_nsx._i18n import _ from vmware_nsx.plugins.nsx_v.vshield.common import exceptions SECTION_LOCATION_HEADER = '/api/4.0/firewall/globalroot-0/config/%s/%s'