13 Commits

Author SHA1 Message Date
Jenkins
6de1af1161 Merge "Add tests for volume quota set" 2015-09-19 03:03:05 +00:00
Joshua Harlow
e3c46ece4a Use a common decorator to log 'take_action' activation
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
2015-09-01 16:49:54 -07:00
TerryHowe
b1ce0356f2 Add tests for volume quota set
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
2015-08-11 14:40:53 -06:00
Jenkins
d87403a7bf Merge "Fix quota set failed problem" 2015-08-06 07:34:08 +00:00
TerryHowe
fd61711585 Fix quota show when there is no project id
If no id is in the response, quota show fails.

Change-Id: I9905431b006404c9ba8453eba016cec9ebe19402
Closes-Bug: #1481803
2015-08-05 09:55:29 -06:00
jiaxi
77214c56e7 Fix quota set failed problem
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
2015-07-28 23:21:28 -04:00
Jamie Lennox
179ed18c30 Don't create empty quota set requests
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
2015-05-05 12:45:42 +10:00
Steve Martinelli
8bd8a8dfd7 Add support to specify volume quotas per volume type
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
2015-04-15 01:42:00 -04:00
zhiyuan_cai
54ab9fb230 Add network support to quota show
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
2015-01-28 16:26:11 +08:00
zhiyuan_cai
7ea5f89043 Catch exception when getting quota
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
2014-12-30 09:53:26 +08:00
Dean Troyer
254910d3ce Begin copying wiki command list here
* 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
2014-11-19 14:47:53 -06:00
Christian Berendt
3b485de6b0 replace string format arguments with function parameters
There are files containing string format arguments inside
logging messages. Using logging function parameters should
be preferred.

Change-Id: Ic749ac9eb55564ed631d57055a5a4dfc3aebd169
2014-05-20 13:49:56 +02:00
Dean Troyer
87104a28d7 Add quota commands
* 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
2013-07-17 15:10:22 -05:00