summaryrefslogtreecommitdiff
path: root/openstackclient/identity/v3/registered_limit.py
Commit message (Collapse)AuthorAgeFilesLines
* Blacken openstackclient.identityStephen Finucane2023-05-101-22/+39
| | | | | | | | | | 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: I2eeade1ce6653be8e9179ecc40105182c5ff5f16 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Replace six.iteritems() with .items()lihaijing2020-01-091-4/+3
| | | | | | | | | | | | | | | | 1. As mentioned in [1], we should avoid using six.iteritems to achieve iterators. We can use dict.items instead, as it will return iterators in PY3 as well. And dict.items/keys will more readable. 2. In py2, the performance about list should be negligible, see the link [2]. [1] https://wiki.openstack.org/wiki/Python3 [2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html Co-Authored-By: Akihiro Motoki <amotoki@gmail.com> Change-Id: I4b9edb326444264c0f6c4ad281acaac356a07e85 Implements: blueprint replace-iteritems-with-items
* Merge "Modify the help message for 'registered limit set'"Zuul2018-12-181-4/+13
|\
| * Modify the help message for 'registered limit set'Vishakha Agarwal2018-11-091-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regsitered limit set CLI takes --service, --region and --resource-name as param which can be updated along with --default limit for existing registered limit. Default limit can be updated with same value and CLI return the success. But --service, --region and --resource- name cannot be same as existing one. CLI return 409 for this case. Which is valid behaviour because more than one limit with same service and same resource cannot exist. But help message of --service, --region and --resource-name are not much clear to tell that they cannot be passed with same value. This patch clarifies the help message for resigtered limit set CLI. Reference Scenario: * openstack registered limit set --default-limit 91 64c2e97fbe904b888544ffdcab21989b limit updated sucessfully Updating limit with exsiting service and resource-name: * openstack registered limit set --default-limit 92 --resource-name snapshot 64c2e97fbe904b888544ffdcab21989b Conflict occurred attempting to store registered_limit - Duplicate entry. (HTTP 409) *openstack registered limit set --default-limit 93 --service compute 64c2e97fbe904b888544ffdcab21989b Conflict occurred attempting to store registered_limit - Duplicate entry. (HTTP 409) *openstack registered limit set --default-limit 91 --resource-name snapshot --service glance 64c2e97fbe904b888544ffdcab21989b Conflict occurred attempting to store registered_limit - Duplicate entry. (HTTP 409) Change-Id: I9e78a6250567cd981adde96946818bb016760a49
* | Updated the take_actions for unified limitsVishakha Agarwal2018-11-091-9/+39
|/ | | | | | | | | | | | | | | | | | | | | | | When user passes --region None, the find_resource of osc_lib calls get() of region. The get API of region ignores the name param returning all the regions in result. As the find_resource checks many cases against the result returned by get API. The output comes greater than 1, thus returning "More than one region ID exist" which is incorrect. However in case of region which cannot be filtered by name we do not require to check these many cases. The solution is to directly call the get method of APIs and returning No resource name exist with the xyz" on passing invaid parameter. And returning all in case of None. Thus created a new function get_resource which can be used in future too by these types of API's. Change-Id: Ib3f881d34a82af97199ce51bfbefc6f3f08599f1 Closes-bug: #1799153
* Implement support for registered limitsLance Bragstad2018-07-231-0/+260
This commit adds support for users to manage registered limits via the command line. bp unified-limits Depends-On: https://review.openstack.org/#/c/574391/ Change-Id: Id8377363f7a3248b45aeeba21d2acc02684a0305