diff --git a/tcp_tests/managers/k8s/resourcequotas.py b/tcp_tests/managers/k8s/resourcequotas.py
index 49d81d5..2edf00d 100644
--- a/tcp_tests/managers/k8s/resourcequotas.py
+++ b/tcp_tests/managers/k8s/resourcequotas.py
@@ -12,59 +12,45 @@
 #    License for the specific language governing permissions and limitations
 
 
+from kubernetes import client
+
 from tcp_tests.managers.k8s.base import K8sBaseResource
 from tcp_tests.managers.k8s.base import K8sBaseManager
 
 
 class K8sResourceQuota(K8sBaseResource):
-    """docstring for K8sResourceQuota"""
+    resource_type = 'resourcequota'
 
-    def __repr__(self):
-        return "<K8sResourceQuota: %s>" % self.name
+    def _read(self, **kwargs):
+        return self._manager.api.read_namespaced_resource_quota(
+            self.name, self.namespace, **kwargs)
 
-    @property
-    def name(self):
-        return self.metadata.name
+    def _create(self, body, **kwargs):
+        return self._manager.api.create_namespaced_resource_quota(
+            self.namespace, body, **kwargs)
+
+    def _patch(self, body, **kwargs):
+        return self._manager.api.patch_namespaced_resource_quota(
+            self.name, self.namespace, body, **kwargs)
+
+    def _replace(self, body, **kwargs):
+        return self._manager.api.replace_namespaced_resource_quota(
+            self.name, self.namespace, body, **kwargs)
+
+    def _delete(self, **kwargs):
+        self._manager.api.delete_namespaced_resource_quota(
+            self.name, self.namespace, client.V1DeleteOptions(), **kwargs)
 
 
 class K8sResourceQuotaManager(K8sBaseManager):
-    """docstring for ClassName"""
-
     resource_class = K8sResourceQuota
 
-    def _get(self, name, namespace=None, **kwargs):
-        namespace = namespace or self.namespace
-        return self.api.read_namespaced_resource_quota(
-            name=name, namespace=namespace, **kwargs)
+    @property
+    def api(self):
+        return self._cluster.api_core
 
-    def _list(self, namespace=None, **kwargs):
-        namespace = namespace or self.namespace
-        return self.api.list_namespaced_resource_quota(
-            namespace=namespace, **kwargs)
+    def _list(self, namespace, **kwargs):
+        return self.api.list_namespaced_resource_quota(namespace, **kwargs)
 
-    def _create(self, body, namespace=None, **kwargs):
-        namespace = namespace or self.namespace
-        return self.api.create_namespaced_resource_quota(
-            body=body, namespace=namespace, **kwargs)
-
-    def _replace(self, body, name, namespace=None, **kwargs):
-        namespace = namespace or self.namespace
-        return self.api.replace_namespaced_resource_quota(
-            body=body, name=name, namespace=namespace, **kwargs)
-
-    def _delete(self, body, name, namespace=None, **kwargs):
-        namespace = namespace or self.namespace
-        return self.api.delete_namespaced_resource_quota(
-            body=body, name=name, namespace=namespace, **kwargs)
-
-    def _deletecollection(self, namespace=None, **kwargs):
-        namespace = namespace or self.namespace
-        return self.api.deletecollection_namespaced_resource_quota(
-            namespace=namespace, **kwargs)
-
-    def full_list(self, *args, **kwargs):
-        lst = self._full_list(*args, **kwargs)
-        return [self.resource_class(self, item) for item in lst.items]
-
-    def _full_list(self, **kwargs):
-        return self.api.list_resourse_quota(**kwargs)
+    def _list_all(self, **kwargs):
+        return self.api.list_resource_quota_for_all_namespaces(**kwargs)
