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
This commit is contained in:
parent
a4e033292d
commit
bdbc3afc51
novaclient
@ -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()
|
@ -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)
|
||||
|
@ -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
|
@ -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',
|
||||
|
Loading…
x
Reference in New Issue
Block a user