summaryrefslogtreecommitdiff
path: root/openstackclient/tests/compute
diff options
context:
space:
mode:
authorRichard Theis <rtheis@us.ibm.com>2015-11-20 12:49:17 -0600
committerRichard Theis <rtheis@us.ibm.com>2015-11-20 13:08:42 -0600
commit99498b0ab3f8a131fca3663f170d746d8bb090ae (patch)
treef894cc2b35c49e1e6f95d3f92e6e1230b3fb055f /openstackclient/tests/compute
parent65e6c7bc63d1a2137ae454f792b17feba7fab9b8 (diff)
downloadpython-openstackclient-99498b0ab3f8a131fca3663f170d746d8bb090ae.tar.gz
Unable to set some compute quotas
The OpenStackClient mapping of 'openstack quota set' arguments isn't correct for compute quota items that have to different names. For example, the --injected-file-size argument is mapped to injected_file_size, but the compute quotas item is actually injected_file_content_bytes. This incorrect mapping prevented the impacted compute quota items from being set. The problem impacts the following 'openstack quota set' arguments: --injected-file-size --injected-path-size --properties --secgroup-rules --secgroups This patch set also expands the compute quota unit tests to verify all compute quota items that can be set. Change-Id: I0a2f241e425f4811e4ae55be183ac0c8b0805c2a Closes-Bug: #1475831
Diffstat (limited to 'openstackclient/tests/compute')
-rw-r--r--openstackclient/tests/compute/v2/fakes.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/openstackclient/tests/compute/v2/fakes.py b/openstackclient/tests/compute/v2/fakes.py
index 13db0c01..94d1f6aa 100644
--- a/openstackclient/tests/compute/v2/fakes.py
+++ b/openstackclient/tests/compute/v2/fakes.py
@@ -68,14 +68,30 @@ FLAVOR = {
floating_ip_num = 100
fix_ip_num = 100
injected_file_num = 100
+injected_file_size_num = 10240
+injected_path_size_num = 255
key_pair_num = 100
+core_num = 20
+ram_num = 51200
+instance_num = 10
+property_num = 128
+secgroup_rule_num = 20
+secgroup_num = 10
project_name = 'project_test'
QUOTA = {
'project': project_name,
'floating-ips': floating_ip_num,
'fix-ips': fix_ip_num,
'injected-files': injected_file_num,
+ 'injected-file-size': injected_file_size_num,
+ 'injected-path-size': injected_path_size_num,
'key-pairs': key_pair_num,
+ 'cores': core_num,
+ 'ram': ram_num,
+ 'instances': instance_num,
+ 'properties': property_num,
+ 'secgroup_rules': secgroup_rule_num,
+ 'secgroups': secgroup_num,
}
QUOTA_columns = tuple(sorted(QUOTA))