~simpoir/landscape-client-charm/charm_push_target

« back to all changes in this revision

Viewing changes to hooks/common.py

  • Committer: 🤖 Landscape Builder
  • Author(s): Adam Collard
  • Date: 2019-04-05 14:05:56 UTC
  • mfrom: (67.1.4 install_sources_keys)
  • Revision ID: _landscape_builder-20190405140556-02pk7xjksbmwjtrm
Add install_sources and install_keys support to landscape-client charm

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    from landscape.sysvconfig import SysVConfig
24
24
 
25
25
 
 
26
CHARM_ONLY_CONFIG = {'install_sources', 'install_keys'}
 
27
 
 
28
 
26
29
class JujuBroker(object):
27
30
    """Class responsible for communicating with Juju.
28
31
 
100
103
        """
101
104
        self.config.reload()
102
105
        for key, value in service_config.items():
103
 
            if key != "origin":
 
106
            if key not in CHARM_ONLY_CONFIG:
104
107
                setattr(self.config, key.replace("-", "_"), value)
105
108
        self.config.write()
106
109
        is_configured_enough = all([