Example #1
0
    def __init__(self):
        self.datadir = CONF.scrubber_datadir
        self.cleanup = CONF.cleanup_scrubber
        self.cleanup_time = CONF.cleanup_scrubber_time
        # configs for registry API store auth
        self.admin_user = CONF.admin_user
        self.admin_tenant = CONF.admin_tenant_name

        host, port = CONF.registry_host, CONF.registry_port

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

        registry.configure_registry_client()
        registry.configure_registry_admin_creds()
        ctx = context.RequestContext()
        self.registry = registry.get_registry_client(ctx)

        utils.safe_mkdirs(self.datadir)

        store.create_stores()
Example #2
0
 def __init__(self, conf):
     self.conf = conf
     self.conf.register_opt(self.default_store_opt)
     glance.store.create_stores(conf)
     self.notifier = notifier.Notifier(conf)
     registry.configure_registry_client(conf)
     self.policy = policy.Enforcer(conf)
Example #3
0
 def __init__(self):
     create_stores()
     self.verify_scheme_or_exit(CONF.default_store)
     self.notifier = notifier.Notifier()
     registry.configure_registry_client()
     self.policy = policy.Enforcer()
     self.pool = eventlet.GreenPool(size=1024)
Example #4
0
 def __init__(self):
     create_stores()
     self.verify_scheme_or_exit(CONF.default_store)
     self.notifier = notifier.Notifier()
     registry.configure_registry_client()
     self.policy = policy.Enforcer()
     self.pool = eventlet.GreenPool(size=1024)
Example #5
0
    def __init__(self):
        self.datadir = CONF.scrubber_datadir
        self.cleanup = CONF.cleanup_scrubber
        self.cleanup_time = CONF.cleanup_scrubber_time
        # configs for registry API store auth
        self.admin_user = CONF.admin_user
        self.admin_tenant = CONF.admin_tenant_name

        host, port = CONF.registry_host, CONF.registry_port

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

        registry.configure_registry_client()
        registry.configure_registry_admin_creds()
        ctx = context.RequestContext()
        self.registry = registry.get_registry_client(ctx)

        utils.safe_mkdirs(self.datadir)
Example #6
0
 def __init__(self, conf):
     self.conf = conf
     self.conf.register_opt(default_store_opt)
     create_stores(self.conf)
     self.verify_scheme_or_exit(self.conf.default_store)
     self.notifier = notifier.Notifier(conf)
     registry.configure_registry_client(conf)
     self.policy = policy.Enforcer(conf)
Example #7
0
 def __init__(self, conf):
     self.conf = conf
     self.conf.register_opt(default_store_opt)
     create_stores(self.conf)
     self.verify_scheme_or_exit(self.conf.default_store)
     self.notifier = notifier.Notifier(conf)
     registry.configure_registry_client(conf)
     self.policy = policy.Enforcer(conf)
Example #8
0
 def setUp(self):
     self.config(default_store="http", known_stores=["glance.store.http.Store"])
     super(TestHttpStore, self).setUp()
     self.stubs = stubout.StubOutForTesting()
     stub_out_http_backend(self.stubs)
     Store.CHUNKSIZE = 2
     self.store = Store()
     configure_registry_client()
Example #9
0
 def setUp(self):
     super(TestHttpStore, self).setUp()
     self.stubs = stubout.StubOutForTesting()
     stub_out_http_backend(self.stubs)
     Store.CHUNKSIZE = 2
     self.store = Store({})
     self.conf = utils.TestConfigOpts({
         'default_store': 'http',
         'known_stores': "glance.store.http.Store",
     })
     configure_registry_client(self.conf)
Example #10
0
 def setUp(self):
     global FAKE_RESPONSE_STACK
     FAKE_RESPONSE_STACK = []
     self.config(default_store='http',
                 known_stores=['glance.store.http.Store'])
     super(TestHttpStore, self).setUp()
     self.stubs = stubout.StubOutForTesting()
     stub_out_http_backend(self.stubs)
     Store.CHUNKSIZE = 2
     self.store = Store()
     configure_registry_client()
