Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
telecom
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
Roque
telecom
Commits
35a29fd2
Commit
35a29fd2
authored
May 03, 2017
by
Roque Porchetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup and minor changes in scripts.
parent
124e2339
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
11 deletions
+7
-11
bt5/erp5_wendelin_telecom_ingestion/PathTemplateItem/portal_callables/DataIngestionLine_writeEmbulkIngestionToDataStream.py
...les/DataIngestionLine_writeEmbulkIngestionToDataStream.py
+2
-1
bt5/erp5_wendelin_telecom_ingestion/PathTemplateItem/portal_callables/DataTransformation_transformFIFDataToDataArray.py
...llables/DataTransformation_transformFIFDataToDataArray.py
+1
-1
bt5/erp5_wendelin_telecom_ingestion/SkinTemplateItem/portal_skins/erp5_wendelin_telecom/IngestionPolicy_getIngestionOperationAndParameterDict.py
.../IngestionPolicy_getIngestionOperationAndParameterDict.py
+4
-9
No files found.
bt5/erp5_wendelin_telecom_ingestion/PathTemplateItem/portal_callables/DataIngestionLine_writeEmbulkIngestionToDataStream.py
View file @
35a29fd2
...
@@ -7,5 +7,6 @@ log("Decoded data_chunk size: " + str(len(decoded)))
...
@@ -7,5 +7,6 @@ log("Decoded data_chunk size: " + str(len(decoded)))
log
(
"FROM SCRIPT %s: appending to data stream: %s."
%
(
script
.
getId
(),
data_stream
))
log
(
"FROM SCRIPT %s: appending to data stream: %s."
%
(
script
.
getId
(),
data_stream
))
data_stream
.
appendData
(
decoded
)
data_stream
.
appendData
(
decoded
)
log
(
"FROM SCRIPT %s: ingested data successfully appended."
%
(
script
.
getId
()))
bt5/erp5_wendelin_telecom_ingestion/PathTemplateItem/portal_callables/DataTransformation_transformFIFDataToDataArray.py
View file @
35a29fd2
...
@@ -5,4 +5,4 @@ log("Processing raw data from Data Stream " + str(input_stream_data.getReference
...
@@ -5,4 +5,4 @@ log("Processing raw data from Data Stream " + str(input_stream_data.getReference
result
=
str
(
context
.
processRawData
(
input_stream_data
,
output_array
,
output_descriptor
))
result
=
str
(
context
.
processRawData
(
input_stream_data
,
output_array
,
output_descriptor
))
log
(
result
)
log
(
result
)
log
(
"Metadata stored in Data Descriptor "
+
str
(
output_descriptor
.
getReference
()))
log
(
"Metadata stored in Data Descriptor "
+
str
(
output_descriptor
))
#
.getReference()))
bt5/erp5_wendelin_telecom_ingestion/SkinTemplateItem/portal_skins/erp5_wendelin_telecom/IngestionPolicy_getIngestionOperationAndParameterDict.py
View file @
35a29fd2
...
@@ -44,8 +44,8 @@ if data_ingestion is None:
...
@@ -44,8 +44,8 @@ if data_ingestion is None:
if
not
specialise_value_list
:
if
not
specialise_value_list
:
specialise_value_list
=
[
x
.
getObject
()
for
x
in
portal_catalog
.
searchResults
(
specialise_value_list
=
[
x
.
getObject
()
for
x
in
portal_catalog
.
searchResults
(
portal_type
=
'Data Supply'
,
portal_type
=
'Data Supply'
,
reference
=
specialise_reference
,
reference
=
'default'
,
validation_state
=
'
default
'
)]
validation_state
=
'
validated
'
)]
log
(
"Data Suppliers list: "
+
str
(
specialise_value_list
))
log
(
"Data Suppliers list: "
+
str
(
specialise_value_list
))
...
@@ -85,15 +85,11 @@ if data_ingestion is None:
...
@@ -85,15 +85,11 @@ if data_ingestion is None:
reference
=
supply_line
.
getReference
(),
reference
=
supply_line
.
getReference
(),
resource
=
supply_line
.
getResource
(),
resource
=
supply_line
.
getResource
(),
)
)
#log("CURRENT LINE: " + str(current_line) + " - Resource: " + str(current_line.getResourceReference()))
if
current_line
.
getResourceReference
()
==
resource_reference
:
if
current_line
.
getResourceReference
()
==
resource_reference
:
#log("CURRENT LINE is an INPUT LINE")
input_line
=
current_line
input_line
=
current_line
elif
current_line
.
getResourceValue
().
getPortalType
()
==
"Data Operation"
:
elif
current_line
.
getResourceValue
().
getPortalType
()
==
"Data Operation"
:
#log("CURRENT LINE is an D.OPERATION LINE")
operation_line
=
current_line
operation_line
=
current_line
else
:
else
:
#log("CURRENT LINE nor INPUT or D.OP LINE, SET QUANTITY TO 0")
# we set quantity=0 for the empty line
# we set quantity=0 for the empty line
current_line
.
setQuantity
(
0
)
current_line
.
setQuantity
(
0
)
...
@@ -118,7 +114,6 @@ if data_ingestion is None:
...
@@ -118,7 +114,6 @@ if data_ingestion is None:
data_set
=
portal_catalog
.
getResultValue
(
data_set
=
portal_catalog
.
getResultValue
(
portal_type
=
"Data Set"
,
portal_type
=
"Data Set"
,
reference
=
dataset_reference
)
reference
=
dataset_reference
)
log
(
"Data Set found for dataset reference: "
+
dataset_reference
)
if
data_set
is
None
:
if
data_set
is
None
:
log
(
"Creating a new Data Set"
)
log
(
"Creating a new Data Set"
)
data_set
=
portal
.
data_set_module
.
newContent
(
data_set
=
portal
.
data_set_module
.
newContent
(
...
@@ -129,10 +124,10 @@ if data_ingestion is None:
...
@@ -129,10 +124,10 @@ if data_ingestion is None:
version
=
"001"
version
=
"001"
)
)
data_set
.
validate
()
data_set
.
validate
()
else
:
log
(
"Data Set found for dataset reference: "
+
data_set
.
getReference
())
input_line
.
setDefaultAggregateValue
(
data_set
)
input_line
.
setDefaultAggregateValue
(
data_set
)
else
:
else
:
# find ingestion line for current resource
# find ingestion line for current resource
for
line
in
data_ingestion
.
objectValues
(
portal_type
=
"Data Ingestion Line"
):
for
line
in
data_ingestion
.
objectValues
(
portal_type
=
"Data Ingestion Line"
):
...
...
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