def configure(self):
        # Here we set up the various file-based image cache paths
        # that we need in order to find the files in different states
        # of cache management.
        self.set_paths()

        # We do a quick attempt to write a user xattr to a temporary file
        # to check that the filesystem is even enabled to support xattrs
        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, 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.") % locals()
                logger.error(msg)
                raise exception.BadDriverConfiguration(driver="xattr",
                                                       reason=msg)
        else:
            # Cleanup after ourselves...
            if os.path.exists(fake_image_filepath):
                os.unlink(fake_image_filepath)
Configure the driver to use the stored configuration options
dataset/ETHPy150Open rcbops/glance-buildpackage/glance/image_cache/drivers/xattr.py/Driver.configure