Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
1b480e71
Commit
1b480e71
authored
6 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
ROHD-1175
: automatically append .tar or .tar.gz to surls if needed
parent
38466ceb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
LTA/LTAIngest/LTAIngestServer/LTAIngestTransferServer/lib/ltacp.py
+18
-1
18 additions, 1 deletion
...gest/LTAIngestServer/LTAIngestTransferServer/lib/ltacp.py
with
18 additions
and
1 deletion
LTA/LTAIngest/LTAIngestServer/LTAIngestTransferServer/lib/ltacp.py
+
18
−
1
View file @
1b480e71
...
...
@@ -232,6 +232,23 @@ class LtaCp:
# determine if input is file
input_is_file
=
self
.
is_soure_single_file
()
if
not
input_is_file
:
# make sure the file extension is .tar or .tar.gz
missing_suffix
=
""
if
self
.
gzip
:
if
not
(
self
.
dst_surl
.
endswith
(
"
.tar.gz
"
)
or
self
.
dst_surl
.
endswith
(
"
.tgz
"
)):
if
self
.
dst_surl
.
endswith
(
"
.tar
"
):
missing_suffix
=
"
.gz
"
else
:
missing_suffix
=
"
.tar.gz
"
else
:
if
not
self
.
dst_surl
.
endswith
(
"
.tar
"
):
missing_suffix
=
"
.tar
"
if
missing_suffix
:
self
.
dst_surl
+=
missing_suffix
logger
.
info
(
"
ltacp %s: appending missing suffix %s to surl: %s
"
,
self
.
logId
,
missing_suffix
,
self
.
dst_surl
)
dst_turl
=
convert_surl_to_turl
(
self
.
dst_surl
)
logger
.
info
(
'
ltacp %s: initiating transfer of %s:%s to surl=%s turl=%s
'
%
(
self
.
logId
,
self
.
src_host
,
...
...
@@ -520,7 +537,7 @@ class LtaCp:
logger
.
info
(
'
ltacp %s: remote and local md5 checksums are equal: %s
'
%
(
self
.
logId
,
md5_checksum_local
,))
logger
.
info
(
'
ltacp %s: fetching adler32 checksum from LTA...
'
%
self
.
logId
)
srm_ok
,
srm_file_size
,
srm_a32_checksum
=
get_srm_size_and_a32_checksum
(
self
.
dst_surl
,
'
ltacp %s
'
%
self
.
logId
)
srm_ok
,
srm_file_size
,
srm_a32_checksum
=
get_srm_size_and_a32_checksum
(
self
.
dst_surl
,
'
ltacp %s
:
'
%
self
.
logId
)
if
not
srm_ok
:
raise
LtacpException
(
'
ltacp %s: Could not get srm adler32 checksum for: %s
'
%
(
self
.
logId
,
self
.
dst_surl
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment