summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-06-21 16:13:59 +0000
committerGerrit Code Review <review@openstack.org>2016-06-21 16:13:59 +0000
commit985df912e16661d462c1c70dec9ea89debba8cbf (patch)
tree2a0d8774c6fe221c0f89e0653bcb5c847fa7bdca
parent46c3792feef6f36b31e9783724b914d6740b0f84 (diff)
parentf58a73495f81dea700f229117f567bad93e9edaf (diff)
downloadpython-glanceclient-985df912e16661d462c1c70dec9ea89debba8cbf.tar.gz
Merge "Remove unused skip_authentication decorator"
-rw-r--r--glanceclient/common/utils.py15
-rw-r--r--glanceclient/shell.py4
2 files changed, 1 insertions, 18 deletions
diff --git a/glanceclient/common/utils.py b/glanceclient/common/utils.py
index c7dd4dd..2723841 100644
--- a/glanceclient/common/utils.py
+++ b/glanceclient/common/utils.py
@@ -246,21 +246,6 @@ def find_resource(manager, name_or_id):
return matches[0]
-def skip_authentication(f):
- """Function decorator used to indicate a caller may be unauthenticated."""
- f.require_authentication = False
- return f
-
-
-def is_authentication_required(f):
- """Checks to see if the function requires authentication.
-
- Use the skip_authentication decorator to indicate a caller may
- skip the authentication step.
- """
- return getattr(f, 'require_authentication', True)
-
-
def env(*vars, **kwargs):
"""Search for the first defined of possibly many env vars.
diff --git a/glanceclient/shell.py b/glanceclient/shell.py
index ea1d313..298d8ea 100644
--- a/glanceclient/shell.py
+++ b/glanceclient/shell.py
@@ -421,9 +421,7 @@ class OpenStackImagesShell(object):
endpoint = self._get_image_url(args)
auth_token = args.os_auth_token
- auth_req = (hasattr(args, 'func') and
- utils.is_authentication_required(args.func))
- if not auth_req or (endpoint and auth_token):
+ if endpoint and auth_token:
kwargs = {
'token': auth_token,
'insecure': args.insecure,