This patch adds policy in code support for capabilities,
hosts, services, limits and depends on the quota patch [1].
[1]: https://review.openstack.org/#/c/508091/
Change-Id: Ib2bac2d28d950c0d8b734a54e300dd4185d98ca9
Partial-Implements: blueprint policy-in-code
We very often end up with merge conflicts for any patches that increment
microversions due to conflicting numbers. We can't really solve that,
but we can avoid the need to update version numbers throughout the code
by defining a constant value in one place and using that variable instead.
Change-Id: Ib3a80fee6caaabb49af097aa197f550c65d94985
"cinder absolute-limits" command supports <tenant_id> filter,
But server side doesn't, this patch added the support for server
side.
APIImpact
Closes-bug: #1668416
Change-Id: Ib31ab87d0954c2bedf55c6d71623b2c7d07b5fa7
Cinder XML API is not tested by Tempest about for one year.
We don't know if it works or not. It was deprecated in
Mitaka release.
Implements blueprint: remove-xml-api
APIImpact
DocImpact
UpgradeImpact
Change-Id: If98db25f1f4032725444c3959acb9aad8f869802
The rule "limits_extension:used_limits" is used by
"UsedLimitsController" which is a controller extension and it extends
"limits" api. Most of controller extensions authorize user's context
by applying the function "extensions.soft_extension_authorizer()",
but "UsedLimitsController" applies "extensions.extension_authorizer"
and this may cause 403 Forbidden error.
In this patch, I changed UsedLimitsController's authorizer to
"soft_extension_authorizer".
APIImpact
Co-Authored-By: ZhuChunzhan <zhucz@cn.fujitsu.com>
Change-Id: I8a4163ca89236b35c2c6ba10bcd98f8c42ef9089
Closes-Bug: #1497868
This change adds Python 3 compatibility to the modified code.
Replace also six.iteritems(obj) with obj.items().
The iteritems() method of Python 2 dictionaries was renamed to items()
on Python 3. As discussed on the openstack-dev mailing list, iteritems()
must be replaced with items(), six.iteritems() should not be used. In
OpenStack, the overhead of creating a temporary list with dict.items()
on Python 2 is negligible.
Blueprint cinder-python3
Change-Id: Ic3d8fd6b71d2c9f21929b0d6bf68c8f84a5e2567
Since quota take volumes, snapshots and gigabytes into account, it also
needs to take backup into account.
1. Backup create API is not admin interface, users of projects could
create any number of backups.
2. If some evil users create many more big backups to exhaust the free
space of backup storage-backend, it would cause cinder-backup in the state
of rejecting service.
Based on these two points, I think it is necessary to support volume
backup quota.
blueprint support-volume-backup-quota
Change-Id: Idd24ad2e8a5507bf18e90bd5fad59a4af1c158c6
This change enables F402 hacking check and fixes all violations found.
[F402] import module from line N shadowed by loop variable
Basically this rule tries to avoid loop variables using the same name as
imported module, for example:
from cinder import volume
...
for volume in volumes:
...
Change-Id: Ie3010616ca87fda113d452fe684e6cff3d5fd978
When calling the limits api we can only get Volume and Gigabyte data,
the snapshot related limit value should be returned too.
Change-Id: I6a5e1e2d1aa6abbac5d5dacd042223ce49207c1f
Closes-bug: 1282924