示例#1
0
def wait_for_ip(max_retries):
    """ waits indefinately for external IP """
    for retry in xrange(1, max_retries):
        ext_ip = get_ip()
        if len(ext_ip) > 0:
            break

        logger.info("(%d/%d) waiting for external IP", retry, max_retries)
        time.sleep(1)

    logger.info("EXT IP: %s", ext_ip)
示例#2
0
 def get_external_ip(self):
     return platform_devs.get_ip()