Commit bc6240bc authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[dock] Allow to disable discovery of environments

Allows to speed up manipulation if the environment is already
known and available.
parent d6084917
...@@ -55,7 +55,7 @@ class Host(object): ...@@ -55,7 +55,7 @@ class Host(object):
images_cache = {} images_cache = {}
def __init__(self, images_cache=None, raise_on_errors=True): def __init__(self, images_cache=None, raise_on_errors=True, discover=True):
# Initialisations # Initialisations
self.raise_on_errors = raise_on_errors self.raise_on_errors = raise_on_errors
...@@ -71,7 +71,8 @@ class Host(object): ...@@ -71,7 +71,8 @@ class Host(object):
Host.images_cache = simplejson.load(f) Host.images_cache = simplejson.load(f)
# Discover the environments # Discover the environments
(self.processing_environments, self.db_environments) = self._discover_environments() if discover:
(self.processing_environments, self.db_environments) = self._discover_environments()
# (If necessary) Save the known infos about the images # (If necessary) Save the known infos about the images
if self.images_cache_filename is not None: if self.images_cache_filename is not None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment