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
Paul Graydon
slapos
Commits
b4914c09
Commit
b4914c09
authored
Apr 24, 2020
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
recipe/pbs: slave-instance-list is already a list of JSON
See
nexedi/slapos!739
parent
5afb8605
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
slapos/recipe/pbs.py
slapos/recipe/pbs.py
+2
-3
slapos/test/recipe/test_pbs.py
slapos/test/recipe/test_pbs.py
+1
-2
No files found.
slapos/recipe/pbs.py
View file @
b4914c09
...
...
@@ -57,7 +57,7 @@ class Recipe(GenericSlapRecipe, Notify, Callback):
def
_options
(
self
,
options
):
options
[
'rdiff-backup-data-folder'
]
=
""
if
'slave-instance-list'
in
options
:
for
slave
in
json
.
loads
(
options
[
'slave-instance-list'
])
:
for
slave
in
options
[
'slave-instance-list'
]
:
if
slave
[
'type'
]
==
'pull'
:
options
[
'rdiff-backup-data-folder'
]
=
str
(
os
.
path
.
join
(
options
[
'directory'
],
slave
[
'name'
],
'rdiff-backup-data'
))
...
...
@@ -299,8 +299,7 @@ class Recipe(GenericSlapRecipe, Notify, Callback):
if
self
.
optionIsTrue
(
'client'
,
True
):
self
.
logger
.
info
(
"Client mode"
)
slaves
=
json
.
loads
(
self
.
options
[
'slave-instance-list'
])
slaves
=
self
.
options
[
'slave-instance-list'
]
known_hosts
=
KnownHostsFile
(
self
.
options
[
'known-hosts'
])
with
known_hosts
:
for
slave
in
slaves
:
...
...
slapos/test/recipe/test_pbs.py
View file @
b4914c09
...
...
@@ -82,7 +82,7 @@ class PBSTest(unittest.TestCase):
'run-directory'
:
run_directory
,
'cron-entries'
:
cron_directory
,
'known-hosts'
:
'TEST_KNOWN_HOSTS'
,
'slave-instance-list'
:
'''
[
'slave-instance-list'
:
[
{
"url"
:
"http://url.to.pull/"
,
"type"
:
"pull"
,
...
...
@@ -101,7 +101,6 @@ class PBSTest(unittest.TestCase):
"frequency"
:
"TEST_FREQUENCY"
}
]
'''
})
recipe
.
_install
()
...
...
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