placement/etc/placement
Matt Riedemann 9ece3d35ab Deprecate [placement]/policy_file config option
The [placement]/policy_file option was necessary when placement
was in nova since nova uses the standard [oslo_policy]/policy_file
option for defining custom policy rules. Now that placement is
extracted (+1 release) we can deprecate the placement-specific
option and use the standard [oslo_policy]/policy_file option as well.

The tricky thing with this is both options define a default value
but those values are different, and neither need to exist or can
exist but be empty and we'll use policy defaults from code. So some
logic is necessary for detecting which option we should pass to the
oslo.policy Enforcer object. We prefer to use [oslo_policy]/policy_file
if it exists but will fallback to use [placement]/policy_file for
backward compatibility. We also check for a couple of edge cases to
try and detect misconfiguration and usage of the deprecated option.

The config generation docs are updated to include the [oslo_policy]
options as well as registering the options from that library for
runtime code.

Change-Id: Ifb14d2c14b17fc5bcdf7d124744ac2e1b58fd063
Story: #2005171
Task: #29913
2019-09-12 18:18:49 -04:00
..
config-generator.conf Deprecate [placement]/policy_file config option 2019-09-12 18:18:49 -04:00
policy-generator.conf Fix genpolicy tox job 2018-10-22 15:23:54 +01:00
README-policy.yaml.txt Fix genpolicy tox job 2018-10-22 15:23:54 +01:00