Merge "RBAC test for unrescue server"
diff --git a/patrole_tempest_plugin/config.py b/patrole_tempest_plugin/config.py
index 200da85..d309d60 100644
--- a/patrole_tempest_plugin/config.py
+++ b/patrole_tempest_plugin/config.py
@@ -46,46 +46,6 @@
ordered by precedence, with high-priority paths before low-priority paths. The
first path that is found to contain the service's policy file will be used.
"""),
- cfg.StrOpt('cinder_policy_file',
- default='/etc/cinder/policy.json',
- help="""Location of the Cinder policy file. Assumed to be on
-the same host as Patrole.""",
- deprecated_group='rbac',
- deprecated_for_removal=True,
- deprecated_reason="It is better to use `custom_policy_files` "
- "which supports any OpenStack service."),
- cfg.StrOpt('glance_policy_file',
- default='/etc/glance/policy.json',
- help="""Location of the Glance policy file. Assumed to be on
-the same host as Patrole.""",
- deprecated_group='rbac',
- deprecated_for_removal=True,
- deprecated_reason="It is better to use `custom_policy_files` "
- "which supports any OpenStack service."),
- cfg.StrOpt('keystone_policy_file',
- default='/etc/keystone/policy.json',
- help="""Location of the custom Keystone policy file. Assumed to
-be on the same host as Patrole.""",
- deprecated_group='rbac',
- deprecated_for_removal=True,
- deprecated_reason="It is better to use `custom_policy_files` "
- "which supports any OpenStack service."),
- cfg.StrOpt('neutron_policy_file',
- default='/etc/neutron/policy.json',
- help="""Location of the Neutron policy file. Assumed to be on
-the same host as Patrole.""",
- deprecated_group='rbac',
- deprecated_for_removal=True,
- deprecated_reason="It is better to use `custom_policy_files` "
- "which supports any OpenStack service."),
- cfg.StrOpt('nova_policy_file',
- default='/etc/nova/policy.json',
- help="""Location of the custom Nova policy file. Assumed to be
-on the same host as Patrole.""",
- deprecated_group='rbac',
- deprecated_for_removal=True,
- deprecated_reason="It is better to use `custom_policy_files` "
- "which supports any OpenStack service."),
cfg.BoolOpt('test_custom_requirements',
default=False,
deprecated_group='rbac',
diff --git a/patrole_tempest_plugin/policy_authority.py b/patrole_tempest_plugin/policy_authority.py
index 0a1aa13..3f4236b 100644
--- a/patrole_tempest_plugin/policy_authority.py
+++ b/patrole_tempest_plugin/policy_authority.py
@@ -107,12 +107,10 @@
# Prioritize dynamically searching for policy files over relying on
# deprecated service-specific policy file locations.
+ self.path = None
if CONF.patrole.custom_policy_files:
self.discover_policy_files()
self.path = self.policy_files.get(service)
- else:
- self.path = getattr(CONF.patrole, '%s_policy_file' % str(service),
- None)
self.rules = policy.Rules.load(self._get_policy_data(service),
'default')
diff --git a/releasenotes/notes/remove-named-policy-files-134f3045502e9ce9.yaml b/releasenotes/notes/remove-named-policy-files-134f3045502e9ce9.yaml
new file mode 100644
index 0000000..00245d7
--- /dev/null
+++ b/releasenotes/notes/remove-named-policy-files-134f3045502e9ce9.yaml
@@ -0,0 +1,13 @@
+---
+deprecations:
+ - |
+ Removed the following deprecated Patrole configuration options:
+
+ * cinder_policy_file
+ * glance_policy_file
+ * keystone_policy_file
+ * neutron_policy_file
+ * nova_policy_file
+
+ To specify the location of a custom policy file, use
+ ``[patrole] custom_policy_files`` instead.