summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* OpenDev Migration Patchocata-eolstable/ocataOpenDev Sysadmins2019-04-191-1/+1
| | | | | | | | | | | | | | | This commit was bulk generated and pushed by the OpenDev sysadmins as a part of the Git hosting and code review systems migration detailed in these mailing list posts: http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html Attempts have been made to correct repository namespaces and hostnames based on simple pattern matching, but it's possible some were updated incorrectly or missed entirely. Please reach out to us via the contact information listed at https://opendev.org/ with any questions you may have.
* import zuul job settings from project-configDoug Hellmann2018-08-031-0/+9
| | | | | | | | | | | | | | | This is a mechanically generated patch to complete step 1 of moving the zuul job settings out of project-config and into each project repository. Because there will be a separate patch on each branch, the branch specifiers for branch-specific jobs have been removed. See the python3-first goal document for details: https://governance.openstack.org/tc/goals/stein/python3-first.html Change-Id: I019fe5f453110c42558f40cb15e15918f0c5de94 Story: #2003250
* Fix sphinx-docs job for stable brancheeldill2018-05-021-0/+5
| | | | | | | | | build-openstack-sphinx-docs jobs fail on stable branches due to the new pip version 10 introduces some previously Warning as Error: in case of calling "pip install" without any package name, the command fails. tox_install.sh is called during docs job without any package passed to pip. Change-Id: I76f6c07bbb938d0eaeefc1bc9c8c383e2ca48e09
* Update UPPER_CONSTRAINTS_FILE for stable/ocataOpenStack Release Bot2017-01-201-1/+1
| | | | Change-Id: I543dadcbe285e27479930bfeb6284c350d1b72b2
* Update .gitreview for stable/ocataOpenStack Release Bot2017-01-201-0/+1
| | | | Change-Id: I4fc4ebd4292a7c1c210961a0bb09ab4c885ee802
* Remove references to Python 3.4ocata-em1.18.0Eric Brown2017-01-092-2/+1
| | | | | | | Now that there exists only a gate job for Python 3.5 and not 3.4, we should remove those references to the 3.4 that is untested. Change-Id: I1459093004581ea89c95e38a90f199ab4930d4ea
* Remove dead code and use default value of argparse.Sami Makki2017-01-021-12/+4
| | | | | | | | | | | In the 'tool' method, the var 'apply_rule' was tested, and the method returned if it was true. Then, it was tested again even though it could only be 'false' (or not be None). Also, an unused parameter of main() had been removed. Closes-Bug #1650599 Change-Id: I4b265ef609d4a5fc8128f40359cf8d04ee8cbe28 Signed-off-by: Sami Makki <mail@samimakki.fr>
* Add Constraints supportTony Breeds2016-12-202-1/+36
| | | | | | | | | | | | Adding constraints support to libraries is slightly more complex than services as the libraries themselves are listed in upper-constraints.txt which leads to errors that you can't install a specific version and a constrained version. This change adds constraints support by also adding a helper script to edit the constraints to remove oslo.policy. Change-Id: If11bb645e9722762ae18c55c7b2808a238d6c3f1
* Updated from global requirementsOpenStack Proposal Bot2016-12-021-1/+1
| | | | Change-Id: I5db9bd40c586abba6e072e35b3ad0b39dbb22ad9
* Improved performance of parse_file_contents() method1.17.0Sergey Nikitin2016-11-291-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before change Ic6236665f2d55b24a56a99120ac57fc2b18e32eb policy file had been parsed by jsonutils.loads() For some reasons jsonutils.loads() is much faster than yaml.safe_load(). For example this script takes 30 seconds: s = '{"a": 3, "b": "c"}' for i in xrange(100000): yaml.safe_load(s) And this script takes only 1 second! s = '{"a": 3, "b": "c"}' for i in xrange(100000): jsonutils.loads(s) Moreover policy rules are presented in JSON format by default (at least in Nova). This patch proposes to parse file by jsonutils.loads(). If it was parsed - use parsed data. If it's failed - try to parse with yaml.safe_load(). It will have no/minimum performance effect on real env because, as I understand, we parse policy file only one time during service start. But it will have great performance improvement in our jenkins jobs. Statistics for nova py27, py34 and functional jobs: * with this change I0c18e9746b742a2fff60795da8a5daddda7cf469 * without this change Ie4af661f4ca16b63444692f3736835f9ce42adc1 Here was taken pure time of running "tox -e py27/py34/functional" commands without (sec) with (sec) py27 421 240 py34 330 170 functional 662 495 As you see performance of unit tests was increased almost in two times. These changes covered by tests in test_policy.py file. There we test method Rules.load() with invalid/valid JSON/YAML. As you can see method Rules.load() directly uses parse_file_contents(). Change-Id: I43782d245d7652ba69613b26fe598ac79ec19929
* Merge "Remove wrong parameter type for class NotCheck from docstring"Jenkins2016-11-281-1/+0
|\
| * Remove wrong parameter type for class NotCheck from docstringChangBo Guo(gcb)2016-11-251-1/+0
| | | | | | | | Change-Id: I0618197919ec3279bc03baaa4b6ba57c6d60bb23
* | Show team and repo badges on READMEFlavio Percoco2016-11-251-0/+9
|/ | | | | | | | | | | | | | | | This patch adds the team's and repository's badges to the README file. The motivation behind this is to communicate the project status and features at first glance. For more information about this effort, please read this email thread: http://lists.openstack.org/pipermail/openstack-dev/2016-October/105562.html To see an example of how this would look like check: b'https://gist.github.com/4f96d1063457f4d4844c73ca8c546c98\n' Change-Id: I5916ea64b1f7cd4b8903c5071c54951802c07bd3
* Merge "Add missing parameter description in module _cache_handler"Jenkins2016-11-091-0/+3
|\
| * Add missing parameter description in module _cache_handlerChangBo Guo(gcb)2016-11-021-0/+3
| | | | | | | | Change-Id: I71c6a322739fa3b361eadd93afb635cb467aaf58
* | Merge "Make exception PolicyNotAuthorized more readable"Jenkins2016-11-091-1/+2
|\ \
| * | Make exception PolicyNotAuthorized more readableChangBo Guo(gcb)2016-10-191-1/+2
| | | | | | | | | | | | | | | | | | Adjust the statement of message to make it more readable. Change-Id: I5f46c38004b8747f414e511508aba183395220c1
* | | Fix a code logic while doing cyclical reference check to the policyXu Ao2016-11-082-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While there is same rule_check in different branchs of a rule, it shouln't be judged to having cyclical reference. For example: 'get_properties': 'rule:is_admin or rule:is_observer' 'is_admin': 'rule:is_member' 'is_observer': 'rule:is_member' In this situation, it shouldn't be judged to haveing cyclical reference. So that the parameter 'seen' should be passed like this to prevent it from missing judgement: get_properties(seen) | --------------- Or ------------------- | | rule:is_admin(seen') rule:is_observer(seen'') | | rule:is_member(seen') rule:is_member(seen'') Change-Id: I904dc60c40b11699c9087e6ebae7aba4d0113dd8 Closes-bug: #1637419
* | | Updated from global requirementsOpenStack Proposal Bot2016-11-021-1/+1
| |/ |/| | | | | Change-Id: I8da9f6fa8ddb2b2cd4ddcc84351f1e4ef63f2aa4
* | Fix typo in oslo.policyhowardlee2016-11-011-2/+2
| | | | | | | | | | | | TrivialFix Change-Id: I0a9f18e31492b5b5bd5de004e8f5129d8fd3f50f
* | Updated from global requirementsOpenStack Proposal Bot2016-10-271-1/+1
| | | | | | | | Change-Id: Ia02e8c9f16319d23913123ed46fac0686a48fc95
* | Add stevedore to requirementsTony Xu2016-10-251-0/+1
| | | | | | | | | | | | | | | | This module is be used in: oslo_policy/generator.py oslo_policy/tests/test_generator.py Change-Id: I613043aeab7825bac44bbb1b20d984c7c9a20ce8
* | Imported Translations from ZanataOpenStack Proposal Bot2016-10-2414-68/+67
| | | | | | | | | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: I8e39999a30bb04011bfc545e55c32a5c7f309337
* | Updated from global requirementsOpenStack Proposal Bot2016-10-221-1/+1
|/ | | | Change-Id: I7d8dd22af3a938f0b8a4823ffde01cab94578585
* Change assertTrue(isinstance()) by optimal assert1.16.0melissaml2016-10-141-1/+1
| | | | | | | | | Some of tests use different method of assertTrue(isinstance(A, B)) or assertEqual(type(A), B). The correct way is to use assertIsInstance(A, B) provided by testtools Change-Id: Ia5156aef65da766520485bbc9495b61918407f22
* Merge "Perform basic checks on policy definitions"Jenkins2016-10-132-0/+104
|\
| * Perform basic checks on policy definitionsAndrew Laski2016-10-122-0/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is easy for someone to configure a policy to reference a rule definition that does not exist. In this case the check will fallback to the default rule(if it exists) and the deployer will never realize they've incorrectly defined their policy. It is also possible to configure a set of rule checks with a cycle. This will fail at runtime with a "RunTimeError: maximum recursion depth exceeded" and a potential 500 HTTP response from whatever API is in use. This change adds a check for those cases which will log a warning when those occur. The check can also be called when a service using oslo.policy starts up and fail to start for incorrect policy definitions. The default behavior is just to log the condition in case a policy file is changed after startup and reloaded. That should not raise an exception which may go unhandled and kill the service. Change-Id: If2d1a5df05091e013293ec350861d7ada1753a47
* | Merge "Enable release notes translation"Jenkins2016-10-131-0/+3
|\ \ | |/ |/|
| * Enable release notes translationAndreas Jaeger2016-10-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Releasenote translation publishing is being prepared. 'locale_dirs' needs to be defined in conf.py to generate translated version of the release notes. Note that this repository might not get translated release notes - or no translations at all - but we add the entry here nevertheless to prepare for it. Change-Id: Iff0ac75910b62cb99f702c65cd8740cfbe1923a1
* | Merge "Change assertTrue(isinstance()) by optimal assert"Jenkins2016-10-121-18/+18
|\ \ | |/ |/|
| * Change assertTrue(isinstance()) by optimal assertgecong19732016-10-081-18/+18
| | | | | | | | | | | | | | | | | | Some of tests use different method of assertTrue(isinstance(A, B)) or assertEqual(type(A), B). The correct way is to use assertIsInstance(A, B) provided by testtools Change-Id: I391e5fd804072e2d438d5c952dc934e664505a8d
* | Changed the home-page linkLuong Anh Tuan2016-10-111-1/+1
|/ | | | | | Set the correct url link for home-page Change-Id: I72da413012e2a967c4b7e0095b3452e7272fd19b
* Updated from global requirements1.15.0OpenStack Proposal Bot2016-09-301-1/+1
| | | | Change-Id: Ibadfbceb8a8548f7aeb9d2320feb938869437334
* Merge "doc: Add introduction to index page"Jenkins2016-09-291-0/+10
|\
| * doc: Add introduction to index pageStephen Finucane2016-09-281-0/+10
| | | | | | | | | | Change-Id: I9a9161f797d89543ae189bd35f61e00524b481a1 TrivialFix
* | Merge "Update docs on policy sample generator"Jenkins2016-09-281-5/+3
|\ \
| * | Update docs on policy sample generatorAndrew Laski2016-09-281-5/+3
| |/ | | | | | | | | | | | | | | | | The docs for the policy sample generator were inconsistent with how it is typically used in practice, with just one namespace. This led to questions about using one namespace when in reality that's what happens. This patch brings the example more in line with reality. Change-Id: Id3c21459eff09aaf6e31c6f3aa4f8d829f87c513
* | Updated from global requirementsOpenStack Proposal Bot2016-09-281-1/+1
|/ | | | Change-Id: I437a4b5edd2353fa0b1888c1730a3eef67b6fbef
* Merge "Add sphinx extension to build sample policy"Jenkins2016-09-285-0/+179
|\
| * Add sphinx extension to build sample policyStephen Finucane2016-09-285-0/+179
| | | | | | | | | | | | | | | | Provide a way to include a sample policy file in a project's documentation. This harnesses the same generator utilities used in standard policy file generation. Change-Id: I4b04044c18ea9f2b1d55785686982af9032a8495
* | Updated from global requirementsOpenStack Proposal Bot2016-09-271-1/+1
|/ | | | Change-Id: Ie990f8b2e9b562a2341bfe741e1f4fdedafc9ebb
* Merge "Doc: declare YAML/JSON support"Jenkins2016-09-262-3/+3
|\
| * Doc: declare YAML/JSON supportChangBo Guo(gcb)2016-09-222-3/+3
| | | | | | | | | | | | | | | | oslo.policy can support both of YAML and JSON until now, but some docstring and config option's help text are inconsistent. This commit fixes them. Change-Id: I23cc60c84be97a3aec158f81ac21ac0ba3779abd
* | Updated from global requirementsOpenStack Proposal Bot2016-09-261-1/+1
| | | | | | | | Change-Id: Ib05af2ba08af4783942a1f4599ed572bc11aa9a7
* | Remove oslo.utils from requirementsTony Xu2016-09-221-1/+0
|/ | | | | | unused import Change-Id: I047819ab59d0b79a222d5517b8d24c84b09a279f
* Update reno for stable/newtonDoug Hellmann2016-09-012-2/+9
| | | | Change-Id: I13566ba343303dd1687059e43e0b73c0c49f02a2
* Revert "Adds debug logging for policy file validation"1.14.0Tony Breeds2016-08-091-5/+6
| | | | | | | | | | | | | | | | | | | | This reverts commit 5273d2c3a15c8807d80547bdb88707ba69defc05. The commit in question more nearly doubles the .testrepository runs: -rw------- 1 stack stack 50M Aug 9 05:29 0 -rw------- 1 stack stack 36M Aug 9 05:46 1 0 == keystone py27 with olso.policy 1.13.0 1 == keystone py27 with olso.policy 1.12.0 This can be seen in the gate[1][2]. Revert the debuging change until it can be off by defult and used when needed. [1] http://logs.openstack.org/97/350197/2/check/gate-cross-keystone-python27-db-ubuntu-xenial/16c26fa/console.html#_2016-08-08_22_53_48_974404 [2] And it's preventing olso.policy 1.13.0 being used in upper-constraints.txt Change-Id: I19a73e8935976cc98398665306cc104b66719951
* Updated from global requirementsOpenStack Proposal Bot2016-08-041-1/+1
| | | | Change-Id: Ib4398ab22db8930d9ac4cf08f36b31dea8b1a1b6
* Merge "Allow policy file to not exist"Jenkins2016-08-032-4/+55
|\
| * Allow policy file to not existAndrew Laski2016-07-142-4/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that policy rules can be registered in code there is a desire to run projects without a policy file. However oslo.policy assumed a policy file would exist and would raise an error if it could not be found. This changes that behavior to not error if a policy file is not found. Because there are now tools which can generate policy files which list the defaults, or list the effective policy there is no requirement that a policy file be used in order to examine the policy that is in use. So it should be possible to run without one. Change-Id: Ia82df77f7a65aa1f3e3eaa7ed949103fa73fb603