Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
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
Levin Zimmermann
wendelin
Commits
d681144c
Commit
d681144c
authored
May 29, 2018
by
Klaus Wölfel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try to use existing Data (Bucket) Stream with same device, project, resource
parent
c4ee7abf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/IngestionPolicy_getIngestionOperationAndParameterDict.py
.../IngestionPolicy_getIngestionOperationAndParameterDict.py
+14
-4
No files found.
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/IngestionPolicy_getIngestionOperationAndParameterDict.py
View file @
d681144c
...
...
@@ -70,10 +70,20 @@ def init_input_line(input_line, operation_line):
for
data_sink_type
in
data_sink_type_list
:
# This should be more generic
if
data_sink_type
not
in
(
"Progress Indicator"
,
"Data Ingestion Batch"
):
data_sink
=
portal
.
getDefaultModule
(
data_sink_type
).
newContent
(
portal_type
=
data_sink_type
,
reference
=
"%s-%s"
%
(
data_ingestion_reference
,
resource_reference
))
data_sink
.
validate
()
# first try to find existing validated data sink
# with same device, project, resource (but can be different source)
data_sink
=
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
data_sink_type
,
validation_state
=
"validated"
,
item_device_relative_url
=
operation_line
.
getAggregateDevice
(),
item_project_relative_url
=
input_line
.
getDestinationProject
(),
item_resource_uid
=
input_line
.
getResourceUid
())
if
data_sink
is
None
:
data_sink
=
portal
.
getDefaultModule
(
data_sink_type
).
newContent
(
portal_type
=
data_sink_type
,
reference
=
"%s-%s"
%
(
data_ingestion_reference
,
resource_reference
))
data_sink
.
validate
()
data_sink_list
.
append
(
data_sink
)
input_line
.
setAggregateValueList
(
...
...
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