From ce31bc3e331c7050d1d74e9b0821dbf99c12fc96 Mon Sep 17 00:00:00 2001 From: Adam Israel Date: Wed, 22 May 2019 16:30:25 -0400 Subject: [PATCH] Align machine_spec with pydoc Align the name of the machine_spec keys as defined in the pydoc Change-Id: I3e9c3609ea81b53b77cefcda63bbb4a8b0c6510c Signed-off-by: Adam Israel --- n2vc/vnf.py | 4 ++-- tests/base.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/n2vc/vnf.py b/n2vc/vnf.py index a68e657..04ad301 100644 --- a/n2vc/vnf.py +++ b/n2vc/vnf.py @@ -456,8 +456,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 diff --git a/tests/base.py b/tests/base.py index 912eab9..663e89a 100644 --- a/tests/base.py +++ b/tests/base.py @@ -740,8 +740,8 @@ class TestN2VC(object): ) machine_spec = { - 'host': hostname, - 'user': 'ubuntu', + 'hostname': hostname, + 'username': 'ubuntu', } await self.n2vc.DeployCharms( -- 2.17.1