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
107
Merge Requests
107
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
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):
...
@@ -56,7 +56,9 @@ class Recipe(GenericBaseRecipe):
'zeo-filestorage-snippet.conf.in'
)
'zeo-filestorage-snippet.conf.in'
)
# Prepare all filestorages
# Prepare all filestorages
filestorage_snippet
=
""
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
()
storage_definition
=
storage_definition
.
strip
()
if
not
storage_definition
:
if
not
storage_definition
:
continue
continue
...
@@ -67,6 +69,10 @@ class Recipe(GenericBaseRecipe):
...
@@ -67,6 +69,10 @@ class Recipe(GenericBaseRecipe):
zodb_path
=
q
.
split
(
'='
)[
1
].
strip
()
zodb_path
=
q
.
split
(
'='
)[
1
].
strip
()
filestorage_snippet
+=
self
.
substituteTemplate
(
filestorage_snippet
+=
self
.
substituteTemplate
(
snippet_filename
,
dict
(
storage_name
=
storage_name
,
path
=
zodb_path
))
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
(
config
=
dict
(
zeo_ip
=
self
.
options
[
'ip'
],
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