add neutron_port_ip args. let tenant could assign static ip of port.
Change-Id: I4db52133797ea8f00985828646e80d305b58d86e
diff --git a/xos/synchronizer/steps/sync_ports.py b/xos/synchronizer/steps/sync_ports.py
index aa8b2a3..b0f1113 100644
--- a/xos/synchronizer/steps/sync_ports.py
+++ b/xos/synchronizer/steps/sync_ports.py
@@ -195,8 +195,11 @@
args = {"network_id": cn.net_id}
neutron_port_name = port.get_parameters().get("neutron_port_name", None)
+ neutron_port_ip = port.get_parameters().get("neutron_port_ip", None)
if neutron_port_name:
args["name"] = neutron_port_name
+ if neutron_port_ip:
+ args["fixed_ips"] = [{"ip_address": neutron_port_ip, "subnet_id": cn.subnet_id}]
neutron_port = driver.shell.neutron.create_port({"port": args})["port"]
port.port_id = neutron_port["id"]