示例#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()
示例#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)
示例#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)
示例#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)
示例#5
0
文件: scrubber.py 项目: ameade/glance
    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)
示例#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)
示例#7
0
文件: images.py 项目: altai/glance
 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)
示例#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()
示例#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)
示例#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()
示例#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()
示例#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)
示例#13
0
 def __init__(self, options):
     self.options = options
     glance.store.create_stores(options)
     self.notifier = notifier.Notifier(options)
     registry.configure_registry_client(options)
示例#14
0
 def __init__(self, options):
     self.options = options
     glance.store.create_stores(options)
     self.cache = ImageCache(options)
     registry.configure_registry_client(options)
示例#15
0
 def __init__(self):
     glance.store.create_stores()
     super(Prefetcher, self).__init__()
     registry.configure_registry_client()
     registry.configure_registry_admin_creds()
示例#16
0
 def __init__(self):
     super(Prefetcher, self).__init__()
     registry.configure_registry_client()
     registry.configure_registry_admin_creds()
示例#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)
示例#18
0
 def __init__(self, options):
     self.options = options
     self.cache = ImageCache(options)
     registry.configure_registry_client(options)
示例#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)
示例#20
0
 def __init__(self):
     glance.store.create_stores()
     super(Prefetcher, self).__init__()
     registry.configure_registry_client()
     registry.configure_registry_admin_creds()
示例#21
0
 def __init__(self, options):
     self.options = options
     self.cache = ImageCache(options)
     registry.configure_registry_client(options)
示例#22
0
 def __init__(self, options):
     self.options = options
     glance.store.create_stores(options)
     self.cache = ImageCache(options)
     registry.configure_registry_client(options)
示例#23
0
文件: images.py 项目: plumgrid/glance
 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)
示例#25
0
 def __init__(self, conf, **local_conf):
     self.conf = conf
     self.cache = ImageCache(conf)
     registry.configure_registry_client(conf)
示例#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)
示例#27
0
 def __init__(self):
     self.notifier = notifier.Notifier()
     registry.configure_registry_client()
     self.policy = policy.Enforcer()
     self.pool = eventlet.GreenPool(size=1024)
示例#28
0
 def __init__(self, options):
     self.options = options
     glance.store.create_stores(options)
     self.notifier = notifier.Notifier(options)
     registry.configure_registry_client(options)