<div dir="ltr"><div><div>Hi Marco,<br><br></div>I have actually run in to this problem before you have my +1 for this!<br><br></div>- Matt<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 10, 2014 at 8:49 AM, Marco Ceppi <span dir="ltr"><<a href="mailto:marco.ceppi@canonical.com" target="_blank">marco.ceppi@canonical.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>Currently, one of the proof requirements within charm-tools is that all configuration options must have a default key with a matching type value for that key.</div>
<div><br></div><div>
Most notably, some charms omit the default key and use strict None/NULL checking within the charm.</div><div><br></div><div>In order to statisfy this proof rule, which is currently a WARNING level (meaning it does not interrupt juju operation, but can affect tools within the ecosystem), we've taken to adding `default: ""` to these missing keys. The reason being we had no way previously to set a None/NULL type value via the command line.</div>

<div><br></div><div>Given that we now have the ability to do so via `juju unset` I'd like to propose we drop the requirement of having strict type checking and allow None/NULL as a valid configuration default for both string and int types (but not bool). In doing so we will still require you have a default: key present but it set to an appropriate value of either a value of the type the configuration is OR None/NULL[0]</div>

<div><br></div><div>A WARNING will still be raised if no default key is present or if the default key is not the type the configuration option expects (and in the case of string or int, also not NULL/None)</div><div><br>
</div>
<div>Looking for some +1's or feedback on this policy change, hoping to get it released in the next version of charm-tools.</div><div><br></div><div>Thanks,<br>Marco Ceppi</div><div><br></div><div>[0]: <a href="http://yaml.org/type/null.html" target="_blank">http://yaml.org/type/null.html</a></div>

</div>
<br>--<br>
Juju mailing list<br>
<a href="mailto:Juju@lists.ubuntu.com">Juju@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">   - Matt</div>
</div>