summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-02-15 10:29:52 +0000
committerGerrit Code Review <review@openstack.org>2014-02-15 10:29:52 +0000
commit7cf73f19423f53a7eddc221fddbd60a610aa47a7 (patch)
tree2e28528f689230eb481e1c2949bfe8883f667de8
parent004287481285fba497ca16891f82643f83cfca9b (diff)
parentff815fb4d01a3fe69a036293ddb899dbc6d99df0 (diff)
downloadpython-novaclient-7cf73f19423f53a7eddc221fddbd60a610aa47a7.tar.gz
Merge "Remove invalid parameter of quota-update"
-rw-r--r--novaclient/tests/v1_1/fakes.py16
-rw-r--r--novaclient/tests/v1_1/test_quotas.py23
-rw-r--r--novaclient/tests/v3/fakes.py2
-rw-r--r--novaclient/v1_1/shell.py18
-rw-r--r--novaclient/v3/shell.py18
5 files changed, 2 insertions, 75 deletions
diff --git a/novaclient/tests/v1_1/fakes.py b/novaclient/tests/v1_1/fakes.py
index e4fa4f61..983f849a 100644
--- a/novaclient/tests/v1_1/fakes.py
+++ b/novaclient/tests/v1_1/fakes.py
@@ -1038,8 +1038,6 @@ class FakeHTTPClient(base_client.HTTPClient):
'metadata_items': [],
'injected_file_content_bytes': 1,
'injected_file_path_bytes': 1,
- 'volumes': 1,
- 'gigabytes': 1,
'ram': 1,
'floating_ips': 1,
'instances': 1,
@@ -1055,8 +1053,6 @@ class FakeHTTPClient(base_client.HTTPClient):
'metadata_items': [],
'injected_file_content_bytes': 1,
'injected_file_path_bytes': 1,
- 'volumes': 1,
- 'gigabytes': 1,
'ram': 1,
'floating_ips': 1,
'instances': 1,
@@ -1072,8 +1068,6 @@ class FakeHTTPClient(base_client.HTTPClient):
'metadata_items': [],
'injected_file_content_bytes': 1,
'injected_file_path_bytes': 1,
- 'volumes': 1,
- 'gigabytes': 1,
'ram': 1,
'floating_ips': 1,
'instances': 1,
@@ -1089,8 +1083,6 @@ class FakeHTTPClient(base_client.HTTPClient):
'metadata_items': [],
'injected_file_content_bytes': 1,
'injected_file_path_bytes': 1,
- 'volumes': 1,
- 'gigabytes': 1,
'ram': 1,
'floating_ips': 1,
'instances': 1,
@@ -1106,8 +1098,6 @@ class FakeHTTPClient(base_client.HTTPClient):
'metadata_items': [],
'injected_file_content_bytes': 1,
'injected_file_path_bytes': 1,
- 'volumes': 1,
- 'gigabytes': 1,
'ram': 1,
'floating_ips': 1,
'instances': 1,
@@ -1123,8 +1113,6 @@ class FakeHTTPClient(base_client.HTTPClient):
'metadata_items': [],
'injected_file_content_bytes': 1,
'injected_file_path_bytes': 1,
- 'volumes': 1,
- 'gigabytes': 1,
'ram': 1,
'floating_ips': 1,
'instances': 1,
@@ -1140,8 +1128,6 @@ class FakeHTTPClient(base_client.HTTPClient):
'metadata_items': [],
'injected_file_content_bytes': 1,
'injected_file_path_bytes': 1,
- 'volumes': 1,
- 'gigabytes': 1,
'ram': 1,
'floating_ips': 1,
'instances': 1,
@@ -1160,8 +1146,6 @@ class FakeHTTPClient(base_client.HTTPClient):
'metadata_items': [],
'injected_file_content_bytes': 1,
'injected_file_path_bytes': 1,
- 'volumes': 2,
- 'gigabytes': 1,
'ram': 1,
'floating_ips': 1,
'instances': 1,
diff --git a/novaclient/tests/v1_1/test_quotas.py b/novaclient/tests/v1_1/test_quotas.py
index 1c679389..06d7461d 100644
--- a/novaclient/tests/v1_1/test_quotas.py
+++ b/novaclient/tests/v1_1/test_quotas.py
@@ -42,20 +42,6 @@ class QuotaSetsTest(utils.TestCase):
self.cs.quotas.defaults(tenant_id)
self.cs.assert_called('GET', '/os-quota-sets/%s/defaults' % tenant_id)
- def test_update_quota(self):
- q = self.cs.quotas.get('97f4c221bff44578b0300df4ef119353')
- q.update(volumes=2)
- self.cs.assert_called('PUT',
- '/os-quota-sets/97f4c221bff44578b0300df4ef119353')
-
- def test_update_user_quota(self):
- tenant_id = '97f4c221bff44578b0300df4ef119353'
- user_id = 'fake_user'
- q = self.cs.quotas.get(tenant_id)
- q.update(volumes=2, user_id=user_id)
- url = '/os-quota-sets/%s?user_id=%s' % (tenant_id, user_id)
- self.cs.assert_called('PUT', url)
-
def test_force_update_quota(self):
q = self.cs.quotas.get('97f4c221bff44578b0300df4ef119353')
q.update(cores=2, force=True)
@@ -65,15 +51,6 @@ class QuotaSetsTest(utils.TestCase):
'cores': 2,
'tenant_id': '97f4c221bff44578b0300df4ef119353'}})
- def test_refresh_quota(self):
- q = self.cs.quotas.get('test')
- q2 = self.cs.quotas.get('test')
- self.assertEqual(q.volumes, q2.volumes)
- q2.volumes = 0
- self.assertNotEqual(q.volumes, q2.volumes)
- q2.get()
- self.assertEqual(q.volumes, q2.volumes)
-
def test_quotas_delete(self):
tenant_id = 'test'
self.cs.quotas.delete(tenant_id)
diff --git a/novaclient/tests/v3/fakes.py b/novaclient/tests/v3/fakes.py
index 60063f3e..1013910f 100644
--- a/novaclient/tests/v3/fakes.py
+++ b/novaclient/tests/v3/fakes.py
@@ -300,8 +300,6 @@ class FakeHTTPClient(fakes_v1_1.FakeHTTPClient):
'metadata_items': [],
'injected_file_content_bytes': 1,
'injected_file_path_bytes': 1,
- 'volumes': 2,
- 'gigabytes': 1,
'ram': 1,
'floating_ips': 1,
'instances': 1,
diff --git a/novaclient/v1_1/shell.py b/novaclient/v1_1/shell.py
index 82e2bba1..989a565e 100644
--- a/novaclient/v1_1/shell.py
+++ b/novaclient/v1_1/shell.py
@@ -3085,7 +3085,7 @@ def do_ssh(cs, args):
return
-_quota_resources = ['instances', 'cores', 'ram', 'volumes', 'gigabytes',
+_quota_resources = ['instances', 'cores', 'ram',
'floating_ips', 'fixed_ips', 'metadata_items',
'injected_files', 'injected_file_content_bytes',
'injected_file_path_bytes', 'key_pairs',
@@ -3177,14 +3177,6 @@ def do_quota_defaults(cs, args):
metavar='<ram>',
type=int, default=None,
help='New value for the "ram" quota.')
-@utils.arg('--volumes',
- metavar='<volumes>',
- type=int, default=None,
- help='New value for the "volumes" quota.')
-@utils.arg('--gigabytes',
- metavar='<gigabytes>',
- type=int, default=None,
- help='New value for the "gigabytes" quota.')
@utils.arg('--floating-ips',
metavar='<floating-ips>',
type=int,
@@ -3292,14 +3284,6 @@ def do_quota_class_show(cs, args):
metavar='<ram>',
type=int, default=None,
help='New value for the "ram" quota.')
-@utils.arg('--volumes',
- metavar='<volumes>',
- type=int, default=None,
- help='New value for the "volumes" quota.')
-@utils.arg('--gigabytes',
- metavar='<gigabytes>',
- type=int, default=None,
- help='New value for the "gigabytes" quota.')
@utils.arg('--floating-ips',
metavar='<floating-ips>',
type=int,
diff --git a/novaclient/v3/shell.py b/novaclient/v3/shell.py
index 3d4ee126..10a6975d 100644
--- a/novaclient/v3/shell.py
+++ b/novaclient/v3/shell.py
@@ -2638,7 +2638,7 @@ def do_ssh(cs, args):
return
-_quota_resources = ['instances', 'cores', 'ram', 'volumes', 'gigabytes',
+_quota_resources = ['instances', 'cores', 'ram',
'fixed_ips', 'metadata_items', 'key_pairs']
@@ -2738,14 +2738,6 @@ def do_quota_defaults(cs, args):
metavar='<ram>',
type=int, default=None,
help='New value for the "ram" quota.')
-@utils.arg('--volumes',
- metavar='<volumes>',
- type=int, default=None,
- help='New value for the "volumes" quota.')
-@utils.arg('--gigabytes',
- metavar='<gigabytes>',
- type=int, default=None,
- help='New value for the "gigabytes" quota.')
@utils.arg('--fixed-ips',
metavar='<fixed-ips>',
type=int,
@@ -2809,14 +2801,6 @@ def do_quota_class_show(cs, args):
metavar='<ram>',
type=int, default=None,
help='New value for the "ram" quota.')
-@utils.arg('--volumes',
- metavar='<volumes>',
- type=int, default=None,
- help='New value for the "volumes" quota.')
-@utils.arg('--gigabytes',
- metavar='<gigabytes>',
- type=int, default=None,
- help='New value for the "gigabytes" quota.')
@utils.arg('--metadata-items',
metavar='<metadata-items>',
type=int,