Convert user_name to username
This will greatly reduce the number of ksc to sdk differences. Why fight it, everyone is used to username anyway. Change-Id: Ie6e897c1baa3184af77510b98790196e8f069f5a
This commit is contained in:
parent
00eed94106
commit
8379ad612e
@ -19,7 +19,7 @@ the containers in the Object Store service.::
|
|||||||
from openstack import connection
|
from openstack import connection
|
||||||
conn = connection.Connection(auth_url="http://openstack:5000/v3",
|
conn = connection.Connection(auth_url="http://openstack:5000/v3",
|
||||||
project_name="big_project",
|
project_name="big_project",
|
||||||
user_name="SDK_user",
|
username"SDK_user",
|
||||||
password="Super5ecretPassw0rd")
|
password="Super5ecretPassw0rd")
|
||||||
for container in conn.object_store.containers():
|
for container in conn.object_store.containers():
|
||||||
print(container.name)
|
print(container.name)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
from openstack import connection
|
from openstack import connection
|
||||||
conn = connection.Connection(auth_url="http://openstack:5000/v3",
|
conn = connection.Connection(auth_url="http://openstack:5000/v3",
|
||||||
project_name="big_project",
|
project_name="big_project",
|
||||||
user_name="SDK_user",
|
username="SDK_user",
|
||||||
password="Super5ecretPassw0rd")
|
password="Super5ecretPassw0rd")
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ To use python-openstacksdk in a project::
|
|||||||
auth_args = {
|
auth_args = {
|
||||||
'auth_url': 'http://172.20.1.108:5000/v3',
|
'auth_url': 'http://172.20.1.108:5000/v3',
|
||||||
'project_name': 'hacker',
|
'project_name': 'hacker',
|
||||||
'user_name': 'neo',
|
'username': 'neo',
|
||||||
'password': 'bluepill',
|
'password': 'bluepill',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@ def option_parser():
|
|||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--os-username',
|
'--os-username',
|
||||||
dest='user_name',
|
dest='username',
|
||||||
metavar='<auth-username>',
|
metavar='<auth-username>',
|
||||||
default=env('OS_USERNAME'),
|
default=env('OS_USERNAME'),
|
||||||
help='Authentication username (Env: OS_USERNAME)',
|
help='Authentication username (Env: OS_USERNAME)',
|
||||||
|
@ -33,7 +33,7 @@ def make_connection(opts):
|
|||||||
'domain_name': opts.domain_name,
|
'domain_name': opts.domain_name,
|
||||||
'project_domain_name': opts.project_domain_name,
|
'project_domain_name': opts.project_domain_name,
|
||||||
'user_domain_name': opts.user_domain_name,
|
'user_domain_name': opts.user_domain_name,
|
||||||
'user_name': opts.user_name,
|
'username': opts.username,
|
||||||
'password': opts.password,
|
'password': opts.password,
|
||||||
'verify': opts.verify,
|
'verify': opts.verify,
|
||||||
'token': opts.token,
|
'token': opts.token,
|
||||||
|
@ -81,7 +81,7 @@ def main():
|
|||||||
'domain_name': opts.domain_name,
|
'domain_name': opts.domain_name,
|
||||||
'project_domain_name': opts.project_domain_name,
|
'project_domain_name': opts.project_domain_name,
|
||||||
'user_domain_name': opts.user_domain_name,
|
'user_domain_name': opts.user_domain_name,
|
||||||
'user_name': opts.user_name,
|
'username': opts.username,
|
||||||
'password': opts.password,
|
'password': opts.password,
|
||||||
'verify': opts.verify,
|
'verify': opts.verify,
|
||||||
'token': opts.token,
|
'token': opts.token,
|
||||||
|
@ -23,7 +23,7 @@ example::
|
|||||||
args = {
|
args = {
|
||||||
'password': 'openSesame',
|
'password': 'openSesame',
|
||||||
'auth_url': 'https://10.1.1.1:5000/v3/',
|
'auth_url': 'https://10.1.1.1:5000/v3/',
|
||||||
'user_name': 'alibaba',
|
'username': 'alibaba',
|
||||||
}
|
}
|
||||||
auth = discoverable.Auth(**args)
|
auth = discoverable.Auth(**args)
|
||||||
xport = transport.Transport()
|
xport = transport.Transport()
|
||||||
@ -52,7 +52,7 @@ class Auth(base.BaseIdentityPlugin):
|
|||||||
|
|
||||||
:param string auth_url: Identity service endpoint for authentication.
|
:param string auth_url: Identity service endpoint for authentication.
|
||||||
|
|
||||||
:raises TypeError: if a user_id, user_name or token is not provided.
|
:raises TypeError: if a user_id, username or token is not provided.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
super(Auth, self).__init__(auth_url=auth_url)
|
super(Auth, self).__init__(auth_url=auth_url)
|
||||||
|
@ -21,7 +21,7 @@ would also require a password. For example::
|
|||||||
args = {
|
args = {
|
||||||
'password': 'openSesame',
|
'password': 'openSesame',
|
||||||
'auth_url': 'https://10.1.1.1:5000/v2.0/',
|
'auth_url': 'https://10.1.1.1:5000/v2.0/',
|
||||||
'user_name': 'alibaba',
|
'username': 'alibaba',
|
||||||
}
|
}
|
||||||
auth = v2.Auth(**args)
|
auth = v2.Auth(**args)
|
||||||
xport = transport.Transport()
|
xport = transport.Transport()
|
||||||
@ -115,7 +115,7 @@ class Password(Auth):
|
|||||||
valid_options = [
|
valid_options = [
|
||||||
'access_info',
|
'access_info',
|
||||||
'auth_url',
|
'auth_url',
|
||||||
'user_name',
|
'username',
|
||||||
'user_id',
|
'user_id',
|
||||||
'password',
|
'password',
|
||||||
'project_id',
|
'project_id',
|
||||||
@ -124,38 +124,38 @@ class Password(Auth):
|
|||||||
'trust_id',
|
'trust_id',
|
||||||
]
|
]
|
||||||
|
|
||||||
def __init__(self, auth_url, user_name=_NOT_PASSED, password=None,
|
def __init__(self, auth_url, username=_NOT_PASSED, password=None,
|
||||||
user_id=_NOT_PASSED, **kwargs):
|
user_id=_NOT_PASSED, **kwargs):
|
||||||
"""A plugin for authenticating with a user_name and password.
|
"""A plugin for authenticating with a username and password.
|
||||||
|
|
||||||
A user_name or user_id must be provided.
|
A username or user_id must be provided.
|
||||||
|
|
||||||
:param string auth_url: Identity service endpoint for authorization.
|
:param string auth_url: Identity service endpoint for authorization.
|
||||||
:param string user_name: Username for authentication.
|
:param string username: Username for authentication.
|
||||||
:param string password: Password for authentication.
|
:param string password: Password for authentication.
|
||||||
:param string user_id: User ID for authentication.
|
:param string user_id: User ID for authentication.
|
||||||
|
|
||||||
:raises TypeError: if a user_id or user_name is not provided.
|
:raises TypeError: if a user_id or username is not provided.
|
||||||
"""
|
"""
|
||||||
super(Password, self).__init__(auth_url, **kwargs)
|
super(Password, self).__init__(auth_url, **kwargs)
|
||||||
|
|
||||||
if user_name is _NOT_PASSED and user_id is _NOT_PASSED:
|
if username is _NOT_PASSED and user_id is _NOT_PASSED:
|
||||||
msg = 'You need to specify either a user_name or user_id'
|
msg = 'You need to specify either a username or user_id'
|
||||||
raise TypeError(msg)
|
raise TypeError(msg)
|
||||||
if user_name is _NOT_PASSED:
|
if username is _NOT_PASSED:
|
||||||
user_name = None
|
username = None
|
||||||
if user_id is _NOT_PASSED:
|
if user_id is _NOT_PASSED:
|
||||||
user_id = None
|
user_id = None
|
||||||
|
|
||||||
self.user_id = user_id
|
self.user_id = user_id
|
||||||
self.user_name = user_name
|
self.username = username
|
||||||
self.password = password
|
self.password = password
|
||||||
|
|
||||||
def get_auth_data(self, headers=None):
|
def get_auth_data(self, headers=None):
|
||||||
auth = {'password': self.password}
|
auth = {'password': self.password}
|
||||||
|
|
||||||
if self.user_name:
|
if self.username:
|
||||||
auth['username'] = self.user_name
|
auth['username'] = self.username
|
||||||
elif self.user_id:
|
elif self.user_id:
|
||||||
auth['userId'] = self.user_id
|
auth['userId'] = self.user_id
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ would also require a password. For example::
|
|||||||
args = {
|
args = {
|
||||||
'password': 'openSesame',
|
'password': 'openSesame',
|
||||||
'auth_url': 'https://10.1.1.1:5000/v3/',
|
'auth_url': 'https://10.1.1.1:5000/v3/',
|
||||||
'user_name': 'alibaba',
|
'username': 'alibaba',
|
||||||
}
|
}
|
||||||
auth = v3.Auth(**args)
|
auth = v3.Auth(**args)
|
||||||
xport = transport.Transport()
|
xport = transport.Transport()
|
||||||
@ -214,7 +214,7 @@ class AuthConstructor(Auth):
|
|||||||
class PasswordMethod(AuthMethod):
|
class PasswordMethod(AuthMethod):
|
||||||
|
|
||||||
_method_parameters = ['user_id',
|
_method_parameters = ['user_id',
|
||||||
'user_name',
|
'username',
|
||||||
'user_domain_id',
|
'user_domain_id',
|
||||||
'user_domain_name',
|
'user_domain_name',
|
||||||
'password']
|
'password']
|
||||||
@ -223,7 +223,7 @@ class PasswordMethod(AuthMethod):
|
|||||||
"""Construct a User/Password based authentication method.
|
"""Construct a User/Password based authentication method.
|
||||||
|
|
||||||
:param string password: Password for authentication.
|
:param string password: Password for authentication.
|
||||||
:param string user_name: Username for authentication.
|
:param string username: Username for authentication.
|
||||||
:param string user_id: User ID for authentication.
|
:param string user_id: User ID for authentication.
|
||||||
:param string user_domain_id: User's domain ID for authentication.
|
:param string user_domain_id: User's domain ID for authentication.
|
||||||
:param string user_domain_name: User's domain name for authentication.
|
:param string user_domain_name: User's domain name for authentication.
|
||||||
@ -236,8 +236,8 @@ class PasswordMethod(AuthMethod):
|
|||||||
|
|
||||||
if self.user_id:
|
if self.user_id:
|
||||||
user['id'] = self.user_id
|
user['id'] = self.user_id
|
||||||
elif self.user_name:
|
elif self.username:
|
||||||
user['name'] = self.user_name
|
user['name'] = self.username
|
||||||
|
|
||||||
if self.user_domain_id:
|
if self.user_domain_id:
|
||||||
user['domain'] = {'id': self.user_domain_id}
|
user['domain'] = {'id': self.user_domain_id}
|
||||||
@ -265,7 +265,7 @@ class Password(AuthConstructor):
|
|||||||
'user_domain_id',
|
'user_domain_id',
|
||||||
'user_domain_name',
|
'user_domain_name',
|
||||||
'user_id',
|
'user_id',
|
||||||
'user_name',
|
'username',
|
||||||
]
|
]
|
||||||
|
|
||||||
_auth_method_class = PasswordMethod
|
_auth_method_class = PasswordMethod
|
||||||
|
@ -34,7 +34,7 @@ by this connection.::
|
|||||||
auth_args = {
|
auth_args = {
|
||||||
'auth_url': 'http://172.20.1.108:5000/v3',
|
'auth_url': 'http://172.20.1.108:5000/v3',
|
||||||
'project_name': 'admin',
|
'project_name': 'admin',
|
||||||
'user_name': 'admin',
|
'username': 'admin',
|
||||||
'password': 'admin',
|
'password': 'admin',
|
||||||
}
|
}
|
||||||
conn = connection.Connection(**auth_args)
|
conn = connection.Connection(**auth_args)
|
||||||
|
@ -36,14 +36,14 @@ class TestDiscoverableAuth(testtools.TestCase):
|
|||||||
'user_domain_id',
|
'user_domain_id',
|
||||||
'user_domain_name',
|
'user_domain_name',
|
||||||
'user_id',
|
'user_id',
|
||||||
'user_name',
|
'username',
|
||||||
]
|
]
|
||||||
self.assertEqual(expected, sorted(discoverable.Auth.valid_options))
|
self.assertEqual(expected, sorted(discoverable.Auth.valid_options))
|
||||||
|
|
||||||
def test_create2(self):
|
def test_create2(self):
|
||||||
auth_args = {
|
auth_args = {
|
||||||
'auth_url': 'http://localhost/v2',
|
'auth_url': 'http://localhost/v2',
|
||||||
'user_name': '1',
|
'username': '1',
|
||||||
'password': '2',
|
'password': '2',
|
||||||
}
|
}
|
||||||
auth = discoverable.Auth(**auth_args)
|
auth = discoverable.Auth(**auth_args)
|
||||||
@ -53,7 +53,7 @@ class TestDiscoverableAuth(testtools.TestCase):
|
|||||||
def test_create3(self):
|
def test_create3(self):
|
||||||
auth_args = {
|
auth_args = {
|
||||||
'auth_url': 'http://localhost/v3',
|
'auth_url': 'http://localhost/v3',
|
||||||
'user_name': '1',
|
'username': '1',
|
||||||
'password': '2',
|
'password': '2',
|
||||||
}
|
}
|
||||||
auth = discoverable.Auth(**auth_args)
|
auth = discoverable.Auth(**auth_args)
|
||||||
@ -63,7 +63,7 @@ class TestDiscoverableAuth(testtools.TestCase):
|
|||||||
def test_create_who_knows(self):
|
def test_create_who_knows(self):
|
||||||
auth_args = {
|
auth_args = {
|
||||||
'auth_url': 'http://localhost:5000/',
|
'auth_url': 'http://localhost:5000/',
|
||||||
'user_name': '1',
|
'username': '1',
|
||||||
'password': '2',
|
'password': '2',
|
||||||
}
|
}
|
||||||
auth = discoverable.Auth(**auth_args)
|
auth = discoverable.Auth(**auth_args)
|
||||||
@ -79,7 +79,7 @@ class TestDiscoverableAuth(testtools.TestCase):
|
|||||||
def test_methods(self):
|
def test_methods(self):
|
||||||
auth_args = {
|
auth_args = {
|
||||||
'auth_url': 'http://localhost:5000/',
|
'auth_url': 'http://localhost:5000/',
|
||||||
'user_name': '1',
|
'username': '1',
|
||||||
'password': '2',
|
'password': '2',
|
||||||
}
|
}
|
||||||
auth = discoverable.Auth(**auth_args)
|
auth = discoverable.Auth(**auth_args)
|
||||||
|
@ -32,7 +32,7 @@ class TestV2Auth(testtools.TestCase):
|
|||||||
sot = v2.Password(TEST_URL, common.TEST_USER, common.TEST_PASS,
|
sot = v2.Password(TEST_URL, common.TEST_USER, common.TEST_PASS,
|
||||||
**kargs)
|
**kargs)
|
||||||
|
|
||||||
self.assertEqual(common.TEST_USER, sot.user_name)
|
self.assertEqual(common.TEST_USER, sot.username)
|
||||||
self.assertEqual(common.TEST_PASS, sot.password)
|
self.assertEqual(common.TEST_PASS, sot.password)
|
||||||
self.assertEqual(common.TEST_TRUST_ID, sot.trust_id)
|
self.assertEqual(common.TEST_TRUST_ID, sot.trust_id)
|
||||||
self.assertEqual(common.TEST_TENANT_ID, sot.tenant_id)
|
self.assertEqual(common.TEST_TENANT_ID, sot.tenant_id)
|
||||||
@ -49,7 +49,7 @@ class TestV2Auth(testtools.TestCase):
|
|||||||
sot = v2.Password(TEST_URL, None, common.TEST_PASS,
|
sot = v2.Password(TEST_URL, None, common.TEST_PASS,
|
||||||
**kargs)
|
**kargs)
|
||||||
|
|
||||||
self.assertEqual(None, sot.user_name)
|
self.assertEqual(None, sot.username)
|
||||||
self.assertEqual(common.TEST_PASS, sot.password)
|
self.assertEqual(common.TEST_PASS, sot.password)
|
||||||
self.assertEqual(common.TEST_TRUST_ID, sot.trust_id)
|
self.assertEqual(common.TEST_TRUST_ID, sot.trust_id)
|
||||||
self.assertEqual(common.TEST_TENANT_ID, sot.tenant_id)
|
self.assertEqual(common.TEST_TENANT_ID, sot.tenant_id)
|
||||||
|
@ -26,7 +26,7 @@ class TestV3Auth(testtools.TestCase):
|
|||||||
'project_id': common.TEST_PROJECT_ID,
|
'project_id': common.TEST_PROJECT_ID,
|
||||||
'project_name': common.TEST_PROJECT_NAME}
|
'project_name': common.TEST_PROJECT_NAME}
|
||||||
|
|
||||||
method = v3.PasswordMethod(user_name=common.TEST_USER,
|
method = v3.PasswordMethod(username=common.TEST_USER,
|
||||||
user_id=common.TEST_USER_ID,
|
user_id=common.TEST_USER_ID,
|
||||||
user_domain_id=common.TEST_DOMAIN_ID,
|
user_domain_id=common.TEST_DOMAIN_ID,
|
||||||
user_domain_name=common.TEST_DOMAIN_NAME,
|
user_domain_name=common.TEST_DOMAIN_NAME,
|
||||||
@ -36,7 +36,7 @@ class TestV3Auth(testtools.TestCase):
|
|||||||
self.assertEqual(1, len(sot.auth_methods))
|
self.assertEqual(1, len(sot.auth_methods))
|
||||||
auther = sot.auth_methods[0]
|
auther = sot.auth_methods[0]
|
||||||
self.assertEqual(common.TEST_USER_ID, auther.user_id)
|
self.assertEqual(common.TEST_USER_ID, auther.user_id)
|
||||||
self.assertEqual(common.TEST_USER, auther.user_name)
|
self.assertEqual(common.TEST_USER, auther.username)
|
||||||
self.assertEqual(common.TEST_DOMAIN_ID, auther.user_domain_id)
|
self.assertEqual(common.TEST_DOMAIN_ID, auther.user_domain_id)
|
||||||
self.assertEqual(common.TEST_DOMAIN_NAME, auther.user_domain_name)
|
self.assertEqual(common.TEST_DOMAIN_NAME, auther.user_domain_name)
|
||||||
self.assertEqual(common.TEST_PASS, auther.password)
|
self.assertEqual(common.TEST_PASS, auther.password)
|
||||||
@ -60,7 +60,7 @@ class TestV3Auth(testtools.TestCase):
|
|||||||
'project_id': common.TEST_PROJECT_ID,
|
'project_id': common.TEST_PROJECT_ID,
|
||||||
'project_name': common.TEST_PROJECT_NAME}
|
'project_name': common.TEST_PROJECT_NAME}
|
||||||
|
|
||||||
methods = [v3.PasswordMethod(user_name=common.TEST_USER,
|
methods = [v3.PasswordMethod(username=common.TEST_USER,
|
||||||
user_id=common.TEST_USER_ID,
|
user_id=common.TEST_USER_ID,
|
||||||
password=common.TEST_PASS)]
|
password=common.TEST_PASS)]
|
||||||
sot = v3.Auth(TEST_URL, methods, **kargs)
|
sot = v3.Auth(TEST_URL, methods, **kargs)
|
||||||
@ -68,7 +68,7 @@ class TestV3Auth(testtools.TestCase):
|
|||||||
self.assertEqual(1, len(sot.auth_methods))
|
self.assertEqual(1, len(sot.auth_methods))
|
||||||
auther = sot.auth_methods[0]
|
auther = sot.auth_methods[0]
|
||||||
self.assertEqual(common.TEST_USER_ID, auther.user_id)
|
self.assertEqual(common.TEST_USER_ID, auther.user_id)
|
||||||
self.assertEqual(common.TEST_USER, auther.user_name)
|
self.assertEqual(common.TEST_USER, auther.username)
|
||||||
self.assertEqual(None, auther.user_domain_id)
|
self.assertEqual(None, auther.user_domain_id)
|
||||||
self.assertEqual(None, auther.user_domain_name)
|
self.assertEqual(None, auther.user_domain_name)
|
||||||
self.assertEqual(common.TEST_PASS, auther.password)
|
self.assertEqual(common.TEST_PASS, auther.password)
|
||||||
@ -288,7 +288,7 @@ class TestV3Auth(testtools.TestCase):
|
|||||||
self.assertEqual(ecatalog, resp._info)
|
self.assertEqual(ecatalog, resp._info)
|
||||||
|
|
||||||
def test_authorize_multi_method(self):
|
def test_authorize_multi_method(self):
|
||||||
methods = [v3.PasswordMethod(user_name=common.TEST_USER,
|
methods = [v3.PasswordMethod(username=common.TEST_USER,
|
||||||
password=common.TEST_PASS),
|
password=common.TEST_PASS),
|
||||||
v3.TokenMethod(token=common.TEST_TOKEN)]
|
v3.TokenMethod(token=common.TEST_TOKEN)]
|
||||||
sot = v3.Auth(TEST_URL, methods)
|
sot = v3.Auth(TEST_URL, methods)
|
||||||
|
@ -41,33 +41,33 @@ class TestConnection(base.TestCase):
|
|||||||
def test_create_authenticator_v2(self):
|
def test_create_authenticator_v2(self):
|
||||||
auth_args = {
|
auth_args = {
|
||||||
'auth_url': '0',
|
'auth_url': '0',
|
||||||
'user_name': '1',
|
'username': '1',
|
||||||
'password': '2',
|
'password': '2',
|
||||||
}
|
}
|
||||||
conn = connection.Connection(transport='0',
|
conn = connection.Connection(transport='0',
|
||||||
auth_plugin='identity_v2_password',
|
auth_plugin='identity_v2_password',
|
||||||
**auth_args)
|
**auth_args)
|
||||||
self.assertEqual('0', conn.authenticator.auth_url)
|
self.assertEqual('0', conn.authenticator.auth_url)
|
||||||
self.assertEqual('1', conn.authenticator.user_name)
|
self.assertEqual('1', conn.authenticator.username)
|
||||||
self.assertEqual('2', conn.authenticator.password)
|
self.assertEqual('2', conn.authenticator.password)
|
||||||
|
|
||||||
def test_create_authenticator_v3(self):
|
def test_create_authenticator_v3(self):
|
||||||
auth_args = {
|
auth_args = {
|
||||||
'auth_url': '0',
|
'auth_url': '0',
|
||||||
'user_name': '1',
|
'username': '1',
|
||||||
'password': '2',
|
'password': '2',
|
||||||
}
|
}
|
||||||
conn = connection.Connection(transport='0',
|
conn = connection.Connection(transport='0',
|
||||||
auth_plugin='identity_v3_password',
|
auth_plugin='identity_v3_password',
|
||||||
**auth_args)
|
**auth_args)
|
||||||
self.assertEqual('0', conn.authenticator.auth_url)
|
self.assertEqual('0', conn.authenticator.auth_url)
|
||||||
self.assertEqual('1', conn.authenticator.auth_methods[0].user_name)
|
self.assertEqual('1', conn.authenticator.auth_methods[0].username)
|
||||||
self.assertEqual('2', conn.authenticator.auth_methods[0].password)
|
self.assertEqual('2', conn.authenticator.auth_methods[0].password)
|
||||||
|
|
||||||
def test_create_authenticator_discoverable(self):
|
def test_create_authenticator_discoverable(self):
|
||||||
auth_args = {
|
auth_args = {
|
||||||
'auth_url': '0',
|
'auth_url': '0',
|
||||||
'user_name': '1',
|
'username': '1',
|
||||||
'password': '2',
|
'password': '2',
|
||||||
}
|
}
|
||||||
conn = connection.Connection(transport='0', auth_plugin='identity',
|
conn = connection.Connection(transport='0', auth_plugin='identity',
|
||||||
@ -75,7 +75,7 @@ class TestConnection(base.TestCase):
|
|||||||
self.assertEqual('0', conn.authenticator.auth_url)
|
self.assertEqual('0', conn.authenticator.auth_url)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
'1',
|
'1',
|
||||||
conn.authenticator.auth_plugin.auth_methods[0].user_name)
|
conn.authenticator.auth_plugin.auth_methods[0].username)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
'2',
|
'2',
|
||||||
conn.authenticator.auth_plugin.auth_methods[0].password)
|
conn.authenticator.auth_plugin.auth_methods[0].password)
|
||||||
@ -83,7 +83,7 @@ class TestConnection(base.TestCase):
|
|||||||
def test_create_authenticator_no_name(self):
|
def test_create_authenticator_no_name(self):
|
||||||
auth_args = {
|
auth_args = {
|
||||||
'auth_url': 'http://localhost/v2',
|
'auth_url': 'http://localhost/v2',
|
||||||
'user_name': '1',
|
'username': '1',
|
||||||
'password': '2',
|
'password': '2',
|
||||||
}
|
}
|
||||||
conn = connection.Connection(transport='0', **auth_args)
|
conn = connection.Connection(transport='0', **auth_args)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user