Commit 74822133 authored by Romain Courteaud's avatar Romain Courteaud 🐙

librecipe: stop calling getInstanceParameterDict by default

Call it only on demand, to get rid of useless http queries
parent b57ae2e6
Pipeline #40011 failed with stage
in 0 seconds
......@@ -264,7 +264,12 @@ class BaseSlapRecipe:
self.request = self.computer_partition.request
self.setConnectionDict = self.computer_partition.setConnectionDict
self._createDefaultDirectoryStructure()
self.parameter_dict = self.computer_partition.getInstanceParameterDict()
# Lazy load of the instance parameter dict
# to prevent an http calls if not needed
@property
def parameter_dict(self):
return self.computer_partition.getInstanceParameterDict()
# call children part of install
path_list = self._install()
......
......@@ -66,7 +66,12 @@ class GenericSlapRecipe(GenericBaseRecipe):
self.request = self.computer_partition.request
self.setConnectionDict = self.computer_partition.setConnectionDict
self.parameter_dict = self.computer_partition.getInstanceParameterDict()
# Lazy load of the instance parameter dict
# to prevent an http calls if not needed
@property
def parameter_dict(self):
return self.computer_partition.getInstanceParameterDict()
# call children part of install
path_list = self._install()
......
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