oslo.policy.enforcer entry point is needed for various scripts available in oslo.policy library to function,
for example oslopolicy-policy-generator to list actual policies in effect (defaults in code + overrides from explicit policy files).
Currently these scripts do not work with Gnocchi:
$ oslopolicy-policy-generator --namespace gnocchi
WARNING:stevedore.named:Could not load gnocchi
Traceback (most recent call last):
File "/var/lib/openstack/bin/oslopolicy-policy-generator", line 8, in <module>
sys.exit(generate_policy())
File "/var/lib/openstack/lib/python3.8/site-packages/oslo_policy/generator.py", line 533, in generate_policy
_generate_policy(conf.namespace, conf.output_file)
File "/var/lib/openstack/lib/python3.8/site-packages/oslo_policy/generator.py", line 327, in _generate_policy
enforcer = _get_enforcer(namespace)
File "/var/lib/openstack/lib/python3.8/site-packages/oslo_policy/generator.py", line 104, in _get_enforcer
raise KeyError('Namespace "%s" not found.' % namespace)
KeyError: 'Namespace "gnocchi" not found.'
oslo.policy.enforcer
entry point is needed for various scripts available inoslo.policy
library to function, for exampleoslopolicy-policy-generator
to list actual policies in effect (defaults in code + overrides from explicit policy files).Currently these scripts do not work with Gnocchi:
https://docs.openstack.org/oslo.policy/latest/cli/index.html