From a8d111f985265bfd118568603c82ed320c1177ce Mon Sep 17 00:00:00 2001 From: Ruoyu Ying Date: Tue, 26 Feb 2019 01:30:49 +0800 Subject: [PATCH] Homing with selected VIM Support homing placement with selected candidateds through OOF, in order to fulfill the need to home a VNF to a specific VIM chose by UUI Change-Id: I94a7793d1f77cea32a414cf94c83b5a14c0f28cc Issue-ID: VFC-1255 Signed-off-by: Ruoyu Ying --- lcm/ns_vnfs/biz/create_vnfs.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lcm/ns_vnfs/biz/create_vnfs.py b/lcm/ns_vnfs/biz/create_vnfs.py index 04cb3b8b..e4773920 100644 --- a/lcm/ns_vnfs/biz/create_vnfs.py +++ b/lcm/ns_vnfs/biz/create_vnfs.py @@ -248,6 +248,21 @@ class CreateVnfs(Thread): "modelVersionId": modelVersionId } } + + if self.vim_id: + vim_info = self.vim_id.split("_") + identifiers = list() + identifiers.append(vim_info[1]) + cloudOwner = vim_info[0] + required_candidate = [ + { + "identifierType": "vimId", + "cloudOwner": cloudOwner, + "identifiers": identifiers + } + ] + placementDemand["requiredCandidates"] = required_candidate + req_body = { "requestInfo": { "transactionId": id, -- 2.16.6