Merge "Importing from trove-client compat"
This commit is contained in:
commit
4c83b33934
@ -20,6 +20,11 @@ try:
|
||||
from troveclient import auth
|
||||
from troveclient import client
|
||||
with_trove = True
|
||||
except ImportError:
|
||||
try:
|
||||
from troveclient.compat import auth
|
||||
from troveclient.compat import client
|
||||
with_trove = True
|
||||
except ImportError:
|
||||
with_trove = False
|
||||
|
||||
|
@ -24,7 +24,14 @@ from openstack_dashboard import api
|
||||
from openstack_dashboard.test import helpers as test
|
||||
|
||||
if api.trove.with_trove:
|
||||
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')
|
||||
|
@ -28,6 +28,10 @@ from swiftclient import client as swiftclient
|
||||
try:
|
||||
from troveclient import exceptions as troveclient
|
||||
with_trove = True
|
||||
except ImportError:
|
||||
try:
|
||||
from troveclient.compat import exceptions as troveclient
|
||||
with_trove = True
|
||||
except ImportError:
|
||||
with_trove = False
|
||||
|
||||
|
@ -41,6 +41,10 @@ from swiftclient import client as swift_client
|
||||
try:
|
||||
from troveclient import client as trove_client
|
||||
with_trove = True
|
||||
except ImportError:
|
||||
try:
|
||||
from troveclient.compat import client as trove_client
|
||||
with_trove = True
|
||||
except ImportError:
|
||||
with_trove = False
|
||||
|
||||
|
@ -22,6 +22,10 @@ from swiftclient import client as swift_exceptions
|
||||
try:
|
||||
from troveclient import exceptions as trove_exceptions
|
||||
with_trove = True
|
||||
except ImportError:
|
||||
try:
|
||||
from troveclient.compat import exceptions as trove_exceptions
|
||||
with_trove = True
|
||||
except ImportError:
|
||||
with_trove = False
|
||||
|
||||
|
@ -18,6 +18,11 @@ try:
|
||||
from troveclient import backups
|
||||
from troveclient import instances
|
||||
with_trove = True
|
||||
except ImportError:
|
||||
try:
|
||||
from troveclient.v1 import backups
|
||||
from troveclient.v1 import instances
|
||||
with_trove = True
|
||||
except ImportError:
|
||||
with_trove = False
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user