@@ -490,7 +490,7 @@ def http_connection(*arg, **kwarg):
490490 return conn .parsed_url , conn
491491
492492
493- def get_auth_1_0 (url , user , key , snet , ** kwargs ):
493+ def get_auth_1_0 (url , user , key , ** kwargs ):
494494 cacert = kwargs .get ('cacert' , None )
495495 insecure = kwargs .get ('insecure' , False )
496496 cert = kwargs .get ('cert' )
@@ -514,12 +514,6 @@ def get_auth_1_0(url, user, key, snet, **kwargs):
514514 # if we don't have a x-storage-url header and if we get a body.
515515 if resp .status < 200 or resp .status >= 300 or (body and not url ):
516516 raise ClientException .from_response (resp , 'Auth GET failed' , body )
517- if snet :
518- parsed = list (urlparse (url ))
519- # Second item in the list is the netloc
520- netloc = parsed [1 ]
521- parsed [1 ] = 'snet-' + netloc
522- url = urlunparse (parsed )
523517
524518 token = resp .getheader ('x-storage-token' , resp .getheader ('x-auth-token' ))
525519 return url , token
@@ -671,12 +665,6 @@ def get_auth(auth_url, user, key, **kwargs):
671665 N.B. if the optional os_options parameter includes a non-empty
672666 'object_storage_url' key it will override the default storage url returned
673667 by the auth service.
674-
675- The snet parameter is used for Rackspace's ServiceNet internal network
676- implementation. In this function, it simply adds *snet-* to the beginning
677- of the host name for the returned storage URL. With Rackspace Cloud Files,
678- use of this network path causes no bandwidth charges but requires the
679- client to be running on Rackspace's ServiceNet network.
680668 """
681669 session = kwargs .get ('session' , None )
682670 auth_version = kwargs .get ('auth_version' , '1' )
@@ -700,7 +688,6 @@ def get_auth(auth_url, user, key, **kwargs):
700688 storage_url , token = get_auth_1_0 (auth_url ,
701689 user ,
702690 key ,
703- kwargs .get ('snet' ),
704691 cacert = cacert ,
705692 insecure = insecure ,
706693 cert = cert ,
@@ -1654,7 +1641,7 @@ class Connection:
16541641 """
16551642
16561643 def __init__ (self , authurl = None , user = None , key = None , retries = 5 ,
1657- preauthurl = None , preauthtoken = None , snet = False ,
1644+ preauthurl = None , preauthtoken = None ,
16581645 starting_backoff = 1 , max_backoff = 64 , tenant_name = None ,
16591646 os_options = None , auth_version = "1" , cacert = None ,
16601647 insecure = False , cert = None , cert_key = None ,
@@ -1669,7 +1656,6 @@ def __init__(self, authurl=None, user=None, key=None, retries=5,
16691656 :param preauthtoken: authentication token (if you have already
16701657 authenticated) note authurl/user/key/tenant_name
16711658 are not required when specifying preauthtoken
1672- :param snet: use SERVICENET internal network default is False
16731659 :param starting_backoff: initial delay between retries (seconds)
16741660 :param max_backoff: maximum delay between retries (seconds)
16751661 :param auth_version: OpenStack auth version, default is 1.0
@@ -1705,7 +1691,6 @@ def __init__(self, authurl=None, user=None, key=None, retries=5,
17051691 self .retries = retries
17061692 self .http_conn = None
17071693 self .attempts = 0
1708- self .snet = snet
17091694 self .starting_backoff = starting_backoff
17101695 self .max_backoff = max_backoff
17111696 self .auth_version = auth_version
@@ -1740,7 +1725,7 @@ def close(self):
17401725
17411726 def get_auth (self ):
17421727 self .url , self .token = get_auth (self .authurl , self .user , self .key ,
1743- session = self .session , snet = self . snet ,
1728+ session = self .session ,
17441729 auth_version = self .auth_version ,
17451730 os_options = self .os_options ,
17461731 cacert = self .cacert ,
@@ -1761,7 +1746,6 @@ def get_service_auth(self):
17611746 service_key = opts .get ('service_key' , None )
17621747 return get_auth (self .authurl , service_user , service_key ,
17631748 session = self .session ,
1764- snet = self .snet ,
17651749 auth_version = self .auth_version ,
17661750 os_options = service_options ,
17671751 cacert = self .cacert ,
0 commit comments