updating a config value from within a hook

Gustavo Niemeyer gustavo.niemeyer at canonical.com
Thu Oct 30 16:29:02 UTC 2014


It can't be done. Configuration is writable only by the administrator, and
is read-only from the charm side.

What is coming, though, is the ability for the charm to report that the
configuration is somehow incorrect, so that the admin can tell that
something is not right by being told nicely via the UI, and then take
appropriate action. That sounds better than simply resetting the value
silently, which would look something like this:

   http://youtu.be/DCMZZRTbR-Q



On Thu Oct 30 2014 at 2:16:37 PM Stein Myrseth <stein.myrseth at gmail.com>
wrote:

> I have the need to update the value of a config key from within a hook.
> 'config-set’ is non existing. Resetting it would also work. The use case is
> that a certain value can only be added once within the lifecycle of the
> charm.
> If updated from either from within the UI or cmd line, I need to set it
> back to it’s previous value (which I have stored).
>
> Any idea how this can be done ?
>
> Stein Myrseth
> Bjørkesvingen 6J
> 3408 Tranby
> mob: +47 909 62 763
> mailto:stein.myrseth at gmail.com <stein.myrseth at gmail.com>
>
> --
> Juju mailing list
> Juju at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/juju
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20141030/0cd5eb34/attachment.html>


More information about the Juju mailing list