store the ip address too
diff --git a/xos/openstack_observer/steps/sync_network_slivers.py b/xos/openstack_observer/steps/sync_network_slivers.py
index 792c8ab..533fdd2 100644
--- a/xos/openstack_observer/steps/sync_network_slivers.py
+++ b/xos/openstack_observer/steps/sync_network_slivers.py
@@ -154,7 +154,10 @@
try:
driver = self.driver.admin_driver(controller = controller,tenant='admin')
#networkSliver.port = driver.shell.quantum.create_port(network_id = cn.net_id)
- networkSliver.port_id = driver.shell.quantum.create_port({"port": {"network_id": cn.net_id}})["port"]["id"]
+ port = driver.shell.quantum.create_port({"port": {"network_id": cn.net_id}})["port"]
+ networkSliver.port_id = port["id"]
+ if port["fixed_ips"]:
+ networkSliver.ip = port["fixed_ips"][0]["ip_address"]
except:
logger.log_exc("failed to create neutron port for %s" % networkSliver)
continue