summaryrefslogtreecommitdiff
path: root/pycadf
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Use unittest.mock instead of third party mock"Zuul2020-03-301-2/+1
|\
| * Use unittest.mock instead of third party mockSean McGinnis2020-03-131-2/+1
| | | | | | | | | | | | | | | | Now that we don't need to support py27 we can use the standard library unittest.mock module instead of the third party mock lib. Change-Id: I1dfdb05ddf78cd8243f31956ccf8173b2059ad33 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* | Update hacking for Python3Andreas Jaeger2020-03-302-0/+2
|/ | | | | | | | | | The repo is Python 3 now, so update hacking to version 3.0 which supports Python 3. Blacklist W503, W504 Fix other problems found Change-Id: Ic0391ae45b9d6d1ee5e2c1df81d85e655250a51d
* Enabling FIPS mode by using sha256 instead of md5Raildo Mascena2018-11-011-2/+2
| | | | | | | | | | FIPS does not allow md5, some systems like RHEL needs to have FIPS compliance, in order to execute some routines like when try to use keystone-manage. As a general rule, we should avoid using md5 if we can and move over to SHA wherever possible. Change-Id: Icaeb3305c788db2913fe99792ea6311d218b3410 Closes-Bug: #1767024
* Remove moxstubout usageCharles Short2018-05-211-4/+0
| | | | | | | | As of version 3.5.0 moxstub will be deprecated, so remove it where it has been used. Change-Id: I033646a1e32a44dea54d902c43bb4def9da89b33 Signed-off-by: Charles Short <zulcss@gmail.com>
* Stopping using norm_nschenghuiyu2017-09-131-8/+0
| | | | | | | | | | The usage of 'norm_ns' via identifier is deprecated for removal. And there is no usage of norm_ns in other projects [1]. It's safe to remove it now. [1] http://codesearch.openstack.org/?q=norm_ns&i=nope&files=&repos= Change-Id: I9dc7683cb2cfa9096c16b888518581ed57c6dd9d
* Make `is_valid` more flexible with uuid validationGage Hugo2017-02-062-8/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In keystone, multiple domain ids are handled by concatenating two valid uuids together. This causes issues with pycadf validation and causes the following warning to be thrown: warnings.warn('Invalid uuid. To ensure interoperability, identifiers ' 'should be a valid uuid.') This appears throughout the testing logs while running keystone tests and there is a current attempt to remove most/all invalid uuids to eliminate this warning [0]. However due to the multiple domain id issue, this cannot be solved in keystone alone. The idea to allow multiple uuids that were joined together was mentioned before in a previous attempt to solve this issue [1]. This change: - Allows 2 or more concatenated uuids to be considered valid without emitting a warning - Cleaned up the list of words that are exceptions for validation - Added 'default' to list of valid words in exception list - Added offending value to printed warning - Broke up test_identifiers for better clarity about which tests were valid. This also solves the issue of `warning_mock.called` always being `True` once an invalid uuid of type string was checked within test_identifier - Added test for valid exception words and extra characters that can be present in a valid uuid according to [2] [0] https://bugs.launchpad.net/keystone/+bug/1659053 [1] https://bugs.launchpad.net/keystone/+bug/1521844 [2] https://docs.python.org/2/library/uuid.html Co-Authored-By: Tin Lam <tinlam@gmail.com> Partial-Bug: #1659053 Change-Id: I58bba04c21c2d24fd37850c9ecc6fac99deb3fc4
* cleanup stringgord chung2017-01-041-1/+1
| | | | Change-Id: I5df26a59aa1437777f175f46fd24e59b903e53a2
* Clean oslo.i18nTony Xu2016-09-271-33/+0
| | | | | | Remove pycadf/_i18n.py file Change-Id: Iffccecba9d4579a4f75acfbde8f5ed58d18a42f2
* Fix order of arguments in assertEqualliangjingtao2016-07-071-22/+22
| | | | | | | | | | | | | | | | | Some tests used incorrect order assertEqual(observed, expected). The correct order expected by testtools is... def assertEqual(self, expected, observed, message=''): """Assert that 'expected' is equal to 'observed'. :param expected: The expected value. :param observed: The observed value. :param message: An optional message to include in the error. """ This patch will fix it. Change-Id: I2d311fc9f774e7f61e52c40aefb1beb54244e9ba
* Add docstring validationDolph Mathews2016-02-121-5/+3
| | | | | | | | | | | | This introduces a linter for PEP257 to avoid trivial nitpicking of docstrings in code reviews. Because flake8_docstrings simply provides a plugin to add pep257 to flake8, you can run it via `tox -e pep8`. PEP257 checks which we are currently violating are ignored in tox.ini. We can remove them from the ignored list as they are fixed. Related-Bug: 1501544 Change-Id: I01ebad7b70cf61dd80d3c06c6808d8178fbdd634
* Fix wrong use of commaEinst Crazy2016-01-071-1/+1
| | | | | | As the sentence ended, it should be a '.' but not comma. Change-Id: I6b0233146692492ef9017b97f77b652672b39d9e
* relax id validation2.0.1gordon chung2015-12-022-5/+18
| | | | | | | | | we want uuid, unfortunately most of openstack is a mess so we can't have nice things. this patch makes it so we continue to allow basically anything that is a string but we warn that they should stop this. Change-Id: I2a89aed143c22b9a3e2261d5473af93c1cad67cd Closes-Bug: #1521844
* make generate_uuid return valid uuidgordon chung2015-11-121-14/+20
| | | | | | | | | | | | original design prepended a namespace to the beginning of uuid. this scoped the uuid to a namespace but it is technically invalid. this patch drops the behaviour of prepending string. rather, it takes the namespace, hashes it, and uses uuid v5 to generate valid uuid based on that namespace Change-Id: Ibde222c91522fa3c4a1720b6a8da81dac31560b9 Closes-Bug: #1504889
* Merge "Add event name"Jenkins2015-11-092-2/+14
|\
| * Add event nameStanisław Pitucha2015-09-242-2/+14
| | | | | | | | | | | | Add support for event name (defined in CADF 1.0.0). Change-Id: I924cafa42cfcd052114fbff7cf9b847452166415
* | Add authenticate and evaluate actionsStanisław Pitucha2015-10-161-2/+5
|/ | | | | | | Make constants for authenticate / evaluate actions, as proposed in Anchor audit patch. Change-Id: Ib9fb6f5d4ab92904097c8c2d77a8b70db0a77c36
* Adding barbican specific base resources.Arun Kant2015-08-141-0/+11
| | | | | | | | Adjusted classification to be without abbreviation and under /security as per review comments. Change-Id: Id658b61e5e18f9f66b0fecbbd5a44b3a71def22b Implements: blueprint barbican-resource-taxonomy
* ensure id is not emptygordon chung2015-06-222-0/+7
| | | | | | | | when validating id, we should validate it's not just a string but that it's also not empty. Change-Id: I0d55803df5f2f8e6b35431a816e1390bcb3fe424 Closes-Bug: #1467670
* Merge "Add unit tests to increase coverage of cadftype"Jenkins2015-05-151-0/+23
|\
| * Add unit tests to increase coverage of cadftypeBrad Topol2015-05-031-0/+23
| | | | | | | | | | | | | | | | Unit tests were added to bring test coverage of cadftype up to 98%. Coverage was increased for ValidatorDescriptor and CADFAbstractType. Change-Id: I66ea3455999df92251212fac89ea3c95d57f6655
* | drop audit middlewaregordon chung2015-04-2410-1071/+0
| | | | | | | | | | | | | | | | | | the audit middleware is deprecated and is available via keystonemiddleware. pyCADF can now be returned to just a library that builds CADF events and validates them. Closes-Bug: #1448239 Change-Id: I1724a6637d9663a825055f56d17189e35d63f269
* | Merge "Added a testcase to cover ValueError in tag.py"Jenkins2015-04-231-0/+12
|\ \
| * | Added a testcase to cover ValueError in tag.pyFernando Diaz2015-04-231-0/+12
| |/ | | | | | | | | | | | | Added a new testcase to cover a ValueError raised in generate_name_value_tag Change-Id: Ia07bc8c5c3d1586d1d9c6fd11a1c508a74bedc61
* | Add test to cover mask value for utils.mask_valuebgsilva2015-04-231-0/+8
|/ | | | | | | | Added a test case to cover a non-string type as value into util.mask_value. The method will return the non-string value unmodified. Change-Id: I8f43d30a594ecddbc028d8b2321457f76ce838c0
* Merge "Add deprecation message to Audit API"0.8.0Jenkins2015-02-131-0/+7
|\
| * Add deprecation message to Audit APISteve Martinelli2015-02-101-0/+7
| | | | | | | | | | | | | | Deprecate audit API as soon as possible so we can remove it from library, and use keystonemiddleware instead. Change-Id: Ib55aa9b2f970fe29b9346c5e3f9757b1007d9583
* | Merge "Use oslo_context"Jenkins2015-02-114-123/+1
|\ \ | |/ |/|
| * Use oslo_contextSteve Martinelli2015-02-044-123/+1
| | | | | | | | | | | | | | even though we have deprecated the middleware, we should still use oslo_context so we can be fully decoupled from oslo-incubator. Change-Id: I17d0d9a8daef66d9d39b621615e5e7bb9f022510
* | Merge "Do not depend on endpoint id existing in the service catalog"Jenkins2015-02-102-1/+39
|\ \
| * | Do not depend on endpoint id existing in the service catalogSteve Martinelli2015-02-062-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if the endpoint id does not exist, pycadf will break. This patch will attempt to find the id of the endpoint and if not found, set it to unknown. Closes-Bug: #1347868 Change-Id: Ief7facfca79f4f4e7c550c8f2317745e0c8e41ea
* | | Merge "Use oslo namespaces"Jenkins2015-02-068-14/+14
|\ \ \ | |/ / |/| / | |/
| * Use oslo namespacesSteve Martinelli2015-02-048-14/+14
| | | | | | | | | | | | | | | | | | | | Instead of using imports like: import oslo.config we should be using: import oslo_config Change-Id: I11fe1dbb0d638b9cc6d65fcdb1c1482cdf0c40b9
* | Merge "add helper module"Jenkins2015-02-044-0/+84
|\ \ | |/ |/|
| * add helper modulegordon chung2015-01-284-0/+84
| | | | | | | | | | | | | | this module will contain helper functions used to do common, generic actions when using CADF. Change-Id: I29c361d161707838b706f05143e00950a16bd275
* | Add a new CADF type for keystone trustsSteve Martinelli2015-01-301-0/+2
|/ | | | | | | Since trusts are also being emitted for notifications, we should also have a new taxonomy for them. Change-Id: I7351c6e439f4cf8acd6661000dc23b6995f52673
* Add new CADF taxonomy types0.7.1Steve Martinelli2015-01-271-0/+8
| | | | | | Add new CADF types for endpoint, project and domain Change-Id: I1e4adc35c2e17615b16bc7b6bd3754cb377cc3de
* Pull out some CADF taxonomy to be constantsSteve Martinelli2015-01-271-11/+23
| | | | | | | It's safer to reference these directly from the library, rather than hardcoding these strings in our code that consumed pyCADF. Change-Id: I9dae7a7c0925f45fc620b4995372b5ed1d2229ca
* upgrade hacking to 0.10.0Steve Martinelli2015-01-121-1/+2
| | | | Change-Id: If646a99435c9f5e1d227ee30fc25909f6fcdaae6
* deprecate audit middlewaregordon chung2014-12-151-0/+7
| | | | | | | | | we should deprecate audit middleware as soon as possible so we can remove it from library. switch oslo.messaging to test as it is only a requirement for middleware and not pycadf in general. Change-Id: I60820cc15d05b3c07215c2000d806b4a0aa42889 Closes-Bug: #1398411
* sync oslogordon chung2014-12-103-16/+5
| | | | | | | | | this patch also corrects an issue where we incorrectly referenced common._i18n this patch syncs to: Ia1820495a989f4f84530ab83f2d87d53a9f761df Change-Id: Ia192869d7e92732000b9033b09b97316ba5d5028
* Use oslo tests fixtureSteve Martinelli2014-10-2011-1522/+1
| | | | Change-Id: I3f60381bebfcad0ba5b597276bac5fd62213470c
* Use oslo.serializationSteve Martinelli2014-10-207-1081/+2
| | | | | | | Move to olso.serialization and update requirements and common.conf appropriately. Change-Id: If1abff0e8cf7c24a451c8d758e99bf143aa7a59f
* Sync oslo librariesSteve Martinelli2014-10-207-200/+205
| | | | | | | | performed update.sh ../pycadf from oslo-incubator sync'ed to level: 368daacaa3f4a65352f3e0c66a939a496c14ecca Change-Id: I1956702bea76eab3fecbf3ba04682451e5c4786a
* add federated credential0.6.0Dolph Mathews2014-08-202-3/+60
| | | | | | | This is in support of bp audit-support-for-federation in Keystone. Change-Id: Ibba203b4131a46fcfd7cc1e54b480b9c1392fe83 Closes-Bug: 1359495
* Merge "clean up license headers"Jenkins2014-08-1528-248/+190
|\
| * clean up license headersDolph Mathews2014-07-2928-248/+190
| | | | | | | | | | | | | | | | | | | | This removes extraneous whitespace, applies a consistent licensing header to all files, removes "all rights reserved" lines attributed to the OpenStack Foundation, removes authorship lines for Matt Rutkowski (which the git commit history much more accurately conveys) and follows all licenses with a blank line before the code/docstr begins. Change-Id: Idcfefd923e5ddb574087265c998dd50ebfe70a79
* | Merge "Enable PEP8 checks E128, E251 and E265"Jenkins2014-08-114-8/+8
|\ \
| * | Enable PEP8 checks E128, E251 and E265Christian Berendt2014-08-014-8/+8
| |/ | | | | | | | | | | | | | | * E128 continuation line under-indented for visual indent * E251 unexpected spaces around keyword / parameter equals * E265 block comment should start with '# ' Change-Id: Ie4b7d8a392c8e8bed58c171b5fc1b9db308036bc
* | Fix typo commentsBrad Topol2014-07-232-3/+3
|/ | | | | | | While looking at the pycadf source I notice some typos in a few of the comments. So I went ahead and fixed them Change-Id: Icfab2820f9f4282fd07e7ce4152142f5bbd476e2