From 2b611ddf79e7e2b1c3d6f53b0e966da8a4e6a219 Mon Sep 17 00:00:00 2001 From: tierno Date: Fri, 11 Jan 2019 10:30:57 +0000 Subject: [PATCH] fix issue with cloud-init jinja2. Add package to Dockerfile local Change-Id: Ifba006343baec917b8778280abb3ba26ceafeabd Signed-off-by: tierno --- Dockerfile.local | 2 +- osm_lcm/ns.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.local b/Dockerfile.local index 64036b8..07c0f2e 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -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 diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index ec0fe0e..2a7b40e 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -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 -- 2.25.1