def create_network(neutron_client, net, subnet1, cidr1,
router, subnet2=None, cidr2=None):
- """Network assoc will not work for networks/subnets created by this function.
+ """Network assoc won't work for networks/subnets created by this function.
It is an ODL limitation due to it handling routers as vpns.
See https://bugs.opendaylight.org/show_bug.cgi?id=6962"""
return str(os.environ['INSTALLER_IP'])
+def get_instance_ip(instance):
+ instance_ip = instance.networks.itervalues().next()[0]
+ return instance_ip
+
+
def wait_for_instance(instance):
logger.info("Waiting for instance %s to get a DHCP lease..." % instance.id)
# The sleep this function replaced waited for 80s
logger.error("Cloud init failed to run. Reason: %s",
instance_log)
break
- if re.search(r"Cloud-init v. .+ finished at" in instance_log):
+ if re.search(r"Cloud-init v. .+ finished at", instance_log):
success = True
break
time.sleep(sleep_time)