From bdbc3afc517a08da42209cb5eab920a75c4333a0 Mon Sep 17 00:00:00 2001
From: Matt Riedemann <mriedem@us.ibm.com>
Date: Tue, 17 Jun 2014 11:11:54 -0700
Subject: [PATCH] Remove quota-class-* commands from v3 shell

Commit 1b15b23b0a629e00913a40c5def42e5ca887071c removed the
os-quota-class-sets v3 API from Nova in Icehouse.  This change removes
the corresponding client code.

Closes-Bug: #1331095

Change-Id: Iaa2f4063e0f671da5a54ff89d0f1c1780a2687c4
---
 novaclient/tests/v3/test_quota_classes.py | 25 -------------
 novaclient/v3/client.py                   |  2 --
 novaclient/v3/quota_classes.py            | 23 ------------
 novaclient/v3/shell.py                    | 43 -----------------------
 4 files changed, 93 deletions(-)
 delete mode 100644 novaclient/tests/v3/test_quota_classes.py
 delete mode 100644 novaclient/v3/quota_classes.py

diff --git a/novaclient/tests/v3/test_quota_classes.py b/novaclient/tests/v3/test_quota_classes.py
deleted file mode 100644
index 2e0ceb9f0..000000000
--- a/novaclient/tests/v3/test_quota_classes.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright IBM Corp. 2013
-#
-#    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 novaclient.tests.v1_1 import test_quota_classes
-from novaclient.tests.v3 import fakes
-
-
-class QuotaClassSetsTest(test_quota_classes.QuotaClassSetsTest):
-    def setUp(self):
-        super(QuotaClassSetsTest, self).setUp()
-        self.cs = self._get_fake_client()
-
-    def _get_fake_client(self):
-        return fakes.FakeClient()
diff --git a/novaclient/v3/client.py b/novaclient/v3/client.py
index 8d265de5a..7af2e1f2b 100644
--- a/novaclient/v3/client.py
+++ b/novaclient/v3/client.py
@@ -25,7 +25,6 @@ from novaclient.v3 import hypervisors
 from novaclient.v3 import images
 from novaclient.v3 import keypairs
 from novaclient.v3 import list_extensions
-from novaclient.v3 import quota_classes
 from novaclient.v3 import quotas
 from novaclient.v3 import servers
 from novaclient.v3 import services
@@ -94,7 +93,6 @@ class Client(object):
         self.images = images.ImageManager(self)
         self.keypairs = keypairs.KeypairManager(self)
         self.quotas = quotas.QuotaSetManager(self)
-        self.quota_classes = quota_classes.QuotaClassSetManager(self)
         self.servers = servers.ServerManager(self)
         self.services = services.ServiceManager(self)
         self.usage = usage.UsageManager(self)
diff --git a/novaclient/v3/quota_classes.py b/novaclient/v3/quota_classes.py
deleted file mode 100644
index e12209eb1..000000000
--- a/novaclient/v3/quota_classes.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright IBM Corp. 2013
-#
-#    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 novaclient.v1_1 import quota_classes
-
-
-class QuotaClassSet(quota_classes.QuotaClassSet):
-    pass
-
-
-class QuotaClassSetManager(quota_classes.QuotaClassSetManager):
-    resource_class = QuotaClassSet
diff --git a/novaclient/v3/shell.py b/novaclient/v3/shell.py
index 8e8f575e7..706dc7bc2 100644
--- a/novaclient/v3/shell.py
+++ b/novaclient/v3/shell.py
@@ -2829,49 +2829,6 @@ def do_quota_delete(cs, args):
     cs.quotas.delete(args.tenant)
 
 
-@utils.arg('class_name',
-    metavar='<class>',
-    help='Name of quota class to list the quotas for.')
-def do_quota_class_show(cs, args):
-    """List the quotas for a quota class."""
-
-    _quota_show(cs.quota_classes.get(args.class_name))
-
-
-@utils.arg('class_name',
-    metavar='<class>',
-    help='Name of quota class to set the quotas for.')
-@utils.arg('--instances',
-           metavar='<instances>',
-           type=int, default=None,
-           help='New value for the "instances" quota.')
-@utils.arg('--cores',
-           metavar='<cores>',
-           type=int, default=None,
-           help='New value for the "cores" quota.')
-@utils.arg('--ram',
-           metavar='<ram>',
-           type=int, default=None,
-           help='New value for the "ram" quota.')
-@utils.arg('--metadata-items',
-    metavar='<metadata-items>',
-    type=int,
-    default=None,
-    help='New value for the "metadata-items" quota.')
-@utils.arg('--metadata_items',
-    type=int,
-    help=argparse.SUPPRESS)
-@utils.arg('--key-pairs',
-    metavar='<key-pairs>',
-    type=int,
-    default=None,
-    help='New value for the "key-pairs" quota.')
-def do_quota_class_update(cs, args):
-    """Update the quotas for a quota class."""
-
-    _quota_update(cs.quota_classes, args.class_name, args)
-
-
 @utils.arg('server', metavar='<server>', help='Name or ID of server.')
 @utils.arg('host', metavar='<host>', help='Name or ID of target host.')
 @utils.arg('--password',