Code Review
/
multicloud
/
openstack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
181c53c
)
Fix MC create_port not handle multiple ip address
87/42987/2
author
Kailun Qin
<kailun.qin@intel.com>
Mon, 16 Apr 2018 09:25:34 +0000
(17:25 +0800)
committer
Kailun Qin
<kailun.qin@intel.com>
Tue, 17 Apr 2018 03:50:43 +0000
(11:50 +0800)
Change-Id: Ie09370b275b39b2803a17da20711ea71d5539742
Issue-ID: MULTICLOUD-212
Signed-off-by: Kailun Qin <kailun.qin@intel.com>
share/newton_base/openoapi/vport.py
patch
|
blob
|
history
diff --git
a/share/newton_base/openoapi/vport.py
b/share/newton_base/openoapi/vport.py
index
9656b5c
..
e112d38
100644
(file)
--- a/
share/newton_base/openoapi/vport.py
+++ b/
share/newton_base/openoapi/vport.py
@@
-147,12
+147,13
@@
class Vports(APIView):
tmpip = port.pop("ip", None)
tmpsubnet = port.pop("subnetId", None)
if tmpip and tmpsubnet:
- fixed_ip = {
- "ip_address": tmpip,
- "subnet_id": tmpsubnet,
- }
- port["fixed_ips"] = []
- port["fixed_ips"].append(fixed_ip)
+ port["fixed_ips"] = []
+ for one_tmpip in tmpip.split(','):
+ fixed_ip = {
+ "ip_address": one_tmpip,
+ "subnet_id": tmpsubnet,
+ }
+ port["fixed_ips"].append(fixed_ip)
VimDriverUtils.replace_key_by_mapping(port,
self.keys_mapping, True)