diff --git a/keystonemiddleware/auth_token.py b/keystonemiddleware/auth_token.py index cbb5c635..0ebef5ef 100644 --- a/keystonemiddleware/auth_token.py +++ b/keystonemiddleware/auth_token.py @@ -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 diff --git a/requirements.txt b/requirements.txt index 4de4e16e..91edca02 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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