Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
109
Merge Requests
109
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
06ec72b0
Commit
06ec72b0
authored
Nov 08, 2011
by
Antoine Catton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add json serialisation on non string parameter in softwaretype
This is usefull for slave_partition_list
parent
8a962ea3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
slapos/recipe/softwaretype.py
slapos/recipe/softwaretype.py
+5
-1
No files found.
slapos/recipe/softwaretype.py
View file @
06ec72b0
...
@@ -29,6 +29,7 @@ import os
...
@@ -29,6 +29,7 @@ import os
import
sys
import
sys
import
copy
import
copy
from
ConfigParser
import
ConfigParser
from
ConfigParser
import
ConfigParser
import
json
import
subprocess
import
subprocess
import
slapos.slap
import
slapos.slap
import
netaddr
import
netaddr
...
@@ -99,7 +100,10 @@ class Recipe:
...
@@ -99,7 +100,10 @@ class Recipe:
buildout
.
add_section
(
'slap-parameter'
)
buildout
.
add_section
(
'slap-parameter'
)
for
parameter
,
value
in
self
.
parameter_dict
.
items
():
for
parameter
,
value
in
self
.
parameter_dict
.
items
():
if
isinstance
(
value
,
str
):
buildout
.
set
(
'slap-parameter'
,
parameter
,
value
)
buildout
.
set
(
'slap-parameter'
,
parameter
,
value
)
else
:
buildout
.
set
(
'slap-parameter'
,
parameter
,
json
.
dumps
(
value
))
buildout
.
add_section
(
'slap-network-information'
)
buildout
.
add_section
(
'slap-network-information'
)
buildout
.
set
(
'slap-network-information'
,
'local-ipv4'
,
buildout
.
set
(
'slap-network-information'
,
'local-ipv4'
,
...
...
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