'Sends an InstanceList with created or updated Instance objects to
the Scheduler client.
In the case of init_host, the value passed will already be an
InstanceList. Other calls will send individual Instance objects that
have been created or resized. In this case, we create an InstanceList
object containing that Instance.'

def _update_scheduler_instance_info(self, context, instance):

    if (not self.send_instance_updates):
        return
    if isinstance(instance, obj_instance.Instance):
        instance = objects.InstanceList(objects=[instance])
    context = context.elevated()
    self.scheduler_client.update_instance_info(context, self.host, instance)
