summaryrefslogtreecommitdiff
path: root/barbicanclient
Commit message (Collapse)AuthorAgeFilesLines
* Drop lower-constraints.txt and its testingGhanshyam Mann2022-05-131-0/+2
| | | | | | | | | | | | | | | | | | | | As discussed in TC PTG[1] and TC resolution[2], we are dropping the lower-constraints.txt file and its testing. We will keep lower bounds in the requirements.txt file but with a note that these are not tested lower bounds and we try our best to keep them updated. This patch also fixes a broken test by updating the maximum payload size to match the current maximum in Barbican. [3] This patch also skips an additional broken test. It will be fixed in a separate patch. [1] https://etherpad.opendev.org/p/tc-zed-ptg#L326 [2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal [3] https://opendev.org/openstack/barbican/src/branch/stable/yoga/barbican/common/config.py#L33 Change-Id: Id192b8eef2c2518b8a89f200727bd03c47dbd07e
* Merge "Switch from unittest2 compat methods to Python 3.x methods"Zuul2020-07-071-4/+4
|\
| * Switch from unittest2 compat methods to Python 3.x methodsDirk Mueller2020-06-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the removal of Python 2.x we can remove the unittest2 compat wrappers and switch to assertCountEqual instead of assertItemsEqual We have been able to use them since then, because testtools required unittest2, which still included it. With testtools removing Python 2.7 support [3][4], we will lose support for assertItemsEqual, so we should switch to use assertCountEqual. [1] - https://bugs.python.org/issue17866 [2] - https://hg.python.org/cpython/rev/d9921cb6e3cd [3] - testing-cabal/testtools#286 [4] - testing-cabal/testtools#277^ Change-Id: I5e02a7ed7803e21ad2baa93fccd00a23cda3da79
* | Merge "Update hacking for Python3"Zuul2020-06-164-66/+66
|\ \ | |/ |/|
| * Update hacking for Python3Andreas Jaeger2020-06-094-66/+66
| | | | | | | | | | | | | | | | | | The repo is Python 3 now, so update hacking to version 3.1.0 which supports Python 3. Fix problems found. Change-Id: I54f9f7c5f6ee87ee886658388541f45e23c7546d
* | Use unittest.mock instead of third party mockSean McGinnis2020-06-092-2/+4
|/ | | | | | | | Now that we no longer support py27, we can use the standard library unittest.mock module instead of the third party mock lib. Change-Id: I3b728aee2f07ad547ee75cabf78659cef1233bc5 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* Fix gate job failures and py3 compatibilityTakashi Kajinami2020-06-083-12/+21
| | | | | | | | | | - Fix incorrect type handling of secret payload in py3 (it should be bytes instead of str by default) - Fix py3 compatibility of test codes - Update expiration date so that resources are created with valid expiration. Change-Id: I4935f601f87e9c49499da1034a320eee2e655b4d
* Merge "docs: Turn on warning-as-error"Zuul2019-11-051-3/+3
|\
| * docs: Turn on warning-as-errorStephen Finucane2019-10-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two main issues here. Firstly, a function was being documented as a class, resulting in: WARNING: error while formatting arguments for barbicanclient.client.Client: 'function' object has no attribute '__mro__' Secondly, a docstring for a common function had an incorrect field list format, resulting in: docstring of barbicanclient.v1.acls.SecretACL.get:4: WARNING: Field list ends without a blank line; unexpected unindent docstring of barbicanclient.v1.acls.ContainerACL.get:4: WARNING: Field list ends without a blank line; unexpected unindent Resolve both. Change-Id: I69ef97cb48c6b5a1add4e89c4a53047420d314f4 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Support two-way auth for barbicanclientjonnary2019-10-022-2/+51
|/ | | | | | | This patch supports two-way auth for barbicanclient. Change-Id: I19fb971de864e94b31bf436bc27d5180aebbce4f blueprint:support-two-way-auth
* Update json module to jsonutilscao.yuan2019-02-263-24/+26
| | | | | | | | | | oslo project provide jsonutils, and barbicanclient use it in many place[1], this PS to update the remained json module to oslo jsonutils for consistency. [1]: https://github.com/openstack/python-barbicanclient/search?utf8=%E2%9C%93&q=jsonutils&type= Change-Id: I244c83edcf756b1e4682d5032179e57810ceaca5
* Secret payload should also be fetched by UUIDAdam Harwell2018-12-202-7/+11
| | | | | | | | | | | | We changed the client to fetch containers and secrets via their UUID from the API, rather than by HREF, so that the endpoint URLs set in the keystone client would be respected. Unfortunately, we (I) missed updating the payload fetch function to do the same. This brings it into line with the other fetches. Change-Id: Ic71cf6771563d669a2fa37a56d4b40c637db1511 Story: 2004653 Task: 28608
* Allow fetching by UUID, and respect interfaceAdam Harwell2018-09-1112-96/+357
| | | | | | | | | | | | | | When passing a UUID to the client, use the Barbican endpoint from the service catalog to fetch the entity. When passing an href, strip everything before the UUID and use it the same as a passed UUID. This allows for service usage when secrets are created with a public endpoint but must be retrieved from an internal or admin endpoint, and is probably how all usage should have worked to begin with. Change-Id: I90778a2eeefc4cfe42b0e2a48ba09036e3e6d83d Story: 2003197 Task: 23353
* use open() instead of file()Doug Hellmann2018-06-131-1/+1
| | | | | | | | Under python 3 the built-in file() has been removed. Use open() instead, since it works for both python 2 and 3. Change-Id: Ifec91646f036dabd8dd6dcd4c648ef4b5bf23427 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
* Add --file flag for secretsDave McCowan2018-06-012-23/+53
| | | | | | | | | | | | | | | | | This patch adds a --file (-F) flag to both 'secret store' and 'secret get' commands to work around a cliff formatter limitation when dealing with binary data. This flag can be used to store a payload directly from a file so that a user doesn't have to do any base64 juggling of their data. The flag can also be used to save a payload directly to a file so we can avoid UTF-8 and ASCII encoding errors thrown by the cliff formatters that expect text data. Original Review: https://review.openstack.org/#/c/388981 Co-Authored-By: douglas.mendizabal@rackspace.com Change-Id: Iee7e2bbb95238a9bbb9e8e6124fe1663da377939
* Supress client debug messagesJeremy Liu2018-03-191-0/+30
| | | | | | | | | | | | | | cliff sets log level to DEBUG in `run` function [1], need to overwrite this configuration to depress DEBUG messages. This patch adds such configuration in `prepare_to_run_command` function which will be called by cliff after it sets log level to DEBUG [2][3]. [1] https://github.com/openstack/cliff/blob/master/cliff/app.py#L248 [2] https://github.com/openstack/cliff/blob/master/cliff/app.py#L279 [3] https://github.com/openstack/cliff/blob/master/cliff/app.py#L393 Change-Id: I5c270d74cb09e90b8a98fd8febf587b98db2306f Closes-bug: #1681966
* Pass OSC interface through to barbican pluginColleen Murphy2018-01-161-1/+2
| | | | | | | | | | | | python-openstackclient uses OS_INTERFACE or --os-interface to select a catalog endpoint to work with. The barbican CLI uses BARBICAN_INTERFACE or --interface, which OSC won't pass through. This is a problem because the it prevents the user from selecting a non-public endpoint when using barbican via openstackclient rather than as a standalone CLI. This patch updates the osc plugin to pass through the interface set by OSC to the barbican client class. Change-Id: I1e9890c9e87fb77b272f939bf33914df739aa5be
* Correct docs usage of keystoneauth1 sessionGage Hugo2017-09-122-2/+2
| | | | | | | | keystoneclient.session has been long deprecated in favor of keystoneauth1.session. This change corrects entries in the documentation to use the correct library's session. Change-Id: I92226c9407ff77839a96cc9476f01eb7acf5c379
* Support import modules from barbicanclient.client module4.5.2Jeremy Liu2017-08-011-0/+32
| | | | | | | | | Before refactor patch, modules could be imported either from barbicanclient.<module> or barbicanclient.client.<module>, octavia is using both methods. We need to support that. Change-Id: Ib5b7c2ae50d30e85685c20cfabc188f46c0c947b Closes-bug: #1706841
* Workaround for importing objects from old path4.5.1Jeremy Liu2017-07-291-0/+46
| | | | | | | | | | Many projects are importing secrets and containers from barbicanclient, the refactor change needs to keep compatiable for this. This is workaround for that and marked as deprecation. Change-Id: Ibc9b525f1abe0a7627759e438977a6bf6b86bed6 Closes-bug: #1706841
* Merge "Update api references according to refactor result"4.5.0Jenkins2017-07-265-13/+13
|\
| * Update api references according to refactor resultyushangbin2017-07-255-13/+13
| | | | | | | | Change-Id: I40c51315fe2d1751240e5b28fd8e0bf72cc215f1
* | Add secret_type filter to CLIJeremy Liu2017-07-251-1/+5
|/ | | | Change-Id: I6d74bd3146e328b74c2ddc6484e76b66adce3349
* Update the documentation link for doc migrationchenxing2017-07-211-1/+1
| | | | Change-Id: I73a74233f0663fe651288ec0a65ad13857f04504
* fix default versionThiago da Silva2017-07-191-2/+1
| | | | | | | | | | | | recent refactor seems to have caused a regression with the client default version, using openstack client causes this error: Invalid client version 1; must be one of: v1 Closes-Bug: 1705322 Change-Id: Ib3d8efce41c00ab8573461ea30357d1a611529e5 Signed-off-by: Thiago da Silva <thiago@redhat.com>
* Refactor barbicanclientJeremy Liu2017-06-2023-51/+139
| | | | | | | | | Add v1 directory for APIs, CLIs and API testcases. Currently, v1 is supported and the default api version. If version is not specified when constructing barbicanclient, default api version will be used. Implements: blueprint refactor-barbicanclient Change-Id: Ib91e7049de007f4d4254abcd4c125b4dc7e03c55
* Merge "Add client list filter functionality"Jenkins2017-06-151-2/+30
|\
| * Add client list filter functionalityKaitlin Farr2017-05-171-2/+30
| | | | | | | | | | | | | | | | Exposes the secret_type, created, updated, expiration, and sort as filters for listing secrets. Change-Id: I583f27f91cb3c6bdb23438dff6b539407b4005ed Depends-On: I95b5390ef24a754f66ccdb9ccde34cd0820b02fd
* | Use generic auth plugin instead of specific versionJeremy Liu2017-05-181-14/+11
|/ | | | | | | | | Switch both client and functional test to use generic auth plugin. Also keep keystone auth_uri as one option so we needn't add extra version to the endpoint and let keystoneauth handle this. Change-Id: I5535d4d459496eec9052131b43615e6056e249e8 Closes-bug: #1691480
* Merge "Enable F and H flake8 rules"Jenkins2017-04-0716-137/+128
|\
| * Enable F and H flake8 rulesKaitlin Farr2017-03-2916-137/+128
| | | | | | | | | | | | | | | | | | | | | | Flake8 was configured to ignore F and H rules, which are the PyFlakes rules and OpenStack hacking rules. H202 (tests for the too-general Exception used with assertRaises) is still ignored because some code actually throws a generic Exception and so the unit test must check that Exception is raised. Change-Id: I4c4b67631547cd2db784936287355968a6d3b6c7
* | Replace six.iteritems() with .items()M V P Nitesh2017-03-303-10/+7
|/ | | | | | | | | | | | 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 Change-Id: I093160f746f346871c136043a8fa48c9491fdc1a
* Set client module __version__Rui Chen2017-03-254-5/+37
| | | | | | | | | | According to PEP 396, the version of client library should be set in xxxclient.__version__, that help python-openstackclient command "module list" to get the right plugin module versions. Change-Id: I74f624e75b5335c657d7bb741435bfafedcc974e Partial-Bug: #1662058
* Merge "Fix doc referencing --payload-content-type"Jenkins2017-03-101-3/+3
|\
| * Fix doc referencing --payload-content-typePetr Kovar2017-01-182-4/+4
| | | | | | | | | | | | | | Referencing --payload-content-type seems incorrect. Also, fix trivial formatting and spelling issues. Change-Id: I68984ce55c1e8882b80a20a6c17b258383225ff3
* | Merge "Change parent class of `WhenTestingCertificateOrders`"Jenkins2017-03-101-32/+22
|\ \
| * | Change parent class of `WhenTestingCertificateOrders`Jeremy Liu2017-02-251-32/+22
| | | | | | | | | | | | | | | | | | | | | | | | Change parent class of WhenTestingCertificateOrders to inherit OrdersTestCase. Change-Id: I6b5a96ffdc720fc57f7ea9cb957e816d8604320c Closes-bug: #1667887
* | | Merge "Replaces uuid.uuid4 with uuidutils.generate_uuid()"Jenkins2017-03-091-25/+40
|\ \ \
| * | | Replaces uuid.uuid4 with uuidutils.generate_uuid()Luong Anh Tuan2016-12-191-25/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Openstack common has a wrapper for generating uuids. We should use that function when generating uuids for consistency. Change-Id: I95a4a8c8e9b4501d4f9796309beb50971f2a7222 Closes-Bug: #1082248
* | | | Fix serializable issues when retrieving json format resourcesJeremy Liu2017-02-2510-12/+80
| |/ / |/| | | | | | | | | | | Change-Id: Icc56feab767e5154588f2e3e32e1ded3d8c62f09 Closes-Bug: #1662144
* | | [openstack-manuals] description of command barbican ca listKiran_totad2017-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | | Changed "List cas." to "List CAs." Change-Id: Ib22148157e5337c098e0bda7792b1f385863b20a Closes-Bug: #1567289
* | | Remove unused barbicanclient/common directoryJeremy Liu2017-01-262-32/+0
| |/ |/| | | | | | | | | | | | | Currently, this directory contains config.py to parse configurations. Barbicanclient does not have a configuration file, so no need to parse configurations. This directory isn't used, so remove it. Change-Id: Id641094b8802a24d0f331469245dd9717b1f089c
* | Merge "Add plug-in summary for osc doc"Jenkins2017-01-041-0/+2
|\ \ | |/ |/|
| * Add plug-in summary for osc docKATO Tomoyuki2016-10-141-0/+2
| | | | | | | | | | | | | | Stevedore Sphinx extension handles this comment. http://docs.openstack.org/developer/python-openstackclient/plugin-commands.html Change-Id: Id6339d11b900a644647c8c25bbd630ef52a60aab
* | Accept 'pass_phrase' for AsymmetricOrder constructorJuan Antonio Osorio Robles2016-12-142-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | This was changed by this commit Iecd129a61eb02d0de59b4a11b83200a8a4269a6c and broke other projects that used this interface. This adds the parameter back, as well as still accepting the one that was introduced ('passphrase' without the underscore). Also, the new parameter takes presedence. Change-Id: I12796f6896bba315b9cd855a13f776b08e0be693 Closes-Bug: #1635213
* | Merge "Add missing param to certificate order initialization"Jenkins2016-11-221-3/+7
|\ \
| * | Add missing param to certificate order initializationJeremy Liu2016-11-121-3/+7
| | | | | | | | | | | | | | | Change-Id: I5a0a2562837c775eabb5125feb838661c2c93947 Closes-Bug: #1635966
* | | Merge "Validate key order meta fields."Jenkins2016-11-222-1/+40
|\ \ \ | |/ / |/| |
| * | Validate key order meta fields.Max Abidi2016-08-232-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | When using barbican client to list malformed orders, the response meta dictionary has invalid "request_type" key. Added check to validate key order meta fields. Added unit test case. Change-Id: I25c50d252daebe623e2f90e9395d0f77f9589b8d Closes-Bug: #1596851
* | | Merge "Using assertTrue/False() instead of assertEqual(True/False)"Jenkins2016-11-112-5/+5
|\ \ \