Add missing stores to setup.cfg

Add the missing stores to setup.cfg and add the old stores to keep
backwards compatibility. In addition, raise an error if a store
entry_point is not found.

Change-Id: I41ffff47d26e2c1bf9b89ed3d0f459bca4d9f731
This commit is contained in:
Flavio Percoco 2014-09-05 10:49:07 +02:00
parent 7d15d01898
commit 6ceda50421
2 changed files with 21 additions and 0 deletions

View File

@ -58,8 +58,13 @@ def register_opts(conf):
def register_store_opts(conf):
for store_entry in set(conf.glance_store.stores):
LOG.debug("Registering options for %s" % store_entry)
store_cls = _load_store(conf, store_entry, False)
if store_cls is None:
msg = _('Store %s not found') % store_entry
raise exceptions.GlanceStoreException(message=msg)
if store_cls.OPTIONS is not None:
# NOTE(flaper87): To be removed in k-2. This should
# give deployers enough time to migrate their systems

View File

@ -27,11 +27,27 @@ glance_store.drivers =
file = glance_store._drivers.filesystem:Store
http = glance_store._drivers.http:Store
swift = glance_store._drivers.swift:Store
rbd = glance_store._drivers.rbd:Store
s3 = glance_store._drivers.s3:Store
sheepdog = glance_store._drivers.sheepdog:Store
cinder = glance_store._drivers.cinder:Store
gridfs = glance_store._drivers.gridfs:Store
vmware = glance_store._drivers.vmware_datastore:Store
# TESTS ONLY
no_conf = glance_store.tests.fakes:UnconfigurableStore
# Backwards compatibility
glance.store.filesystem.Store = glance_store._drivers.filesystem:Store
glance.store.http.Store = glance_store._drivers.http:Store
glance.store.swift.Store = glance_store._drivers.swift:Store
glance.store.rbd.Store = glance_store._drivers.rbd:Store
glance.store.s3.Store = glance_store._drivers.s3:Store
glance.store.sheepdog.Store = glance_store._drivers.sheepdog:Store
glance.store.cinder.Store = glance_store._drivers.cinder:Store
glance.store.gridfs.Store = glance_store._drivers.gridfs:Store
glance.store.vmware_datastore.Store = glance_store._drivers.vmware_datastore:Store
[build_sphinx]
source-dir = doc/source
build-dir = doc/build