diff --git a/openstack_dashboard/api/trove.py b/openstack_dashboard/api/trove.py index 54b5017f2e..9c7423d896 100644 --- a/openstack_dashboard/api/trove.py +++ b/openstack_dashboard/api/trove.py @@ -17,13 +17,13 @@ from django.conf import settings # noqa try: - from troveclient import auth - from troveclient import client + from troveclient.compat import auth + from troveclient.compat import client with_trove = True except ImportError: try: - from troveclient.compat import auth - from troveclient.compat import client + from troveclient import auth + from troveclient import client with_trove = True except ImportError: with_trove = False diff --git a/openstack_dashboard/dashboards/project/databases/tests.py b/openstack_dashboard/dashboards/project/databases/tests.py index 3c6a393f3c..318115f620 100644 --- a/openstack_dashboard/dashboards/project/databases/tests.py +++ b/openstack_dashboard/dashboards/project/databases/tests.py @@ -25,10 +25,10 @@ from openstack_dashboard.test import helpers as test if api.trove.with_trove: try: - from troveclient import common + from troveclient.compat import common except ImportError: try: - from troveclient.compat import common + from troveclient import common except ImportError: pass diff --git a/openstack_dashboard/exceptions.py b/openstack_dashboard/exceptions.py index d44a9f8168..78e677f4f2 100644 --- a/openstack_dashboard/exceptions.py +++ b/openstack_dashboard/exceptions.py @@ -26,11 +26,11 @@ from neutronclient.common import exceptions as neutronclient from novaclient import exceptions as novaclient from swiftclient import client as swiftclient try: - from troveclient import exceptions as troveclient + from troveclient.compat import exceptions as troveclient with_trove = True except ImportError: try: - from troveclient.compat import exceptions as troveclient + from troveclient import exceptions as troveclient with_trove = True except ImportError: with_trove = False diff --git a/openstack_dashboard/test/helpers.py b/openstack_dashboard/test/helpers.py index 5cfcbaee10..d73e346b65 100644 --- a/openstack_dashboard/test/helpers.py +++ b/openstack_dashboard/test/helpers.py @@ -39,11 +39,11 @@ from neutronclient.v2_0 import client as neutron_client from novaclient.v1_1 import client as nova_client from swiftclient import client as swift_client try: - from troveclient import client as trove_client + from troveclient.compat import client as trove_client with_trove = True except ImportError: try: - from troveclient.compat import client as trove_client + from troveclient import client as trove_client with_trove = True except ImportError: with_trove = False diff --git a/openstack_dashboard/test/test_data/exceptions.py b/openstack_dashboard/test/test_data/exceptions.py index 40c57d2517..ae8e83145c 100644 --- a/openstack_dashboard/test/test_data/exceptions.py +++ b/openstack_dashboard/test/test_data/exceptions.py @@ -20,11 +20,11 @@ from neutronclient.common import exceptions as neutron_exceptions from novaclient import exceptions as nova_exceptions from swiftclient import client as swift_exceptions try: - from troveclient import exceptions as trove_exceptions + from troveclient.compat import exceptions as trove_exceptions with_trove = True except ImportError: try: - from troveclient.compat import exceptions as trove_exceptions + from troveclient import exceptions as trove_exceptions with_trove = True except ImportError: with_trove = False diff --git a/openstack_dashboard/test/test_data/trove_data.py b/openstack_dashboard/test/test_data/trove_data.py index d6461aa332..134cacb464 100644 --- a/openstack_dashboard/test/test_data/trove_data.py +++ b/openstack_dashboard/test/test_data/trove_data.py @@ -15,13 +15,13 @@ # under the License. try: - from troveclient import backups - from troveclient import instances + from troveclient.v1 import backups + from troveclient.v1 import instances with_trove = True except ImportError: try: - from troveclient.v1 import backups - from troveclient.v1 import instances + from troveclient import backups + from troveclient import instances with_trove = True except ImportError: with_trove = False