Rules engine to enforce access control policy
Go to file
whoami-rajat 9673a74b60 Only pass exclude-deprecated when True
The '--exclude-deprecated' parameter should only be passed to
oslo.config to parse when it is True.
The final generated sphinx syntax is[1] where [--exclude-deprecated]
doesn't require True/False value and only should be passed when True.

The change introducing this[2] causes parsing issue in oslo.config[3]
while checking <bool>.startswith (we pass True/False value) and even
after that while calling argparse[4] with following error[5].

[1] usage: sphinx-build [-h] [--config-dir DIR] [--config-file PATH] [--exclude-deprecated] [--format FORMAT] [--namespace NAMESPACE]
                        [--noexclude-deprecated] [--output-file OUTPUT_FILE]
[2] https://review.opendev.org/c/openstack/oslo.policy/+/830514
[3] https://opendev.org/openstack/oslo.config/src/branch/master/oslo_config/cfg.py#L2937
[4] https://opendev.org/openstack/oslo.config/src/branch/master/oslo_config/cfg.py#L2960
[5] > /usr/lib/python3.8/argparse.py(1781)parse_args()
-> if argv:
(Pdb)
> /usr/lib/python3.8/argparse.py(1782)parse_args()
-> msg = _('unrecognized arguments: %s')
(Pdb)
> /usr/lib/python3.8/argparse.py(1783)parse_args()
-> self.error(msg % ' '.join(argv))
(Pdb)
TypeError: sequence item 0: expected str instance, bool found
> /usr/lib/python3.8/argparse.py(1783)parse_args()
-> self.error(msg % ' '.join(argv))
Handler <function generate_sample at 0x7fc0d6697d30> for event 'builder-inited' threw an exception (exception: sequence item 0: expected str instance, bool found)

Closes-Bug: #1970725
Change-Id: I95745b8d1cbdb6a7cf442d431a998b7e3ff600e4
2022-04-28 15:27:31 +05:30
doc make deprecated rule examples explicit 2022-02-22 11:20:49 -08:00
oslo_policy Only pass exclude-deprecated when True 2022-04-28 15:27:31 +05:30
releasenotes Only pass exclude-deprecated when True 2022-04-28 15:27:31 +05:30
sample_data Modernize policy checker 2019-10-10 08:38:14 -07:00
.coveragerc Fix coverage configuration and execution 2015-10-01 15:39:58 +00:00
.gitignore Move doc related modules to doc/requirements.txt 2019-07-06 18:38:54 +08:00
.gitreview OpenDev Migration Patch 2019-04-19 19:29:48 +00:00
.mailmap exported from oslo-incubator by graduate.sh 2014-12-09 14:40:01 -03:00
.pre-commit-config.yaml Move flake8 as a pre-commit local target. 2021-04-07 16:33:45 +02:00
.stestr.conf Fix requirements and convert to stestr 2018-07-02 17:30:07 +00:00
.zuul.yaml Add Python3 zed unit tests 2022-03-04 17:19:06 +00:00
CONTRIBUTING.rst Fix grammar issues 2020-11-01 18:08:33 -08:00
HACKING.rst Update URLs in documents according to document migration 2017-07-12 23:01:31 +08:00
LICENSE exported from oslo-incubator by graduate.sh 2014-12-09 14:40:01 -03:00
README.rst Replace git.openstack.org URLs with opendev.org URLs 2019-05-14 13:14:16 +00:00
requirements.txt Add policy file selection logic when default changing to yaml 2020-11-19 11:30:23 -06:00
setup.cfg Update python testing classifier 2021-12-21 17:47:24 +08:00
setup.py remove outdated header 2020-02-11 18:54:49 +01:00
test-requirements.txt pre-commit: Resolve dependency conflicts 2021-01-18 15:48:28 +00:00
tox.ini Changed minversion in tox to 3.18.0 2021-06-07 16:41:34 +08:00

README.rst

Team and repository tags

image

oslo.policy

Latest Version

The Oslo Policy library provides support for RBAC policy enforcement across all OpenStack services.