From ee29bc7eb31d80fd24eaa5667ccf2dad386ffdca Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Tue, 17 Dec 2019 15:47:58 +0100 Subject: [PATCH] Quick deployment of charms: added apt_mirror and enable_os_upgrade model config options Change-Id: I3d13b835744d857149f984cdff5e13e7f4602252 Signed-off-by: garciadeblas --- Dockerfile.local | 12 +++++++----- osm_lcm/ns.py | 7 +++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Dockerfile.local b/Dockerfile.local index 20438797..9b25519f 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -69,11 +69,13 @@ ENV OSMLCM_RO_TENANT osm # VCA ENV OSMLCM_VCA_HOST vca -ENV OSMLCM_VCA_PORT: 17070 -ENV OSMLCM_VCA_USER: admin -ENV OSMLCM_VCA_SECRET: secret -# ENV OSMLCM_VCA_PUBKEY: pubkey -# ENV OSMLCM_VCA_CACERT: cacert +ENV OSMLCM_VCA_PORT 17070 +ENV OSMLCM_VCA_USER admin +ENV OSMLCM_VCA_SECRET secret +# ENV OSMLCM_VCA_ENABLEOSUPGRADE false +# ENV OSMLCM_VCA_APTMIRROR http://archive.ubuntu.com/ubuntu/ +# ENV OSMLCM_VCA_PUBKEY pubkey +# ENV OSMLCM_VCA_CACERT cacert # database ENV OSMLCM_DATABASE_DRIVER mongo diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index 87eaecd5..18bd6f95 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -104,6 +104,13 @@ class NsLcm(LcmBase): self.vca_config['ca_cert'] = self.vca_config['cacert'] if 'apiproxy' in self.vca_config: self.vca_config['api_proxy'] = self.vca_config['apiproxy'] + if 'enableosupgrade' in self.vca_config: + if self.vca_config['enableosupgrade'].lower() == 'false': + self.vca_config['enable_os_upgrade'] = False + elif self.vca_config['enableosupgrade'].lower() == 'true': + self.vca_config['enable_os_upgrade'] = True + if 'aptmirror' in self.vca_config: + self.vca_config['apt_mirror'] = self.vca_config['aptmirror'] # create N2VC connector self.n2vc = N2VCJujuConnector( -- 2.25.1