Example #11
0
 def setUp(self):
     global FAKE_RESPONSE_STACK
     FAKE_RESPONSE_STACK = []
     self.config(default_store='http',
                 known_stores=['glance.store.http.Store'])
     super(TestHttpStore, self).setUp()
     self.stubs = stubout.StubOutForTesting()
     stub_out_http_backend(self.stubs)
     Store.CHUNKSIZE = 2
     self.store = Store()
     configure_registry_client()
Example #12
0
 def setUp(self):
     super(TestHttpStore, self).setUp()
     self.stubs = stubout.StubOutForTesting()
     stub_out_http_backend(self.stubs)
     Store.CHUNKSIZE = 2
     self.store = Store({})
     self.conf = utils.TestConfigOpts({
         'default_store':
         'http',
         'known_stores':
         "glance.store.http.Store",
     })
     configure_registry_client(self.conf)
Example #13
0
 def __init__(self, options):
     self.options = options
     glance.store.create_stores(options)
     self.notifier = notifier.Notifier(options)
     registry.configure_registry_client(options)
Example #14
0
 def __init__(self, options):
     self.options = options
     glance.store.create_stores(options)
     self.cache = ImageCache(options)
     registry.configure_registry_client(options)
Example #15
0
 def __init__(self):
     glance.store.create_stores()
     super(Prefetcher, self).__init__()
     registry.configure_registry_client()
     registry.configure_registry_admin_creds()
Example #16
0
 def __init__(self):
     super(Prefetcher, self).__init__()
     registry.configure_registry_client()
     registry.configure_registry_admin_creds()
Example #17
0
 def __init__(self, conf, **local_conf):
     self.conf = conf
     self.cache = ImageCache(conf)
     registry.configure_registry_client(conf)
     registry.configure_registry_admin_creds(conf)
Example #18
0
 def __init__(self, options):
     self.options = options
     self.cache = ImageCache(options)
     registry.configure_registry_client(options)
Example #19
0
 def __init__(self, conf):
     self.conf = conf
     self.conf.register_opt(self.default_store_opt)
     glance.store.create_stores(conf)
     self.notifier = notifier.Notifier(conf)
     registry.configure_registry_client(conf)
Example #20
0
 def __init__(self):
     glance.store.create_stores()
     super(Prefetcher, self).__init__()
     registry.configure_registry_client()
     registry.configure_registry_admin_creds()
Example #21
0
 def __init__(self, options):
     self.options = options
     self.cache = ImageCache(options)
     registry.configure_registry_client(options)
Example #22
0
 def __init__(self, options):
     self.options = options
     glance.store.create_stores(options)
     self.cache = ImageCache(options)
     registry.configure_registry_client(options)
Example #23
0
 def __init__(self):
     self.notifier = notifier.Notifier()
     registry.configure_registry_client()
     self.policy = policy.Enforcer()
     self.pool = eventlet.GreenPool(size=1024)
 def __init__(self, conf, **local_conf):
     self.conf = conf
     glance.store.create_stores(conf)
     self.cache = ImageCache(conf)
     registry.configure_registry_client(conf)
     registry.configure_registry_admin_creds(conf)
Example #25
0
 def __init__(self, conf, **local_conf):
     self.conf = conf
     self.cache = ImageCache(conf)
     registry.configure_registry_client(conf)
Example #26
0
 def __init__(self, conf, **local_conf):
     self.conf = conf
     glance.store.create_stores(conf)
     self.cache = ImageCache(conf)
     registry.configure_registry_client(conf)
     registry.configure_registry_admin_creds(conf)
Example #27
0
 def __init__(self):
     self.notifier = notifier.Notifier()
     registry.configure_registry_client()
     self.policy = policy.Enforcer()
     self.pool = eventlet.GreenPool(size=1024)
Example #28
0
 def __init__(self, options):
     self.options = options
     glance.store.create_stores(options)
     self.notifier = notifier.Notifier(options)
     registry.configure_registry_client(options)