code: def _waitForIP(cls, instance):
          
          logger.debug('Waiting for ip...')
          while True:
              time.sleep(a_short_time)
              instance.update()
              if instance.ip_address or instance.public_dns_name or instance.private_ip_address:
                  logger.debug('...got ip')
                  break
docs: Wait until the instances has a public IP address assigned to it.
  
          :type instance: boto.ec2.instance.Instance