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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Matevz Golob
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
Hide 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
import
sys
import
copy
from
ConfigParser
import
ConfigParser
import
json
import
subprocess
import
slapos.slap
import
netaddr
...
...
@@ -99,7 +100,10 @@ class Recipe:
buildout
.
add_section
(
'slap-parameter'
)
for
parameter
,
value
in
self
.
parameter_dict
.
items
():
buildout
.
set
(
'slap-parameter'
,
parameter
,
value
)
if
isinstance
(
value
,
str
):
buildout
.
set
(
'slap-parameter'
,
parameter
,
value
)
else
:
buildout
.
set
(
'slap-parameter'
,
parameter
,
json
.
dumps
(
value
))
buildout
.
add_section
(
'slap-network-information'
)
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