Merge "Complete Feature 6297"
[osm/N2VC.git] / n2vc / vnf.py
index a68e657..11ce3c8 100644 (file)
@@ -339,6 +339,7 @@ class N2VC:
         # Loop through relations
         for cfg in configs:
             if 'juju' in cfg:
+                juju = cfg['juju']
                 if 'relation' in juju:
                     for rel in juju['relation']:
                         try:
@@ -456,8 +457,8 @@ class N2VC:
             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