Use the correct _ from vmware_nsx._i18n file

Ensure that the correct _ method is used.

Change-Id: I7ff4cb24bbde47e480dc6dd410b122693bd63ad3
This commit is contained in:
Gary Kotton 2015-12-06 06:59:18 -08:00
parent cd84fdbd04
commit a67d0ad9bd
45 changed files with 55 additions and 28 deletions

View File

@ -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."""

View File

@ -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__)

View File

@ -15,6 +15,8 @@
# under the License.
#
from vmware_nsx._i18n import _
class NsxApiException(Exception):
"""Base NSX API Client Exception.

View File

@ -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__)

View File

@ -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

View File

@ -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

View File

@ -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")

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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__)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -15,6 +15,7 @@
import inspect
from vmware_nsx._i18n import _
from vmware_nsx.api_client import exception
DEFAULT_VERSION = -1

View File

@ -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

View File

@ -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__)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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__)

View File

@ -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

View File

@ -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

View File

@ -14,6 +14,8 @@
from neutron.common import exceptions
from vmware_nsx._i18n import _
class VcnsException(exceptions.NeutronException):
pass

View File

@ -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)

View File

@ -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 = {

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -17,6 +17,8 @@
from neutronclient.neutron import v2_0 as client
from vmware_nsx._i18n import _
LSN_PATH = '/lsns'

View File

@ -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 (

View File

@ -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'