Remove keystone v2 related code
Kyestone V2 support was removed in Train, so it's safe to remove "tenant" param. Change-Id: I1458a61f5b0d70e1d4ebe3b8ba88bc4826b7a363
This commit is contained in:
parent
2a8a8dc3cd
commit
0df8a1da22
@ -236,7 +236,6 @@ class FreezerShell(app.App):
|
||||
'token': self.options.os_token,
|
||||
'username': self.options.os_username,
|
||||
'password': self.options.os_password,
|
||||
'tenant_name': self.options.os_project_name,
|
||||
'auth_url': self.options.os_auth_url,
|
||||
'endpoint': self.options.os_backup_url,
|
||||
'endpoint_type': self.options.os_endpoint_type,
|
||||
|
@ -36,8 +36,6 @@ class ShellTest(testtools.TestCase):
|
||||
FAKE_ENV = {
|
||||
'OS_USERNAME': DEFAULT_USERNAME,
|
||||
'OS_PASSWORD': DEFAULT_PASSWORD,
|
||||
'OS_TENANT_ID': DEFAULT_PROJECT_ID,
|
||||
'OS_TENANT_NAME': DEFAULT_PROJECT_NAME,
|
||||
'OS_PROJECT_ID': DEFAULT_PROJECT_ID,
|
||||
'OS_PROJECT_NAME': DEFAULT_PROJECT_NAME,
|
||||
'OS_AUTH_URL': DEFAULT_AUTH_URL,
|
||||
|
@ -40,7 +40,7 @@ class TestClientMock(unittest.TestCase):
|
||||
kwargs = {'token': 'alpha',
|
||||
'username': 'bravo',
|
||||
'password': 'charlie',
|
||||
'tenant_name': 'delta',
|
||||
'project_name': 'delta',
|
||||
'auth_url': 'echo',
|
||||
'endpoint': 'golf',
|
||||
'session': mock_session}
|
||||
@ -49,7 +49,7 @@ class TestClientMock(unittest.TestCase):
|
||||
self.assertEqual('alpha', c.opts.os_token)
|
||||
self.assertEqual('bravo', c.opts.os_username)
|
||||
self.assertEqual('charlie', c.opts.os_password)
|
||||
self.assertEqual('delta', c.opts.os_tenant_name)
|
||||
self.assertEqual('delta', c.opts.os_project_name)
|
||||
self.assertEqual('echo', c.opts.os_auth_url)
|
||||
self.assertEqual(mock_session, c._session)
|
||||
self.assertEqual(mock_session, c.session)
|
||||
@ -63,7 +63,6 @@ class TestClientMock(unittest.TestCase):
|
||||
mock_ks_loader.return_value.load_from_options.return_value = 'auth'
|
||||
kwargs = {'auth_url': 'one',
|
||||
'project_id': 'two',
|
||||
'tenant_name': 'three',
|
||||
'project_name': 'four',
|
||||
'user_domain_id': 'five',
|
||||
'user_domain_name': 'six',
|
||||
@ -76,7 +75,6 @@ class TestClientMock(unittest.TestCase):
|
||||
self.assertIsInstance(c, client.Client)
|
||||
self.assertEqual('one', c.opts.os_auth_url)
|
||||
self.assertEqual('two', c.opts.os_project_id)
|
||||
self.assertEqual('three', c.opts.os_tenant_name)
|
||||
self.assertEqual('four', c.opts.os_project_name)
|
||||
self.assertEqual('five', c.opts.os_user_domain_id)
|
||||
self.assertEqual('six', c.opts.os_user_domain_name)
|
||||
@ -94,7 +92,6 @@ class TestClientMock(unittest.TestCase):
|
||||
mock_ks_loader.return_value.load_from_options.return_value = 'auth'
|
||||
kwargs = {'auth_url': 'one',
|
||||
'project_id': 'two',
|
||||
'tenant_name': 'three',
|
||||
'project_name': 'four',
|
||||
'user_domain_id': 'five',
|
||||
'user_domain_name': 'six',
|
||||
@ -106,7 +103,6 @@ class TestClientMock(unittest.TestCase):
|
||||
self.assertIsInstance(c, client.Client)
|
||||
self.assertEqual('one', c.opts.os_auth_url)
|
||||
self.assertEqual('two', c.opts.os_project_id)
|
||||
self.assertEqual('three', c.opts.os_tenant_name)
|
||||
self.assertEqual('four', c.opts.os_project_name)
|
||||
self.assertEqual('five', c.opts.os_user_domain_id)
|
||||
self.assertEqual('six', c.opts.os_user_domain_name)
|
||||
|
@ -40,7 +40,7 @@ class TestClientMock(unittest.TestCase):
|
||||
kwargs = {'token': 'alpha',
|
||||
'username': 'bravo',
|
||||
'password': 'charlie',
|
||||
'tenant_name': 'delta',
|
||||
'project_name': 'delta',
|
||||
'auth_url': 'echo',
|
||||
'endpoint': 'golf',
|
||||
'session': mock_session}
|
||||
@ -49,7 +49,7 @@ class TestClientMock(unittest.TestCase):
|
||||
self.assertEqual('alpha', c.opts.os_token)
|
||||
self.assertEqual('bravo', c.opts.os_username)
|
||||
self.assertEqual('charlie', c.opts.os_password)
|
||||
self.assertEqual('delta', c.opts.os_tenant_name)
|
||||
self.assertEqual('delta', c.opts.os_project_name)
|
||||
self.assertEqual('echo', c.opts.os_auth_url)
|
||||
self.assertEqual(mock_session, c._session)
|
||||
self.assertEqual(mock_session, c.session)
|
||||
@ -63,7 +63,6 @@ class TestClientMock(unittest.TestCase):
|
||||
mock_ks_loader.return_value.load_from_options.return_value = 'auth'
|
||||
kwargs = {'auth_url': 'one',
|
||||
'project_id': 'two',
|
||||
'tenant_name': 'three',
|
||||
'project_name': 'four',
|
||||
'user_domain_id': 'five',
|
||||
'user_domain_name': 'six',
|
||||
@ -76,7 +75,6 @@ class TestClientMock(unittest.TestCase):
|
||||
self.assertIsInstance(c, client.Client)
|
||||
self.assertEqual('one', c.opts.os_auth_url)
|
||||
self.assertEqual('two', c.opts.os_project_id)
|
||||
self.assertEqual('three', c.opts.os_tenant_name)
|
||||
self.assertEqual('four', c.opts.os_project_name)
|
||||
self.assertEqual('five', c.opts.os_user_domain_id)
|
||||
self.assertEqual('six', c.opts.os_user_domain_name)
|
||||
@ -94,7 +92,6 @@ class TestClientMock(unittest.TestCase):
|
||||
mock_ks_loader.return_value.load_from_options.return_value = 'auth'
|
||||
kwargs = {'auth_url': 'one',
|
||||
'project_id': 'two',
|
||||
'tenant_name': 'three',
|
||||
'project_name': 'four',
|
||||
'user_domain_id': 'five',
|
||||
'user_domain_name': 'six',
|
||||
@ -106,7 +103,6 @@ class TestClientMock(unittest.TestCase):
|
||||
self.assertIsInstance(c, client.Client)
|
||||
self.assertEqual('one', c.opts.os_auth_url)
|
||||
self.assertEqual('two', c.opts.os_project_id)
|
||||
self.assertEqual('three', c.opts.os_tenant_name)
|
||||
self.assertEqual('four', c.opts.os_project_name)
|
||||
self.assertEqual('five', c.opts.os_user_domain_id)
|
||||
self.assertEqual('six', c.opts.os_user_domain_name)
|
||||
|
@ -31,7 +31,7 @@ class Client(object):
|
||||
"""
|
||||
|
||||
def __init__(self, token=None, username=None, password=None,
|
||||
tenant_name=None, auth_url=None, session=None, endpoint=None,
|
||||
auth_url=None, session=None, endpoint=None,
|
||||
endpoint_type=None, opts=None, project_name=None,
|
||||
user_domain_name=None, user_domain_id=None,
|
||||
project_domain_name=None, project_domain_id=None,
|
||||
@ -41,7 +41,6 @@ class Client(object):
|
||||
:param token: keystone token
|
||||
:param username: openstack username
|
||||
:param password: openstack password
|
||||
:param tenant_name: tenant
|
||||
:param auth_url: keystone-api endpoint
|
||||
:param session: keystone.Session
|
||||
:param endpoint: freezer-api endpoint
|
||||
@ -71,7 +70,6 @@ class Client(object):
|
||||
self.opts.os_token = token or None
|
||||
self.opts.os_username = username or None
|
||||
self.opts.os_password = password or None
|
||||
self.opts.os_tenant_name = tenant_name or None
|
||||
self.opts.os_auth_url = auth_url or None
|
||||
self.opts.os_backup_url = endpoint or None
|
||||
self.opts.os_endpoint_type = endpoint_type or None
|
||||
@ -119,7 +117,6 @@ class Client(object):
|
||||
auth_kwargs.update({
|
||||
'username': self.opts.os_username,
|
||||
'password': self.opts.os_password,
|
||||
'tenant_name': self.opts.os_tenant_name,
|
||||
'user_domain_id': self.opts.os_user_domain_id,
|
||||
'user_domain_name': self.opts.os_user_domain_name,
|
||||
})
|
||||
|
@ -31,7 +31,7 @@ class Client(object):
|
||||
"""
|
||||
|
||||
def __init__(self, token=None, username=None, password=None,
|
||||
tenant_name=None, auth_url=None, session=None, endpoint=None,
|
||||
auth_url=None, session=None, endpoint=None,
|
||||
endpoint_type=None, opts=None, project_name=None,
|
||||
user_domain_name=None, user_domain_id=None,
|
||||
project_domain_name=None, project_domain_id=None,
|
||||
@ -41,14 +41,12 @@ class Client(object):
|
||||
:param token: keystone token
|
||||
:param username: openstack username
|
||||
:param password: openstack password
|
||||
:param tenant_name: tenant
|
||||
:param auth_url: keystone-api endpoint
|
||||
:param session: keystone.Session
|
||||
:param endpoint: freezer-api endpoint
|
||||
:param endpoint_type: type of endpoint
|
||||
:param opts: a namespace to store all keystone data
|
||||
:param project_name: only for version 3
|
||||
:param tenant_id: only for version 2
|
||||
:param user_domain_name: only for version 3
|
||||
:param user_domain_id: only for version 3
|
||||
:param project_domain_name: only for version 3
|
||||
@ -71,7 +69,6 @@ class Client(object):
|
||||
self.opts.os_token = token or None
|
||||
self.opts.os_username = username or None
|
||||
self.opts.os_password = password or None
|
||||
self.opts.os_tenant_name = tenant_name or None
|
||||
self.opts.os_auth_url = auth_url or None
|
||||
self.opts.os_backup_url = endpoint or None
|
||||
self.opts.os_endpoint_type = endpoint_type or None
|
||||
@ -119,7 +116,6 @@ class Client(object):
|
||||
auth_kwargs.update({
|
||||
'username': self.opts.os_username,
|
||||
'password': self.opts.os_password,
|
||||
'tenant_name': self.opts.os_tenant_name,
|
||||
'user_domain_id': self.opts.os_user_domain_id,
|
||||
'user_domain_name': self.opts.os_user_domain_name,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user