EOX GitLab Instance
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ESA
PRISM
VS
Commits
a74f444a
Commit
a74f444a
authored
4 years ago
by
Lubomir Dolezal
Browse files
Options
Downloads
Patches
Plain Diff
allowing registrar to not have bucket set to allow re-registering old collections
parent
a6fee10c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/registrar.py
+6
-7
6 additions, 7 deletions
core/registrar.py
with
6 additions
and
7 deletions
core/registrar.py
+
6
−
7
View file @
a74f444a
...
...
@@ -147,12 +147,15 @@ class RegistrationError(Exception):
@transaction.atomic
def
registrar
(
collection
,
objects_prefix
,
upload_container
,
replace
=
False
,
client
=
None
,
registered_set_key
=
None
objects_prefix
,
upload_container
=
None
,
replace
=
False
,
client
=
None
,
registered_set_key
=
None
):
logger
.
info
(
"
Starting registration of product
'
%s
'
.
"
%
objects_prefix
)
metadata_package
,
data_package
,
has_vrt
=
None
,
None
,
None
metadata_package
,
data_package
=
None
,
None
if
not
upload_container
:
# assuming objects_prefix = bucket/itemname
upload_container
=
objects_prefix
.
split
(
"
/
"
)[
0
]
objects_prefix
=
objects_prefix
.
split
(
"
/
"
)[
1
]
with
SwiftService
()
as
swift
:
list_parts_gen
=
swift
.
list
(
container
=
upload_container
,
options
=
{
"
prefix
"
:
objects_prefix
},
...
...
@@ -165,11 +168,7 @@ def registrar(
metadata_package
=
item
[
"
name
"
]
elif
item
[
"
name
"
].
endswith
(
"
.TIF
"
)
or
\
item
[
"
name
"
].
endswith
(
"
.tif
"
):
if
has_vrt
is
not
True
:
data_package
=
item
[
"
name
"
]
elif
item
[
"
name
"
].
endswith
(
"
.vrt
"
):
data_package
=
item
[
"
name
"
]
has_vrt
=
True
elif
not
item
[
"
name
"
].
endswith
(
"
.tar
"
):
raise
RegistrationError
(
"
Product with objects prefix
'
%s
'
has
"
...
...
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