fix issue with cloud-init jinja2. Add package to Dockerfile local 96/7096/2
authortierno <alfonso.tiernosepulveda@telefonica.com>
Fri, 11 Jan 2019 10:30:57 +0000 (10:30 +0000)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Fri, 11 Jan 2019 10:33:56 +0000 (10:33 +0000)
Change-Id: Ifba006343baec917b8778280abb3ba26ceafeabd
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
Dockerfile.local
osm_lcm/ns.py

index 64036b8..07c0f2e 100644 (file)
@@ -19,7 +19,7 @@ FROM ubuntu:16.04
 WORKDIR /app/LCM/osm_lcm
 
 RUN apt-get update && apt-get install -y git tox python3 \
-    python3-pip python3-aiohttp \
+    python3-pip python3-aiohttp python3-jinja2 \
     && pip3 install pip==9.0.3 \
     && pip3 install -U 'PyYAML==3.*' 'aiohttp==0.20.2' flake8
 
index ec0fe0e..2a7b40e 100644 (file)
@@ -145,7 +145,7 @@ class NsLcm(LcmBase):
                                                "file, must be provided in the instantiation parameters inside the "
                                                "'additionalParamsForVnf' block".format(var, vnfd["id"], vdu["id"]))
                 template = Template(cloud_init_content)
-                cloud_init_content = template.render(additionalParams)
+                cloud_init_content = template.render(additionalParams or {})
                 vdu["cloud-init"] = cloud_init_content
 
             return vnfd_RO