<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 23, 2013 at 6:55 AM, Emilien Macchi <span dir="ltr"><<a href="mailto:emilien.macchi@enovance.com" target="_blank">emilien.macchi@enovance.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>Also for your information,<br>
<br>
I created a bug : <a href="https://bugs.launchpad.net/neutron/+bug/1199963" target="_blank">https://bugs.launchpad.net/neutron/+bug/1199963</a><br>
and a first patchset for generating the new configuration file
with Oslo config scripts :<br>
<a href="https://review.openstack.org/#/c/36546/" target="_blank">https://review.openstack.org/#/c/36546/</a><br>
<br>
<pre cols="72">Emilien Macchi
----------------------------------------------------
# OpenStack Engineer
// eNovance Inc. <a href="http://enovance.com" target="_blank">http://enovance.com</a>
// ✉ <a href="mailto:emilien@enovance.com" target="_blank">emilien@enovance.com</a> ☎ <a href="tel:%2B33%20%280%291%2049%2070%2099%2080" value="+33149709980" target="_blank">+33 (0)1 49 70 99 80</a>
// 10 rue de la Victoire 75009 Paris</pre><div><div class="h5">
On 07/22/2013 06:34 PM, Julien Danjou wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div class="h5">
<pre>Hi there,
I've been working on the changes that would need to be done to make the
default config generator work for Neutron.
However, the current default config generator doesn't support the
possibility to generate different configuration files (e.g. one per
service/plugin). I can imagine two options:
a. move every options in oslo.config.cfg.CONF, moving the plugins into
their own section rather than in their own file, register all options
at module-level, avoiding duplicate options.
b. enhance config.generator to generate a config file from a particular
object (not always olso.config.cfg.CONF like it's done currently).
That means Neutron should evolve to provide a global CONF object per
plugin at least.</pre></div></div></blockquote></div></blockquote><div><br></div><div>Actually the current generator script looks for an instance or a list of instances of classes which are inherited from cfg.Opt. For example, if module a.py has<br>
<br></div><div>_opt = cfg.StrOpt(a)<br></div><div>_opts = [<br></div><div> cfg.IntOpt(b),<br></div><div> cfg.BoolOpt(c),<br>]<br><br></div><div>Then the generator.py catches _opt and _opts and prints the config info onto the config file.<br>
</div><div>The group info of a particular option is searched in oslo.config.cfg.CONF.<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF">
<blockquote type="cite"><div><div class="h5"><pre>
Option a. is how all other OpenStack projects¹ are working so far.
Option b. requires a bit more work on both side.
Is there any particular way you guys see things?
</pre></div></div></blockquote></div></blockquote><div>IMO, we shouldn't change how Neutron uses its config files due to backwards compatibility issues. I was thinking of each project having a openstack-config.conf file (like openstack-common.conf) which contains the mapping of options to config file names.<br>
</div><div>Then the generator.py will load the openstack-config.conf file and generate config files accordingly. An exception will be raised If an option is neglected in openstack-config.conf<br><br></div><div>But whatever path we take, it would be hard to land a perfect solution within Havana. So I suggest we first stick with neutron.conf.sample for now.<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF"><blockquote type="cite"><div><div class="h5"><pre>
¹ nova, ceilometer and heat at least for now
</pre>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
OpenStack-dev mailing list
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
</blockquote>
<br>
</div>
<br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><div><b>Intel SSG/STOD/DCST/CIT</b></div>
<div>880 Zixing Road, Zizhu Science Park, Minhang District, 200241, Shanghai,
China<br></div>
<div>+862161166500</div></div>
</div></div>