diff --git a/manila_tempest_tests/tests/api/base.py b/manila_tempest_tests/tests/api/base.py
index 7beb289..b2da080 100644
--- a/manila_tempest_tests/tests/api/base.py
+++ b/manila_tempest_tests/tests/api/base.py
@@ -21,9 +21,9 @@
 from oslo_concurrency import lockutils
 from oslo_log import log
 import six
-from tempest.common import isolated_creds  # noqa
-from tempest import config  # noqa
-from tempest import test  # noqa
+from tempest.common import dynamic_creds
+from tempest import config
+from tempest import test
 from tempest_lib.common.utils import data_utils
 from tempest_lib import exceptions
 
@@ -129,7 +129,10 @@
                 name = name[0:32]
 
         # Choose type of isolated creds
-        ic = isolated_creds.IsolatedCreds(name=name)
+        ic = dynamic_creds.DynamicCredentialProvider(
+            identity_version=CONF.identity.auth_version,
+            name=name,
+            admin_role=CONF.identity.admin_role)
         if "admin" in type_of_creds:
             creds = ic.get_admin_creds()
         elif "alt" in type_of_creds:
@@ -147,7 +150,7 @@
 
         # Set place where will be deleted isolated creds
         ic_res = {
-            "method": ic.clear_isolated_creds,
+            "method": ic.clear_creds,
             "deleted": False,
         }
         if cleanup_in_class:
@@ -159,7 +162,7 @@
         if CONF.share.multitenancy_enabled:
             if not CONF.service_available.neutron:
                 raise cls.skipException("Neutron support is required")
-            nc = os.network_client
+            nc = os.networks_client
             share_network_id = cls.provide_share_network(client, nc, ic)
             client.share_network_id = share_network_id
             resource = {
@@ -197,7 +200,7 @@
             if not CONF.service_available.neutron:
                 raise cls.skipException("Neutron support is required")
             sc = cls.os.shares_client
-            nc = cls.os.network_client
+            nc = cls.os.networks_client
             share_network_id = cls.provide_share_network(sc, nc)
             cls.os.shares_client.share_network_id = share_network_id
             cls.os.shares_v2_client.share_network_id = share_network_id
@@ -217,7 +220,7 @@
 
     @classmethod
     @network_synchronized
-    def provide_share_network(cls, shares_client, network_client,
+    def provide_share_network(cls, shares_client, networks_client,
                               isolated_creds_client=None):
         """Used for finding/creating share network for multitenant driver.
 
@@ -225,8 +228,8 @@
         share-network will be used for creation of service vm.
 
         :param shares_client: shares client, which requires share-network
-        :param network_client: network client from same tenant as shares
-        :param isolated_creds_client: IsolatedCreds instance
+        :param networks_client: network client from same tenant as shares
+        :param isolated_creds_client: DynamicCredentialProvider instance
             If provided, then its networking will be used if needed.
             If not provided, then common network will be used if needed.
         :returns: str -- share network id for shares_client tenant
@@ -249,7 +252,7 @@
                 search_word = "reusable"
                 sn_name = "autogenerated_by_tempest_%s" % search_word
                 service_net_name = "share-service"
-                networks = network_client.list_networks()
+                networks = networks_client.list_networks()
                 if "networks" in networks.keys():
                     networks = networks["networks"]
                 for network in networks:
@@ -262,7 +265,11 @@
 
                 # Create suitable network
                 if (net_id is None or subnet_id is None):
-                    ic = isolated_creds.IsolatedCreds(name=service_net_name)
+                    ic = dynamic_creds.DynamicCredentialProvider(
+                        identity_version=CONF.identity.auth_version,
+                        name=service_net_name,
+                        admin_role=CONF.identity.admin_role,
+                    )
                     net_data = ic._create_network_resources(sc.tenant_id)
                     network, subnet, router = net_data
                     net_id = network["id"]
