From 99498b0ab3f8a131fca3663f170d746d8bb090ae Mon Sep 17 00:00:00 2001 From: Richard Theis Date: Fri, 20 Nov 2015 12:49:17 -0600 Subject: 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 --- openstackclient/tests/compute/v2/fakes.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'openstackclient/tests/compute') 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)) -- cgit v1.2.1