# Loop through relations
for cfg in configs:
if 'juju' in cfg:
+ juju = cfg['juju']
if 'relation' in juju:
for rel in juju['relation']:
try:
if all(k in machine_spec for k in ['host', 'user']):
# Enlist an existing machine as a Juju unit
machine = await model.add_machine(spec='ssh:{}@{}:{}'.format(
- machine_spec['user'],
- machine_spec['host'],
+ machine_spec['username'],
+ machine_spec['hostname'],
self.GetPrivateKeyPath(),
))
to = machine.id