'Poll for rebooting instances.'

def poll_rebooting_instances(self, timeout, instances):

    ctxt = nova_context.get_admin_context()
    instances_info = dict(instance_count=len(instances), timeout=timeout)
    if (instances_info['instance_count'] > 0):
        LOG.info('Found    %(instance_count)d    hung    reboots    older    than    %(timeout)d    seconds', instances_info)
    for instance in instances:
        LOG.info('Automatically    hard    rebooting', instance=instance)
        self.compute_api.reboot(ctxt, instance, 'HARD')
