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
Jean-Paul Smets
slapos
Commits
40d8562c
Commit
40d8562c
authored
Oct 24, 2012
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use createWrapper() for rdiff-backup
parent
bd35420c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
slapos/recipe/pbs.py
slapos/recipe/pbs.py
+11
-13
No files found.
slapos/recipe/pbs.py
View file @
40d8562c
...
@@ -134,8 +134,7 @@ class Recipe(GenericSlapRecipe, Notify, Callback):
...
@@ -134,8 +134,7 @@ class Recipe(GenericSlapRecipe, Notify, Callback):
'host'
:
parsed_url
.
hostname
,
'host'
:
parsed_url
.
hostname
,
}
}
command
=
[
self
.
options
[
'rdiffbackup-binary'
]]
parameters
=
[
'--remote-schema'
,
remote_schema
]
command
.
extend
([
'--remote-schema'
,
remote_schema
])
remote_directory
=
'%(port)s::%(path)s'
%
{
'port'
:
parsed_url
.
port
,
remote_directory
=
'%(port)s::%(path)s'
%
{
'port'
:
parsed_url
.
port
,
'path'
:
parsed_url
.
path
}
'path'
:
parsed_url
.
path
}
...
@@ -144,24 +143,23 @@ class Recipe(GenericSlapRecipe, Notify, Callback):
...
@@ -144,24 +143,23 @@ class Recipe(GenericSlapRecipe, Notify, Callback):
name_hash
)
name_hash
)
if
entry
[
'type'
]
==
'push'
:
if
entry
[
'type'
]
==
'push'
:
command
.
extend
([
'--restore-as-of'
,
'now'
])
parameters
.
extend
([
'--restore-as-of'
,
'now'
])
command
.
append
(
'--force'
)
parameters
.
append
(
'--force'
)
command
.
extend
([
local_directory
,
remote_directory
])
parameters
.
extend
([
local_directory
,
remote_directory
])
else
:
else
:
command
.
extend
([
remote_directory
,
local_directory
])
parameters
.
extend
([
remote_directory
,
local_directory
])
wrapper_basepath
=
os
.
path
.
join
(
self
.
options
[
'wrappers-directory'
],
wrapper_basepath
=
os
.
path
.
join
(
self
.
options
[
'wrappers-directory'
],
url_hash
)
url_hash
)
wrapper_path
=
wrapper_basepath
if
'notify'
in
entry
:
if
'notify'
in
entry
:
wrapper_path
=
'%s_raw'
%
wrapper_basepath
wrapper_path
=
wrapper_basepath
+
'_raw'
else
:
wrapper_path
=
wrapper_basepath
wrapper
=
self
.
createPythonScript
(
wrapper
=
self
.
createWrapper
(
name
=
wrapper_path
,
wrapper_path
,
command
=
self
.
options
[
'rdiffbackup-binary'
],
'slapos.recipe.librecipe.execute.execute'
,
parameters
=
parameters
)
[
str
(
i
)
for
i
in
command
]
)
path_list
.
append
(
wrapper
)
path_list
.
append
(
wrapper
)
if
'notify'
in
entry
:
if
'notify'
in
entry
:
...
...
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