From af6812a8ae52cb5b2235c2266779e78784c1f697 Mon Sep 17 00:00:00 2001 From: David Garcia Date: Mon, 25 May 2020 16:23:20 +0200 Subject: [PATCH 1/1] Get series from machine Currently the series when deploying a charm is hardcoded to xenial, when it should be retrieved from the machine. Change-Id: I2784290dde803e276a77775ee57879897b1c523c Signed-off-by: David Garcia --- n2vc/n2vc_juju_conn.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/n2vc/n2vc_juju_conn.py b/n2vc/n2vc_juju_conn.py index 856f79f..0ac8b08 100644 --- a/n2vc/n2vc_juju_conn.py +++ b/n2vc/n2vc_juju_conn.py @@ -1113,14 +1113,14 @@ class N2VCJujuConnector(N2VCConnector): ) ) self.log.debug("charm: {}".format(charm_path)) - series = "xenial" + machine = model.machines[machine_id] # series = None application = await model.deploy( entity_url=charm_path, application_name=application_name, channel="stable", num_units=1, - series=series, + series=machine.series, to=machine_id, config=config, ) -- 2.17.1