Recent updates to layer-basic include new conventions for dealing with layers. First, now that layer-basic pulls in layer-options, let's do like the README says:
foo_opts = layer.options.get('foo') # returns a dict of all the options
my_opt_1 = layer.options.get('foo', 'my_opt_1') # returns just that option
Next, the layer lib import convention is to use from charms import layer followed by layer.foo to make the namespace of functions stand out a bit better. The old style still works, but we may as well future-proof before some little data spills out.
Recent updates to layer-basic include new conventions for dealing with layers. First, now that layer-basic pulls in layer-options, let's do like the README says:
https://github.com/juju-solutions/layer-options
Next, the layer lib import convention is to use
from charms import layer
followed bylayer.foo
to make the namespace of functions stand out a bit better. The old style still works, but we may as well future-proof before some little data spills out.