Importing from trove-client compat

Fixes bug #1250237

Change-Id: I7a67fa7e2ab34c960fed908090edb05059ae74e4
This commit is contained in:
Steve Leon 2013-11-11 14:29:55 -08:00
parent 7e819638fb
commit 2fc1a45a84
6 changed files with 35 additions and 6 deletions

View File

@ -21,7 +21,12 @@ try:
from troveclient import client
with_trove = True
except ImportError:
with_trove = False
try:
from troveclient.compat import auth
from troveclient.compat import client
with_trove = True
except ImportError:
with_trove = False
class TokenAuth(object):

View File

@ -24,7 +24,14 @@ from openstack_dashboard import api
from openstack_dashboard.test import helpers as test
if api.trove.with_trove:
from troveclient import common
try:
from troveclient import common
except ImportError:
try:
from troveclient.compat import common
except ImportError:
pass
INDEX_URL = reverse('horizon:project:databases:index')
LAUNCH_URL = reverse('horizon:project:databases:launch')

View File

@ -29,7 +29,11 @@ try:
from troveclient import exceptions as troveclient
with_trove = True
except ImportError:
with_trove = False
try:
from troveclient.compat import exceptions as troveclient
with_trove = True
except ImportError:
with_trove = False
UNAUTHORIZED = (keystoneclient.Unauthorized,

View File

@ -42,7 +42,11 @@ try:
from troveclient import client as trove_client
with_trove = True
except ImportError:
with_trove = False
try:
from troveclient.compat import client as trove_client
with_trove = True
except ImportError:
with_trove = False
import httplib2
import mox

View File

@ -23,7 +23,11 @@ try:
from troveclient import exceptions as trove_exceptions
with_trove = True
except ImportError:
with_trove = False
try:
from troveclient.compat import exceptions as trove_exceptions
with_trove = True
except ImportError:
with_trove = False
from openstack_dashboard.test.test_data import utils

View File

@ -19,7 +19,12 @@ try:
from troveclient import instances
with_trove = True
except ImportError:
with_trove = False
try:
from troveclient.v1 import backups
from troveclient.v1 import instances
with_trove = True
except ImportError:
with_trove = False
from openstack_dashboard.test.test_data import utils