summaryrefslogtreecommitdiffstats
path: root/lcm
diff options
context:
space:
mode:
Diffstat (limited to 'lcm')
-rw-r--r--lcm/lcm/pub/msapi/gvnfmdriver.py4
-rw-r--r--lcm/lcm/pub/vimapi/adaptor.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/lcm/lcm/pub/msapi/gvnfmdriver.py b/lcm/lcm/pub/msapi/gvnfmdriver.py
index 5446fa3d..4b2b304a 100644
--- a/lcm/lcm/pub/msapi/gvnfmdriver.py
+++ b/lcm/lcm/pub/msapi/gvnfmdriver.py
@@ -59,7 +59,7 @@ def prepare_notification_data(nfinstid, jobid, changetype):
vm = VmInstModel.objects.filter(vmid=vnfc.vmid)
if vm:
vm_resource = {
- 'vimId': vm[0].vimConnectionId,
+ 'vimId': vm[0].vimid,
'resourceId': vm[0].resouceid,
'resourceProviderId': vm[0].vmname, # TODO: is resourceName mapped to resourceProviderId?
'vimLevelResourceType': 'vm'
@@ -96,7 +96,7 @@ def prepare_notification_data(nfinstid, jobid, changetype):
'resourceProviderId': port.name, # TODO: is resourceName mapped to resourceProviderId?
'vimLevelResourceType': 'port'
},
- 'cpInstanceId': port.cpinstanceid
+ 'cpInstanceId': port.cpinstanceid # TODO: port.cpinstanceid is not initiated when create port resource.
}),
affected_vss = []
vss = StorageInstModel.objects.filter(instid=nfinstid)
diff --git a/lcm/lcm/pub/vimapi/adaptor.py b/lcm/lcm/pub/vimapi/adaptor.py
index 70f33dc1..9ca3e8de 100644
--- a/lcm/lcm/pub/vimapi/adaptor.py
+++ b/lcm/lcm/pub/vimapi/adaptor.py
@@ -182,7 +182,7 @@ def create_port(vim_cache, res_cache, data, port, do_notify, res_type):
vdu["cps"].append(port["cp_id"])
break
if not location_info:
- err_msg = "vdu_id(%s) for cp(%s) is not defined"
+ err_msg = "vdu_id(%s) for cp(%s) is not defined."
raise VimException(err_msg % (port_ref_vdu_id, port["cp_id"]), ERR_CODE)
network_id = ignore_case_get(port, "networkId")
subnet_id = ignore_case_get(port, "subnetId")
@@ -197,7 +197,7 @@ def create_port(vim_cache, res_cache, data, port, do_notify, res_type):
set_opt_val(param, "macAddress", ignore_case_get(port["properties"], "mac_address"))
ip_address = []
for one_protocol_data in port["properties"]["protocol_data"]:
- l3_address_data = one_protocol_data["address_data"]["l3_address_data"]
+ l3_address_data = one_protocol_data["address_data"]["l3_address_data"] # l3 is not 13
fixed_ip_address = ignore_case_get(l3_address_data, "fixed_ip_address")
ip_address.extend(fixed_ip_address)
set_opt_val(param, "ip", ",".join(ip_address))
@@ -266,7 +266,7 @@ def create_flavor(vim_cache, res_cache, data, flavor, do_notify, res_type):
vdu_memory_requirements = ignore_case_get(virtual_memory, "vdu_memory_requirements")
if "memoryPageSize" in vdu_memory_requirements:
memory_page_size = int(vdu_memory_requirements["memoryPageSize"].replace('MB', '').strip())
- flavor_extra_specs = ("hw:mem_page_size=%sMB" % memory_page_size)
+ flavor_extra_specs = {"hw": memory_page_size, } # TODO
logger.debug("flavor_extra_specs:%s" % flavor_extra_specs)
# FIXME: search aai flavor