Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Ivan Tyagov
slapos
Commits
74822133
Commit
74822133
authored
4 weeks ago
by
Romain Courteaud
Browse files
Options
Download
Email Patches
Plain Diff
librecipe: stop calling getInstanceParameterDict by default
Call it only on demand, to get rid of useless http queries
parent
b57ae2e6
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
slapos/recipe/librecipe/__init__.py
slapos/recipe/librecipe/__init__.py
+6
-1
slapos/recipe/librecipe/genericslap.py
slapos/recipe/librecipe/genericslap.py
+6
-1
No files found.
slapos/recipe/librecipe/__init__.py
View file @
74822133
...
...
@@ -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
()
...
...
This diff is collapsed.
Click to expand it.
slapos/recipe/librecipe/genericslap.py
View file @
74822133
...
...
@@ -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
()
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment