From: garciadeblas Date: Tue, 17 Dec 2019 14:47:58 +0000 (+0100) Subject: Quick deployment of charms: added apt_mirror and enable_os_upgrade model config options X-Git-Tag: v7.0.1rc1~7 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=ee29bc7eb31d80fd24eaa5667ccf2dad386ffdca;p=osm%2FLCM.git Quick deployment of charms: added apt_mirror and enable_os_upgrade model config options Change-Id: I3d13b835744d857149f984cdff5e13e7f4602252 Signed-off-by: garciadeblas --- diff --git a/Dockerfile.local b/Dockerfile.local index 2043879..9b25519 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 87eaecd..18bd6f9 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(