Switch ipresolver to always be defined in the storage context

We now use a no-op IP resolver instead of an IF check

Fixes https://jira.prod.coreos.systems/browse/QS-38
This commit is contained in:
Joseph Schorr 2017-10-17 14:29:40 -04:00
parent 5dfa46ed56
commit 8194f5cf72
3 changed files with 27 additions and 3 deletions

View file

@ -4,6 +4,7 @@ from storage.fakestorage import FakeStorage
from storage.distributedstorage import DistributedStorage
from storage.swift import SwiftStorage
from storage.downloadproxy import DownloadProxy
from util.ipresolver import NoopIPResolver
STORAGE_DRIVER_CLASSES = {
'LocalStorage': LocalStorage,
@ -33,7 +34,7 @@ class StorageContext(object):
self.metric_queue = metric_queue
self.chunk_cleanup_queue = chunk_cleanup_queue
self.config_provider = config_provider
self.ip_resolver = ip_resolver
self.ip_resolver = ip_resolver or NoopIPResolver()
class Storage(object):