From 9b4d7d063f7c7595ec9aed73a3db20969c57aa33 Mon Sep 17 00:00:00 2001 From: "ChangBo Guo(gcb)" Date: Thu, 22 Sep 2016 17:07:18 +0800 Subject: [PATCH] Doc: declare YAML/JSON support oslo.policy can support both of YAML and JSON until now, but some docstring and config option's help text are inconsistent. This commit fixes them. Change-Id: I23cc60c84be97a3aec158f81ac21ac0ba3779abd --- oslo_policy/opts.py | 4 ++-- oslo_policy/policy.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/oslo_policy/opts.py b/oslo_policy/opts.py index d247e8a1..2f119687 100644 --- a/oslo_policy/opts.py +++ b/oslo_policy/opts.py @@ -27,7 +27,7 @@ _option_group = 'oslo_policy' _options = [ cfg.StrOpt('policy_file', default='policy.json', - help=_('The JSON file that defines policies.'), + help=_('The file that defines policies.'), deprecated_group='DEFAULT'), cfg.StrOpt('policy_default_rule', default='default', @@ -84,7 +84,7 @@ def set_defaults(conf, policy_file=None): :param conf: Configuration object, managed by the caller. :type conf: oslo.config.cfg.ConfigOpts - :param policy_file: The base filename for the JSON file that + :param policy_file: The base filename for the file that defines policies. :type policy_file: unicode """ diff --git a/oslo_policy/policy.py b/oslo_policy/policy.py index 342bf01e..9337280f 100644 --- a/oslo_policy/policy.py +++ b/oslo_policy/policy.py @@ -584,7 +584,7 @@ class Enforcer(object): LOG.debug('Reloaded policy file: %(path)s', {'path': path}) def _get_policy_path(self, path): - """Locate the policy JSON data file/path. + """Locate the policy YAML/JSON data file/path. :param path: It's value can be a full path or related path. When full path specified, this function just returns the full