Commit 87722837 authored by Łukasz Nowak's avatar Łukasz Nowak

fixup! librecipe: stop calling getInstanceParameterDict by default

parent abc9492b
Pipeline #40037 failed with stage
in 0 seconds
...@@ -253,6 +253,12 @@ class BaseSlapRecipe: ...@@ -253,6 +253,12 @@ class BaseSlapRecipe:
"""Generates password. Shall be secured, until then all are insecure""" """Generates password. Shall be secured, until then all are insecure"""
return 'insecure' return 'insecure'
# 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()
def install(self): def install(self):
self.logger.warning("BaseSlapRecipe has been deprecated. Use " \ self.logger.warning("BaseSlapRecipe has been deprecated. Use " \
"GenericBaseRecipe or GenericSlapRecipe instead.") "GenericBaseRecipe or GenericSlapRecipe instead.")
...@@ -265,12 +271,6 @@ class BaseSlapRecipe: ...@@ -265,12 +271,6 @@ class BaseSlapRecipe:
self.setConnectionDict = self.computer_partition.setConnectionDict self.setConnectionDict = self.computer_partition.setConnectionDict
self._createDefaultDirectoryStructure() self._createDefaultDirectoryStructure()
# 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 # call children part of install
path_list = self._install() path_list = self._install()
......
...@@ -51,6 +51,12 @@ class GenericSlapRecipe(GenericBaseRecipe): ...@@ -51,6 +51,12 @@ class GenericSlapRecipe(GenericBaseRecipe):
self.key_file = slap_connection.get('key-file') self.key_file = slap_connection.get('key-file')
self.cert_file = slap_connection.get('cert-file') self.cert_file = slap_connection.get('cert-file')
# 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()
def install(self): def install(self):
cache_key = "%s_%s" % (self.computer_id, self.computer_partition_id) cache_key = "%s_%s" % (self.computer_id, self.computer_partition_id)
...@@ -67,12 +73,6 @@ class GenericSlapRecipe(GenericBaseRecipe): ...@@ -67,12 +73,6 @@ class GenericSlapRecipe(GenericBaseRecipe):
self.request = self.computer_partition.request self.request = self.computer_partition.request
self.setConnectionDict = self.computer_partition.setConnectionDict self.setConnectionDict = self.computer_partition.setConnectionDict
# 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 # call children part of install
path_list = self._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