22 Commits

Author SHA1 Message Date
Zuul
d0741d7853 Merge "Add '--force; parameter to 'openstack quota set'" 2020-07-06 20:50:24 +00:00
hackertron
b328cf74df Add '--force; parameter to 'openstack quota set'
The compute service allows us to to force set a quota, setting a
quota value that is less than the amount of the resource currently
consumed. Expose this feature by way of a '--force' boolean
parameter.

Change-Id: I1d1ac1ac46f49f64794ffc8631e166935537966c
2020-04-14 22:59:52 +02:00
Jose Castro Leon
3e83e7471b Allow os quota list query to filter by project
In the os quota list command, project parameter is completely ignored
ending up in a request to all projects and then all quotas. This patch
enables back the parameter and does a single call to quotas if specified.

Change-Id: Ie17c256e2bdc307dcd94ad5be7abdbffa776d369
Story: 2007422
Task: 39043
2020-03-12 14:43:18 +01:00
Sean McGinnis
69db9fe73c
Raise flake8-import-order version to latest
We had this library capped at a release that is a few years old. Now
that we have dropped py2 testing, we can pick up the latest version.

This uncovered a few things to clean up. Mostly the fact that mock is
now a part of the StdLib unittest since Python 3.3.

Change-Id: I27484dd4c25378413ff16e97a35a1a46062357bc
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-01-10 14:21:47 -06:00
Zuul
9b8a76fd61 Merge "Delete the LB object quotas set command in openstackclient" 2019-03-13 08:48:34 +00:00
Sławek Kapłoński
75cba9d1cb Add support for get details of Quota
With passing "--detail" argument to "openstack quota list", details
about current usage should be returned.
It is currently supported by Nova and Neutron so details of
resources from those projects can be returned.

Change-Id: I48fda15b34283bb7c66ea18ed28262f48b9229fe
Related-Bug: #1716043
2019-02-24 10:41:53 +00:00
yanpuqing
b18e79c09b Delete the LB object quotas set command in openstackclient
Setting octavia quotas should use "openstack loadbalancer quota set", not
"openstack quota set". The vip parameter had be removed from octavia.
The patch removes '--vips', '--health-monitors', '--l7policies' parameter
in "openstack quota set" command.

Change-Id: Id0046195aa93bae62264d9de7d123cf63bd0fb7e
Task: 19657
Story: 2002016
2018-06-20 11:08:09 +00:00
Akihiro Motoki
f3bbf52b3c Use flake8-import-order plugin
In reviews we usually check import grouping but it is boring.
By using flake8-import-order plugin, we can avoid this.
It enforces loose checking so it sounds good to use it.
This flake8 plugin is already used in tempest.

Note that flake8-import-order version is pinned to avoid unexpected
breakage of pep8 job.

Setup for unit tests of hacking rules is tweaked to disable
flake8-import-order checks. This extension assumes an actual file exists
and causes hacking rule unit tests.

Change-Id: I12b596820727aeeb379bee16c2bc993dee9eb637
2017-08-17 06:55:00 +00:00
Dean Troyer
e8f3103cc1 Ignore more exceptions in quota list
Additional exceptions can be thrown here, ignore additional project
lookup exceptions, but still not all.  Server failures are still
interesting, for example.

Change-Id: I9a750ae8e8efa29a36bbd1e34b50b6ace0658260
2017-05-11 08:47:37 -05:00
Dean Troyer
d930b043ee Funcional tests: quota list
The quota list tests have a race in them where occasionally a project is
deleted in another test between the time that quota list gets a list of all
projects and it gets the quota for the projects from the service; the get
quota call fails on the non-existant project.

The quota list functional tests have been substantially re-written to
properly test the exception handling.

Change-Id: I71e6bbb5d46fcea4718a5a870f9a66a2c20fff0f
2017-05-02 14:09:16 -05:00
Jenkins
6329c04297 Merge "OSC Quota List" 2017-03-21 03:56:05 +00:00
Sindhu Devale
58591d3c37 OSC Quota List
Implement Neutron feature of Quota List into
OpenStack Client.

