diff options
author | Steven Hardy <shardy@redhat.com> | 2012-10-23 09:18:29 +0100 |
---|---|---|
committer | Steven Hardy <shardy@redhat.com> | 2012-10-24 22:40:31 +0100 |
commit | 656b80bef38db8eda148288a4cb5c9fbd3a0da4b (patch) | |
tree | 1bffcd207448added8a836882207be53758bd3bf /swiftclient/client.py | |
parent | 2be776c2e543dcafbe268b9f18e17f08a5e1466f (diff) | |
download | python-swiftclient-656b80bef38db8eda148288a4cb5c9fbd3a0da4b.tar.gz |
swiftclient Connection : default optional arguments to None
Default the authurl/user/key constructor arguments for the
Connection class to None, as these are not required in the
preauthurl/preauthtoken case
Change-Id: I445a5d365212c365ecc691c0a670a226e2b7954a
Diffstat (limited to 'swiftclient/client.py')
-rw-r--r-- | swiftclient/client.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/swiftclient/client.py b/swiftclient/client.py index 2fda8ab..896dd35 100644 --- a/swiftclient/client.py +++ b/swiftclient/client.py @@ -921,9 +921,10 @@ def delete_object(url, token=None, container=None, name=None, http_conn=None, class Connection(object): """Convenience class to make requests that will also retry the request""" - def __init__(self, authurl, user, key, retries=5, preauthurl=None, - preauthtoken=None, snet=False, starting_backoff=1, - tenant_name=None, os_options=None, auth_version="1"): + def __init__(self, authurl=None, user=None, key=None, retries=5, + preauthurl=None, preauthtoken=None, snet=False, + starting_backoff=1, tenant_name=None, os_options=None, + auth_version="1"): """ :param authurl: authentication URL :param user: user name to authenticate as @@ -931,7 +932,8 @@ class Connection(object): :param retries: Number of times to retry the request before failing :param preauthurl: storage URL (if you have already authenticated) :param preauthtoken: authentication token (if you have already - authenticated) + authenticated) note authurl/user/key/tenant_name + are not required when specifying preauthtoken :param snet: use SERVICENET internal network default is False :param auth_version: OpenStack auth version, default is 1.0 :param tenant_name: The tenant/account name, required when connecting |