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
Nirina Malard
slapos
Commits
b54e9b2a
Commit
b54e9b2a
authored
Jul 03, 2014
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stork: fix previous commit
parent
aca5d6ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
slapos/recipe/stork/__init__.py
slapos/recipe/stork/__init__.py
+8
-6
software/stork/software.cfg
software/stork/software.cfg
+3
-0
No files found.
slapos/recipe/stork/__init__.py
View file @
b54e9b2a
...
@@ -181,31 +181,33 @@ class AppSubmit(GenericBaseRecipe):
...
@@ -181,31 +181,33 @@ class AppSubmit(GenericBaseRecipe):
stork_submit
=
os
.
path
.
join
(
self
.
options
[
'bin'
].
strip
(),
'stork_submit'
)
stork_submit
=
os
.
path
.
join
(
self
.
options
[
'bin'
].
strip
(),
'stork_submit'
)
file_list
=
'{}'
file_list
=
'{}'
if
str
(
self
.
options
.
get
(
'src_from_file'
)).
lower
()
in
[
'y'
,
'yes'
,
'1'
,
'true'
]
\
if
str
(
self
.
options
.
get
(
'src_from_file'
)).
lower
()
in
[
'y'
,
'yes'
,
'1'
,
'true'
]
:
and
os
.
path
.
exists
(
source_url_list
):
if
os
.
path
.
exists
(
source_url_list
):
with
open
(
source_url_list
,
'r'
)
as
file_source
:
with
open
(
source_url_list
,
'r'
)
as
file_source
:
file_list
=
json
.
loads
(
file_source
.
read
())
file_list
=
json
.
loads
(
file_source
.
read
())
else
:
else
:
file_list
=
json
.
loads
(
source_url_list
)
file_list
=
json
.
loads
(
source_url_list
)
with
open
(
submitfile
,
'w'
)
as
stork_file
:
with
open
(
submitfile
,
'w'
)
as
stork_file
:
# XXX - Simply, we don't want to download file twice with stork,
# XXX - Simply, we don't want to download file twice with stork,
# skip file if it already exists at dest_url (only for file:path)
# skip file if it already exists at dest_url (only for file:path)
for
filename
in
file_list
:
for
filename
in
file_list
:
log_name
=
filename
if
dest_url
.
startswith
(
'file:'
):
if
dest_url
.
startswith
(
'file:'
):
destination
=
os
.
path
.
join
(
dest_url
.
replace
(
'file:'
,
''
),
filename
)
destination
=
os
.
path
.
join
(
dest_url
.
replace
(
'file:'
,
''
),
filename
)
if
os
.
path
.
exists
(
destination
+
'_part'
)
or
os
.
path
.
exists
(
destination
):
if
os
.
path
.
exists
(
destination
+
'_part'
)
or
os
.
path
.
exists
(
destination
):
continue
continue
download_dest_list
[
filename
]
=
destination
download_dest_list
[
filename
]
=
destination
filename
=
filename
+
'_part'
stork_file
.
write
(
"""[
stork_file
.
write
(
"""[
src_url="%s";
src_url="%s";
dest_url="%s/%s
_part
";
dest_url="%s/%s";
err = "%s.err";
err = "%s.err";
output = "%s.out";
output = "%s.out";
dap_type = "transfer";
dap_type = "transfer";
set_permission = "600" ;
set_permission = "600" ;
]
]
"""
%
(
file_list
[
filename
],
dest_url
,
filename
,
filename
,
file
name
)
"""
%
(
file_list
[
filename
],
dest_url
,
filename
,
log_name
,
log_
name
)
)
)
parameter
=
dict
(
submit
=
stork_submit
,
parameter
=
dict
(
submit
=
stork_submit
,
...
...
software/stork/software.cfg
View file @
b54e9b2a
[buildout]
[buildout]
develop =
${:parts-directory}/slapos.cookbook-repository
parts =
parts =
stork
stork
slapos-cookbook
slapos-cookbook
...
...
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