Can't create two port in one network 34/72634/1
authorHaibin Huang <haibin.huang@intel.com>
Wed, 14 Nov 2018 10:25:07 +0000 (10:25 +0000)
committerHuang Haibin <haibin.huang@intel.com>
Wed, 14 Nov 2018 11:39:13 +0000 (11:39 +0000)
Change-Id: I2f57a75b9fb1daec8e59205451a14178a7724760
Issue-ID: VFC-1186
Signed-off-by: Haibin Huang <haibin.huang@intel.com>
(cherry picked from commit 70314109351b750c8bcabbccb9bc4b021d9837dc)

lcm/lcm/pub/vimapi/adaptor.py

index 4415362..a7a0fd3 100644 (file)
@@ -251,7 +251,7 @@ def create_port(vim_cache, res_cache, data, port, do_notify, res_type):
         subnet_id = get_res_id(res_cache, RES_SUBNET, port["vl_id"])
     param = {
         "networkId": network_id,
-        "name": port["properties"].get("name", "undefined")
+        "name": port["cp_id"]
     }
     set_opt_val(param, "subnetId", subnet_id)
     set_opt_val(param, "macAddress", ignore_case_get(port["properties"], "mac_address"))