Change-Id: Idf941acf8d00b136776b7381b877c56d82622f57
Partially-Implements: blueprint neutron-client-quota
2017-03-10 14:59:47 +00:00
Huanxuan Ao
ef2a8f4d11 Revert unit tests for quota commands
quota set and quota show command have been fixed
by [1] [2], now can revert the unit test as well

[1] https://review.openstack.org/435574
[2] https://review.openstack.org/435735

Change-Id: I3d592df6ea4e96770dac4dba91819b5c4bcb0561
2017-02-23 20:44:28 +08:00
Huanxuan Ao
0340275fa9 Fix quota set command error for SDK > 0.9.10
A bug in OpenStack SDK 0.9.11 and 0.9.12 that causes
quota set command to fail. This can be removed when
the proposed SDK fix (https://review.openstack.org/#/c/419911/)
is released and in the minimum SDK version in global requirements.

Closes-Bug: #1655445
Change-Id: I63132f5f762f0120282f8b92e72512763063e3c6
2017-01-15 20:00:53 +08:00
Jenkins
ccd2d658d1 Merge "Fix openstack quota set/show --class not work" 2016-09-20 09:01:16 +00:00
Reedip
91c4509afe Fix quota-update issue in LBaaS
Currently L7Policies cannot be updated( it was missing
in implementation in neutronclient). The same has been
taken care in the current patch.

Also, currently quota doesnt support updating the members
in an LBaaS pool. This patch temporarily removes it, till
it is not confirmed that LBaaS v2 needs to support quotas
for members or not.

Change-Id: I25a54a57debb762a32a280ece8c081fc52365f0f
Closes-Bug: #1624097
2016-09-16 10:57:02 +00:00
Reedip
d3e9361796 Fix Quota Support for HMs
Health Monitors could not be updated using
the `openstack quota update` CLI.

This patch fixes the same.

Change-Id: Ic5a4fa5dce5767e40139137131114834d564f89a
Closes-Bug: #1624225
2016-09-16 12:47:55 +05:30
qtang
2a01ede6b6 Fix openstack quota set/show --class not work
identity_client should not be used for quota class operation.
Update code to fix the qutoa class set/show issue.

Change-Id: I71c59c08a0d5da29982497f589e1efe131997f21
Closes-Bug: #1609233
2016-09-14 11:15:01 +08:00
Rui Chen
6f326acd26 Support fetching network project default quota
Neutron server and openstacksdk had supported to fetch
network project default quota, this patch add the CLI
support in openstackclient.

Change-Id: If0ef74c268c41a866c62156da0603a40ae4e6e31
Closes-Bug: #1204956
Depends-On: I6a4e2a146351dd1e7d652442511f1ef2c279da42
2016-09-13 17:23:22 +08:00
Rui Chen
6fba7163e8 Set quota "per_volume_gigabytes", "backup_gigabytes" and "backups"
"per_volume_gigabytes", "backup_gigabytes" and "backups" items
can be shown in "openstack quota show" command, but can't be
updated by "openstack quota set". This patch fix the issue.

Change-Id: I47db5a69d4e4ef6e140f2735257c83e1fb052760
Closes-Bug: #1609767
2016-09-12 11:00:55 +08:00
Rui Chen
4e71e9da6b Unit tests of quota command refactor
Do refactor for quota command related unit tests, remove
useless code, add new tests to cover '--volume-type' and
'--class' option in "quota set" command and add the
volume quota fake object.

Change-Id: Iaf214740e98db1bfb4c739e810bac1c5ba6e9625
2016-09-12 10:54:15 +08:00
Steve Martinelli
39839def2e move unit tests to new "unit" test module
this will better isolate the unit tests from the functional tests.
unfortunately, the "integration" tests had to be lumped into the
"unit" tests since we need the separation in testr.conf

Change-Id: Ifd12198c1f90e4e3c951c73bfa1884ab300d8ded
2016-09-08 15:19:50 -07:00