'Configure the driver to use the stored configuration options
Any store that needs special configuration should implement
this method. If the store was not able to successfully configure
itself, it should raise `exception.BadDriverConfiguration`'

def configure(self):

    self.set_paths()
    image_cache_dir = self.base_dir
    fake_image_filepath = os.path.join(image_cache_dir, 'checkme')
    with open(fake_image_filepath, 'wb') as fake_file:
        fake_file.write('XXX')
        fake_file.flush()
    try:
        set_xattr(fake_image_filepath, 'hits', '1')
    except IOError as e:
        if (e.errno == errno.EOPNOTSUPP):
            msg = (_('The    device    housing    the    image    cache    directory    %(image_cache_dir)s    does    not    support    xattr.    It    is    likely    you    need    to    edit    your    fstab    and    add    the    user_xattr    option    to    the    appropriate    line    for    the    device    housing    the    cache    directory.') % {'image_cache_dir': image_cache_dir})
            LOG.error(msg)
            raise exception.BadDriverConfiguration(driver_name='xattr', reason=msg)
    else:
        fileutils.delete_if_exists(fake_image_filepath)
