From 25ec7730065edeb0a8ade17a426fc9d6b21e6c30 Mon Sep 17 00:00:00 2001 From: tierno Date: Wed, 24 Oct 2018 18:47:11 +0200 Subject: [PATCH] feature 1429 add n2vc key to all mgmt vdus Change-Id: I8b469e05f9d6be34f9c3067fcb7de0d6d3dca599 Signed-off-by: tierno --- osm_lcm/ns.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index f9244e5..d54187d 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -216,6 +216,9 @@ class NsLcm(LcmBase): "vnfs": {}, "networks": {}, } + if ns_params.get("vduImage"): + RO_ns_params["vduImage"] = ns_params["vduImage"] + if ns_params.get("ssh-authorized-key"): RO_ns_params["cloud-config"] = {"key-pairs": ns_params["ssh-authorized-key"]} if ns_params.get("vnf"): @@ -544,6 +547,11 @@ class NsLcm(LcmBase): step = db_nsr_update["detailed-status"] = "Checking instantiation parameters" RO_ns_params = self.ns_params_2_RO(ns_params, nsd, needed_vnfd) + + n2vc_key = await self.n2vc.GetPublicKey() + RO_ns_params["mgmt_keys"] = [n2vc_key] + # TODO feature 1429. Add this option only to VMs with configuration and no password + step = db_nsr_update["detailed-status"] = "Creating ns at RO" desc = await RO.create("ns", descriptor=RO_ns_params, name=db_nsr["name"], -- 2.25.1