'Inject instance\'s auto_disk_config attribute into xenstore.'

def _inject_auto_disk_config(self, instance, vm_ref):

    @utils.synchronized(('xenstore-' + instance['uuid']))
    def store_auto_disk_config(key, value):
        value = ((value and True) or False)
        self._add_to_param_xenstore(vm_ref, key, str(value))
    store_auto_disk_config('vm-data/auto-disk-config', instance['auto_disk_config'])
