From 7a018b3bc1c23b183dc1314e8a5ca1fb37837c2d Mon Sep 17 00:00:00 2001 From: Victoria Martinez de la Cruz Date: Wed, 2 May 2018 11:43:23 -0400 Subject: [PATCH] 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 --- .../tests/dashboards/project/test_data.py | 24 +++++-------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/manila_ui/tests/dashboards/project/test_data.py b/manila_ui/tests/dashboards/project/test_data.py index 57cab202..8da54517 100644 --- a/manila_ui/tests/dashboards/project/test_data.py +++ b/manila_ui/tests/dashboards/project/test_data.py @@ -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