Remove deprecated warnings

vmware_nsx/extensions/dns_search_domain.py:40: DeprecationWarning:
Using function/method 'instance.ugettext()' is deprecated: Builtin _
translation function is deprecated in OpenStack; use the function
from _i18n module for your project.

      _("Name '%s' must be 1-63 characters long, each of "

TrivialFix

Change-Id: If4540986497903eb2d8a841903f568526225bf51
This commit is contained in:
Gary Kotton 2016-02-15 00:39:48 -08:00
parent c2e7627625
commit 3046089feb

View File

@ -17,6 +17,7 @@ import re
from neutron.api import extensions
from neutron.api.v2 import attributes
from vmware_nsx._i18n import _
DNS_LABEL_MAX_LEN = 63
DNS_LABEL_REGEX = "[a-zA-Z0-9-]{1,%d}$" % DNS_LABEL_MAX_LEN