Skip to content

Commit

Permalink
Merge pull request #145 from catenax-ng/release/v1.3.0-register-testdata
Browse files Browse the repository at this point in the history
[6°] - Release/v1.3.0 register testdata: update dpp/irs test data and script
  • Loading branch information
matbmoser authored Nov 3, 2023
2 parents 150ad03 + 072abcf commit ca8217e
Show file tree
Hide file tree
Showing 18 changed files with 710 additions and 585 deletions.
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

0 comments on commit ca8217e

Please sign in to comment.