summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update .gitreview for stable/newtonnewton-eolstable/newtonDoug Hellmann2016-08-291-0/+1
| | | | Change-Id: I638c5a6df74e546c07e66476ee282f0b3381f43f
* 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
* | Delete H803 in flake8 ignoreWei Li2016-08-021-2/+1
| | | | | | | | | | | | | | In hacking >= 0.10.0,do not have H803.So we should delete it in flake8 ignore list. Change-Id: Ife2b05586211b574eb87412f922e1a5d0ef75b0b
* | Updated from global requirements1.13.0OpenStack Proposal Bot2016-07-291-1/+1
| | | | | | | | Change-Id: I924b370ccf0af8350c2db6fa84bff2eaa79e27da
* | Merge "Add note about not all APIs support policy enforcement by user_id"Jenkins2016-07-211-0/+5
|\ \
| * | Add note about not all APIs support policy enforcement by user_idHe Jie Xu2016-07-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The policy enforcement by user_id on some of API resources was untested. This patch adds note about not all API resource support policy enforcement by user_id or project_id. Discussion: http://lists.openstack.org/pipermail/openstack-operators/2016-May/010528.html Change-Id: I6e5c77981d7acbee73ebf10b6d8bdecab4e83bb3
* | | Merge "Adds debug logging for policy file validation"Jenkins2016-07-201-6/+5
|\ \ \
| * | | Adds debug logging for policy file validationKseniya Tychkova2016-07-131-6/+5
| | |/ | |/| | | | | | | | | | | | | | | | Simple solution to make debug easier Change-Id: Ie5704f444b22f32876156277595408424c0ac38e Closes-Bug: 1588552
* | | Merge "Add Python 3.5 classifier and venv"Jenkins2016-07-132-1/+2
|\ \ \
| * | | Add Python 3.5 classifier and venvChangBo Guo(gcb)2016-07-122-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that there is a passing gate job, we can claim support for Python 3.5 in the classifier. This patch also adds the convenience py35 venv. Change-Id: I712c4e32e4db3e5ef826c69a11b8c3338753906f
* | | | Fixed unit tests running on WindowsAdrian Vladu2016-07-121-26/+43
|/ / / | | | | | | | | | | | | | | | | | | Replaced all slashes in the paths with os.path.join, so that they are compatible with Windows and Linux. Change-ID: I04125bb3305f695e156e901543393abfae527acc
* | | Updated from global requirements1.12.0OpenStack Proposal Bot2016-07-091-1/+1
| | | | | | | | | | | | Change-Id: I295cbacfcf5e68b811920992a13d22435601683f
* | | Updated from global requirementsOpenStack Proposal Bot2016-07-091-1/+1
|/ / | | | | | | Change-Id: I92f5e86ef3a0a14eb55e0d4cc1134d2ec33da54d
* | Fix mispelled method name in setup.cfgAndrew Laski2016-07-061-1/+1
| | | | | | | | | | | | | | | | The oslopolicy-policy-generator script was configured to use a method named genarate_policy. Unfortunately that method does not exist but there is one called generate_policy. This fixes the mistake. Change-Id: I04125bb3305f695e156e901543393abfae527a09
* | Updated from global requirementsOpenStack Proposal Bot2016-06-301-1/+1
| | | | | | | | Change-Id: I929f57c4d6c72df0386ea87ae1edd49d1e2ae16f
* | Updated from global requirementsOpenStack Proposal Bot2016-06-291-2/+2
| | | | | | | | Change-Id: I5daf4add079c41a6bb98b53b687fb8ed53c508b0
* | Imported Translations from ZanataOpenStack Proposal Bot2016-06-291-3/+6
| | | | | | | | | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: I5e6ef88add5dd799ffc65f10e91d61b7c1f9e67a
* | Updated from global requirements1.11.0OpenStack Proposal Bot2016-06-211-1/+1
| | | | | | | | Change-Id: I9c467fc429143a81948988201940fcab69965008
* | Imported Translations from Zanata1.10.0OpenStack Proposal Bot2016-06-111-4/+13
| | | | | | | | | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: Ic28384fe1b8d981974ef6633c0a08c089fa45f95
* | Merge "Improve policy sample generation testing"Jenkins2016-06-111-24/+43
|\ \
| * | Improve policy sample generation testingAndrew Laski2016-06-081-24/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests for policy sample generation were replacing stevedore.named.NamedExtensionManager with a mock. This allows tests to form a mock with a different api than NamedExtensionManager and run code against that, which may pass the test and then fail when a real NamedExtensionManager is used. Instead a NamedExtensionManager.make_test_instance() should be returned which enforces the same api as NamedExtensionManager and would cause a test failure if used improperly. Change-Id: I6db1b92fd90956f727a6422524623aee73f8c416
* | | Add helper scripts for generating policy infoAndrew Laski2016-06-084-3/+288
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds two helper scripts that consuming projects can use to get information that helps deployers. The oslopolicy-policy-generator script looks at an entry_point for a configured policy.Enforcer and outputs a yaml formatted policy file for that configuration. This is a merge of registered rules and configured rules. The oslopolicy_list_redundant script looks at an entry_point for a configured policy.Enforcer and outputs a yaml formatted policy file with a list of policies where the registered default matches the project configuration. These are policies that can be removed from the configuration file(s) without affecting policy. Change-Id: Ibe4e6c9288768bcc8f532e384524580c57e58275 Implements: bp policy-sample-generation
* | Add sample file generation script and helper methods1.9.0Andrew Laski2016-06-064-2/+313
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a console script to oslo.policy that will output a sample policy file in yaml format. It works by looking at the configured namespace(s) under an 'oslo.policy.policies' entry point. A method, or methods, should be provided which return a list of oslo_policy.policy.RuleDefault objects. To use this script add an entry to setup.cfg in a project with something like: oslo.policy.policies = nova.api = nova.api.opts:list_policies list_policies should be a method which returns a list of oslo_policy.policy.RuleDefault objects. Then run it like: oslopolicy-sample-generator --namespace nova.api --output-file can also be specified, or those options can be configured in a file which can be specified with --config-file. Change-Id: If25d48313b91a6610119220e13f635c6e28b2a59 Partially-Implements: bp policy-sample-generation
* | Add equality operator to policy.RuleDefaultAndrew Laski2016-06-062-0/+74
| | | | | | | | | | | | | | | | There are occasions when comparing two RuleDefault objects is needed. Rather than embedding the logic at the comparison site it's preferable to let the object know how to compare itself to another. Change-Id: I2eae5665fdecd6638e84f577b506314f7bc03fd3
* | Imported Translations from ZanataOpenStack Proposal Bot2016-06-045-82/+82
| | | | | | | | | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: I497b49d36eabca37ce64c57dfc77a6731c3b48a5
* | Updated from global requirementsOpenStack Proposal Bot2016-06-031-1/+1
| | | | | | | | Change-Id: Ia206c725686347c3ce63cfe91e644296fc3813eb
* | Fix typo: 'olso' to 'oslo'Edan David2016-06-021-1/+1
| | | | | | | | Change-Id: I58d28adf06e778307370fe580a1449659aedecc2
* | Updated from global requirementsOpenStack Proposal Bot2016-06-011-1/+1
|/ | | | Change-Id: Id3d3d8966f256009c33636b9169e0f286776d178
* Updated from global requirementsOpenStack Proposal Bot2016-05-311-1/+1
| | | | Change-Id: I93d7566f51b01576d70c3eba0434c298166f2846
* Merge "Add reno for release notes management"Jenkins2016-05-2310-0/+315
|\
| * Add reno for release notes managementKirill Bespalov2016-05-2010-0/+315
| | | | | | | | | | | | | | An initial patch to add reno and create a base directory for release notes Change-Id: If7aeb47ca244cfe03a34b8b8a80f0075de5f4b02
* | Merge "Add policy registration and authorize method"Jenkins2016-05-193-29/+337
|\ \ | |/ |/|
| * Add policy registration and authorize methodAndrew Laski2016-05-193-29/+337
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A new RuleDefault class has been added which can be used to register policies that will be used by a consumer of oslo.policy. These policies are merged with those defined in policy files, with the file definitions overriding the defaults Registering a policy with the same name twice is considered an error and will raise a DuplicateRuleDefaultError exception. To facilitate projects wishing to ensure that all policies are registered before use an authorize method has been added which errors when checking an unregistered policy. If the policy has been registered then the enforce method is called in the normal manner. Change-Id: I3b6423aeed8ae80e8bf73dbda0f63ef379ccef43 Implements: bp policy-in-code
* | Updated from global requirementsOpenStack Proposal Bot2016-05-171-1/+1
| | | | | | | | Change-Id: Iddbee6964b25bbd03ff4f0a51eb6f2c1e04bf699
* | doc: Fix wrong import statement in usageChangBo Guo(gcb)2016-05-171-2/+2
|/ | | | | | We should import cfg from oslo_config, not keystone. Change-Id: I79e3dc573727400d1f6f6474c221726796a6ece2
* Trivial: ignore openstack/common in flake8 exclude list1.8.0ChangBo Guo(gcb)2016-05-111-1/+1
| | | | | | | The directory openstack/common doesn't exist any more. So remove it from flake8 exclude list. Change-Id: Ib6b1714ab24aae952081e519609e5e99cf4babc2
* Updated from global requirements1.7.0OpenStack Proposal Bot2016-04-281-1/+1
| | | | Change-Id: I110883319216fefb1fc8cb8ae663eb946d78d062
* Imported Translations from ZanataOpenStack Proposal Bot2016-04-2530-96/+98
| | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: I9b3bf7c6d8088333b4bf09b46f87625792296c2a
* Merge "Deprecate load_json() in favor of load()"Jenkins2016-04-244-13/+38
|\
| * Deprecate load_json() in favor of load()Brant Knudson2016-02-224-13/+38
| | | | | | | | | | | | | | | | | | The Rules.load_json function now supports loading YAML and is not limited to JSON. As such, the name is changed to load(). The old name remains but is deprecated. bp policy-yaml Change-Id: I8c71d1a566779f1641106a996ebbc9551e2f05e3
* | Merge "Support policy file in YAML"Jenkins2016-04-243-5/+44
|\ \ | |/
| * Support policy file in YAMLBrant Knudson2016-02-223-5/+44
| | | | | | | | | | | | | | | | YAML provides the advantage of being able to add comments. bp policy-yaml Change-Id: Ic6236665f2d55b24a56a99120ac57fc2b18e32eb
* | Imported Translations from ZanataOpenStack Proposal Bot2016-04-1630-0/+911
| | | | | | | | | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: I9ec0512be11854e238eddda0399ae73cc2d60d4a
* | Updated from global requirementsOpenStack Proposal Bot2016-04-071-1/+1
| | | | | | | | Change-Id: I8486efae93766132cc0d9e12795422bd4befddf5
* | Updated from global requirementsOpenStack Proposal Bot2016-02-261-1/+1
|/ | | | Change-Id: Idf80333c78658a6708ba7069d25ae3424965e887
* Updated from global requirements1.5.0OpenStack Proposal Bot2016-02-201-1/+1
| | | | Change-Id: I40e90130045e9601028807fd3bc029ac7ad9a530
* Update translation setup1.4.0Andreas Jaeger2016-01-297-144/+7
| | | | | | | | | | | | | | | | | | | | Follow new infra setup for translations, see spec http://specs.openstack.org/openstack-infra/infra-specs/specs/translation_setup.html for full details. This basically renames oslo.policy/locale/oslo.policy.pot to oslo_policy/locale/oslo_policy.pot. For this we need to update setup.cfg. Update also domain name in i18n.py. The project has no translations currently, let's remove the outdated pot file, the updated scripts work without them. So, we can just delete the file and once there are translations, an updated pot file together with translations can be imported automatically. Change-Id: I9ca723834b1634a9ed965a92724d72fefc15e0d2