Remove Manila V1 API client

The Manila V1 API has been deprecated since 2016 and tests
stopped using it in change Id90044bca44387864aee8984bc2366c089c87cfc.
Complete this removal by:

1. Making SharesV2Client inherit directly from RestClient
   instead of the V1 SharesClient
2. Add microversion support added to all methods
3. Removing V1 client registration from plugin.py

Change-Id: I7be74fc22594d3a59932b8bc469f9209cf985fe6
Co-Authored-By: Stephen Finucane <stephenfin@redhat.com>
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
diff --git a/manila_tempest_tests/tests/api/base.py b/manila_tempest_tests/tests/api/base.py
index 5ce7882..b834d99 100644
--- a/manila_tempest_tests/tests/api/base.py
+++ b/manila_tempest_tests/tests/api/base.py
@@ -149,8 +149,7 @@
     def setup_clients(cls):
         super(BaseSharesTest, cls).setup_clients()
         os = getattr(cls, 'os_%s' % cls.credentials[0])
-        # Initialise share clients for test credentials
-        cls.shares_client = os.share_v1.SharesClient()
+        # Initialise share client for test credentials
         cls.shares_v2_client = os.share_v2.SharesV2Client()
         # Initialise network clients for test credentials
         cls.networks_client = None
@@ -170,7 +169,6 @@
                     "is set to True")
             share_network_id = cls.provide_share_network(
                 cls.shares_v2_client, cls.networks_client)
-            cls.shares_client.share_network_id = share_network_id
             cls.shares_v2_client.share_network_id = share_network_id
 
     def setUp(self):
@@ -1124,7 +1122,6 @@
     def setup_clients(cls):
         super(BaseSharesAdminTest, cls).setup_clients()
         # Initialise share clients
-        cls.admin_shares_client = cls.os_admin.share_v1.SharesClient()
         cls.admin_shares_v2_client = cls.os_admin.share_v2.SharesV2Client()
 
     @staticmethod
@@ -1277,10 +1274,10 @@
 class BaseSharesMixedTest(BaseSharesAdminTest):
     """Base test case class for all Shares API tests with all user roles.
 
-       Tests deriving from this class can use the primary project's clients
-       (self.shares_client, self.shares_v2_client) and the alt project user's
-       clients (self.alt_shares_client, self.alt_shares_v2_client) to perform
-       API calls and validations. Although admin clients are available for use,
+       Tests deriving from this class can use the primary project's client
+       (self.shares_v2_client) and the alt project user's client
+       (self.alt_shares_v2_client) to perform API calls and validations.
+       Although admin clients are available for use,
        their use should be limited to performing bootstrapping (e.g., creating
        a share type, or resetting state of a resource, etc.). No API validation
        must be performed against admin APIs. Use BaseAdminTest as a base class
@@ -1306,7 +1303,6 @@
     @classmethod
     def setup_clients(cls):
         super(BaseSharesMixedTest, cls).setup_clients()
-        cls.alt_shares_client = cls.os_alt.share_v1.SharesClient()
         cls.alt_shares_v2_client = cls.os_alt.share_v2.SharesV2Client()
         # Initialise network clients
         cls.os_admin.networks_client = cls.os_admin.network.NetworksClient()
@@ -1334,13 +1330,11 @@
         if CONF.share.multitenancy_enabled:
             admin_share_network_id = cls.provide_share_network(
                 cls.admin_shares_v2_client, cls.os_admin.networks_client)
-            cls.admin_shares_client.share_network_id = admin_share_network_id
             cls.admin_shares_v2_client.share_network_id = (
                 admin_share_network_id)
 
             alt_share_network_id = cls.provide_share_network(
                 cls.alt_shares_v2_client, cls.os_alt.networks_client)
-            cls.alt_shares_client.share_network_id = alt_share_network_id
             cls.alt_shares_v2_client.share_network_id = alt_share_network_id
 
     @classmethod
@@ -1379,6 +1373,5 @@
         user_creds = cls.os_admin.creds_client.get_credentials(
             user, project, password)
         os = clients.Clients(user_creds)
-        os.shares_v1_client = os.share_v1.SharesClient()
         os.shares_v2_client = os.share_v2.SharesV2Client()
         return os
diff --git a/manila_tempest_tests/tests/api/test_public_shares.py b/manila_tempest_tests/tests/api/test_public_shares.py
index e132246..9476849 100644
--- a/manila_tempest_tests/tests/api/test_public_shares.py
+++ b/manila_tempest_tests/tests/api/test_public_shares.py
@@ -95,7 +95,11 @@
         new_name = data_utils.rand_name('tempest-new-share-name')
         new_desc = 'share is now updated'
         updated = self.admin_shares_v2_client.update_share(
-            share['id'], name=new_name, desc=new_desc, is_public=True)['share']
+            share['id'],
+            display_name=new_name,
+            display_description=new_desc,
+            is_public=True
+        )['share']
         self.assertEqual(new_name, updated['name'])
         self.assertEqual(new_desc, updated['description'])
         self.assertTrue(updated['is_public'])
diff --git a/manila_tempest_tests/tests/api/test_public_shares_negative.py b/manila_tempest_tests/tests/api/test_public_shares_negative.py
index d3151f2..226e2b1 100644
--- a/manila_tempest_tests/tests/api/test_public_shares_negative.py
+++ b/manila_tempest_tests/tests/api/test_public_shares_negative.py
@@ -50,7 +50,7 @@
         self.assertRaises(lib_exc.Forbidden,
                           self.alt_shares_v2_client.update_share,
                           self.share["id"],
-                          name="new_name")
+                          display_name="new_name")
 
     @decorators.idempotent_id('68d1f1bc-16e4-4086-8982-7e44ca6bdc4d')
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
diff --git a/manila_tempest_tests/tests/api/test_shares_actions.py b/manila_tempest_tests/tests/api/test_shares_actions.py
index 3fbd6f0..a6ee2b8 100644
--- a/manila_tempest_tests/tests/api/test_shares_actions.py
+++ b/manila_tempest_tests/tests/api/test_shares_actions.py
@@ -779,7 +779,10 @@
         new_name = data_utils.rand_name("tempest-new-name")
         new_desc = data_utils.rand_name("tempest-new-description")
         updated = self.shares_v2_client.update_share(
-            share["id"], name=new_name, desc=new_desc)['share']
+            share["id"],
+            display_name=new_name,
+            display_description=new_desc
+        )['share']
         self.assertEqual(new_name, updated["name"])
         self.assertEqual(new_desc, updated["description"])