summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lcm/lcm/pub/vimapi/adaptor.py3
-rw-r--r--lcm/lcm/samples/tests.py9
2 files changed, 10 insertions, 2 deletions
diff --git a/lcm/lcm/pub/vimapi/adaptor.py b/lcm/lcm/pub/vimapi/adaptor.py
index 3264f94f..4ce0e697 100644
--- a/lcm/lcm/pub/vimapi/adaptor.py
+++ b/lcm/lcm/pub/vimapi/adaptor.py
@@ -194,7 +194,8 @@ def create_port(vim_cache, res_cache, data, port, do_notify, res_type):
}
set_opt_val(param, "subnetId", subnet_id)
set_opt_val(param, "macAddress", ignore_case_get(port["properties"], "mac_address"))
- set_opt_val(param, "ip", ignore_case_get(port["properties"], "ip_address"))
+ l3_address_data = port["properties"]["protocol_data"]["address_data"]["l3_address_data"]
+ set_opt_val(param, "ip", ignore_case_get(l3_address_data, "fixed_ip_address"))
set_opt_val(param, "vnicType", ignore_case_get(port["properties"], "vnic_type"))
set_opt_val(param, "securityGroups", "") # TODO
vim_id, tenant_name = location_info["vimid"], location_info["tenant"]
diff --git a/lcm/lcm/samples/tests.py b/lcm/lcm/samples/tests.py
index 9c57d84e..c626675f 100644
--- a/lcm/lcm/samples/tests.py
+++ b/lcm/lcm/samples/tests.py
@@ -204,9 +204,16 @@ inst_res_data = {
],
"cps": [
{
+
"properties": {
"name": "vNat_big_subnet_port",
- "ip_address": "10.43.38.253",
+ "protocol_data": {
+ "address_data": {
+ "l3_address_data": {
+ "fixed_ip_address": "10.43.38.253"
+ },
+ },
+ },
"vnic_type": "normal",
"role": "root",
"virtual_network_interface_requirements": [