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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Justin
slapos
Commits
20c649eb
Commit
20c649eb
authored
Oct 19, 2011
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to propagate multilines parameter
parent
3fe2bfbd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
11 deletions
+10
-11
slapos/recipe/request.py
slapos/recipe/request.py
+5
-6
software/erp5/instance-erp5-production.cfg
software/erp5/instance-erp5-production.cfg
+4
-4
software/erp5/software.cfg
software/erp5/software.cfg
+1
-1
No files found.
slapos/recipe/request.py
View file @
20c649eb
...
...
@@ -31,10 +31,6 @@ from slapos import slap as slapmodule
class
Recipe
(
object
):
def
parseMultiValues
(
self
,
string
):
return
dict
([
[
str
(
column
).
strip
()
for
column
in
line
.
split
(
'='
,
1
)]
for
line
in
str
(
string
).
splitlines
()
if
'='
in
line
])
def
__init__
(
self
,
buildout
,
name
,
options
):
self
.
logger
=
logging
.
getLogger
(
name
)
...
...
@@ -67,11 +63,14 @@ class Recipe(object):
filter_kw
=
{}
if
'sla'
in
options
:
filter_kw
=
self
.
parseMultiValues
(
options
[
'sla'
])
for
sla_parameter
in
options
[
'sla'
].
split
():
filter_kw
[
sla_parameter
]
=
options
[
'sla-%s'
%
sla_parameter
]
partition_parameter_kw
=
{}
if
'config'
in
options
:
partition_parameter_kw
=
self
.
parseMultiValues
(
options
[
'config'
])
for
config_parameter
in
options
[
'config'
].
split
():
partition_parameter_kw
[
config_parameter
]
=
\
options
[
'config-%s'
%
config_parameter
]
instance
=
self
.
request
(
options
[
'software-url'
],
software_type
,
options
[
'name'
],
partition_parameter_kw
=
partition_parameter_kw
,
...
...
software/erp5/instance-erp5-production.cfg
View file @
20c649eb
...
...
@@ -20,8 +20,8 @@ offline = true
[request-common]
recipe = slapos.cookbook:request
software-url = $${slap-connection:software-release-url}
sla =
computer_guid=
$${slap-connection:computer-id}
sla =
computer_guid
sla-computer_guid =
$${slap-connection:computer-id}
return = url
server-url = $${slap-connection:server-url}
key-file = $${slap-connection:key-file}
...
...
@@ -52,8 +52,8 @@ software-type = kumofs
[request-tidstorage]
<=request-common
name = TidStorage
config =
json=
$${slap-parameter:json}
config =
json
config-json =
$${slap-parameter:json}
software-type = tidstorage
# rest of parts are candidates for some generic stuff
...
...
software/erp5/software.cfg
View file @
20c649eb
...
...
@@ -74,7 +74,7 @@ mode = 0644
[template-erp5-production]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-erp5-production.cfg
md5sum =
25bd7e8dfa2d7588c6c2c648cd291b47
md5sum =
1c7a514854edab9cf92c28f2951147d5
output = ${buildout:directory}/template-erp5-production.cfg
mode = 0644
...
...
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