3
from charmhelpers.core import hookenv
9
settings = hookenv.relation_get()
10
port = settings.get('port')
11
hostname = settings.get('hostname')
12
if port is not None and hostname is not None:
13
url = '{}:{}'.format(hostname, port)
14
definitions.DEFAULT_CONFIG.set(
15
definitions.CONFIG_SECTION,
16
'jujugui.jem_url', url)
17
definitions.DEFAULT_CONFIG.set(
18
definitions.CONFIG_SECTION,
19
'jujugui.sandbox', False)
20
with open(definitions.INI_PATH, 'w') as ini_file:
21
definitions.DEFAULT_CONFIG.write(ini_file)
23
if __name__ == '__main__':
b'\\ No newline at end of file'