diff --git a/patrole_tempest_plugin/tests/api/identity/rbac_base.py b/patrole_tempest_plugin/tests/api/identity/rbac_base.py
index 63f6ff8..5124f52 100644
--- a/patrole_tempest_plugin/tests/api/identity/rbac_base.py
+++ b/patrole_tempest_plugin/tests/api/identity/rbac_base.py
@@ -52,12 +52,9 @@
         params = {
             'service_id': service['id'],
             'region': region_name,
-            'interface': interface
+            'interface': interface,
+            'url': url
         }
-        if cls.identity_version == 'v2':
-            params['publicurl'] = url
-        elif cls.identity_version == 'v3':
-            params['url'] = url
 
         endpoint = cls.endpoints_client.create_endpoint(**params)['endpoint']
         cls.addClassResourceCleanup(
@@ -87,12 +84,7 @@
         service = cls.services_client.create_service(
             name=name,
             type=serv_type,
-            description=desc)
-
-        if cls.identity_version == 'v2':
-            service = service['OS-KSADM:service']
-        elif cls.identity_version == 'v3':
-            service = service['service']
+            description=desc)['service']
 
         cls.addClassResourceCleanup(
             test_utils.call_and_ignore_notfound_exc,
@@ -118,74 +110,6 @@
         return user
 
 
-class BaseIdentityV2AdminRbacTest(BaseIdentityRbacTest):
-    """Base test class for the Identity v2 admin API.
-
-    Keystone's v2 API is split into two APIs: an admin and non-admin API. RBAC
-    testing is only provided for the admin API. Instead of policy enforcement,
-    these APIs execute ``self.assert_admin(request)``, which checks that the
-    request object has ``context_is_admin``. For more details, see the
-    implementation of ``assert_admin`` in ``keystone.common.wsgi``.
-    """
-    identity_version = 'v2'
-    credentials = ['primary']
-
-    @classmethod
-    def skip_checks(cls):
-        super(BaseIdentityV2AdminRbacTest, cls).skip_checks()
-        if not CONF.identity_feature_enabled.api_v2_admin:
-            raise cls.skipException('Identity v2 admin not available')
-
-    @classmethod
-    def setup_clients(cls):
-        super(BaseIdentityV2AdminRbacTest, cls).setup_clients()
-        cls.client = cls.os_primary.identity_client
-        cls.endpoints_client = cls.os_primary.endpoints_client
-        cls.roles_client = cls.os_primary.roles_client
-        cls.services_client = cls.os_primary.identity_services_client
-        cls.tenants_client = cls.os_primary.tenants_client
-        cls.token_client = cls.os_primary.token_client
-        cls.users_client = cls.os_primary.users_client
-
-    @classmethod
-    def resource_setup(cls):
-        super(BaseIdentityV2AdminRbacTest, cls).resource_setup()
-        cls.tenants = []
-        cls.tokens = []
-
-    @classmethod
-    def resource_cleanup(cls):
-        for tenant in cls.tenants:
-            test_utils.call_and_ignore_notfound_exc(
-                cls.tenants_client.delete_tenant, tenant['id'])
-
-        for token in cls.tokens:
-            test_utils.call_and_ignore_notfound_exc(
-                cls.client.delete_token, token)
-
-        super(BaseIdentityV2AdminRbacTest, cls).resource_cleanup()
-
-    @classmethod
-    def setup_test_tenant(cls):
-        """Set up a test tenant."""
-        name = data_utils.rand_name(cls.__name__ + '-test_tenant')
-        tenant = cls.tenants_client.create_tenant(
-            name=name,
-            description=data_utils.rand_name(
-                cls.__name__ + '-desc'))['tenant']
-        cls.tenants.append(tenant)
-        return tenant
-
-    @classmethod
-    def setup_test_token(cls, user_name, password, tenant_name):
-        """Set up a test token."""
-        token = cls.token_client.auth(user_name, password,
-                                      tenant_name)['token']
-        token_id = token['id']
-        cls.tokens.append(token_id)
-        return token_id
-
-
 class BaseIdentityV3RbacTest(BaseIdentityRbacTest):
 
     identity_version = 'v3'
diff --git a/patrole_tempest_plugin/tests/api/identity/v2/__init__.py b/patrole_tempest_plugin/tests/api/identity/v2/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/patrole_tempest_plugin/tests/api/identity/v2/__init__.py
+++ /dev/null
diff --git a/patrole_tempest_plugin/tests/api/identity/v2/test_endpoints_rbac.py b/patrole_tempest_plugin/tests/api/identity/v2/test_endpoints_rbac.py
deleted file mode 100644
index 133562c..0000000
--- a/patrole_tempest_plugin/tests/api/identity/v2/test_endpoints_rbac.py
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 2017 AT&T Corporation.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from tempest.lib import decorators
-
-from patrole_tempest_plugin import rbac_rule_validation
-from patrole_tempest_plugin.tests.api.identity import rbac_base
-
-
-class IdentityEndpointsV2AdminRbacTest(rbac_base.BaseIdentityV2AdminRbacTest):
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('6bdaecd4-0843-4ed6-ab64-3a57ab0cd124')
-    def test_create_endpoint(self):
-
-        """Create Endpoint Test
-
-        RBAC test for Identity v2 create_endpoint
-        """
-
-        with self.rbac_utils.override_role(self):
-            self.setup_test_endpoint()
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('6bdaecd4-0843-4ed6-ab64-3a57ab0cd125')
-    def test_delete_endpoint(self):
-
-        """Delete Endpoint Test
-
-        RBAC test for Identity v2 delete_endpoint
-        """
-
-        endpoint = self.setup_test_endpoint()
-        with self.rbac_utils.override_role(self):
-            self.endpoints_client.delete_endpoint(endpoint['id'])
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('6bdaecd4-0843-4ed6-ab64-3a57ab0cd126')
-    def test_list_endpoints(self):
-
-        """List Endpoints Test
-
-        RBAC test for Identity v2 list_endpoint
-        """
-
-        with self.rbac_utils.override_role(self):
-            self.endpoints_client.list_endpoints()
diff --git a/patrole_tempest_plugin/tests/api/identity/v2/test_projects_rbac.py b/patrole_tempest_plugin/tests/api/identity/v2/test_projects_rbac.py
deleted file mode 100644
index 74886ec..0000000
--- a/patrole_tempest_plugin/tests/api/identity/v2/test_projects_rbac.py
+++ /dev/null
@@ -1,129 +0,0 @@
-# Copyright 2017 AT&T Corporation.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from tempest import config
-from tempest.lib import decorators
-
-from patrole_tempest_plugin import rbac_exceptions
-from patrole_tempest_plugin import rbac_rule_validation
-from patrole_tempest_plugin import rbac_utils
-from patrole_tempest_plugin.tests.api.identity import rbac_base
-
-CONF = config.CONF
-
-
-class IdentityProjectV2AdminRbacTest(rbac_base.BaseIdentityV2AdminRbacTest):
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('0f148510-63bf-11e6-b348-080044d0d904')
-    def test_create_project(self):
-
-        """Create Project Test
-
-        RBAC test for Identity 2.0 create_tenant
-        """
-
-        with self.rbac_utils.override_role(self):
-            self.setup_test_tenant()
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('0f148510-63bf-11e6-b348-080044d0d905')
-    def test_update_project(self):
-
-        """Update Project Test
-
-        RBAC test for Identity 2.0 update_tenant
-        """
-        tenant = self.setup_test_tenant()
-
-        with self.rbac_utils.override_role(self):
-            self.tenants_client.update_tenant(
-                tenant['id'], description="Changed description")
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('0f148510-63bf-11e6-b348-080044d0d906')
-    def test_delete_project(self):
-
-        """Delete Project Test
-
-        RBAC test for Identity 2.0 delete_tenant
-        """
-        tenant = self.setup_test_tenant()
-
-        with self.rbac_utils.override_role(self):
-            self.tenants_client.delete_tenant(tenant['id'])
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('0f148510-63bf-11e6-b348-080044d0d907')
-    def test_get_project(self):
-
-        """Get Project Test
-
-        RBAC test for Identity 2.0 show_tenant
-        """
-
-        tenant = self.setup_test_tenant()
-
-        with self.rbac_utils.override_role(self):
-            self.tenants_client.show_tenant(tenant['id'])
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('0f148510-63bf-11e6-b348-080044d0d909')
-    def test_list_project_users(self):
-
-        """Get Users of a Project Test
-
-        RBAC test for Identity 2.0 list_tenant_users
-        """
-        tenant = self.setup_test_tenant()
-
-        with self.rbac_utils.override_role(self):
-            self.tenants_client.list_tenant_users(tenant['id'])
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('0f148510-63bf-11e6-b348-080044d0d908')
-    def test_list_all_projects(self):
-
-        """List All Projects Test
-
-        RBAC test for Identity 2.0 list_tenants (admin endpoint)
-
-        There are two separate APIs for listing tenants in the Keystone
-        v2 API: one for admin and one for non-admin. The ``os_admin`` client
-        calls the admin endpoint and the ``os_primary`` client calls the
-        non-admin endpoint. To ensure that the admin endpoint only returns
-        admin-scoped tenants, raise ``RbacActionFailed`` exception otherwise.
-        """
-        tenants_client = self.os_admin.tenants_client if \
-            rbac_utils.is_admin() else self.os_primary.tenants_client
-        admin_tenant_id = self.os_admin.credentials.project_id
-        non_admin_tenant_id = self.os_primary.credentials.project_id
-
-        with self.rbac_utils.override_role(self):
-            tenants = tenants_client.list_tenants()['tenants']
-
-        tenant_ids = [t['id'] for t in tenants]
-        if admin_tenant_id not in tenant_ids:
-            raise rbac_exceptions.RbacMalformedResponse(
-                attribute="admin tenant id")
-        if non_admin_tenant_id in tenant_ids:
-            raise rbac_exceptions.RbacMalformedResponse(
-                extra_attr=True)
diff --git a/patrole_tempest_plugin/tests/api/identity/v2/test_roles_rbac.py b/patrole_tempest_plugin/tests/api/identity/v2/test_roles_rbac.py
deleted file mode 100644
index 2065c42..0000000
--- a/patrole_tempest_plugin/tests/api/identity/v2/test_roles_rbac.py
+++ /dev/null
@@ -1,140 +0,0 @@
-# Copyright 2017 AT&T Corporation.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from tempest.lib.common.utils import test_utils
-from tempest.lib import decorators
-
-from patrole_tempest_plugin import rbac_rule_validation
-from patrole_tempest_plugin.tests.api.identity import rbac_base
-
-
-class IdentityRolesV2AdminRbacTest(rbac_base.BaseIdentityV2AdminRbacTest):
-
-    @classmethod
-    def setup_clients(cls):
-        super(IdentityRolesV2AdminRbacTest, cls).setup_clients()
-        cls.roles_client = cls.os_primary.roles_client
-
-    def _create_tenant_user_and_role(self):
-        tenant = self.setup_test_tenant()
-        user = self.setup_test_user(tenantid=tenant['id'])
-        role = self.setup_test_role()
-        return tenant, user, role
-
-    def _create_role_on_project(self, tenant, user, role):
-        self.roles_client.create_user_role_on_project(
-            tenant['id'], user['id'], role['id'])
-        self.addCleanup(
-            test_utils.call_and_ignore_notfound_exc,
-            self.roles_client.delete_role_from_user_on_project,
-            tenant['id'], user['id'], role['id'])
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('0f148510-63bf-11e6-8674-080044d0d904')
-    def test_create_role(self):
-
-        """Create Role Test
-
-        RBAC test for Identity v2 role-create
-        """
-
-        with self.rbac_utils.override_role(self):
-            self.setup_test_role()
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('0f148510-63bf-11e6-8674-080044d0d905')
-    def test_delete_role(self):
-
-        """Delete Role Test
-
-        RBAC test for Identity v2 delete_role
-        """
-        role = self.setup_test_role()
-
-        with self.rbac_utils.override_role(self):
-            self.roles_client.delete_role(role['id'])
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('0f148510-63bf-11e6-8674-080044d0d906')
-    def test_show_role(self):
-
-        """Get Role Test
-
-        RBAC test for Identity v2 show_role
-        """
-        role = self.setup_test_role()
-
-        with self.rbac_utils.override_role(self):
-            self.roles_client.show_role(role['id'])
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('0f148510-63bf-11e6-8674-080044d0d907')
-    def test_list_roles(self):
-
-        """List Roles Test
-
-        RBAC test for Identity v2 list_roles
-        """
-        with self.rbac_utils.override_role(self):
-            self.roles_client.list_roles()
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('0f148510-63bf-11e6-8674-080044d0d908')
-    def test_create_role_on_project(self):
-
-        """Assign User Role Test
-
-        RBAC test for Identity v2 create_user_role_on_project
-        """
-        tenant, user, role = self._create_tenant_user_and_role()
-        with self.rbac_utils.override_role(self):
-            self._create_role_on_project(tenant, user, role)
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('0f148510-63bf-11e6-8674-080044d0d909')
-    def test_delete_role_from_user_on_project(self):
-
-        """Remove User Roles Test
-
-        RBAC test for Identity v2 delete_role_from_user_on_project
-        """
-        tenant, user, role = self._create_tenant_user_and_role()
-        self._create_role_on_project(tenant, user, role)
-
-        with self.rbac_utils.override_role(self):
-            self.roles_client.delete_role_from_user_on_project(
-                tenant['id'], user['id'], role['id'])
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('0f148510-63bf-11e6-8674-080044d0d90a')
-    def test_list_user_roles_on_project(self):
-
-        """List User Roles Test
-
-        RBAC test for Identity v2 list_user_roles_on_project
-        """
-        tenant = self.setup_test_tenant()
-        user = self.setup_test_user(tenantid=tenant['id'])
-
-        with self.rbac_utils.override_role(self):
-            self.roles_client.list_user_roles_on_project(
-                tenant['id'], user['id'])
diff --git a/patrole_tempest_plugin/tests/api/identity/v2/test_services_rbac.py b/patrole_tempest_plugin/tests/api/identity/v2/test_services_rbac.py
deleted file mode 100644
index 6485c91..0000000
--- a/patrole_tempest_plugin/tests/api/identity/v2/test_services_rbac.py
+++ /dev/null
@@ -1,70 +0,0 @@
-# Copyright 2017 AT&T Corporation.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from tempest.lib import decorators
-
-from patrole_tempest_plugin import rbac_rule_validation
-from patrole_tempest_plugin.tests.api.identity import rbac_base
-
-
-class IdentityServicesV2AdminRbacTest(rbac_base.BaseIdentityV2AdminRbacTest):
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('370050f6-d271-4fb4-abc5-4de1d6dfbad2')
-    def test_create_service(self):
-        """Create Service Test
-
-        RBAC test for Identity v2 create_service
-        """
-        with self.rbac_utils.override_role(self):
-            self.setup_test_service()
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('f6c64fc3-6a1f-423e-af91-e411add3a384')
-    def test_delete_service(self):
-        """Delete Service Test
-
-        RBAC test for Identity v2 delete_service
-        """
-        service_id = self.setup_test_service()['id']
-
-        with self.rbac_utils.override_role(self):
-            self.services_client.delete_service(service_id)
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('504d62bb-97d7-445e-9d6d-b1945a7c9e08')
-    def test_show_service(self):
-        """Show Service Test
-
-        RBAC test for Identity v2 show_service
-        """
-        service_id = self.setup_test_service()['id']
-
-        with self.rbac_utils.override_role(self):
-            self.services_client.show_service(service_id)
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('d7dc461d-51ad-48e0-9cd2-33add1b88de9')
-    def test_list_services(self):
-        """List all the services
-
-        RBAC test for Identity v2 list_service
-        """
-        with self.rbac_utils.override_role(self):
-            self.services_client.list_services()
diff --git a/patrole_tempest_plugin/tests/api/identity/v2/test_tokens_rbac.py b/patrole_tempest_plugin/tests/api/identity/v2/test_tokens_rbac.py
deleted file mode 100644
index 424e2d3..0000000
--- a/patrole_tempest_plugin/tests/api/identity/v2/test_tokens_rbac.py
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 2017 AT&T Corporation.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from tempest.lib import decorators
-
-from patrole_tempest_plugin import rbac_rule_validation
-from patrole_tempest_plugin.tests.api.identity import rbac_base
-
-
-class IdentityTokenV2RbacTest(rbac_base.BaseIdentityV2AdminRbacTest):
-
-    def _create_token(self):
-
-        user_name = self.client.auth_provider.credentials.username
-        tenant_name = self.client.auth_provider.credentials.tenant_name
-        password = self.client.auth_provider.credentials.password
-        token_id = self.setup_test_token(user_name, password,
-                                         tenant_name)
-        return token_id
-
-    @rbac_rule_validation.action(service="keystone",
-                                 rule="identity:validate_token")
-    @decorators.idempotent_id('71471202-4c4e-4a3d-9d41-57eb621bf3bb')
-    def test_validate_token(self):
-
-        """Validate token (get-token)
-
-        RBAC test for Identity v2 get token validation
-        """
-        token_id = self._create_token()
-
-        with self.rbac_utils.override_role(self):
-            self.client.show_token(token_id)
-
-    @rbac_rule_validation.action(service="keystone",
-                                 rule="identity:revoke_token")
-    @decorators.idempotent_id('77338f66-0713-4f20-b11c-b0d750618276')
-    def test_revoke_token(self):
-
-        """Revoke token (delete-token)
-
-        RBAC test for Identity v2 delete token
-        """
-        token_id = self._create_token()
-
-        with self.rbac_utils.override_role(self):
-            self.client.delete_token(token_id)
-
-    @rbac_rule_validation.action(service="keystone",
-                                 rule="identity:validate_token_head")
-    @decorators.idempotent_id('71471202-4c4e-4a3d-9d41-57eb621bf3ba')
-    def test_check_token_existence(self):
-
-        """Validate Token head
-
-        RBAC test for Identity v2 token head validation
-        """
-        token_id = self._create_token()
-        with self.rbac_utils.override_role(self):
-            self.client.check_token_existence(token_id)
diff --git a/patrole_tempest_plugin/tests/api/identity/v2/test_users_rbac.py b/patrole_tempest_plugin/tests/api/identity/v2/test_users_rbac.py
deleted file mode 100644
index 315637f..0000000
--- a/patrole_tempest_plugin/tests/api/identity/v2/test_users_rbac.py
+++ /dev/null
@@ -1,84 +0,0 @@
-# Copyright 2017 AT&T Corporation.
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from tempest.lib.common.utils import data_utils
-from tempest.lib import decorators
-
-from patrole_tempest_plugin import rbac_rule_validation
-from patrole_tempest_plugin.tests.api.identity import rbac_base
-
-
-class IdentityUsersV2AdminRbacTest(rbac_base.BaseIdentityV2AdminRbacTest):
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('0f148510-63bf-11e6-1342-080044d0d904')
-    def test_create_user(self):
-        with self.rbac_utils.override_role(self):
-            self.setup_test_user()
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('0f148510-63bf-11e6-1342-080044d0d905')
-    def test_update_user(self):
-        user = self.setup_test_user()
-
-        with self.rbac_utils.override_role(self):
-            self.users_client.update_user(user['id'],
-                                          email="changedUser@xyz.com")
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('0f148510-63bf-11e6-1342-080044d0d9a1')
-    def test_update_user_enabled(self):
-        user = self.setup_test_user()
-
-        with self.rbac_utils.override_role(self):
-            self.users_client.update_user_enabled(user['id'], enabled=True)
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('0f148510-63bf-11e6-1342-080044d0d906')
-    def test_delete_user(self):
-        user = self.setup_test_user()
-
-        with self.rbac_utils.override_role(self):
-            self.users_client.delete_user(user['id'])
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('0f148510-63bf-11e6-1342-080044d0d907')
-    def test_list_users(self):
-        with self.rbac_utils.override_role(self):
-            self.users_client.list_users()
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('0f148510-63bf-11e6-1342-080044d0d908')
-    def test_show_user(self):
-        user = self.setup_test_user()
-
-        with self.rbac_utils.override_role(self):
-            self.users_client.show_user(user['id'])
-
-    @rbac_rule_validation.action(service="keystone",
-                                 admin_only=True)
-    @decorators.idempotent_id('0f148510-63bf-11e6-1342-080044d0d909')
-    def test_update_user_password(self):
-        user = self.setup_test_user()
-
-        with self.rbac_utils.override_role(self):
-            self.users_client.update_user_password(
-                user['id'], password=data_utils.rand_password())
diff --git a/releasenotes/notes/remove-identity-v2-tests-bac20fda1d85327a.yaml b/releasenotes/notes/remove-identity-v2-tests-bac20fda1d85327a.yaml
new file mode 100644
index 0000000..5226c57
--- /dev/null
+++ b/releasenotes/notes/remove-identity-v2-tests-bac20fda1d85327a.yaml
@@ -0,0 +1,5 @@
+---
+upgrade:
+  - |
+    All of the identity v2.0 API tests have been removed from Patrole because
+    the majority of the v2.0 API has been removed from the identity project.
