Merge "Keystoneclient supports Py3K now"

This commit is contained in:
Jenkins
2014-01-15 17:53:21 +00:00
committed by Gerrit Code Review

View File

@@ -14,24 +14,14 @@
# limitations under the License. # limitations under the License.
import six
from marconiclient.auth import base from marconiclient.auth import base
from marconiclient.auth import keystone
if not six.PY3:
from marconiclient.auth import keystone
else:
keystone = None
# NOTE(flaper87): Replace with logging
print('Keystone auth does not support Py3K')
_BACKENDS = { _BACKENDS = {
'noauth': base.NoAuth, 'noauth': base.NoAuth,
'keystone': keystone.KeystoneAuth
} }
if keystone:
_BACKENDS['keystone'] = keystone.KeystoneAuth
def get_backend(backend='noauth', options=None): def get_backend(backend='noauth', options=None):
"""Loads backend `auth_backend` """Loads backend `auth_backend`