63fcfd55c0
Propagate BadStoreConfiguration exceptions to library user on start up (on create_stores call) instead of just logging them as ERRORs. Until logic to handle runtime BadStoreConfiguration exceptions from configure and get_store_from_schema is added to Glance we'll keep just logging those exceptions at runtime. Closes-Bug: #1422699 Depends-On: Ifc038874aa0388b036729790a883ae1e1efd323d Change-Id: I1d4f95cba47d21f1eb7e580314d01ac8d3481586
23 lines
834 B
Python
23 lines
834 B
Python
# Copyright 2014 Red hat, Inc.
|
|
# All Rights Reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
from glance_store import driver
|
|
from glance_store import exceptions
|
|
|
|
|
|
class UnconfigurableStore(driver.Store):
|
|
def configure(self, re_raise_bsc=False):
|
|
raise exceptions.BadStoreConfiguration()
|