Commit Graph

4 Commits

Author SHA1 Message Date
Vishakha Agarwal 4530041931 Remove six usage
This repo does not support Python 2 anymore, so we don't need
six for compatibility between Python2 and 3, convert six usage to Python
3 code.

Change-Id: Icba56808f38277b27af2ae5aac4b8507dee71b3b
2020-01-30 06:06:51 +00:00
Lance Bragstad f249c9e2b0 Allow domain users to access the limit API
This commit adds domain-scope to the scope_types for limit policies,
allowing domain users to access those APIs when enforce_scope is
enabled. This commit also introduces some tests that explicitly show
how domain users are expected to behave with the limits API. A
subsequent patch will do the same for project users.

This commit also modifies the GET /v3/limit policy to allow project
users to filter responses by project_id, which isn't entirely useful
outside of just calling the API with a project-scoped token.

Change-Id: I9b38f3fd2f83efd508b2d9a6c323bbaa7169d4cd
Related-Bug: 1805880
Partial-Bug: 1818736
2019-09-24 19:14:17 -07:00
wangxiyuan df173c7c90 Add domain level limit support - API
Add domain_id parameter for limit creation API

bp: domain-level-limit
Change-Id: I9f3d999f5f07fbb6bdbaf9410e15efefae19d262
2019-02-19 11:09:13 +08:00
Morgan Fainberg 3bad4cdbb7 Convert limits and registered limits to flask dispatching
Convert limits and registered limits to flask native dispatching.

NOTE: A minor test change was needed. The limit JSON Home data
      was incorrectly formatted and did not properly isolate the
      singular forms of "limit" and "registered_limit" from the
      plural (list) APIs.

Change-Id: Ib3ceeb0a249ccc73c143730fac78d9f54c67174e
Partial-Bug: #1776504
2018-08-06 12:37:49 -07:00