summaryrefslogtreecommitdiffstats
path: root/lcm
diff options
context:
space:
mode:
authorHuang Haibin <haibin.huang@intel.com>2018-11-01 14:52:41 +0800
committerHuang Haibin <haibin.huang@intel.com>2018-11-02 16:23:16 +0800
commit2e7b4ae13e0f0802a34bfbfc030dd67aef1ee203 (patch)
treebb6dcfc1305470952081a000a6cfe83a956e3bae /lcm
parent57a85ed3aff05f7b8d40b5c6956f57292f6e1054 (diff)
Align SOL003 data for vnflcm
Change-Id: I4abe0ad302d40b297f40005d4c73b82ea6c1678c Issue-ID: VFC-1085 Signed-off-by: Huang Haibin <haibin.huang@intel.com>
Diffstat (limited to 'lcm')
-rw-r--r--lcm/lcm/nf/biz/instantiate_vnf.py8
-rw-r--r--lcm/lcm/nf/tests/test_instantiate_vnf.py4
2 files changed, 7 insertions, 5 deletions
diff --git a/lcm/lcm/nf/biz/instantiate_vnf.py b/lcm/lcm/nf/biz/instantiate_vnf.py
index 606dbab0..364eaffc 100644
--- a/lcm/lcm/nf/biz/instantiate_vnf.py
+++ b/lcm/lcm/nf/biz/instantiate_vnf.py
@@ -163,7 +163,6 @@ class InstantiateVnf(Thread):
def set_location(self, apply_result):
vim_connections = ignore_case_get(apply_result, "vimConnections")
vnfid = ignore_case_get(apply_result, "vnfInstanceId")
- directive = ignore_case_get(apply_result, "directive")
vim_assets = ignore_case_get(apply_result, "vimAssets")
access_info = ignore_case_get(vim_connections[0], "accessInfo")
tenant = ignore_case_get(access_info, "tenant")
@@ -171,10 +170,13 @@ class InstantiateVnf(Thread):
cloud_owner, cloud_regionid = vimid.split("_")
vdu_info = []
- for flavor in ignore_case_get(vim_assets, "vimComputeResourceFlavour"):
+ for flavor in ignore_case_get(vim_assets, "computeResourceFlavours"):
+ oof_vimid = flavor["vimConnectionId"]
+ if oof_vimid and oof_vimid != "none":
+ vimid = oof_vimid
vdu_info.append({"vduName": flavor["resourceProviderId"],
"flavorName": flavor["vimFlavourId"],
- "directive": directive})
+ "vimid": vimid})
for resource_type in ['vdus', 'vls']:
for resource in ignore_case_get(self.vnfd_info, resource_type):
diff --git a/lcm/lcm/nf/tests/test_instantiate_vnf.py b/lcm/lcm/nf/tests/test_instantiate_vnf.py
index 4784fa29..b54a1359 100644
--- a/lcm/lcm/nf/tests/test_instantiate_vnf.py
+++ b/lcm/lcm/nf/tests/test_instantiate_vnf.py
@@ -48,11 +48,11 @@ class TestNFInstantiate(TestCase):
"vnfId": "413aa1fe-b4d1-11e8-8268-dff5aab95c63",
"vimAssets":
{
- "vimComputeResourceFlavour": [
+ "computeResourceFlavours": [
{
"resourceProviderId": "vgw",
"vimFlavourId": "yui",
- "directive": ""
+ "vimConnectionId": ""
},
]
}