Beispiel #1
0
    def test_http_delete_raise_error(self):
        uri = "https://netloc/path/to/file.tar.gz"
        loc = get_location_from_uri(uri)
        self.assertRaises(NotImplementedError, self.store.delete, loc)

        create_stores(utils.TestConfigOpts({}))
        self.assertRaises(exception.StoreDeleteNotSupported,
                          delete_from_backend, uri)
    def test_http_delete_raise_error(self):
        uri = "https://netloc/path/to/file.tar.gz"
        loc = get_location_from_uri(uri)
        self.assertRaises(NotImplementedError, self.store.delete, loc)

        create_stores(utils.TestConfigOpts({}))
        self.assertRaises(exception.StoreDeleteNotSupported,
                          delete_from_backend, uri)
Beispiel #3
0
    def __init__(self, conf, **local_conf):
        self.conf = conf
        self.conf.register_opts(self.opts)

        self.datadir = store.get_scrubber_datadir(conf)
        self.cleanup = self.conf.cleanup_scrubber
        self.cleanup_time = self.conf.cleanup_scrubber_time

        host, port = registry.get_registry_addr(conf)

        logger.info(_("Initializing scrubber with conf: %s") %
                    {'datadir': self.datadir, 'cleanup': self.cleanup,
                     'cleanup_time': self.cleanup_time,
                     'registry_host': host, 'registry_port': port})

        self.registry = client.RegistryClient(host, port)

        utils.safe_mkdirs(self.datadir)

        store.create_stores(conf)
Beispiel #4
0
    def __init__(self, conf, **local_conf):
        self.conf = conf
        self.conf.register_opts(self.opts)

        self.datadir = store.get_scrubber_datadir(conf)
        self.cleanup = self.conf.cleanup_scrubber
        self.cleanup_time = self.conf.cleanup_scrubber_time

        host, port = registry.get_registry_addr(conf)

        logger.info(
            _("Initializing scrubber with conf: %s") % {
                'datadir': self.datadir,
                'cleanup': self.cleanup,
                'cleanup_time': self.cleanup_time,
                'registry_host': host,
                'registry_port': port
            })

        self.registry = client.RegistryClient(host, port)

        utils.safe_mkdirs(self.datadir)

        store.create_stores(conf)