Merge "Keystoneclient supports Py3K now"
This commit is contained in:
@@ -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`
|
||||||
|
Reference in New Issue
Block a user