diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-09-12 17:59:36 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-09-12 17:59:36 +0000 |
| commit | ed4454c5bba8c912c310c92f94a7c17a2b44ee10 (patch) | |
| tree | c49f0ced9b622ab44be22c68a9bf402daebbe85d /openstackclient/common | |
| parent | c8ecd9a49731a004bf86343a1e2f050ad5fc06f8 (diff) | |
| parent | 6fba7163e85a436d1fe0660d9932a53d06b1a343 (diff) | |
| download | python-openstackclient-ed4454c5bba8c912c310c92f94a7c17a2b44ee10.tar.gz | |
Merge "Set quota "per_volume_gigabytes", "backup_gigabytes" and "backups""
Diffstat (limited to 'openstackclient/common')
| -rw-r--r-- | openstackclient/common/quota.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/openstackclient/common/quota.py b/openstackclient/common/quota.py index 5d53171c..8ae6f7d4 100644 --- a/openstackclient/common/quota.py +++ b/openstackclient/common/quota.py @@ -43,11 +43,20 @@ COMPUTE_QUOTAS = { } VOLUME_QUOTAS = { + 'backups': 'backups', + 'backup_gigabytes': 'backup-gigabytes', 'gigabytes': 'gigabytes', + 'per_volume_gigabytes': 'per-volume-gigabytes', 'snapshots': 'snapshots', 'volumes': 'volumes', } +IMPACT_VOLUME_TYPE_QUOTAS = [ + 'gigabytes', + 'snapshots', + 'volumes', +] + NOVA_NETWORK_QUOTAS = { 'floating_ips': 'floating-ips', 'security_group_rules': 'secgroup-rules', @@ -128,7 +137,8 @@ class SetQuota(command.Command): for k, v in VOLUME_QUOTAS.items(): value = getattr(parsed_args, k, None) if value is not None: - if parsed_args.volume_type: + if (parsed_args.volume_type and + k in IMPACT_VOLUME_TYPE_QUOTAS): k = k + '_%s' % parsed_args.volume_type volume_kwargs[k] = value |
