Correct base class of no_conf driver
1. Fix wrong base class of no_conf store driver. 2. Enhance create_stores() to handle NotImplementedError case. Change-Id: I0f38d101a994b3a3d0c7a10bdd2e936e026b407b Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
This commit is contained in:
parent
c7e2433d4b
commit
084f8e8d45
@ -185,8 +185,11 @@ def create_stores(conf=CONF):
|
||||
store_count = 0
|
||||
|
||||
for (store_entry, store_instance) in _load_stores(conf):
|
||||
schemes = store_instance.get_schemes()
|
||||
store_instance.configure()
|
||||
try:
|
||||
schemes = store_instance.get_schemes()
|
||||
store_instance.configure()
|
||||
except NotImplementedError:
|
||||
continue
|
||||
if not schemes:
|
||||
raise exceptions.BackendException('Unable to register store %s. '
|
||||
'No schemes associated with it.'
|
||||
|
@ -13,9 +13,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from glance_store import driver
|
||||
from glance_store import exceptions
|
||||
|
||||
|
||||
class UnconfigurableStore(base.Store):
|
||||
class UnconfigurableStore(driver.Store):
|
||||
def configure(self):
|
||||
raise exceptions.BadStoreConfiguration()
|
||||
|
Loading…
x
Reference in New Issue
Block a user