diff --git a/tempest/api_schema/response/compute/v2_1/limits.py b/tempest/api_schema/response/compute/v2_1/limits.py
deleted file mode 100644
index 81f175f..0000000
--- a/tempest/api_schema/response/compute/v2_1/limits.py
+++ /dev/null
@@ -1,106 +0,0 @@
-# Copyright 2014 NEC 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.
-
-get_limit = {
-    'status_code': [200],
-    'response_body': {
-        'type': 'object',
-        'properties': {
-            'limits': {
-                'type': 'object',
-                'properties': {
-                    'absolute': {
-                        'type': 'object',
-                        'properties': {
-                            'maxTotalRAMSize': {'type': 'integer'},
-                            'totalCoresUsed': {'type': 'integer'},
-                            'maxTotalInstances': {'type': 'integer'},
-                            'maxTotalFloatingIps': {'type': 'integer'},
-                            'totalSecurityGroupsUsed': {'type': 'integer'},
-                            'maxTotalCores': {'type': 'integer'},
-                            'totalFloatingIpsUsed': {'type': 'integer'},
-                            'maxSecurityGroups': {'type': 'integer'},
-                            'maxServerMeta': {'type': 'integer'},
-                            'maxPersonality': {'type': 'integer'},
-                            'maxImageMeta': {'type': 'integer'},
-                            'maxPersonalitySize': {'type': 'integer'},
-                            'maxSecurityGroupRules': {'type': 'integer'},
-                            'maxTotalKeypairs': {'type': 'integer'},
-                            'totalRAMUsed': {'type': 'integer'},
-                            'totalInstancesUsed': {'type': 'integer'},
-                            'maxServerGroupMembers': {'type': 'integer'},
-                            'maxServerGroups': {'type': 'integer'},
-                            'totalServerGroupsUsed': {'type': 'integer'}
-                        },
-                        'additionalProperties': False,
-                        # NOTE(gmann): maxServerGroupMembers,  maxServerGroups
-                        # and totalServerGroupsUsed are API extension,
-                        # and some environments return a response without these
-                        # attributes.So they are not 'required'.
-                        'required': ['maxImageMeta',
-                                     'maxPersonality',
-                                     'maxPersonalitySize',
-                                     'maxSecurityGroupRules',
-                                     'maxSecurityGroups',
-                                     'maxServerMeta',
-                                     'maxTotalCores',
-                                     'maxTotalFloatingIps',
-                                     'maxTotalInstances',
-                                     'maxTotalKeypairs',
-                                     'maxTotalRAMSize',
-                                     'totalCoresUsed',
-                                     'totalFloatingIpsUsed',
-                                     'totalInstancesUsed',
-                                     'totalRAMUsed',
-                                     'totalSecurityGroupsUsed']
-                    },
-                    'rate': {
-                        'type': 'array',
-                        'items': {
-                            'type': 'object',
-                            'properties': {
-                                'limit': {
-                                    'type': 'array',
-                                    'items': {
-                                        'type': 'object',
-                                        'properties': {
-                                            'next-available':
-                                                {'type': 'string'},
-                                            'remaining':
-                                                {'type': 'integer'},
-                                            'unit':
-                                                {'type': 'string'},
-                                            'value':
-                                                {'type': 'integer'},
-                                            'verb':
-                                                {'type': 'string'}
-                                        },
-                                        'additionalProperties': False,
-                                    }
-                                },
-                                'regex': {'type': 'string'},
-                                'uri': {'type': 'string'}
-                            },
-                            'additionalProperties': False,
-                        }
-                    }
-                },
-                'additionalProperties': False,
-                'required': ['absolute', 'rate']
-            }
-        },
-        'additionalProperties': False,
-        'required': ['limits']
-    }
-}
diff --git a/tempest/clients.py b/tempest/clients.py
index f2c0773..72ceb46 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -38,6 +38,7 @@
 from tempest_lib.services.compute.images_client import ImagesClient
 from tempest_lib.services.compute.instance_usage_audit_log_client import \
     InstanceUsagesAuditLogClient
+from tempest_lib.services.compute.limits_client import LimitsClient
 from tempest_lib.services.identity.v2.token_client import TokenClient
 from tempest_lib.services.identity.v3.token_client import V3TokenClient
 
@@ -53,7 +54,6 @@
 from tempest.services.compute.json.interfaces_client import \
     InterfacesClient
 from tempest.services.compute.json.keypairs_client import KeyPairsClient
-from tempest.services.compute.json.limits_client import LimitsClient
 from tempest.services.compute.json.migrations_client import \
     MigrationsClient
 from tempest.services.compute.json.networks_client import NetworksClient \
diff --git a/tempest/services/compute/json/limits_client.py b/tempest/services/compute/json/limits_client.py
deleted file mode 100644
index b64b4a5..0000000
--- a/tempest/services/compute/json/limits_client.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 2012 OpenStack Foundation
-# 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 oslo_serialization import jsonutils as json
-
-from tempest.api_schema.response.compute.v2_1 import limits as schema
-from tempest.common import service_client
-
-
-class LimitsClient(service_client.ServiceClient):
-
-    def show_limits(self):
-        resp, body = self.get("limits")
-        body = json.loads(body)
-        self.validate_response(schema.get_limit, resp, body)
-        return service_client.ResponseBody(resp, body)
diff --git a/tempest/tests/services/compute/test_limits_client.py b/tempest/tests/services/compute/test_limits_client.py
deleted file mode 100644
index 733d3d1..0000000
--- a/tempest/tests/services/compute/test_limits_client.py
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright 2015 NEC 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.tests import fake_auth_provider
-
-from tempest.services.compute.json import limits_client
-from tempest.tests.services.compute import base
-
-
-class TestLimitsClient(base.BaseComputeServiceTest):
-
-    def setUp(self):
-        super(TestLimitsClient, self).setUp()
-        fake_auth = fake_auth_provider.FakeAuthProvider()
-        self.client = limits_client.LimitsClient(
-            fake_auth, 'compute', 'regionOne')
-
-    def _test_show_limits(self, bytes_body=False):
-        expected = {
-            "limits": {
-                "rate": [],
-                "absolute": {
-                    "maxServerMeta": 128,
-                    "maxPersonality": 5,
-                    "totalServerGroupsUsed": 0,
-                    "maxImageMeta": 128,
-                    "maxPersonalitySize": 10240,
-                    "maxServerGroups": 10,
-                    "maxSecurityGroupRules": 20,
-                    "maxTotalKeypairs": 100,
-                    "totalCoresUsed": 0,
-                    "totalRAMUsed": 0,
-                    "totalInstancesUsed": 0,
-                    "maxSecurityGroups": 10,
-                    "totalFloatingIpsUsed": 0,
-                    "maxTotalCores": 20,
-                    "totalSecurityGroupsUsed": 0,
-                    "maxTotalFloatingIps": 10,
-                    "maxTotalInstances": 10,
-                    "maxTotalRAMSize": 51200,
-                    "maxServerGroupMembers": 10
-                    }
-            }
-        }
-
-        self.check_service_client_function(
-            self.client.show_limits,
-            'tempest.common.service_client.ServiceClient.get',
-            expected,
-            bytes_body)
-
-    def test_show_limits_with_str_body(self):
-        self._test_show_limits()
-
-    def test_show_limits_with_bytes_body(self):
-        self._test_show_limits(bytes_body=True)
