From: tierno Date: Wed, 24 Oct 2018 16:47:11 +0000 (+0200) Subject: feature 1429 add n2vc key to all mgmt vdus X-Git-Tag: v5.0.0~17 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=25ec7730065edeb0a8ade17a426fc9d6b21e6c30;p=osm%2FLCM.git feature 1429 add n2vc key to all mgmt vdus Change-Id: I8b469e05f9d6be34f9c3067fcb7de0d6d3dca599 Signed-off-by: tierno --- diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index f9244e56..d54187dc 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"],