Remove try-catch from test_data imports
python-manilaclient>=1.16.0, lower constrain for manila-ui, has support for v2. For this reason, the imports try-catch in test_data is no longer needed. Change-Id: Ic73137a1cc5356684d32578ddd1f49690bc5e515
This commit is contained in:
parent
31f30346ae
commit
7a018b3bc1
|
@ -13,32 +13,20 @@
|
|||
# under the License.
|
||||
import collections
|
||||
|
||||
try:
|
||||
# NOTE(vponomaryov): Try import latest modules, assuming we have
|
||||
# manilaclient that is new enough and have v2 API support.
|
||||
from manilaclient.v2 import quotas
|
||||
from manilaclient.v2 import security_services
|
||||
from manilaclient.v2 import share_networks
|
||||
from manilaclient.v2 import share_snapshots
|
||||
from manilaclient.v2 import share_types
|
||||
from manilaclient.v2 import shares
|
||||
except ImportError:
|
||||
# NOTE(vponomaryov): If we got here then we have old manilaclient.
|
||||
from manilaclient.v1 import quotas
|
||||
from manilaclient.v1 import security_services
|
||||
from manilaclient.v1 import share_networks
|
||||
from manilaclient.v1 import share_snapshots
|
||||
from manilaclient.v1 import share_types
|
||||
from manilaclient.v1 import shares
|
||||
|
||||
from manilaclient.v2 import quotas
|
||||
from manilaclient.v2 import security_services
|
||||
from manilaclient.v2 import share_export_locations
|
||||
from manilaclient.v2 import share_group_snapshots
|
||||
from manilaclient.v2 import share_group_types
|
||||
from manilaclient.v2 import share_groups
|
||||
from manilaclient.v2 import share_instances
|
||||
from manilaclient.v2 import share_networks
|
||||
from manilaclient.v2 import share_replicas
|
||||
from manilaclient.v2 import share_servers
|
||||
from manilaclient.v2 import share_snapshot_export_locations
|
||||
from manilaclient.v2 import share_snapshots
|
||||
from manilaclient.v2 import share_types
|
||||
from manilaclient.v2 import shares
|
||||
|
||||
from openstack_dashboard import api
|
||||
from openstack_dashboard.usage import quotas as usage_quotas
|
||||
|
|
Loading…
Reference in New Issue