Exemplo n.º 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()
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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()
Exemplo n.º 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)
Exemplo n.º 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()
Exemplo n.º 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()
Exemplo n.º 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)
Exemplo n.º 13
0
 def __init__(self, options):
     self.options = options
     glance.store.create_stores(options)
     self.notifier = notifier.Notifier(options)
     registry.configure_registry_client(options)
Exemplo n.º 14
0
 def __init__(self, options):
     self.options = options
     glance.store.create_stores(options)
     self.cache = ImageCache(options)
     registry.configure_registry_client(options)
Exemplo n.º 15
0
 def __init__(self):
     glance.store.create_stores()
     super(Prefetcher, self).__init__()
     registry.configure_registry_client()
     registry.configure_registry_admin_creds()
Exemplo n.º 16
0
 def __init__(self):
     super(Prefetcher, self).__init__()
     registry.configure_registry_client()
     registry.configure_registry_admin_creds()
Exemplo n.º 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)
Exemplo n.º 18
0
 def __init__(self, options):
     self.options = options
     self.cache = ImageCache(options)
     registry.configure_registry_client(options)
Exemplo n.º 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)
Exemplo n.º 20
0
 def __init__(self):
     glance.store.create_stores()
     super(Prefetcher, self).__init__()
     registry.configure_registry_client()
     registry.configure_registry_admin_creds()
Exemplo n.º 21
0
 def __init__(self, options):
     self.options = options
     self.cache = ImageCache(options)
     registry.configure_registry_client(options)
Exemplo n.º 22
0
 def __init__(self, options):
     self.options = options
     glance.store.create_stores(options)
     self.cache = ImageCache(options)
     registry.configure_registry_client(options)
Exemplo n.º 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)
Exemplo n.º 25
0
 def __init__(self, conf, **local_conf):
     self.conf = conf
     self.cache = ImageCache(conf)
     registry.configure_registry_client(conf)
Exemplo n.º 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)
Exemplo n.º 27
0
 def __init__(self):
     self.notifier = notifier.Notifier()
     registry.configure_registry_client()
     self.policy = policy.Enforcer()
     self.pool = eventlet.GreenPool(size=1024)
Exemplo n.º 28
0
 def __init__(self, options):
     self.options = options
     glance.store.create_stores(options)
     self.notifier = notifier.Notifier(options)
     registry.configure_registry_client(options)