Use keystoneauth instead of keystoneclient
keystoneauth was split out last cycle as a library specifically to deal with doing auth functions so that people who do not need to do keystone CRUD operations can just consume only the auth session parts. As part of modernizing keystone interactions, use keystoneauth instead of keystoneclient. Change-Id: Ief82837103450de209fcbbd92d8f4e898949fac4
This commit is contained in:
parent
7350f666c1
commit
1df776e86e
|
@ -13,9 +13,9 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from keystoneclient.auth.identity import v2 as keystone_v2_auth
|
||||
from keystoneclient.auth.identity import v3 as keystone_v3_auth
|
||||
from keystoneclient import session as keystone_session
|
||||
from keystoneauth1.identity import v2 as keystone_v2_auth
|
||||
from keystoneauth1.identity import v3 as keystone_v3_auth
|
||||
from keystoneauth1 import session as keystone_session
|
||||
import neutronclient.neutron.client as NeutronClient
|
||||
import novaclient.client as NovaClient
|
||||
from oslo_config import cfg
|
||||
|
|
|
@ -35,7 +35,7 @@ class TestClient(base.UnitTestCase):
|
|||
super(TestClient, self).tearDown()
|
||||
self.CONF.reset()
|
||||
|
||||
@mock.patch('keystoneclient.auth.identity.v2.Password')
|
||||
@mock.patch('keystoneauth1.identity.v2.Password')
|
||||
def test_get_auth_v2(self, mock_auth_v2):
|
||||
"""Test cue.client get_auth_v2.
|
||||
|
||||
|
@ -57,7 +57,7 @@ class TestClient(base.UnitTestCase):
|
|||
tenant_name=os_project_name,
|
||||
username=os_username)
|
||||
|
||||
@mock.patch('keystoneclient.auth.identity.v3.Password')
|
||||
@mock.patch('keystoneauth1.identity.v3.Password')
|
||||
def test_get_auth_v3(self, mock_auth_v3):
|
||||
"""Test cue.client get_auth_v3.
|
||||
|
||||
|
@ -86,7 +86,7 @@ class TestClient(base.UnitTestCase):
|
|||
user_domain_name=os_user_domain_name,
|
||||
username=os_username)
|
||||
|
||||
@mock.patch('keystoneclient.session.Session')
|
||||
@mock.patch('keystoneauth1.session.Session')
|
||||
@mock.patch('cue.client.get_auth_v2')
|
||||
def test_get_keystone_session_v2(self, mock_auth_v2, mock_ks_session):
|
||||
"""Test cue.client get_keystone_session.
|
||||
|
@ -104,7 +104,7 @@ class TestClient(base.UnitTestCase):
|
|||
mock_ks_session.assert_called_once_with(auth=mock_auth_v2(),
|
||||
verify=False)
|
||||
|
||||
@mock.patch('keystoneclient.session.Session')
|
||||
@mock.patch('keystoneauth1.session.Session')
|
||||
@mock.patch('cue.client.get_auth_v3')
|
||||
def test_get_keystone_session_v3(self, mock_auth_v3, mock_ks_session):
|
||||
"""Test cue.client get_keystone_session.
|
||||
|
|
|
@ -31,7 +31,7 @@ taskflow>=1.16.0
|
|||
kazoo>=2.2
|
||||
tooz>=1.28.0 # Apache-2.0
|
||||
#PyMySQL
|
||||
python-keystoneclient!=1.8.0,>=1.6.0
|
||||
keystoneauth1>=2.1.0
|
||||
python-novaclient!=2.33.0,>=2.29.0
|
||||
python-cinderclient>=1.3.1
|
||||
python-neutronclient>=2.6.0
|
||||
|
|
Loading…
Reference in New Issue