summaryrefslogtreecommitdiff
path: root/openstackclient/common/quota.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Make set/unset commands in compute/image/common return normally when nothing ↵Tang Chen2016-06-211-5/+0
| | | | | | | | | | specified After this patch, all set/unset commands will return normally when nothing specified. Change-Id: Id94d0329faa1a674006a9aae901f834b41917317 Close-bug: #1588588
* osc-lib: commandDean Troyer2016-06-131-1/+1
| | | | | | | Leave command.py and test_command.py as a sanity check during the deprecation period. Change-Id: I24e1b755cbfbcbcaeb5273ec0c9706b82384fc85
* osc-lib: utilsDean Troyer2016-06-131-2/+3
| | | | | | | | Use osc-lib directly for utils. Leave openstackclient.common.utils for deprecation period. Change-Id: I5bd9579abc4e07f45219ccd0565626e6667472f7
* Fix i18n supports in commomHuanxuan Ao2016-06-071-7/+8
| | | | | | | | I checked all the files in openstackclient/common and fixed the missing i18n supprots. Change-Id: Id7f76a24aae663f5832ef9bcf1bd5a6b7081af24 Partial-bug: #1574965
* Add newline to strings in stdout/stderr.write()Lu lei2016-06-061-1/+1
| | | | | | Function stdout/stderr.write() can't break line automatically. Change-Id: I903c2d1cc1a669adb6be5aa4eb783d3b9943e685
* Add network support for "quota set"Fang Zhen2016-05-191-9/+50
| | | | | | | | | | The "quota set" command support compute and volume quotas previously. This patch add support network. Partially-implements: blueprint neutron-client-quota Closes-bug: 1489441 Change-Id: I9d297f52bc30614b3493f09ed15f8f1d3f8ff952
* Support quota show for current projectRichard Theis2016-04-211-11/+18
| | | | | | | | | | The "os quota show" command "<project/class>" argument is now optional. If not specified, the user's current project is used. This allows non-admin users to show quotas for their current project. Change-Id: I602d4cc09c9d29ce84271eff78137f8810cb1a47 Closes-Bug: #1572733
* Fixed a bunch of spacingBrandon Palm2016-02-231-2/+2
| | | | | | | Nothing too complicated here. I fixed a bunch of spacing issues that I saw in OSC. Change-Id: I935ab48e7c5bac5f88ecdb3a05f73fb44fc9f41d
* Merge "Fix showing network quotas for a project"Jenkins2016-02-021-4/+7
|\
| * Fix showing network quotas for a projectRichard Theis2016-02-021-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The OpenStack SDK is now used for the network client. However, the 'openstack quota show' command wasn't updated for the client change. As a result, the command will fail to show network quotas when a project name is specified. For example: $ openstack quota show admin 'Proxy' object has no attribute 'show_quota' This patch set fixes the command by using the OpenStack SDK to get network quotas for a project. Change-Id: I59a7b6780a7b80cd09e79d40d214751b25d3016e Related-To: blueprint neutron-client Closes-Bug: #1528249
* | log take_action parameters in a single placeAkihiro Motoki2016-02-021-11/+2
|/ | | | | | | | | | | | Previously each command logs take_action parameters explicitly by using @utils.log_method decorator or log.debug(). Some commands have no logging. This commit calls a logger in the base class and drops all logging definition from individual commands. Closes-Bug: #1532294 Change-Id: I43cd0290a4353c68c075bade9571c940733da1be
* Add project name/ID validation for "openstack quota show"xiexs2015-11-291-3/+9
| | | | | | | A validation is necessary to check the existence of project. This patch is similar to Ia2d8c96527820e25b074e6486d3f39c5ad7eae60. Change-Id: Id8895ba7a21ecad05942619a82a87c0dc68eae53
* Unable to set some compute quotasRichard Theis2015-11-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* Add project-name/-id validation for the OSC "openstack quota set"xiexs2015-11-041-4/+11
| | | | | | | | | The quota info would be set into DB, even though the project actually does not exist. This patch tried to add a validation to forbid this undesirable behavior. Change-Id: Ia2d8c96527820e25b074e6486d3f39c5ad7eae60 Closes-Bug: #1512638
* Merge "Add tests for volume quota set"Jenkins2015-09-191-2/+1
|\
| * Add tests for volume quota setTerryHowe2015-08-111-2/+1
| | | | | | | | | | | | | | Add some tests for volume quota set and get rid of TODO about using the value instead of the key to get the attribute. Change-Id: I57aa57951aeea65965966e63af922cda532d759d
* | Use a common decorator to log 'take_action' activationJoshua Harlow2015-09-011-2/+4
|/ | | | | | | | | Instead of duplicating the same log statement throughout the code, the same logic can be provided by a shared decorator that abstracts away the logging capability and unifies it behind a common function instead. Change-Id: Icc63bced7347c8bbf0299a4c5821425a10892a79
* Merge "Fix quota set failed problem"Jenkins2015-08-061-1/+2
|\
| * Fix quota set failed problemjiaxi2015-07-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using the command: openstack quota set, the compute quota below can't be set successfully,the value of compute quota stay unchanged, 'fixed-ips', 'floating-ips', 'injected-files', 'key-pairs'. What's more,I add a TODO comment in the code for two reason. 1. volume quota set works fine for the moment. 2. To indicate that this issue about volume needs discuss and report another bug, if it's confirmed. This bug is only about compute quota. Change-Id: Ic1028d561f5a0030cf65ac18fc117bf01e945478 Partial-Bug: #1420104
* | Fix quota show when there is no project idTerryHowe2015-08-051-3/+2
|/ | | | | | | If no id is in the response, quota show fails. Change-Id: I9905431b006404c9ba8453eba016cec9ebe19402 Closes-Bug: #1481803
* Don't create empty quota set requestsJamie Lennox2015-05-051-2/+3
| | | | | | | | | | | | The way that getattr is called with the None default you will always create a compute_kwargs dictionary with key: None values. This means that we will always send these empty requests to the servers. Change so that only actually changed values end up in the quota set requests and get sent. Change-Id: I33bc3f4e1a8013ec672e995648d27513064baf26 Closes-Bug: #1451640
* Add support to specify volume quotas per volume typeSteve Martinelli2015-04-151-2/+10
| | | | | | | | | | | Add a --volume-type option to quota set, this will allow users to set quotas for volume attributes on a per volume-type basis. for example: openstack quota set admin --volume-type myvol --volumes 12 Change-Id: I3ce9cf82a65d4f012b339f0e0dedb752cb132c33 Closes-Bug: 1438377
* Add network support to quota showzhiyuan_cai2015-01-281-6/+30
| | | | | | | | | | | | Currently quota show only lists quotas of Nova and Cinder, we should make it also support Neutron resources. Also, Nova and Neutron may have conflicts in the quotas of the following resources: floating ip, security group and security group rule. When Neutron is enabled, we should display the quotas of the above resouces in Neutron, not Nova. Change-Id: I6e508d2077b6cda41ca93d81a82f39aee0ebfb4c Closes-Bug: #1411160
* Catch exception when getting quotazhiyuan_cai2014-12-301-15/+19
| | | | | | | | | | Quota show command will list both the quotas of nova and cinder. But if cinder service is not enabled, EndpointNotFound exception will be raised and thus the command is broken. Catch this exception so quotas of nova can be listed. Change-Id: If2d2820675aa6a12e407d608fed846b21c953b2d Closes-Bug: #1390507
* Begin copying wiki command list hereDean Troyer2014-11-191-1/+1
| | | | | | | | | | * Sort by command objects * Drop the comparison to the project CLIs * Minor updates to command help to match docs Initially include the cross-API commands to establish the structure and format. Change-Id: I77a7b3c89e088b66aa62941e29ce0b65b532285b
* replace string format arguments with function parametersChristian Berendt2014-05-201-2/+2
| | | | | | | | There are files containing string format arguments inside logging messages. Using logging function parameters should be preferred. Change-Id: Ic749ac9eb55564ed631d57055a5a4dfc3aebd169
* Add quota commandsDean Troyer2013-07-171-0/+192
* Add quota set and quota show commands; these work on both the compute and volume APIs * Add the --class variation on the above commands Note: this replaces the existing volume-only quota commands and eliminates quota list Blueprint: cinder-client Bug: 1172064 Change-Id: I766d40e410e48f05e36e17e567a4f01a9411b40e