Homing with selected VIM 83/79083/2
authorRuoyu Ying <ruoyu.ying@intel.com>
Mon, 25 Feb 2019 17:30:49 +0000 (01:30 +0800)
committerRuoyu Ying <ruoyu.ying@intel.com>
Tue, 26 Feb 2019 03:04:19 +0000 (03:04 +0000)
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 <ruoyu.ying@intel.com>
lcm/ns_vnfs/biz/create_vnfs.py

index 04cb3b8..e477392 100644 (file)
@@ -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,