Quick deployment of charms: added apt_mirror and enable_os_upgrade model config options 17/8417/5
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Tue, 17 Dec 2019 14:47:58 +0000 (15:47 +0100)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Thu, 19 Dec 2019 15:57:33 +0000 (16:57 +0100)
Change-Id: I3d13b835744d857149f984cdff5e13e7f4602252
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
Dockerfile.local
osm_lcm/ns.py

index 2043879..9b25519 100644 (file)
@@ -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
index 87eaecd..18bd6f9 100644 (file)
@@ -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(