Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6°] - Release/v1.3.0 register testdata: update dpp/irs test data and script #145

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ The changelog format is based on [Keep a Changelog](https://keepachangelog.com/e
- Enabled drill down in tree of components
- Add IRS configuration to the helm values

## Updated
- Update dpp/irs test data edc assets and script to register them

## Issues Fixed
- Fix IRS tree component bugs related to the Digital Twin parsing
- Fix IRS job tracker to one single job.
Expand Down
18 changes: 9 additions & 9 deletions deployment/infrastructure/init-provider-dtr-irs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,28 +105,28 @@ echo



echo '**************************Battery Pack**********************'
echo '**************************Battery Module**********************'

echo
# Create Submodel data
echo "Create Battery pack sample data..."
curl -X POST -H 'Content-Type: application/json' -s --data "@resources/irs/payloads/EVPACK-TRJ712.json" $SUBMODEL_SERVER/provider_backend/data/${DT2_SUBMODEL_ID_1}
echo "Create Battery module sample data..."
curl -X POST -H 'Content-Type: application/json' -s --data "@resources/irs/payloads/EVMODULE-TRJ712.json" $SUBMODEL_SERVER/provider_backend/data/${DT2_SUBMODEL_ID_1}
echo

echo "Create Battery pack BomAsBuilt sample data..."
curl -X POST -H 'Content-Type: application/json' -s --data "@resources/irs/payloads/singleLevelUsageAsBuilt-EVPACK-TRJ712.json" $SUBMODEL_SERVER/provider_backend/data/${DT2_SUBMODEL_ID_2}
echo "Create Battery module BomAsBuilt sample data..."
curl -X POST -H 'Content-Type: application/json' -s --data "@resources/irs/payloads/singleLevelUsageAsBuilt-EVMODULE-TRJ712.json" $SUBMODEL_SERVER/provider_backend/data/${DT2_SUBMODEL_ID_2}
echo

echo "Create Battery pack BomAsUsage sample data..."
curl -X POST -H 'Content-Type: application/json' -s --data "@resources/irs/payloads/singleLevelBomAsBuilt-EVPACK-TRJ712.json" $SUBMODEL_SERVER/provider_backend/data/${DT2_SUBMODEL_ID_3}
echo "Create Battery module BomAsUsage sample data..."
curl -X POST -H 'Content-Type: application/json' -s --data "@resources/irs/payloads/singleLevelBomAsBuilt-EVMODULE-TRJ712.json" $SUBMODEL_SERVER/provider_backend/data/${DT2_SUBMODEL_ID_3}
echo


# Create a digital twin and register inside CX registry
# To authenticate against CX registry, one needs a valid bearer token which can be issued through postman given the clientId and clientSecret
echo "Create a DT for asset 3 and register it devo CX registry..."

curl -X POST -s -H 'Content-Type: application/json' --data "@resources/irs/digitaltwins/DT-EVPACK-TRJ712+BOMAsBuilt.json" $REGISTRY_URL
curl -X POST -s -H 'Content-Type: application/json' --data "@resources/irs/digitaltwins/DT-EVMODULE-TRJ712+BOMAsBuilt.json" $REGISTRY_URL
echo
echo

Expand All @@ -143,7 +143,7 @@ curl -X POST -H 'Content-Type: application/json' -s --data "@resources/irs/paylo
echo

echo "Create Battery Cell BomAsUsage sample data..."
curl -X POST -H 'Content-Type: application/json' -s --data "@resources/irs/payloads/singleLevelUsageAsBuilt-CTA-13123.json" $SUBMODEL_SERVER/provider_backend/data/${DT2_SUBMODEL_ID_3}
curl -X POST -H 'Content-Type: application/json' -s --data "@resources/irs/payloads/singleLevelUsageAsBuilt-CTA-13123.json" $SUBMODEL_SERVER/provider_backend/data/${DT3_SUBMODEL_ID_3}
echo

# Create a digital twin and register inside CX registry
Expand Down
19 changes: 8 additions & 11 deletions deployment/infrastructure/resources/irs/assets/DT-BAT-XYZ789.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
{
"@context": {
"dct": "https://purl.org/dc/terms/",
"tx": "https://w3id.org/tractusx/v0.0.1/ns/",
"edc": "https://w3id.org/edc/v0.0.1/ns/",
"dcat": "https://www.w3.org/ns/dcat/",
"odrl": "http://www.w3.org/ns/odrl/2/",
"dspace": "https://w3id.org/dspace/v0.8/"
},
"@context": {},
"asset": {
"@type": "Asset",
"@id": "urn:uuid:3e4a5957-f226-478a-ab18-79ced49d6195",
"@id": "urn:uuid:3e4a5957-f226-478a-ab18-79ced49d6195",
"properties": {
"description": "DPP EDC Test Asset"
"description": "IRS EDC Test Asset"
}
},
"dataAddress": {
"@type": "DataAddress",
"type": "HttpData",
"baseUrl": "https://materialpass.int.demo.catena-x.net/provider_backend/data/urn:uuid:3e4a5957-f226-478a-ab18-79ced49d6195"
"baseUrl": "https://materialpass.int.demo.catena-x.net/provider_backend",
"proxyPath": "true",
"proxyBody": "false",
"proxyMethod": "false",
"proxyQueryParams": "false"
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
{
"@context": {
"dct": "https://purl.org/dc/terms/",
"tx": "https://w3id.org/tractusx/v0.0.1/ns/",
"edc": "https://w3id.org/edc/v0.0.1/ns/",
"dcat": "https://www.w3.org/ns/dcat/",
"odrl": "http://www.w3.org/ns/odrl/2/",
"dspace": "https://w3id.org/dspace/v0.8/"
},
"@context": {},
"asset": {
"@type": "data.core.digitalTwinRegistry",
"@type": "Asset",
"@id": "registry-asset",
"properties": {
"type": "data.core.digitalTwinRegistry",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
{
"@context": {
"dct": "https://purl.org/dc/terms/",
"tx": "https://w3id.org/tractusx/v0.0.1/ns/",
"edc": "https://w3id.org/edc/v0.0.1/ns/",
"dcat": "https://www.w3.org/ns/dcat/",
"odrl": "http://www.w3.org/ns/odrl/2/",
"dspace": "https://w3id.org/dspace/v0.8/"
},
"@context": {},
"@id": "6289e746-0390-4a4a-8cd3-3c10fb701bd7",
"@type": "ContractDefinition",
"accessPolicyId": "e3ffbbcb-1e6c-406c-91e8-cf0bf191b807",
"contractPolicyId": "e3ffbbcb-1e6c-406c-91e8-cf0bf191b807",
"accessPolicyId": "id-3.0-trace",
"contractPolicyId": "id-3.0-trace",
"assetsSelector" : {
"@type" : "CriterionDto",
"operandLeft": "https://w3id.org/edc/v0.0.1/ns/id",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
{
"@context": {
"dct": "https://purl.org/dc/terms/",
"tx": "https://w3id.org/tractusx/v0.0.1/ns/",
"edc": "https://w3id.org/edc/v0.0.1/ns/",
"dcat": "https://www.w3.org/ns/dcat/",
"odrl": "http://www.w3.org/ns/odrl/2/",
"dspace": "https://w3id.org/dspace/v0.8/"
},
"@context": {},
"@id": "aead5322-5c42-4954-bb78-4319638923cd",
"@type": "ContractDefinition",
"accessPolicyId": "4b480f48-79a0-4851-a56c-6ef71e19ebc4",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
{
"@context": {
"odrl": "http://www.w3.org/ns/odrl/2/leftOperand"
"odrl": "http://www.w3.org/ns/odrl/2/"
},
"@type": "PolicyDefinitionRequestDto",
"@id": "e3ffbbcb-1e6c-406c-91e8-cf0bf191b807",
"@id": "id-3.0-trace",
"policy": {
"@type": "Policy",
"odrl:permission" : [{
"odrl:action": "USE",
"odrl:constraint": {
"odrl:constraint": {
"@type": "LogicalConstraint",
"odrl:or": [
"@type": "Policy",
"odrl:permission": [
{
"@type": "Contraint",
"odrl:leftOperand": "BusinessPartnerNumber",
"odrl:operator": "EQ",
"odrl:rightOperand": "BPNL00000000CBA5"
"odrl:action": "USE",
"odrl:constraint": {
"@type": "AtomicConstraint",
"odrl:or": [
{
"@type": "Constraint",
"odrl:leftOperand": "PURPOSE",
"odrl:operator": {
"@id": "odrl:eq"
},
"odrl:rightOperand": "ID 3.0 Trace"
}
]
}
}
]
}
}
}]
]
}
}
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
{
"@context": {
"odrl": "http://www.w3.org/ns/odrl/2/leftOperand"
"odrl": "http://www.w3.org/ns/odrl/2/"
},
"@type": "PolicyDefinitionRequestDto",
"@id": "4b480f48-79a0-4851-a56c-6ef71e19ebc4",
"policy": {
"@type": "Policy",
"odrl:permission" : [{
"odrl:action": "USE",
"odrl:constraint": {
"odrl:constraint": {
"@type": "LogicalConstraint",
"odrl:or": [
{
"@type": "Contraint",
"odrl:leftOperand": "BusinessPartnerNumber",
"odrl:operator": "EQ",
"odrl:rightOperand": "BPNL00000000CBA5"
}
]
}
}
}]
"@type": "Policy",
"odrl:permission": []
}
}
Loading
Loading