| src | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
Creation of an ILI report
A function that will create a ILI report asset and sequence.
Input
Arguments
pipeline_id: astringwhich should be a valid uuid for a pipeline.date: astringformatted as an ISO date representing the date of the inspection.vendor_name: astringthe company who conducted the ILI inspectionreport_type: astringthe type of the report possible values:finalpreliminary
inspection_type: astringthe type of technology used possible values:mfltfiutematcalipercombo_mfl_and_tficombo_mfl_and_utcombo_mfl_and_ec
file_details: aobjectrepresenting uploaded report file.pipebody_tolerances: anobjectrepresenting the tolerances for the pipebodyhaz_tolerances: anobjectrepresenting the tolerances for the heat affected zone (HAZ)
Environment
ORG_ID: the organization idPROJECT_ID: the id of the data project where the pipeline data is foundENV: the environment of the platform e.g.devorstgetc.
Creating the function on the platform
To create this function on the platform using the cli set up the port forwarding as shown in README.
Then run the following command to create the function.
cargo run functions create \
-f functions/ili_creation \
-n uploadili \
-d "Processes an ILI file and create the sequences and assets associated with that report" \
-i pipeline_id=string \
-i date=string \
-i vendor_name=string \
-i report_type=string \
-i inspection_type=string \
-i file_details=object \
-i pipebody_tolerances=object \
-i haz_tolerances=object
Testing the function locally
You can run and test the function locally by running
cargo run
Then you can check it work with curl as follows
curl -X POST localhost:8080 -v \
-d "\"{\\\"pipeline_id\\\": \\\"0195a527-f16b-7d83-b936-35bc2dd92f9d\\\"}\""