Move config provider to _init to decouple from app
remove app references from validators
This commit is contained in:
parent
86929c16d3
commit
d45b925155
26 changed files with 54 additions and 51 deletions
|
|
@ -1,12 +1,16 @@
|
|||
from app import app, ip_resolver, config_provider
|
||||
from _init import config_provider
|
||||
from storage import get_storage_driver
|
||||
from util.config.validators import BaseValidator, ConfigValidationException
|
||||
from util.ipresolver import NoopIPResolver
|
||||
|
||||
ip_resolver = NoopIPResolver()
|
||||
|
||||
|
||||
class StorageValidator(BaseValidator):
|
||||
name = "registry-storage"
|
||||
|
||||
@classmethod
|
||||
def validate(cls, config, user, user_password):
|
||||
def validate(cls, config, user, user_password, app):
|
||||
""" Validates registry storage. """
|
||||
replication_enabled = config.get('FEATURE_STORAGE_REPLICATION', False)
|
||||
|
||||
|
|
|
|||
Reference in a new issue