This is done for both the compute and block storage services. The
network service was already using SDK.
Change-Id: Id7a6943b8b4d7d1330e7d7f13705f027d1b67189
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Depends-on: https://review.opendev.org/c/openstack/openstacksdk/+/923864
The existing default behavior has been deprecated for over a 18 months
(change I25828a3d68e2e900f498e17a0d01fb70be77548e). It's time for a new
default.
Change-Id: Iaf4fa931dcbf16c22933f63629c6a4d443ac5310
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This should have been added as a counterpart to the 'quota show
--default' option way back when we added that. Better late than never!
Change-Id: I0e3719e585353664fea6f23ec658a330086db3df
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
These are all deprecated for over 18 months (change
I0dd38e5cb252a01d5817ed168be040b21b35e348). It's time to remove them and
simplify this code.
Change-Id: I9ee3bfebbad21eec3eb1b475a813bcbc450edea4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ibdd329a6db8bd176af065d7f5190f0901d3c3f8d
This was incorrectly grouped as a general compute quota, when in fact
it's a nova-network quota. Move it.
Change-Id: If93c95bc181ab766137b61943a09821810345300
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This change is entirely automated save for the update of some mocks from
'io.open' to '__builtins__.open').
We are keeping this change separate from addition of the actual hook so
that we can ignore the commit later.
Change-Id: I0a9d8736632084473b57b57b693322447d7be519
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This ensures we are speccing the compute proxy API.
Change-Id: I7adbf2666d71f222fbd9c1479216f72cb9893348
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This removes the need for a number of base test case subclasses. We use
'compute_client' rather than 'client' to avoid conflicts with clients
for other services.
Change-Id: I430214cd79eca481bd8d8c53bf97eaede6766eb4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This removes the need for a number of base test case subclasses. We use
'volume_client' rather than 'client' to avoid conflicts with clients for
other services.
Change-Id: I28d78f32142bb3a3fde0ba1780c504adc31cc77c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This ensures we are speccing the network proxy API. Future changes will
do the same for the image proxy API and eventually the compute proxy API
(once everything has been converted).
Change-Id: Ic203964c7dede7dd80ae2d93b8fa1b7e6634a758
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This removes the need for a number of base test case subclasses. We use
'network_client' rather than 'network' for consistency with other
services.
Change-Id: I61f7c43341acf19ae16d06db34e18970297fbb93
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This no longer makes any sense since all network calls uses the SDK
proxy API now.
Change-Id: I0d57d7561b697270b24acd7b8ff62db73a83f49a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Black used with the '-l 79 -S' flags.
A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.
Change-Id: Ifcb3c798666d74d596b8ecb3d6d507f782de7ba5
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
In change Idc1b99492d609eb699d0a6bef6cd760458a774f6, we added a
'--check-limit' option to enable "no force" behavior for network quotas.
This was already the default for compute quotas. Provide a path for
harmonizing the behavior of the two options by instead using a
'--no-force' option which will become the eventual default for the
network quotas also.
Change-Id: I25828a3d68e2e900f498e17a0d01fb70be77548e
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
We were passing a project object rather than just the ID. Also correct a
typo in the call to delete network quotas.
Change-Id: I2292db7932ec01026f0e54014e3d02218792617a
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Add '--compute', '--network' and '--volume' options to the 'quota show'
command, along with a default '--all' option, allowing us to restrict
quotas shown to an individual service.
Change-Id: I122b765df01887b8d916ee6567ffb7768fcb4392
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Provide an more sane way to get usage information for a particular
project's quotas. This requires using the 'Lister' command type since
the 'ShowOne' command type only allows for simple key-value pair output.
We also add a note indicating that the '<project>' argument is optional.
Change-Id: Ic7342cf08f024cc690049414c5eef5b9a7594677
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This is prep work for some changes we're introducing in a later change.
Change-Id: I27a59bc1d57e6815fb166fb99ea2af88f08b68a9
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
We were stating that this was not supported. That is not true. Correct
the oversight.
Change-Id: Ib9d9db641a18e142be0a1eccff783e7cccdf2db5
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
We had previously indicated that people use 'quota set' for unsetting a
project's quotas, however, there was nothing that actually allowed us to
do this. Correct that oversight.
Change-Id: I04057e766b8ccf94bf219972249b68dc2bb796d4
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This flag allows to set a new Neutron quota resource limit without
checking first the current resource usage. The new limit will be
set anyway. This flag was used only by the compute engine.
Related-Bug: #1953170
Change-Id: I7084f8208b804236ac99e6842db7a45854ce54d7
Since the openstack SDK still has the neutron-lbaas entries in the network quota,
but those are already deprecated [1], the 'opentack quota show' command shows those
as None value.
This fix removes those empty deprecated values from the output.
[1] https://review.opendev.org/#/c/658494/
Change-Id: I8dbdba2a029ea8e6a268ddf29627e1466a7e3a8a
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
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
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>
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
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
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
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
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
Implement Neutron feature of Quota List into
OpenStack Client.
Change-Id: Idf941acf8d00b136776b7381b877c56d82622f57
Partially-Implements: blueprint neutron-client-quota
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
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
Health Monitors could not be updated using
the `openstack quota update` CLI.
This patch fixes the same.
Change-Id: Ic5a4fa5dce5767e40139137131114834d564f89a
Closes-Bug: #1624225
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
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
"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
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
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