diff --git a/novaclient/tests/functional/base.py b/novaclient/tests/functional/base.py index 58403a078..138d5f513 100644 --- a/novaclient/tests/functional/base.py +++ b/novaclient/tests/functional/base.py @@ -15,7 +15,6 @@ import time from cinderclient.v3 import client as cinderclient import fixtures -from glanceclient import client as glanceclient from keystoneauth1.exceptions import discovery as discovery_exc from keystoneauth1 import identity from keystoneauth1 import session as ksession @@ -24,6 +23,7 @@ from keystoneclient import discover as keystone_discover from neutronclient.v2_0 import client as neutronclient import openstack.config import openstack.config.exceptions +import openstack.connection from oslo_utils import uuidutils import tempest.lib.cli.base import testtools @@ -223,13 +223,13 @@ class ClientTestBase(testtools.TestCase): self.client = self._get_novaclient(session) - self.glance = glanceclient.Client('2', session=session) + self.openstack = openstack.connection.Connection(session=session) # pick some reasonable flavor / image combo if "flavor" not in CACHE: CACHE["flavor"] = pick_flavor(self.client.flavors.list()) if "image" not in CACHE: - CACHE["image"] = pick_image(self.glance.images.list()) + CACHE["image"] = pick_image(self.openstack.image.images()) self.flavor = CACHE["flavor"] self.image = CACHE["image"] diff --git a/novaclient/tests/functional/v2/legacy/test_servers.py b/novaclient/tests/functional/v2/legacy/test_servers.py index 181f59f33..246b8d60c 100644 --- a/novaclient/tests/functional/v2/legacy/test_servers.py +++ b/novaclient/tests/functional/v2/legacy/test_servers.py @@ -111,7 +111,7 @@ class TestServersBootNovaClient(base.ClientTestBase): # get the snapshot image id out of the output table for the second # server create request snapshot_id = self._get_value_from_the_table(snapshot_info, 'id') - self.addCleanup(self.glance.images.delete, snapshot_id) + self.addCleanup(self.openstack.image.delete_image, snapshot_id) # verify the metadata was set on the snapshot image meta_value = self._get_value_from_the_table( diff --git a/test-requirements.txt b/test-requirements.txt index 0c56a31a6..1004a2837 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -5,7 +5,6 @@ ddt>=1.0.1 # MIT fixtures>=3.0.0 # Apache-2.0/BSD python-keystoneclient>=3.8.0 # Apache-2.0 python-cinderclient>=4.0.1 # Apache-2.0 -python-glanceclient>=2.8.0 # Apache-2.0 python-neutronclient>=6.7.0 # Apache-2.0 requests-mock>=1.2.0 # Apache-2.0 openstacksdk>=0.11.2 # Apache-2.0