~moon127/+junk/bind-resolver-charm

« back to all changes in this revision

Viewing changes to reactive/bind-resolver.py

  • Committer: gareth.woolridge at canonical
  • Date: 2019-09-17 16:10:11 UTC
  • Revision ID: gareth.woolridge@canonical.com-20190917161011-8vc92sya2ee080g1
Add some minimal status setting around config-changed

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 
10
10
from charmhelpers.contrib.charmsupport.nrpe import NRPE
11
11
from charmhelpers.core import sysctl, host
12
 
from charmhelpers.core.hookenv import config, open_port, related_units, relation_get, relation_ids
 
12
from charmhelpers.core.hookenv import config, open_port, related_units, relation_get, relation_ids, status_set
13
13
from charms import reactive
14
14
from charms.reactive import hook, when, when_not
15
15
from jinja2 import Template
23
23
def config_changed():
24
24
    conf = config()
25
25
 
 
26
    status_set('maintenance', 'Configuring bind')
 
27
 
26
28
    os.umask(0o007)
27
29
 
28
30
    options = Template(open("templates/named.conf.options.tmpl").read()).render(conf)
32
34
    # TODO
33
35
    #   determine when we need to restart the server, and in what manner
34
36
    #     minimize that
 
37
 
 
38
    status_set('active', '')