Revert local validation context, extract another util
This commit is contained in:
parent
d7ffb54333
commit
14fefea38f
6 changed files with 18 additions and 24 deletions
|
@ -1,4 +1,4 @@
|
|||
from storage import get_storage_driver
|
||||
from storage import get_storage_driver, TYPE_LOCAL_STORAGE
|
||||
from util.config.validators import BaseValidator, ConfigValidationException
|
||||
|
||||
|
||||
|
@ -12,7 +12,6 @@ class StorageValidator(BaseValidator):
|
|||
client = validator_context.http_client
|
||||
ip_resolver = validator_context.ip_resolver
|
||||
config_provider = validator_context.config_provider
|
||||
skip_localstorage_validation = validator_context.skip_localstorage_validation
|
||||
|
||||
replication_enabled = config.get('FEATURE_STORAGE_REPLICATION', False)
|
||||
|
||||
|
@ -21,7 +20,9 @@ class StorageValidator(BaseValidator):
|
|||
raise ConfigValidationException('Storage configuration required')
|
||||
|
||||
for name, (storage_type, driver) in providers:
|
||||
if skip_localstorage_validation and storage_type == 'LocalStorage':
|
||||
# We can skip localstorage validation, since we can't guarantee that
|
||||
# this will be the same machine Q.E. will run under
|
||||
if storage_type == TYPE_LOCAL_STORAGE:
|
||||
continue
|
||||
|
||||
try:
|
||||
|
|
Reference in a new issue