juju-solutions / layer-apache-bigtop-base

Apache License 2.0
1 stars 5 forks source link

use current conventions from layer-basic #71

Closed kwmonroe closed 6 years ago

kwmonroe commented 6 years ago

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

    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.