diff --git a/etc/proton/proton.conf.sample b/etc/proton/proton.conf.sample index fd51ef4..f5dc20c 100644 --- a/etc/proton/proton.conf.sample +++ b/etc/proton/proton.conf.sample @@ -322,6 +322,21 @@ state_path = /var/lib/proton #auth_section = +[oslo_policy] + +# +# From gluon.conf +# + +# File path to the policy_file. Gluon models define policies in their +# corresponding yaml files and in most cases users should manage policies e.g. +# create, update, and delete policies within the yaml files thus making the +# yaml files as the single reference for model definitions. This file is +# provided as an avaiable option for users to add new or modify existing +# policies. (string value) +#policy_file = /etc/proton/policy.json + + [path] # diff --git a/gluon/conf/config.py b/gluon/conf/config.py index 127b161..4dd1fac 100644 --- a/gluon/conf/config.py +++ b/gluon/conf/config.py @@ -59,14 +59,29 @@ SQL_OPTS = [ help='MySQL engine to use.'), ] +POLICY_OPTS = [ + cfg.StrOpt('policy_file', + default='/etc/proton/policy.json', + help=("File path to the policy_file. Gluon models define " + "policies in their corresponding yaml files and in most " + "cases users should manage policies e.g. create, update, " + "and delete policies within the yaml files thus making " + "the yaml files as the single reference for model " + "definitions. This file is provided as an avaiable " + "option for users to add new or modify existing policies." + )), +] + def register_opts(conf): conf.register_opts(API_OPTS, 'api') conf.register_opts(PATH_OPTS) conf.register_opts(SQL_OPTS, 'database') + conf.register_opts(POLICY_OPTS) def list_opts(): return {'api': API_OPTS, 'path': PATH_OPTS, - 'database': SQL_OPTS} + 'database': SQL_OPTS, + 'oslo_policy': POLICY_OPTS}