Remove netaddr package requirement

An auth_host with : in the name is going to require wrapping in []
because otherwise the : is confused with the port separator, so the
code doesn't have to verify that it's an IPv6 address. This allows
the removal of the netaddr package requirement.

Change-Id: I0d4c622b360769f1a7587d3c230e50d22f5b75a4
This commit is contained in:
Brant Knudson 2014-10-23 19:48:45 -05:00
parent 9355d27921
commit 0ea1f07993
2 changed files with 1 additions and 3 deletions

View File

@ -175,7 +175,6 @@ from keystoneclient.auth import token_endpoint
from keystoneclient.common import cms
from keystoneclient import exceptions
from keystoneclient import session
import netaddr
from oslo.config import cfg
from oslo.serialization import jsonutils
from oslo.utils import timeutils
@ -605,7 +604,7 @@ class AuthProtocol(object):
auth_protocol = self._conf_get('auth_protocol')
auth_admin_prefix = self._conf_get('auth_admin_prefix')
if netaddr.valid_ipv6(auth_host):
if ':' in auth_host:
# Note(dzyu) it is an IPv6 address, so it needs to be wrapped
# with '[]' to generate a valid IPv6 URL, based on
# http://www.ietf.org/rfc/rfc2732.txt

View File

@ -4,7 +4,6 @@
Babel>=1.3
iso8601>=0.1.9
netaddr>=0.7.12
oslo.config>=1.4.0 # Apache-2.0
oslo.serialization>=1.0.0 # Apache-2.0
oslo.utils>=1.0.0 # Apache-2.0