Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos-caddy
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
Guillaume Hervier
slapos-caddy
Commits
fad66997
Commit
fad66997
authored
Sep 24, 2012
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for non-string storage definition.
In preparation for better ERP5 clusterisation.
parent
020bb119
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
slapos/recipe/zeo/__init__.py
slapos/recipe/zeo/__init__.py
+17
-11
No files found.
slapos/recipe/zeo/__init__.py
View file @
fad66997
...
...
@@ -56,7 +56,9 @@ class Recipe(GenericBaseRecipe):
'zeo-filestorage-snippet.conf.in'
)
# Prepare all filestorages
filestorage_snippet
=
""
for
storage_definition
in
self
.
options
[
'storage'
].
splitlines
():
storage
=
self
.
options
[
'storage'
]
if
isinstance
(
storage
,
basestring
):
for
storage_definition
in
storage
.
splitlines
():
storage_definition
=
storage_definition
.
strip
()
if
not
storage_definition
:
continue
...
...
@@ -67,6 +69,10 @@ class Recipe(GenericBaseRecipe):
zodb_path
=
q
.
split
(
'='
)[
1
].
strip
()
filestorage_snippet
+=
self
.
substituteTemplate
(
snippet_filename
,
dict
(
storage_name
=
storage_name
,
path
=
zodb_path
))
else
:
for
storage_name
,
path
in
storage
:
filestorage_snippet
+=
self
.
substituteTemplate
(
snippet_filename
,
{
'storage_name'
:
storage_name
,
'path'
:
path
})
config
=
dict
(
zeo_ip
=
self
.
options
[
'ip'
],
...
...
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