From 112f6203e7f779ca81a7527239aa332ae8ac1e17 Mon Sep 17 00:00:00 2001 From: Tiago PDM Date: Fri, 14 Oct 2022 15:06:18 +0100 Subject: [PATCH] refs #123 - adds bdns generation tools and adds sensibility for BRICKS_DOMAIN environment variable --- .github/workflows/generate-files.yaml | 115 ++++++++++++ fgt-bdns/networks/dev/bdns-bayer.json | 173 ++++++++++++++++++ fgt-bdns/networks/dev/bdns-gsk.json | 173 ++++++++++++++++++ fgt-bdns/networks/dev/bdns-msd.json | 173 ++++++++++++++++++ fgt-bdns/networks/dev/bdns-novo-nordisk.json | 173 ++++++++++++++++++ fgt-bdns/networks/dev/bdns-pfizer.json | 173 ++++++++++++++++++ fgt-bdns/networks/dev/bdns-pha-1.json | 173 ++++++++++++++++++ fgt-bdns/networks/dev/bdns-pha-2.json | 173 ++++++++++++++++++ fgt-bdns/networks/dev/bdns-roche.json | 173 ++++++++++++++++++ fgt-bdns/networks/dev/bdns-sanofi.json | 173 ++++++++++++++++++ fgt-bdns/networks/dev/bdns-takeda.json | 173 ++++++++++++++++++ fgt-bdns/networks/dev/bdns-traceability.json | 173 ++++++++++++++++++ fgt-bdns/networks/dev/bdns-whs-takeda.json | 173 ++++++++++++++++++ fgt-bdns/networks/dev/bdns-whs-zuellig.json | 173 ++++++++++++++++++ fgt-bdns/networks/dev/bdns-whs1.json | 173 ++++++++++++++++++ fgt-bdns/networks/dev/bdns-whs2.json | 173 ++++++++++++++++++ fgt-bdns/networks/dev/editable/bayer/bdns | 1 + fgt-bdns/networks/dev/editable/gsk/bdns | 1 + fgt-bdns/networks/dev/editable/msd/bdns | 1 + .../networks/dev/editable/novo-nordisk/bdns | 1 + fgt-bdns/networks/dev/editable/pfizer/bdns | 1 + fgt-bdns/networks/dev/editable/pha-1/bdns | 1 + fgt-bdns/networks/dev/editable/pha-2/bdns | 1 + fgt-bdns/networks/dev/editable/roche/bdns | 1 + fgt-bdns/networks/dev/editable/sanofi/bdns | 1 + fgt-bdns/networks/dev/editable/takeda/bdns | 1 + .../networks/dev/editable/traceability/bdns | 1 + .../networks/dev/editable/whs-takeda/bdns | 1 + .../networks/dev/editable/whs-zuellig/bdns | 1 + fgt-bdns/networks/dev/editable/whs1/bdns | 1 + fgt-bdns/networks/dev/editable/whs2/bdns | 1 + fgt-bdns/scripts/README.md | 28 +++ fgt-bdns/scripts/generate-files.py | 147 +++++++++++++++ fgt-bdns/scripts/helper-files/bdns-end | 13 ++ .../scripts/helper-files/bdns-mobile-app-end | 13 ++ .../helper-files/bdns-mobile-app-section | 4 + fgt-bdns/scripts/helper-files/bdns-section | 11 ++ fgt-bdns/scripts/helper-files/bdns-start | 9 + fgt-dsu-wizard/services/BatchService.js | 13 +- .../services/IndividualProductService.js | 14 +- fgt-dsu-wizard/services/OrderService.js | 19 +- fgt-dsu-wizard/services/ProductService.js | 11 +- fgt-dsu-wizard/services/SaleService.js | 32 +++- .../services/ShipmentCodeService.js | 18 +- .../services/ShipmentLineService.js | 25 ++- fgt-dsu-wizard/services/ShipmentService.js | 26 ++- fgt-dsu-wizard/services/StatusService.js | 19 +- 47 files changed, 3097 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/generate-files.yaml create mode 100644 fgt-bdns/networks/dev/bdns-bayer.json create mode 100644 fgt-bdns/networks/dev/bdns-gsk.json create mode 100644 fgt-bdns/networks/dev/bdns-msd.json create mode 100644 fgt-bdns/networks/dev/bdns-novo-nordisk.json create mode 100644 fgt-bdns/networks/dev/bdns-pfizer.json create mode 100644 fgt-bdns/networks/dev/bdns-pha-1.json create mode 100644 fgt-bdns/networks/dev/bdns-pha-2.json create mode 100644 fgt-bdns/networks/dev/bdns-roche.json create mode 100644 fgt-bdns/networks/dev/bdns-sanofi.json create mode 100644 fgt-bdns/networks/dev/bdns-takeda.json create mode 100644 fgt-bdns/networks/dev/bdns-traceability.json create mode 100644 fgt-bdns/networks/dev/bdns-whs-takeda.json create mode 100644 fgt-bdns/networks/dev/bdns-whs-zuellig.json create mode 100644 fgt-bdns/networks/dev/bdns-whs1.json create mode 100644 fgt-bdns/networks/dev/bdns-whs2.json create mode 100644 fgt-bdns/networks/dev/editable/bayer/bdns create mode 100644 fgt-bdns/networks/dev/editable/gsk/bdns create mode 100644 fgt-bdns/networks/dev/editable/msd/bdns create mode 100644 fgt-bdns/networks/dev/editable/novo-nordisk/bdns create mode 100644 fgt-bdns/networks/dev/editable/pfizer/bdns create mode 100644 fgt-bdns/networks/dev/editable/pha-1/bdns create mode 100644 fgt-bdns/networks/dev/editable/pha-2/bdns create mode 100644 fgt-bdns/networks/dev/editable/roche/bdns create mode 100644 fgt-bdns/networks/dev/editable/sanofi/bdns create mode 100644 fgt-bdns/networks/dev/editable/takeda/bdns create mode 100644 fgt-bdns/networks/dev/editable/traceability/bdns create mode 100644 fgt-bdns/networks/dev/editable/whs-takeda/bdns create mode 100644 fgt-bdns/networks/dev/editable/whs-zuellig/bdns create mode 100644 fgt-bdns/networks/dev/editable/whs1/bdns create mode 100644 fgt-bdns/networks/dev/editable/whs2/bdns create mode 100644 fgt-bdns/scripts/README.md create mode 100644 fgt-bdns/scripts/generate-files.py create mode 100644 fgt-bdns/scripts/helper-files/bdns-end create mode 100644 fgt-bdns/scripts/helper-files/bdns-mobile-app-end create mode 100644 fgt-bdns/scripts/helper-files/bdns-mobile-app-section create mode 100644 fgt-bdns/scripts/helper-files/bdns-section create mode 100644 fgt-bdns/scripts/helper-files/bdns-start diff --git a/.github/workflows/generate-files.yaml b/.github/workflows/generate-files.yaml new file mode 100644 index 000000000..d64139a9b --- /dev/null +++ b/.github/workflows/generate-files.yaml @@ -0,0 +1,115 @@ +# This is a basic workflow to help you get started with Actions + +name: File Generation + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + paths: + - 'fgt-bdns/*' + pull_request: + branches: [ master ] + paths: + - 'fgt-bdns/*' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + generate-files: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Run the python script - Pull request + id: pr_preview + if: | + github.event_name == 'pull_request' + run: | + scriptOutput=$(cd fgt-bdns && python3 ./scripts/generate-files.py) + cd fgt-bdns && python3 ./fgt-bdns/scripts/generate-files.py + newFile=$(cat ./networks/dev/plugin_data_common.json) + echo $newFile + + echo "MY_OUTPUT<> $GITHUB_ENV + + echo "Script logs:" >> $GITHUB_ENV + echo " " >> $GITHUB_ENV + echo "$scriptOutput" >> $GITHUB_ENV + echo " " >> $GITHUB_ENV + + echo "New plugin_data_common.json file:" >> $GITHUB_ENV + echo " " >> $GITHUB_ENV + echo "$newFile" >> $GITHUB_ENV + + echo "EOF" >> $GITHUB_ENV + + - name: Auto Comment + uses: wow-actions/auto-comment@v1 + if: | + github.event_name == 'pull_request' + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + pullRequestOpened: | + 👋 @{{ author }} + + Thank you for raising your pull request. + + This is Python script output: + + ``` + + ${{ env.MY_OUTPUT }} + + ``` + + pullRequestSynchronize: | + 👋 @{{ author }} + + Thank you updating your pull request. + + This is the new Python script output: + + ``` + + ${{ env.MY_OUTPUT }} + + ``` + + pullRequestEdited: | + 👋 @{{ author }} + + The base branch has been updated. + + This is the new Python script output: + + ``` + + ${{ env.MY_OUTPUT }} + + ``` + + - name: Run the python script - Push + if: | + github.event_name == 'push' + run: | + cd fgt-bdns && python3 ./scripts/generate-files.py + + - name: Commit files # transfer the new html files back into the repository + if: | + github.event_name == 'push' + run: | + git config --local user.name "github-action" + git add . + git commit -m "GitHub Action Commit: Updating the repository with generated files" + + - name: Push changes + uses: ad-m/github-push-action@master + if: | + github.event_name == 'push' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + force: true diff --git a/fgt-bdns/networks/dev/bdns-bayer.json b/fgt-bdns/networks/dev/bdns-bayer.json new file mode 100644 index 000000000..360c2f634 --- /dev/null +++ b/fgt-bdns/networks/dev/bdns-bayer.json @@ -0,0 +1,173 @@ +{ + "dev.traceability" : { + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, + "dev.traceability.bayer" : { + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, "dev.traceability.whs-takeda" : { + "brickStorages": [ + "http://172.16.63.103:8080" + ], + "anchoringServices": [ + "http://172.16.63.103:8080" + ], + "notifications": [ + "http://172.16.63.103:8080" + ] + }, "dev.traceability.pfizer" : { + "brickStorages": [ + "http://172.16.63.66:8080" + ], + "anchoringServices": [ + "http://172.16.63.66:8080" + ], + "notifications": [ + "http://172.16.63.66:8080" + ] + }, "dev.traceability.pha-2" : { + "brickStorages": [ + "http:/172.16.63.152:8080" + ], + "anchoringServices": [ + "http:/172.16.63.152:8080" + ], + "notifications": [ + "http:/172.16.63.152:8080" + ] + }, "dev.traceability.whs1" : { + "brickStorages": [ + "http://172.16.63.101:8080" + ], + "anchoringServices": [ + "http://172.16.63.101:8080" + ], + "notifications": [ + "http://172.16.63.101:8080" + ] + }, "dev.traceability.msd" : { + "brickStorages": [ + "http://172.16.63.64:8080" + ], + "anchoringServices": [ + "http://172.16.63.64:8080" + ], + "notifications": [ + "http://172.16.63.64:8080" + ] + }, "dev.traceability.whs-zuellig" : { + "brickStorages": [ + "http://172.16.63.104:8080" + ], + "anchoringServices": [ + "http://172.16.63.104:8080" + ], + "notifications": [ + "http://172.16.63.104:8080" + ] + }, "dev.traceability.sanofi" : { + "brickStorages": [ + "http://172.16.63.68:8080" + ], + "anchoringServices": [ + "http://172.16.63.68:8080" + ], + "notifications": [ + "http://172.16.63.68:8080" + ] + }, "dev.traceability.novo-nordisk" : { + "brickStorages": [ + "http://172.16.63.65:8080" + ], + "anchoringServices": [ + "http://172.16.63.65:8080" + ], + "notifications": [ + "http://172.16.63.65:8080" + ] + }, "dev.traceability.pha-1" : { + "brickStorages": [ + "http://172.16.63.151:8080" + ], + "anchoringServices": [ + "http://172.16.63.151:8080" + ], + "notifications": [ + "http://172.16.63.151:8080" + ] + }, "dev.traceability.whs2" : { + "brickStorages": [ + "http://172.16.63.102:8080" + ], + "anchoringServices": [ + "http://172.16.63.102:8080" + ], + "notifications": [ + "http://172.16.63.102:8080" + ] + }, "dev.traceability.takeda" : { + "brickStorages": [ + "http://172.16.63.67:8080" + ], + "anchoringServices": [ + "http://172.16.63.67:8080" + ], + "notifications": [ + "http://172.16.63.67:8080" + ] + }, "dev.traceability.roche" : { + "brickStorages": [ + "http://172.16.63.61:8080" + ], + "anchoringServices": [ + "http://172.16.63.61:8080" + ], + "notifications": [ + "http://172.16.63.61:8080" + ] + }, "dev.traceability.traceability" : { + "brickStorages": [ + "http://172.16.51.62:8080" + ], + "anchoringServices": [ + "http://172.16.51.62:8080" + ], + "notifications": [ + "http://172.16.51.62:8080" + ] + }, "dev.traceability.gsk" : { + "brickStorages": [ + "http://172.16.63.63:8080" + ], + "anchoringServices": [ + "http://172.16.63.63:8080" + ], + "notifications": [ + "http://172.16.63.63:8080" + ] + }, + "dev.vault.bayer" : { + "replicas": [], + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + } +} \ No newline at end of file diff --git a/fgt-bdns/networks/dev/bdns-gsk.json b/fgt-bdns/networks/dev/bdns-gsk.json new file mode 100644 index 000000000..9b1f8efa4 --- /dev/null +++ b/fgt-bdns/networks/dev/bdns-gsk.json @@ -0,0 +1,173 @@ +{ + "dev.traceability" : { + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, + "dev.traceability.bayer" : { + "brickStorages": [ + "http://172.16.63.62:8080" + ], + "anchoringServices": [ + "http://172.16.63.62:8080" + ], + "notifications": [ + "http://172.16.63.62:8080" + ] + }, "dev.traceability.whs-takeda" : { + "brickStorages": [ + "http://172.16.63.103:8080" + ], + "anchoringServices": [ + "http://172.16.63.103:8080" + ], + "notifications": [ + "http://172.16.63.103:8080" + ] + }, "dev.traceability.pfizer" : { + "brickStorages": [ + "http://172.16.63.66:8080" + ], + "anchoringServices": [ + "http://172.16.63.66:8080" + ], + "notifications": [ + "http://172.16.63.66:8080" + ] + }, "dev.traceability.pha-2" : { + "brickStorages": [ + "http:/172.16.63.152:8080" + ], + "anchoringServices": [ + "http:/172.16.63.152:8080" + ], + "notifications": [ + "http:/172.16.63.152:8080" + ] + }, "dev.traceability.whs1" : { + "brickStorages": [ + "http://172.16.63.101:8080" + ], + "anchoringServices": [ + "http://172.16.63.101:8080" + ], + "notifications": [ + "http://172.16.63.101:8080" + ] + }, "dev.traceability.msd" : { + "brickStorages": [ + "http://172.16.63.64:8080" + ], + "anchoringServices": [ + "http://172.16.63.64:8080" + ], + "notifications": [ + "http://172.16.63.64:8080" + ] + }, "dev.traceability.whs-zuellig" : { + "brickStorages": [ + "http://172.16.63.104:8080" + ], + "anchoringServices": [ + "http://172.16.63.104:8080" + ], + "notifications": [ + "http://172.16.63.104:8080" + ] + }, "dev.traceability.sanofi" : { + "brickStorages": [ + "http://172.16.63.68:8080" + ], + "anchoringServices": [ + "http://172.16.63.68:8080" + ], + "notifications": [ + "http://172.16.63.68:8080" + ] + }, "dev.traceability.novo-nordisk" : { + "brickStorages": [ + "http://172.16.63.65:8080" + ], + "anchoringServices": [ + "http://172.16.63.65:8080" + ], + "notifications": [ + "http://172.16.63.65:8080" + ] + }, "dev.traceability.pha-1" : { + "brickStorages": [ + "http://172.16.63.151:8080" + ], + "anchoringServices": [ + "http://172.16.63.151:8080" + ], + "notifications": [ + "http://172.16.63.151:8080" + ] + }, "dev.traceability.whs2" : { + "brickStorages": [ + "http://172.16.63.102:8080" + ], + "anchoringServices": [ + "http://172.16.63.102:8080" + ], + "notifications": [ + "http://172.16.63.102:8080" + ] + }, "dev.traceability.takeda" : { + "brickStorages": [ + "http://172.16.63.67:8080" + ], + "anchoringServices": [ + "http://172.16.63.67:8080" + ], + "notifications": [ + "http://172.16.63.67:8080" + ] + }, "dev.traceability.roche" : { + "brickStorages": [ + "http://172.16.63.61:8080" + ], + "anchoringServices": [ + "http://172.16.63.61:8080" + ], + "notifications": [ + "http://172.16.63.61:8080" + ] + }, "dev.traceability.traceability" : { + "brickStorages": [ + "http://172.16.51.62:8080" + ], + "anchoringServices": [ + "http://172.16.51.62:8080" + ], + "notifications": [ + "http://172.16.51.62:8080" + ] + }, "dev.traceability.gsk" : { + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, + "dev.vault.gsk" : { + "replicas": [], + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + } +} \ No newline at end of file diff --git a/fgt-bdns/networks/dev/bdns-msd.json b/fgt-bdns/networks/dev/bdns-msd.json new file mode 100644 index 000000000..6ed7869cd --- /dev/null +++ b/fgt-bdns/networks/dev/bdns-msd.json @@ -0,0 +1,173 @@ +{ + "dev.traceability" : { + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, + "dev.traceability.bayer" : { + "brickStorages": [ + "http://172.16.63.62:8080" + ], + "anchoringServices": [ + "http://172.16.63.62:8080" + ], + "notifications": [ + "http://172.16.63.62:8080" + ] + }, "dev.traceability.whs-takeda" : { + "brickStorages": [ + "http://172.16.63.103:8080" + ], + "anchoringServices": [ + "http://172.16.63.103:8080" + ], + "notifications": [ + "http://172.16.63.103:8080" + ] + }, "dev.traceability.pfizer" : { + "brickStorages": [ + "http://172.16.63.66:8080" + ], + "anchoringServices": [ + "http://172.16.63.66:8080" + ], + "notifications": [ + "http://172.16.63.66:8080" + ] + }, "dev.traceability.pha-2" : { + "brickStorages": [ + "http:/172.16.63.152:8080" + ], + "anchoringServices": [ + "http:/172.16.63.152:8080" + ], + "notifications": [ + "http:/172.16.63.152:8080" + ] + }, "dev.traceability.whs1" : { + "brickStorages": [ + "http://172.16.63.101:8080" + ], + "anchoringServices": [ + "http://172.16.63.101:8080" + ], + "notifications": [ + "http://172.16.63.101:8080" + ] + }, "dev.traceability.msd" : { + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, "dev.traceability.whs-zuellig" : { + "brickStorages": [ + "http://172.16.63.104:8080" + ], + "anchoringServices": [ + "http://172.16.63.104:8080" + ], + "notifications": [ + "http://172.16.63.104:8080" + ] + }, "dev.traceability.sanofi" : { + "brickStorages": [ + "http://172.16.63.68:8080" + ], + "anchoringServices": [ + "http://172.16.63.68:8080" + ], + "notifications": [ + "http://172.16.63.68:8080" + ] + }, "dev.traceability.novo-nordisk" : { + "brickStorages": [ + "http://172.16.63.65:8080" + ], + "anchoringServices": [ + "http://172.16.63.65:8080" + ], + "notifications": [ + "http://172.16.63.65:8080" + ] + }, "dev.traceability.pha-1" : { + "brickStorages": [ + "http://172.16.63.151:8080" + ], + "anchoringServices": [ + "http://172.16.63.151:8080" + ], + "notifications": [ + "http://172.16.63.151:8080" + ] + }, "dev.traceability.whs2" : { + "brickStorages": [ + "http://172.16.63.102:8080" + ], + "anchoringServices": [ + "http://172.16.63.102:8080" + ], + "notifications": [ + "http://172.16.63.102:8080" + ] + }, "dev.traceability.takeda" : { + "brickStorages": [ + "http://172.16.63.67:8080" + ], + "anchoringServices": [ + "http://172.16.63.67:8080" + ], + "notifications": [ + "http://172.16.63.67:8080" + ] + }, "dev.traceability.roche" : { + "brickStorages": [ + "http://172.16.63.61:8080" + ], + "anchoringServices": [ + "http://172.16.63.61:8080" + ], + "notifications": [ + "http://172.16.63.61:8080" + ] + }, "dev.traceability.traceability" : { + "brickStorages": [ + "http://172.16.51.62:8080" + ], + "anchoringServices": [ + "http://172.16.51.62:8080" + ], + "notifications": [ + "http://172.16.51.62:8080" + ] + }, "dev.traceability.gsk" : { + "brickStorages": [ + "http://172.16.63.63:8080" + ], + "anchoringServices": [ + "http://172.16.63.63:8080" + ], + "notifications": [ + "http://172.16.63.63:8080" + ] + }, + "dev.vault.msd" : { + "replicas": [], + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + } +} \ No newline at end of file diff --git a/fgt-bdns/networks/dev/bdns-novo-nordisk.json b/fgt-bdns/networks/dev/bdns-novo-nordisk.json new file mode 100644 index 000000000..a9108cc92 --- /dev/null +++ b/fgt-bdns/networks/dev/bdns-novo-nordisk.json @@ -0,0 +1,173 @@ +{ + "dev.traceability" : { + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, + "dev.traceability.bayer" : { + "brickStorages": [ + "http://172.16.63.62:8080" + ], + "anchoringServices": [ + "http://172.16.63.62:8080" + ], + "notifications": [ + "http://172.16.63.62:8080" + ] + }, "dev.traceability.whs-takeda" : { + "brickStorages": [ + "http://172.16.63.103:8080" + ], + "anchoringServices": [ + "http://172.16.63.103:8080" + ], + "notifications": [ + "http://172.16.63.103:8080" + ] + }, "dev.traceability.pfizer" : { + "brickStorages": [ + "http://172.16.63.66:8080" + ], + "anchoringServices": [ + "http://172.16.63.66:8080" + ], + "notifications": [ + "http://172.16.63.66:8080" + ] + }, "dev.traceability.pha-2" : { + "brickStorages": [ + "http:/172.16.63.152:8080" + ], + "anchoringServices": [ + "http:/172.16.63.152:8080" + ], + "notifications": [ + "http:/172.16.63.152:8080" + ] + }, "dev.traceability.whs1" : { + "brickStorages": [ + "http://172.16.63.101:8080" + ], + "anchoringServices": [ + "http://172.16.63.101:8080" + ], + "notifications": [ + "http://172.16.63.101:8080" + ] + }, "dev.traceability.msd" : { + "brickStorages": [ + "http://172.16.63.64:8080" + ], + "anchoringServices": [ + "http://172.16.63.64:8080" + ], + "notifications": [ + "http://172.16.63.64:8080" + ] + }, "dev.traceability.whs-zuellig" : { + "brickStorages": [ + "http://172.16.63.104:8080" + ], + "anchoringServices": [ + "http://172.16.63.104:8080" + ], + "notifications": [ + "http://172.16.63.104:8080" + ] + }, "dev.traceability.sanofi" : { + "brickStorages": [ + "http://172.16.63.68:8080" + ], + "anchoringServices": [ + "http://172.16.63.68:8080" + ], + "notifications": [ + "http://172.16.63.68:8080" + ] + }, "dev.traceability.novo-nordisk" : { + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, "dev.traceability.pha-1" : { + "brickStorages": [ + "http://172.16.63.151:8080" + ], + "anchoringServices": [ + "http://172.16.63.151:8080" + ], + "notifications": [ + "http://172.16.63.151:8080" + ] + }, "dev.traceability.whs2" : { + "brickStorages": [ + "http://172.16.63.102:8080" + ], + "anchoringServices": [ + "http://172.16.63.102:8080" + ], + "notifications": [ + "http://172.16.63.102:8080" + ] + }, "dev.traceability.takeda" : { + "brickStorages": [ + "http://172.16.63.67:8080" + ], + "anchoringServices": [ + "http://172.16.63.67:8080" + ], + "notifications": [ + "http://172.16.63.67:8080" + ] + }, "dev.traceability.roche" : { + "brickStorages": [ + "http://172.16.63.61:8080" + ], + "anchoringServices": [ + "http://172.16.63.61:8080" + ], + "notifications": [ + "http://172.16.63.61:8080" + ] + }, "dev.traceability.traceability" : { + "brickStorages": [ + "http://172.16.51.62:8080" + ], + "anchoringServices": [ + "http://172.16.51.62:8080" + ], + "notifications": [ + "http://172.16.51.62:8080" + ] + }, "dev.traceability.gsk" : { + "brickStorages": [ + "http://172.16.63.63:8080" + ], + "anchoringServices": [ + "http://172.16.63.63:8080" + ], + "notifications": [ + "http://172.16.63.63:8080" + ] + }, + "dev.vault.novo-nordisk" : { + "replicas": [], + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + } +} \ No newline at end of file diff --git a/fgt-bdns/networks/dev/bdns-pfizer.json b/fgt-bdns/networks/dev/bdns-pfizer.json new file mode 100644 index 000000000..0231f4dc0 --- /dev/null +++ b/fgt-bdns/networks/dev/bdns-pfizer.json @@ -0,0 +1,173 @@ +{ + "dev.traceability" : { + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, + "dev.traceability.bayer" : { + "brickStorages": [ + "http://172.16.63.62:8080" + ], + "anchoringServices": [ + "http://172.16.63.62:8080" + ], + "notifications": [ + "http://172.16.63.62:8080" + ] + }, "dev.traceability.whs-takeda" : { + "brickStorages": [ + "http://172.16.63.103:8080" + ], + "anchoringServices": [ + "http://172.16.63.103:8080" + ], + "notifications": [ + "http://172.16.63.103:8080" + ] + }, "dev.traceability.pfizer" : { + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, "dev.traceability.pha-2" : { + "brickStorages": [ + "http:/172.16.63.152:8080" + ], + "anchoringServices": [ + "http:/172.16.63.152:8080" + ], + "notifications": [ + "http:/172.16.63.152:8080" + ] + }, "dev.traceability.whs1" : { + "brickStorages": [ + "http://172.16.63.101:8080" + ], + "anchoringServices": [ + "http://172.16.63.101:8080" + ], + "notifications": [ + "http://172.16.63.101:8080" + ] + }, "dev.traceability.msd" : { + "brickStorages": [ + "http://172.16.63.64:8080" + ], + "anchoringServices": [ + "http://172.16.63.64:8080" + ], + "notifications": [ + "http://172.16.63.64:8080" + ] + }, "dev.traceability.whs-zuellig" : { + "brickStorages": [ + "http://172.16.63.104:8080" + ], + "anchoringServices": [ + "http://172.16.63.104:8080" + ], + "notifications": [ + "http://172.16.63.104:8080" + ] + }, "dev.traceability.sanofi" : { + "brickStorages": [ + "http://172.16.63.68:8080" + ], + "anchoringServices": [ + "http://172.16.63.68:8080" + ], + "notifications": [ + "http://172.16.63.68:8080" + ] + }, "dev.traceability.novo-nordisk" : { + "brickStorages": [ + "http://172.16.63.65:8080" + ], + "anchoringServices": [ + "http://172.16.63.65:8080" + ], + "notifications": [ + "http://172.16.63.65:8080" + ] + }, "dev.traceability.pha-1" : { + "brickStorages": [ + "http://172.16.63.151:8080" + ], + "anchoringServices": [ + "http://172.16.63.151:8080" + ], + "notifications": [ + "http://172.16.63.151:8080" + ] + }, "dev.traceability.whs2" : { + "brickStorages": [ + "http://172.16.63.102:8080" + ], + "anchoringServices": [ + "http://172.16.63.102:8080" + ], + "notifications": [ + "http://172.16.63.102:8080" + ] + }, "dev.traceability.takeda" : { + "brickStorages": [ + "http://172.16.63.67:8080" + ], + "anchoringServices": [ + "http://172.16.63.67:8080" + ], + "notifications": [ + "http://172.16.63.67:8080" + ] + }, "dev.traceability.roche" : { + "brickStorages": [ + "http://172.16.63.61:8080" + ], + "anchoringServices": [ + "http://172.16.63.61:8080" + ], + "notifications": [ + "http://172.16.63.61:8080" + ] + }, "dev.traceability.traceability" : { + "brickStorages": [ + "http://172.16.51.62:8080" + ], + "anchoringServices": [ + "http://172.16.51.62:8080" + ], + "notifications": [ + "http://172.16.51.62:8080" + ] + }, "dev.traceability.gsk" : { + "brickStorages": [ + "http://172.16.63.63:8080" + ], + "anchoringServices": [ + "http://172.16.63.63:8080" + ], + "notifications": [ + "http://172.16.63.63:8080" + ] + }, + "dev.vault.pfizer" : { + "replicas": [], + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + } +} \ No newline at end of file diff --git a/fgt-bdns/networks/dev/bdns-pha-1.json b/fgt-bdns/networks/dev/bdns-pha-1.json new file mode 100644 index 000000000..1583cb7ef --- /dev/null +++ b/fgt-bdns/networks/dev/bdns-pha-1.json @@ -0,0 +1,173 @@ +{ + "dev.traceability" : { + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, + "dev.traceability.bayer" : { + "brickStorages": [ + "http://172.16.63.62:8080" + ], + "anchoringServices": [ + "http://172.16.63.62:8080" + ], + "notifications": [ + "http://172.16.63.62:8080" + ] + }, "dev.traceability.whs-takeda" : { + "brickStorages": [ + "http://172.16.63.103:8080" + ], + "anchoringServices": [ + "http://172.16.63.103:8080" + ], + "notifications": [ + "http://172.16.63.103:8080" + ] + }, "dev.traceability.pfizer" : { + "brickStorages": [ + "http://172.16.63.66:8080" + ], + "anchoringServices": [ + "http://172.16.63.66:8080" + ], + "notifications": [ + "http://172.16.63.66:8080" + ] + }, "dev.traceability.pha-2" : { + "brickStorages": [ + "http:/172.16.63.152:8080" + ], + "anchoringServices": [ + "http:/172.16.63.152:8080" + ], + "notifications": [ + "http:/172.16.63.152:8080" + ] + }, "dev.traceability.whs1" : { + "brickStorages": [ + "http://172.16.63.101:8080" + ], + "anchoringServices": [ + "http://172.16.63.101:8080" + ], + "notifications": [ + "http://172.16.63.101:8080" + ] + }, "dev.traceability.msd" : { + "brickStorages": [ + "http://172.16.63.64:8080" + ], + "anchoringServices": [ + "http://172.16.63.64:8080" + ], + "notifications": [ + "http://172.16.63.64:8080" + ] + }, "dev.traceability.whs-zuellig" : { + "brickStorages": [ + "http://172.16.63.104:8080" + ], + "anchoringServices": [ + "http://172.16.63.104:8080" + ], + "notifications": [ + "http://172.16.63.104:8080" + ] + }, "dev.traceability.sanofi" : { + "brickStorages": [ + "http://172.16.63.68:8080" + ], + "anchoringServices": [ + "http://172.16.63.68:8080" + ], + "notifications": [ + "http://172.16.63.68:8080" + ] + }, "dev.traceability.novo-nordisk" : { + "brickStorages": [ + "http://172.16.63.65:8080" + ], + "anchoringServices": [ + "http://172.16.63.65:8080" + ], + "notifications": [ + "http://172.16.63.65:8080" + ] + }, "dev.traceability.pha-1" : { + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, "dev.traceability.whs2" : { + "brickStorages": [ + "http://172.16.63.102:8080" + ], + "anchoringServices": [ + "http://172.16.63.102:8080" + ], + "notifications": [ + "http://172.16.63.102:8080" + ] + }, "dev.traceability.takeda" : { + "brickStorages": [ + "http://172.16.63.67:8080" + ], + "anchoringServices": [ + "http://172.16.63.67:8080" + ], + "notifications": [ + "http://172.16.63.67:8080" + ] + }, "dev.traceability.roche" : { + "brickStorages": [ + "http://172.16.63.61:8080" + ], + "anchoringServices": [ + "http://172.16.63.61:8080" + ], + "notifications": [ + "http://172.16.63.61:8080" + ] + }, "dev.traceability.traceability" : { + "brickStorages": [ + "http://172.16.51.62:8080" + ], + "anchoringServices": [ + "http://172.16.51.62:8080" + ], + "notifications": [ + "http://172.16.51.62:8080" + ] + }, "dev.traceability.gsk" : { + "brickStorages": [ + "http://172.16.63.63:8080" + ], + "anchoringServices": [ + "http://172.16.63.63:8080" + ], + "notifications": [ + "http://172.16.63.63:8080" + ] + }, + "dev.vault.pha-1" : { + "replicas": [], + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + } +} \ No newline at end of file diff --git a/fgt-bdns/networks/dev/bdns-pha-2.json b/fgt-bdns/networks/dev/bdns-pha-2.json new file mode 100644 index 000000000..15a9a860b --- /dev/null +++ b/fgt-bdns/networks/dev/bdns-pha-2.json @@ -0,0 +1,173 @@ +{ + "dev.traceability" : { + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, + "dev.traceability.bayer" : { + "brickStorages": [ + "http://172.16.63.62:8080" + ], + "anchoringServices": [ + "http://172.16.63.62:8080" + ], + "notifications": [ + "http://172.16.63.62:8080" + ] + }, "dev.traceability.whs-takeda" : { + "brickStorages": [ + "http://172.16.63.103:8080" + ], + "anchoringServices": [ + "http://172.16.63.103:8080" + ], + "notifications": [ + "http://172.16.63.103:8080" + ] + }, "dev.traceability.pfizer" : { + "brickStorages": [ + "http://172.16.63.66:8080" + ], + "anchoringServices": [ + "http://172.16.63.66:8080" + ], + "notifications": [ + "http://172.16.63.66:8080" + ] + }, "dev.traceability.pha-2" : { + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, "dev.traceability.whs1" : { + "brickStorages": [ + "http://172.16.63.101:8080" + ], + "anchoringServices": [ + "http://172.16.63.101:8080" + ], + "notifications": [ + "http://172.16.63.101:8080" + ] + }, "dev.traceability.msd" : { + "brickStorages": [ + "http://172.16.63.64:8080" + ], + "anchoringServices": [ + "http://172.16.63.64:8080" + ], + "notifications": [ + "http://172.16.63.64:8080" + ] + }, "dev.traceability.whs-zuellig" : { + "brickStorages": [ + "http://172.16.63.104:8080" + ], + "anchoringServices": [ + "http://172.16.63.104:8080" + ], + "notifications": [ + "http://172.16.63.104:8080" + ] + }, "dev.traceability.sanofi" : { + "brickStorages": [ + "http://172.16.63.68:8080" + ], + "anchoringServices": [ + "http://172.16.63.68:8080" + ], + "notifications": [ + "http://172.16.63.68:8080" + ] + }, "dev.traceability.novo-nordisk" : { + "brickStorages": [ + "http://172.16.63.65:8080" + ], + "anchoringServices": [ + "http://172.16.63.65:8080" + ], + "notifications": [ + "http://172.16.63.65:8080" + ] + }, "dev.traceability.pha-1" : { + "brickStorages": [ + "http://172.16.63.151:8080" + ], + "anchoringServices": [ + "http://172.16.63.151:8080" + ], + "notifications": [ + "http://172.16.63.151:8080" + ] + }, "dev.traceability.whs2" : { + "brickStorages": [ + "http://172.16.63.102:8080" + ], + "anchoringServices": [ + "http://172.16.63.102:8080" + ], + "notifications": [ + "http://172.16.63.102:8080" + ] + }, "dev.traceability.takeda" : { + "brickStorages": [ + "http://172.16.63.67:8080" + ], + "anchoringServices": [ + "http://172.16.63.67:8080" + ], + "notifications": [ + "http://172.16.63.67:8080" + ] + }, "dev.traceability.roche" : { + "brickStorages": [ + "http://172.16.63.61:8080" + ], + "anchoringServices": [ + "http://172.16.63.61:8080" + ], + "notifications": [ + "http://172.16.63.61:8080" + ] + }, "dev.traceability.traceability" : { + "brickStorages": [ + "http://172.16.51.62:8080" + ], + "anchoringServices": [ + "http://172.16.51.62:8080" + ], + "notifications": [ + "http://172.16.51.62:8080" + ] + }, "dev.traceability.gsk" : { + "brickStorages": [ + "http://172.16.63.63:8080" + ], + "anchoringServices": [ + "http://172.16.63.63:8080" + ], + "notifications": [ + "http://172.16.63.63:8080" + ] + }, + "dev.vault.pha-2" : { + "replicas": [], + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + } +} \ No newline at end of file diff --git a/fgt-bdns/networks/dev/bdns-roche.json b/fgt-bdns/networks/dev/bdns-roche.json new file mode 100644 index 000000000..2aa4e8a37 --- /dev/null +++ b/fgt-bdns/networks/dev/bdns-roche.json @@ -0,0 +1,173 @@ +{ + "dev.traceability" : { + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, + "dev.traceability.bayer" : { + "brickStorages": [ + "http://172.16.63.62:8080" + ], + "anchoringServices": [ + "http://172.16.63.62:8080" + ], + "notifications": [ + "http://172.16.63.62:8080" + ] + }, "dev.traceability.whs-takeda" : { + "brickStorages": [ + "http://172.16.63.103:8080" + ], + "anchoringServices": [ + "http://172.16.63.103:8080" + ], + "notifications": [ + "http://172.16.63.103:8080" + ] + }, "dev.traceability.pfizer" : { + "brickStorages": [ + "http://172.16.63.66:8080" + ], + "anchoringServices": [ + "http://172.16.63.66:8080" + ], + "notifications": [ + "http://172.16.63.66:8080" + ] + }, "dev.traceability.pha-2" : { + "brickStorages": [ + "http:/172.16.63.152:8080" + ], + "anchoringServices": [ + "http:/172.16.63.152:8080" + ], + "notifications": [ + "http:/172.16.63.152:8080" + ] + }, "dev.traceability.whs1" : { + "brickStorages": [ + "http://172.16.63.101:8080" + ], + "anchoringServices": [ + "http://172.16.63.101:8080" + ], + "notifications": [ + "http://172.16.63.101:8080" + ] + }, "dev.traceability.msd" : { + "brickStorages": [ + "http://172.16.63.64:8080" + ], + "anchoringServices": [ + "http://172.16.63.64:8080" + ], + "notifications": [ + "http://172.16.63.64:8080" + ] + }, "dev.traceability.whs-zuellig" : { + "brickStorages": [ + "http://172.16.63.104:8080" + ], + "anchoringServices": [ + "http://172.16.63.104:8080" + ], + "notifications": [ + "http://172.16.63.104:8080" + ] + }, "dev.traceability.sanofi" : { + "brickStorages": [ + "http://172.16.63.68:8080" + ], + "anchoringServices": [ + "http://172.16.63.68:8080" + ], + "notifications": [ + "http://172.16.63.68:8080" + ] + }, "dev.traceability.novo-nordisk" : { + "brickStorages": [ + "http://172.16.63.65:8080" + ], + "anchoringServices": [ + "http://172.16.63.65:8080" + ], + "notifications": [ + "http://172.16.63.65:8080" + ] + }, "dev.traceability.pha-1" : { + "brickStorages": [ + "http://172.16.63.151:8080" + ], + "anchoringServices": [ + "http://172.16.63.151:8080" + ], + "notifications": [ + "http://172.16.63.151:8080" + ] + }, "dev.traceability.whs2" : { + "brickStorages": [ + "http://172.16.63.102:8080" + ], + "anchoringServices": [ + "http://172.16.63.102:8080" + ], + "notifications": [ + "http://172.16.63.102:8080" + ] + }, "dev.traceability.takeda" : { + "brickStorages": [ + "http://172.16.63.67:8080" + ], + "anchoringServices": [ + "http://172.16.63.67:8080" + ], + "notifications": [ + "http://172.16.63.67:8080" + ] + }, "dev.traceability.roche" : { + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, "dev.traceability.traceability" : { + "brickStorages": [ + "http://172.16.51.62:8080" + ], + "anchoringServices": [ + "http://172.16.51.62:8080" + ], + "notifications": [ + "http://172.16.51.62:8080" + ] + }, "dev.traceability.gsk" : { + "brickStorages": [ + "http://172.16.63.63:8080" + ], + "anchoringServices": [ + "http://172.16.63.63:8080" + ], + "notifications": [ + "http://172.16.63.63:8080" + ] + }, + "dev.vault.roche" : { + "replicas": [], + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + } +} \ No newline at end of file diff --git a/fgt-bdns/networks/dev/bdns-sanofi.json b/fgt-bdns/networks/dev/bdns-sanofi.json new file mode 100644 index 000000000..bae844da6 --- /dev/null +++ b/fgt-bdns/networks/dev/bdns-sanofi.json @@ -0,0 +1,173 @@ +{ + "dev.traceability" : { + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, + "dev.traceability.bayer" : { + "brickStorages": [ + "http://172.16.63.62:8080" + ], + "anchoringServices": [ + "http://172.16.63.62:8080" + ], + "notifications": [ + "http://172.16.63.62:8080" + ] + }, "dev.traceability.whs-takeda" : { + "brickStorages": [ + "http://172.16.63.103:8080" + ], + "anchoringServices": [ + "http://172.16.63.103:8080" + ], + "notifications": [ + "http://172.16.63.103:8080" + ] + }, "dev.traceability.pfizer" : { + "brickStorages": [ + "http://172.16.63.66:8080" + ], + "anchoringServices": [ + "http://172.16.63.66:8080" + ], + "notifications": [ + "http://172.16.63.66:8080" + ] + }, "dev.traceability.pha-2" : { + "brickStorages": [ + "http:/172.16.63.152:8080" + ], + "anchoringServices": [ + "http:/172.16.63.152:8080" + ], + "notifications": [ + "http:/172.16.63.152:8080" + ] + }, "dev.traceability.whs1" : { + "brickStorages": [ + "http://172.16.63.101:8080" + ], + "anchoringServices": [ + "http://172.16.63.101:8080" + ], + "notifications": [ + "http://172.16.63.101:8080" + ] + }, "dev.traceability.msd" : { + "brickStorages": [ + "http://172.16.63.64:8080" + ], + "anchoringServices": [ + "http://172.16.63.64:8080" + ], + "notifications": [ + "http://172.16.63.64:8080" + ] + }, "dev.traceability.whs-zuellig" : { + "brickStorages": [ + "http://172.16.63.104:8080" + ], + "anchoringServices": [ + "http://172.16.63.104:8080" + ], + "notifications": [ + "http://172.16.63.104:8080" + ] + }, "dev.traceability.sanofi" : { + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, "dev.traceability.novo-nordisk" : { + "brickStorages": [ + "http://172.16.63.65:8080" + ], + "anchoringServices": [ + "http://172.16.63.65:8080" + ], + "notifications": [ + "http://172.16.63.65:8080" + ] + }, "dev.traceability.pha-1" : { + "brickStorages": [ + "http://172.16.63.151:8080" + ], + "anchoringServices": [ + "http://172.16.63.151:8080" + ], + "notifications": [ + "http://172.16.63.151:8080" + ] + }, "dev.traceability.whs2" : { + "brickStorages": [ + "http://172.16.63.102:8080" + ], + "anchoringServices": [ + "http://172.16.63.102:8080" + ], + "notifications": [ + "http://172.16.63.102:8080" + ] + }, "dev.traceability.takeda" : { + "brickStorages": [ + "http://172.16.63.67:8080" + ], + "anchoringServices": [ + "http://172.16.63.67:8080" + ], + "notifications": [ + "http://172.16.63.67:8080" + ] + }, "dev.traceability.roche" : { + "brickStorages": [ + "http://172.16.63.61:8080" + ], + "anchoringServices": [ + "http://172.16.63.61:8080" + ], + "notifications": [ + "http://172.16.63.61:8080" + ] + }, "dev.traceability.traceability" : { + "brickStorages": [ + "http://172.16.51.62:8080" + ], + "anchoringServices": [ + "http://172.16.51.62:8080" + ], + "notifications": [ + "http://172.16.51.62:8080" + ] + }, "dev.traceability.gsk" : { + "brickStorages": [ + "http://172.16.63.63:8080" + ], + "anchoringServices": [ + "http://172.16.63.63:8080" + ], + "notifications": [ + "http://172.16.63.63:8080" + ] + }, + "dev.vault.sanofi" : { + "replicas": [], + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + } +} \ No newline at end of file diff --git a/fgt-bdns/networks/dev/bdns-takeda.json b/fgt-bdns/networks/dev/bdns-takeda.json new file mode 100644 index 000000000..74232e210 --- /dev/null +++ b/fgt-bdns/networks/dev/bdns-takeda.json @@ -0,0 +1,173 @@ +{ + "dev.traceability" : { + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, + "dev.traceability.bayer" : { + "brickStorages": [ + "http://172.16.63.62:8080" + ], + "anchoringServices": [ + "http://172.16.63.62:8080" + ], + "notifications": [ + "http://172.16.63.62:8080" + ] + }, "dev.traceability.whs-takeda" : { + "brickStorages": [ + "http://172.16.63.103:8080" + ], + "anchoringServices": [ + "http://172.16.63.103:8080" + ], + "notifications": [ + "http://172.16.63.103:8080" + ] + }, "dev.traceability.pfizer" : { + "brickStorages": [ + "http://172.16.63.66:8080" + ], + "anchoringServices": [ + "http://172.16.63.66:8080" + ], + "notifications": [ + "http://172.16.63.66:8080" + ] + }, "dev.traceability.pha-2" : { + "brickStorages": [ + "http:/172.16.63.152:8080" + ], + "anchoringServices": [ + "http:/172.16.63.152:8080" + ], + "notifications": [ + "http:/172.16.63.152:8080" + ] + }, "dev.traceability.whs1" : { + "brickStorages": [ + "http://172.16.63.101:8080" + ], + "anchoringServices": [ + "http://172.16.63.101:8080" + ], + "notifications": [ + "http://172.16.63.101:8080" + ] + }, "dev.traceability.msd" : { + "brickStorages": [ + "http://172.16.63.64:8080" + ], + "anchoringServices": [ + "http://172.16.63.64:8080" + ], + "notifications": [ + "http://172.16.63.64:8080" + ] + }, "dev.traceability.whs-zuellig" : { + "brickStorages": [ + "http://172.16.63.104:8080" + ], + "anchoringServices": [ + "http://172.16.63.104:8080" + ], + "notifications": [ + "http://172.16.63.104:8080" + ] + }, "dev.traceability.sanofi" : { + "brickStorages": [ + "http://172.16.63.68:8080" + ], + "anchoringServices": [ + "http://172.16.63.68:8080" + ], + "notifications": [ + "http://172.16.63.68:8080" + ] + }, "dev.traceability.novo-nordisk" : { + "brickStorages": [ + "http://172.16.63.65:8080" + ], + "anchoringServices": [ + "http://172.16.63.65:8080" + ], + "notifications": [ + "http://172.16.63.65:8080" + ] + }, "dev.traceability.pha-1" : { + "brickStorages": [ + "http://172.16.63.151:8080" + ], + "anchoringServices": [ + "http://172.16.63.151:8080" + ], + "notifications": [ + "http://172.16.63.151:8080" + ] + }, "dev.traceability.whs2" : { + "brickStorages": [ + "http://172.16.63.102:8080" + ], + "anchoringServices": [ + "http://172.16.63.102:8080" + ], + "notifications": [ + "http://172.16.63.102:8080" + ] + }, "dev.traceability.takeda" : { + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, "dev.traceability.roche" : { + "brickStorages": [ + "http://172.16.63.61:8080" + ], + "anchoringServices": [ + "http://172.16.63.61:8080" + ], + "notifications": [ + "http://172.16.63.61:8080" + ] + }, "dev.traceability.traceability" : { + "brickStorages": [ + "http://172.16.51.62:8080" + ], + "anchoringServices": [ + "http://172.16.51.62:8080" + ], + "notifications": [ + "http://172.16.51.62:8080" + ] + }, "dev.traceability.gsk" : { + "brickStorages": [ + "http://172.16.63.63:8080" + ], + "anchoringServices": [ + "http://172.16.63.63:8080" + ], + "notifications": [ + "http://172.16.63.63:8080" + ] + }, + "dev.vault.takeda" : { + "replicas": [], + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + } +} \ No newline at end of file diff --git a/fgt-bdns/networks/dev/bdns-traceability.json b/fgt-bdns/networks/dev/bdns-traceability.json new file mode 100644 index 000000000..17254c64d --- /dev/null +++ b/fgt-bdns/networks/dev/bdns-traceability.json @@ -0,0 +1,173 @@ +{ + "dev.traceability" : { + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, + "dev.traceability.bayer" : { + "brickStorages": [ + "http://172.16.63.62:8080" + ], + "anchoringServices": [ + "http://172.16.63.62:8080" + ], + "notifications": [ + "http://172.16.63.62:8080" + ] + }, "dev.traceability.whs-takeda" : { + "brickStorages": [ + "http://172.16.63.103:8080" + ], + "anchoringServices": [ + "http://172.16.63.103:8080" + ], + "notifications": [ + "http://172.16.63.103:8080" + ] + }, "dev.traceability.pfizer" : { + "brickStorages": [ + "http://172.16.63.66:8080" + ], + "anchoringServices": [ + "http://172.16.63.66:8080" + ], + "notifications": [ + "http://172.16.63.66:8080" + ] + }, "dev.traceability.pha-2" : { + "brickStorages": [ + "http:/172.16.63.152:8080" + ], + "anchoringServices": [ + "http:/172.16.63.152:8080" + ], + "notifications": [ + "http:/172.16.63.152:8080" + ] + }, "dev.traceability.whs1" : { + "brickStorages": [ + "http://172.16.63.101:8080" + ], + "anchoringServices": [ + "http://172.16.63.101:8080" + ], + "notifications": [ + "http://172.16.63.101:8080" + ] + }, "dev.traceability.msd" : { + "brickStorages": [ + "http://172.16.63.64:8080" + ], + "anchoringServices": [ + "http://172.16.63.64:8080" + ], + "notifications": [ + "http://172.16.63.64:8080" + ] + }, "dev.traceability.whs-zuellig" : { + "brickStorages": [ + "http://172.16.63.104:8080" + ], + "anchoringServices": [ + "http://172.16.63.104:8080" + ], + "notifications": [ + "http://172.16.63.104:8080" + ] + }, "dev.traceability.sanofi" : { + "brickStorages": [ + "http://172.16.63.68:8080" + ], + "anchoringServices": [ + "http://172.16.63.68:8080" + ], + "notifications": [ + "http://172.16.63.68:8080" + ] + }, "dev.traceability.novo-nordisk" : { + "brickStorages": [ + "http://172.16.63.65:8080" + ], + "anchoringServices": [ + "http://172.16.63.65:8080" + ], + "notifications": [ + "http://172.16.63.65:8080" + ] + }, "dev.traceability.pha-1" : { + "brickStorages": [ + "http://172.16.63.151:8080" + ], + "anchoringServices": [ + "http://172.16.63.151:8080" + ], + "notifications": [ + "http://172.16.63.151:8080" + ] + }, "dev.traceability.whs2" : { + "brickStorages": [ + "http://172.16.63.102:8080" + ], + "anchoringServices": [ + "http://172.16.63.102:8080" + ], + "notifications": [ + "http://172.16.63.102:8080" + ] + }, "dev.traceability.takeda" : { + "brickStorages": [ + "http://172.16.63.67:8080" + ], + "anchoringServices": [ + "http://172.16.63.67:8080" + ], + "notifications": [ + "http://172.16.63.67:8080" + ] + }, "dev.traceability.roche" : { + "brickStorages": [ + "http://172.16.63.61:8080" + ], + "anchoringServices": [ + "http://172.16.63.61:8080" + ], + "notifications": [ + "http://172.16.63.61:8080" + ] + }, "dev.traceability.traceability" : { + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, "dev.traceability.gsk" : { + "brickStorages": [ + "http://172.16.63.63:8080" + ], + "anchoringServices": [ + "http://172.16.63.63:8080" + ], + "notifications": [ + "http://172.16.63.63:8080" + ] + }, + "dev.vault.traceability" : { + "replicas": [], + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + } +} \ No newline at end of file diff --git a/fgt-bdns/networks/dev/bdns-whs-takeda.json b/fgt-bdns/networks/dev/bdns-whs-takeda.json new file mode 100644 index 000000000..9b10ccf57 --- /dev/null +++ b/fgt-bdns/networks/dev/bdns-whs-takeda.json @@ -0,0 +1,173 @@ +{ + "dev.traceability" : { + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, + "dev.traceability.bayer" : { + "brickStorages": [ + "http://172.16.63.62:8080" + ], + "anchoringServices": [ + "http://172.16.63.62:8080" + ], + "notifications": [ + "http://172.16.63.62:8080" + ] + }, "dev.traceability.whs-takeda" : { + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, "dev.traceability.pfizer" : { + "brickStorages": [ + "http://172.16.63.66:8080" + ], + "anchoringServices": [ + "http://172.16.63.66:8080" + ], + "notifications": [ + "http://172.16.63.66:8080" + ] + }, "dev.traceability.pha-2" : { + "brickStorages": [ + "http:/172.16.63.152:8080" + ], + "anchoringServices": [ + "http:/172.16.63.152:8080" + ], + "notifications": [ + "http:/172.16.63.152:8080" + ] + }, "dev.traceability.whs1" : { + "brickStorages": [ + "http://172.16.63.101:8080" + ], + "anchoringServices": [ + "http://172.16.63.101:8080" + ], + "notifications": [ + "http://172.16.63.101:8080" + ] + }, "dev.traceability.msd" : { + "brickStorages": [ + "http://172.16.63.64:8080" + ], + "anchoringServices": [ + "http://172.16.63.64:8080" + ], + "notifications": [ + "http://172.16.63.64:8080" + ] + }, "dev.traceability.whs-zuellig" : { + "brickStorages": [ + "http://172.16.63.104:8080" + ], + "anchoringServices": [ + "http://172.16.63.104:8080" + ], + "notifications": [ + "http://172.16.63.104:8080" + ] + }, "dev.traceability.sanofi" : { + "brickStorages": [ + "http://172.16.63.68:8080" + ], + "anchoringServices": [ + "http://172.16.63.68:8080" + ], + "notifications": [ + "http://172.16.63.68:8080" + ] + }, "dev.traceability.novo-nordisk" : { + "brickStorages": [ + "http://172.16.63.65:8080" + ], + "anchoringServices": [ + "http://172.16.63.65:8080" + ], + "notifications": [ + "http://172.16.63.65:8080" + ] + }, "dev.traceability.pha-1" : { + "brickStorages": [ + "http://172.16.63.151:8080" + ], + "anchoringServices": [ + "http://172.16.63.151:8080" + ], + "notifications": [ + "http://172.16.63.151:8080" + ] + }, "dev.traceability.whs2" : { + "brickStorages": [ + "http://172.16.63.102:8080" + ], + "anchoringServices": [ + "http://172.16.63.102:8080" + ], + "notifications": [ + "http://172.16.63.102:8080" + ] + }, "dev.traceability.takeda" : { + "brickStorages": [ + "http://172.16.63.67:8080" + ], + "anchoringServices": [ + "http://172.16.63.67:8080" + ], + "notifications": [ + "http://172.16.63.67:8080" + ] + }, "dev.traceability.roche" : { + "brickStorages": [ + "http://172.16.63.61:8080" + ], + "anchoringServices": [ + "http://172.16.63.61:8080" + ], + "notifications": [ + "http://172.16.63.61:8080" + ] + }, "dev.traceability.traceability" : { + "brickStorages": [ + "http://172.16.51.62:8080" + ], + "anchoringServices": [ + "http://172.16.51.62:8080" + ], + "notifications": [ + "http://172.16.51.62:8080" + ] + }, "dev.traceability.gsk" : { + "brickStorages": [ + "http://172.16.63.63:8080" + ], + "anchoringServices": [ + "http://172.16.63.63:8080" + ], + "notifications": [ + "http://172.16.63.63:8080" + ] + }, + "dev.vault.whs-takeda" : { + "replicas": [], + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + } +} \ No newline at end of file diff --git a/fgt-bdns/networks/dev/bdns-whs-zuellig.json b/fgt-bdns/networks/dev/bdns-whs-zuellig.json new file mode 100644 index 000000000..d660c0cae --- /dev/null +++ b/fgt-bdns/networks/dev/bdns-whs-zuellig.json @@ -0,0 +1,173 @@ +{ + "dev.traceability" : { + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, + "dev.traceability.bayer" : { + "brickStorages": [ + "http://172.16.63.62:8080" + ], + "anchoringServices": [ + "http://172.16.63.62:8080" + ], + "notifications": [ + "http://172.16.63.62:8080" + ] + }, "dev.traceability.whs-takeda" : { + "brickStorages": [ + "http://172.16.63.103:8080" + ], + "anchoringServices": [ + "http://172.16.63.103:8080" + ], + "notifications": [ + "http://172.16.63.103:8080" + ] + }, "dev.traceability.pfizer" : { + "brickStorages": [ + "http://172.16.63.66:8080" + ], + "anchoringServices": [ + "http://172.16.63.66:8080" + ], + "notifications": [ + "http://172.16.63.66:8080" + ] + }, "dev.traceability.pha-2" : { + "brickStorages": [ + "http:/172.16.63.152:8080" + ], + "anchoringServices": [ + "http:/172.16.63.152:8080" + ], + "notifications": [ + "http:/172.16.63.152:8080" + ] + }, "dev.traceability.whs1" : { + "brickStorages": [ + "http://172.16.63.101:8080" + ], + "anchoringServices": [ + "http://172.16.63.101:8080" + ], + "notifications": [ + "http://172.16.63.101:8080" + ] + }, "dev.traceability.msd" : { + "brickStorages": [ + "http://172.16.63.64:8080" + ], + "anchoringServices": [ + "http://172.16.63.64:8080" + ], + "notifications": [ + "http://172.16.63.64:8080" + ] + }, "dev.traceability.whs-zuellig" : { + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, "dev.traceability.sanofi" : { + "brickStorages": [ + "http://172.16.63.68:8080" + ], + "anchoringServices": [ + "http://172.16.63.68:8080" + ], + "notifications": [ + "http://172.16.63.68:8080" + ] + }, "dev.traceability.novo-nordisk" : { + "brickStorages": [ + "http://172.16.63.65:8080" + ], + "anchoringServices": [ + "http://172.16.63.65:8080" + ], + "notifications": [ + "http://172.16.63.65:8080" + ] + }, "dev.traceability.pha-1" : { + "brickStorages": [ + "http://172.16.63.151:8080" + ], + "anchoringServices": [ + "http://172.16.63.151:8080" + ], + "notifications": [ + "http://172.16.63.151:8080" + ] + }, "dev.traceability.whs2" : { + "brickStorages": [ + "http://172.16.63.102:8080" + ], + "anchoringServices": [ + "http://172.16.63.102:8080" + ], + "notifications": [ + "http://172.16.63.102:8080" + ] + }, "dev.traceability.takeda" : { + "brickStorages": [ + "http://172.16.63.67:8080" + ], + "anchoringServices": [ + "http://172.16.63.67:8080" + ], + "notifications": [ + "http://172.16.63.67:8080" + ] + }, "dev.traceability.roche" : { + "brickStorages": [ + "http://172.16.63.61:8080" + ], + "anchoringServices": [ + "http://172.16.63.61:8080" + ], + "notifications": [ + "http://172.16.63.61:8080" + ] + }, "dev.traceability.traceability" : { + "brickStorages": [ + "http://172.16.51.62:8080" + ], + "anchoringServices": [ + "http://172.16.51.62:8080" + ], + "notifications": [ + "http://172.16.51.62:8080" + ] + }, "dev.traceability.gsk" : { + "brickStorages": [ + "http://172.16.63.63:8080" + ], + "anchoringServices": [ + "http://172.16.63.63:8080" + ], + "notifications": [ + "http://172.16.63.63:8080" + ] + }, + "dev.vault.whs-zuellig" : { + "replicas": [], + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + } +} \ No newline at end of file diff --git a/fgt-bdns/networks/dev/bdns-whs1.json b/fgt-bdns/networks/dev/bdns-whs1.json new file mode 100644 index 000000000..9f3512073 --- /dev/null +++ b/fgt-bdns/networks/dev/bdns-whs1.json @@ -0,0 +1,173 @@ +{ + "dev.traceability" : { + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, + "dev.traceability.bayer" : { + "brickStorages": [ + "http://172.16.63.62:8080" + ], + "anchoringServices": [ + "http://172.16.63.62:8080" + ], + "notifications": [ + "http://172.16.63.62:8080" + ] + }, "dev.traceability.whs-takeda" : { + "brickStorages": [ + "http://172.16.63.103:8080" + ], + "anchoringServices": [ + "http://172.16.63.103:8080" + ], + "notifications": [ + "http://172.16.63.103:8080" + ] + }, "dev.traceability.pfizer" : { + "brickStorages": [ + "http://172.16.63.66:8080" + ], + "anchoringServices": [ + "http://172.16.63.66:8080" + ], + "notifications": [ + "http://172.16.63.66:8080" + ] + }, "dev.traceability.pha-2" : { + "brickStorages": [ + "http:/172.16.63.152:8080" + ], + "anchoringServices": [ + "http:/172.16.63.152:8080" + ], + "notifications": [ + "http:/172.16.63.152:8080" + ] + }, "dev.traceability.whs1" : { + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, "dev.traceability.msd" : { + "brickStorages": [ + "http://172.16.63.64:8080" + ], + "anchoringServices": [ + "http://172.16.63.64:8080" + ], + "notifications": [ + "http://172.16.63.64:8080" + ] + }, "dev.traceability.whs-zuellig" : { + "brickStorages": [ + "http://172.16.63.104:8080" + ], + "anchoringServices": [ + "http://172.16.63.104:8080" + ], + "notifications": [ + "http://172.16.63.104:8080" + ] + }, "dev.traceability.sanofi" : { + "brickStorages": [ + "http://172.16.63.68:8080" + ], + "anchoringServices": [ + "http://172.16.63.68:8080" + ], + "notifications": [ + "http://172.16.63.68:8080" + ] + }, "dev.traceability.novo-nordisk" : { + "brickStorages": [ + "http://172.16.63.65:8080" + ], + "anchoringServices": [ + "http://172.16.63.65:8080" + ], + "notifications": [ + "http://172.16.63.65:8080" + ] + }, "dev.traceability.pha-1" : { + "brickStorages": [ + "http://172.16.63.151:8080" + ], + "anchoringServices": [ + "http://172.16.63.151:8080" + ], + "notifications": [ + "http://172.16.63.151:8080" + ] + }, "dev.traceability.whs2" : { + "brickStorages": [ + "http://172.16.63.102:8080" + ], + "anchoringServices": [ + "http://172.16.63.102:8080" + ], + "notifications": [ + "http://172.16.63.102:8080" + ] + }, "dev.traceability.takeda" : { + "brickStorages": [ + "http://172.16.63.67:8080" + ], + "anchoringServices": [ + "http://172.16.63.67:8080" + ], + "notifications": [ + "http://172.16.63.67:8080" + ] + }, "dev.traceability.roche" : { + "brickStorages": [ + "http://172.16.63.61:8080" + ], + "anchoringServices": [ + "http://172.16.63.61:8080" + ], + "notifications": [ + "http://172.16.63.61:8080" + ] + }, "dev.traceability.traceability" : { + "brickStorages": [ + "http://172.16.51.62:8080" + ], + "anchoringServices": [ + "http://172.16.51.62:8080" + ], + "notifications": [ + "http://172.16.51.62:8080" + ] + }, "dev.traceability.gsk" : { + "brickStorages": [ + "http://172.16.63.63:8080" + ], + "anchoringServices": [ + "http://172.16.63.63:8080" + ], + "notifications": [ + "http://172.16.63.63:8080" + ] + }, + "dev.vault.whs1" : { + "replicas": [], + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + } +} \ No newline at end of file diff --git a/fgt-bdns/networks/dev/bdns-whs2.json b/fgt-bdns/networks/dev/bdns-whs2.json new file mode 100644 index 000000000..d1962b45b --- /dev/null +++ b/fgt-bdns/networks/dev/bdns-whs2.json @@ -0,0 +1,173 @@ +{ + "dev.traceability" : { + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, + "dev.traceability.bayer" : { + "brickStorages": [ + "http://172.16.63.62:8080" + ], + "anchoringServices": [ + "http://172.16.63.62:8080" + ], + "notifications": [ + "http://172.16.63.62:8080" + ] + }, "dev.traceability.whs-takeda" : { + "brickStorages": [ + "http://172.16.63.103:8080" + ], + "anchoringServices": [ + "http://172.16.63.103:8080" + ], + "notifications": [ + "http://172.16.63.103:8080" + ] + }, "dev.traceability.pfizer" : { + "brickStorages": [ + "http://172.16.63.66:8080" + ], + "anchoringServices": [ + "http://172.16.63.66:8080" + ], + "notifications": [ + "http://172.16.63.66:8080" + ] + }, "dev.traceability.pha-2" : { + "brickStorages": [ + "http:/172.16.63.152:8080" + ], + "anchoringServices": [ + "http:/172.16.63.152:8080" + ], + "notifications": [ + "http:/172.16.63.152:8080" + ] + }, "dev.traceability.whs1" : { + "brickStorages": [ + "http://172.16.63.101:8080" + ], + "anchoringServices": [ + "http://172.16.63.101:8080" + ], + "notifications": [ + "http://172.16.63.101:8080" + ] + }, "dev.traceability.msd" : { + "brickStorages": [ + "http://172.16.63.64:8080" + ], + "anchoringServices": [ + "http://172.16.63.64:8080" + ], + "notifications": [ + "http://172.16.63.64:8080" + ] + }, "dev.traceability.whs-zuellig" : { + "brickStorages": [ + "http://172.16.63.104:8080" + ], + "anchoringServices": [ + "http://172.16.63.104:8080" + ], + "notifications": [ + "http://172.16.63.104:8080" + ] + }, "dev.traceability.sanofi" : { + "brickStorages": [ + "http://172.16.63.68:8080" + ], + "anchoringServices": [ + "http://172.16.63.68:8080" + ], + "notifications": [ + "http://172.16.63.68:8080" + ] + }, "dev.traceability.novo-nordisk" : { + "brickStorages": [ + "http://172.16.63.65:8080" + ], + "anchoringServices": [ + "http://172.16.63.65:8080" + ], + "notifications": [ + "http://172.16.63.65:8080" + ] + }, "dev.traceability.pha-1" : { + "brickStorages": [ + "http://172.16.63.151:8080" + ], + "anchoringServices": [ + "http://172.16.63.151:8080" + ], + "notifications": [ + "http://172.16.63.151:8080" + ] + }, "dev.traceability.whs2" : { + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, "dev.traceability.takeda" : { + "brickStorages": [ + "http://172.16.63.67:8080" + ], + "anchoringServices": [ + "http://172.16.63.67:8080" + ], + "notifications": [ + "http://172.16.63.67:8080" + ] + }, "dev.traceability.roche" : { + "brickStorages": [ + "http://172.16.63.61:8080" + ], + "anchoringServices": [ + "http://172.16.63.61:8080" + ], + "notifications": [ + "http://172.16.63.61:8080" + ] + }, "dev.traceability.traceability" : { + "brickStorages": [ + "http://172.16.51.62:8080" + ], + "anchoringServices": [ + "http://172.16.51.62:8080" + ], + "notifications": [ + "http://172.16.51.62:8080" + ] + }, "dev.traceability.gsk" : { + "brickStorages": [ + "http://172.16.63.63:8080" + ], + "anchoringServices": [ + "http://172.16.63.63:8080" + ], + "notifications": [ + "http://172.16.63.63:8080" + ] + }, + "dev.vault.whs2" : { + "replicas": [], + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + } +} \ No newline at end of file diff --git a/fgt-bdns/networks/dev/editable/bayer/bdns b/fgt-bdns/networks/dev/editable/bayer/bdns new file mode 100644 index 000000000..ffd5628c1 --- /dev/null +++ b/fgt-bdns/networks/dev/editable/bayer/bdns @@ -0,0 +1 @@ +http://172.16.63.62:8080 \ No newline at end of file diff --git a/fgt-bdns/networks/dev/editable/gsk/bdns b/fgt-bdns/networks/dev/editable/gsk/bdns new file mode 100644 index 000000000..50c1d7006 --- /dev/null +++ b/fgt-bdns/networks/dev/editable/gsk/bdns @@ -0,0 +1 @@ +http://172.16.63.63:8080 \ No newline at end of file diff --git a/fgt-bdns/networks/dev/editable/msd/bdns b/fgt-bdns/networks/dev/editable/msd/bdns new file mode 100644 index 000000000..40c2f7b67 --- /dev/null +++ b/fgt-bdns/networks/dev/editable/msd/bdns @@ -0,0 +1 @@ +http://172.16.63.64:8080 \ No newline at end of file diff --git a/fgt-bdns/networks/dev/editable/novo-nordisk/bdns b/fgt-bdns/networks/dev/editable/novo-nordisk/bdns new file mode 100644 index 000000000..dc653236d --- /dev/null +++ b/fgt-bdns/networks/dev/editable/novo-nordisk/bdns @@ -0,0 +1 @@ +http://172.16.63.65:8080 \ No newline at end of file diff --git a/fgt-bdns/networks/dev/editable/pfizer/bdns b/fgt-bdns/networks/dev/editable/pfizer/bdns new file mode 100644 index 000000000..6963a8567 --- /dev/null +++ b/fgt-bdns/networks/dev/editable/pfizer/bdns @@ -0,0 +1 @@ +http://172.16.63.66:8080 \ No newline at end of file diff --git a/fgt-bdns/networks/dev/editable/pha-1/bdns b/fgt-bdns/networks/dev/editable/pha-1/bdns new file mode 100644 index 000000000..878b4da12 --- /dev/null +++ b/fgt-bdns/networks/dev/editable/pha-1/bdns @@ -0,0 +1 @@ +http://172.16.63.151:8080 \ No newline at end of file diff --git a/fgt-bdns/networks/dev/editable/pha-2/bdns b/fgt-bdns/networks/dev/editable/pha-2/bdns new file mode 100644 index 000000000..c703c73af --- /dev/null +++ b/fgt-bdns/networks/dev/editable/pha-2/bdns @@ -0,0 +1 @@ +http:/172.16.63.152:8080 \ No newline at end of file diff --git a/fgt-bdns/networks/dev/editable/roche/bdns b/fgt-bdns/networks/dev/editable/roche/bdns new file mode 100644 index 000000000..917439798 --- /dev/null +++ b/fgt-bdns/networks/dev/editable/roche/bdns @@ -0,0 +1 @@ +http://172.16.63.61:8080 \ No newline at end of file diff --git a/fgt-bdns/networks/dev/editable/sanofi/bdns b/fgt-bdns/networks/dev/editable/sanofi/bdns new file mode 100644 index 000000000..e3e2842b3 --- /dev/null +++ b/fgt-bdns/networks/dev/editable/sanofi/bdns @@ -0,0 +1 @@ +http://172.16.63.68:8080 \ No newline at end of file diff --git a/fgt-bdns/networks/dev/editable/takeda/bdns b/fgt-bdns/networks/dev/editable/takeda/bdns new file mode 100644 index 000000000..b78c7b8f5 --- /dev/null +++ b/fgt-bdns/networks/dev/editable/takeda/bdns @@ -0,0 +1 @@ +http://172.16.63.67:8080 \ No newline at end of file diff --git a/fgt-bdns/networks/dev/editable/traceability/bdns b/fgt-bdns/networks/dev/editable/traceability/bdns new file mode 100644 index 000000000..4a7e5cc7e --- /dev/null +++ b/fgt-bdns/networks/dev/editable/traceability/bdns @@ -0,0 +1 @@ +http://172.16.51.62:8080 \ No newline at end of file diff --git a/fgt-bdns/networks/dev/editable/whs-takeda/bdns b/fgt-bdns/networks/dev/editable/whs-takeda/bdns new file mode 100644 index 000000000..354326145 --- /dev/null +++ b/fgt-bdns/networks/dev/editable/whs-takeda/bdns @@ -0,0 +1 @@ +http://172.16.63.103:8080 \ No newline at end of file diff --git a/fgt-bdns/networks/dev/editable/whs-zuellig/bdns b/fgt-bdns/networks/dev/editable/whs-zuellig/bdns new file mode 100644 index 000000000..c5d445636 --- /dev/null +++ b/fgt-bdns/networks/dev/editable/whs-zuellig/bdns @@ -0,0 +1 @@ +http://172.16.63.104:8080 \ No newline at end of file diff --git a/fgt-bdns/networks/dev/editable/whs1/bdns b/fgt-bdns/networks/dev/editable/whs1/bdns new file mode 100644 index 000000000..7d36265c9 --- /dev/null +++ b/fgt-bdns/networks/dev/editable/whs1/bdns @@ -0,0 +1 @@ +http://172.16.63.101:8080 \ No newline at end of file diff --git a/fgt-bdns/networks/dev/editable/whs2/bdns b/fgt-bdns/networks/dev/editable/whs2/bdns new file mode 100644 index 000000000..b594faeaa --- /dev/null +++ b/fgt-bdns/networks/dev/editable/whs2/bdns @@ -0,0 +1 @@ +http://172.16.63.102:8080 \ No newline at end of file diff --git a/fgt-bdns/scripts/README.md b/fgt-bdns/scripts/README.md new file mode 100644 index 000000000..0a77618f2 --- /dev/null +++ b/fgt-bdns/scripts/README.md @@ -0,0 +1,28 @@ +# Script for generation configuration + +The script used to generate configuration files is executed via a GitHub Action on every push to the master branch. Script processes all content of [network](../networks) directory, where it assumes that first level of directory is an environment and them reads everything from *editable* subdirectorery and regenrate config files into environment root directory. + +## Output files + +Following files are generated: +| Filename: | Description: | +| :--- | :--- | +| bdns-<company-name>.json | A company specific BDNS configuration for epi use-case. Can be directly used for epi Helm chart. | +| bdns.json | List of BDNS domains | +| company.json | List of companies | +| enode.json | List of enodes | +| validator.json | List of validators | +| ip-whitelist | List of egress node IP adresses - should be directly applicable into FW. | +| genesis-geth.json,
smartContractAbi.json,
smartContractAddress.json | Files copied from PLA directory as source files. | +| plugin_data_common.json | Ordered configuration values to be used directly in epi Helm chart. | + +## Hardcoded value mapping + +Generally, any input is processed, but some values are hardcoded: + +- blockchain-node-outbound-ips mapped into ip-whitelis and as egress into plugin_data_common.json +- if more values are included - an array is created, for BDNS always just first value is included + +## Helper files + +[Helper files](./scripts/helper-files/) contain current format of the BDNS yaml file. diff --git a/fgt-bdns/scripts/generate-files.py b/fgt-bdns/scripts/generate-files.py new file mode 100644 index 000000000..829e559e4 --- /dev/null +++ b/fgt-bdns/scripts/generate-files.py @@ -0,0 +1,147 @@ +import shutil +import os +import json +import re + + +"""Write BDNS config specific per company""" + + +def write_bdns(env, path, valuelist): + # load templates + ENV = '$$ENV$$' + with open('./scripts/helper-files/bdns-start') as starttemplate: + start = starttemplate.read().replace(ENV, env) + + with open('./scripts/helper-files/bdns-end') as endtemplate: + end = endtemplate.read().replace(ENV, env) + + with open('./scripts/helper-files/bdns-section') as sectiontemplate: + section = sectiontemplate.read() + + for valueitem in valuelist: + filename = "bdns-"+valueitem[0]+".json" + filecontent = "\n" + fileout = "" + for valueitem2 in valuelist: + if valueitem[0] == valueitem2[0]: + url = '$ORIGIN' + else: + url = valueitem2[1] + + filecontent += section.replace(ENV, env).replace( + '$$COMPANY$$', valueitem2[0]).replace('$$URL$$', url) + fileout += section.replace(ENV, env).replace( + '$$COMPANY$$', valueitem2[0]).replace('$$URL$$', valueitem2[1]) + + with open(os.path.join(path, filename), "w") as f: + f.write(start+filecontent+'\n' + + end.replace('$$COMPANY$$', valueitem[0])) + return(fileout) + + +"""Create a unique list of keys""" + + +def prepare_unique(datavalues): + # extract unique key list + keys = list(datavalues[0].keys()) + for i in range(len(datavalues)): + keys += datavalues[i].keys() + # insert the list to the set + list_set = set(keys) + # convert the set to the list + return (list(list_set)) + + +"""Prepare data before write + - slices data from list of dictionaries based on unique keys + - create expected filename (rename key) + - call write plain config files + - call BDNS config write + proceses all keys (files) found in the data +""" + + +def prepare_config(env, path, datavalues): + for key in prepare_unique(datavalues): + templist = [] + if key == "bdns": + bdnslist = [] + + for dictvalue in datavalues: + if dictvalue.get(key).__class__.__name__ == "tuple": + for tuplevalue in dictvalue.get(key): + # TODO limit those which can have just one value + templist.append(str(tuplevalue)) + # Only 1st value is included + if key == "bdns": + bdnslist.append( + (str(dictvalue.get("company")), str(dictvalue.get(key)[0]))) + + elif dictvalue.get(key) == None: + continue + + else: + templist.append(str(dictvalue.get(key))) + if key == "bdns": + bdnslist.append( + (str(dictvalue.get("company")), str(dictvalue.get(key)))) + + if key == "bdns": + bdns_content = write_bdns(env, path, bdnslist) + + bdns_val = list() + for val in bdnslist: + bdns_val.append(val[1]) + + +"""Gather data from source +Read all data in the dir structure +""" + + +def read_files(path): + read_data = list() + for root, dirs, files in os.walk(path): + t_dictionary = dict() + for file in files: + with open(os.path.join(root, file), "r") as f: + t_lines = list() + for line in f: + if len(line.rstrip()) > 0: + t_lines.append(line.rstrip()) + + if not t_lines: + break + elif len(t_lines) > 1: + node_item = tuple(t_lines) + else: + node_item = t_lines[0] + + t_dictionary[file] = node_item + + if t_dictionary: + # resort company -> first place + ordered_dict = dict() + ordered_dict["company"] = os.path.basename(root) + ordered_dict.update(t_dictionary) + read_data.append(ordered_dict) + + return read_data + + +# start script +ROOT_DIR = "./networks" + +for it in os.scandir(ROOT_DIR): + if it.is_dir(): + env = it.name + # source files + base_path = os.path.join(ROOT_DIR, env) + source_path = os.path.join(base_path, "editable") + dest_path = base_path + # read data + output_value = read_files(source_path) + # generate specific config files + prepare_config(env, dest_path, output_value) diff --git a/fgt-bdns/scripts/helper-files/bdns-end b/fgt-bdns/scripts/helper-files/bdns-end new file mode 100644 index 000000000..bd91e69ab --- /dev/null +++ b/fgt-bdns/scripts/helper-files/bdns-end @@ -0,0 +1,13 @@ + "$$ENV$$.vault.$$COMPANY$$" : { + "replicas": [], + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + } +} \ No newline at end of file diff --git a/fgt-bdns/scripts/helper-files/bdns-mobile-app-end b/fgt-bdns/scripts/helper-files/bdns-mobile-app-end new file mode 100644 index 000000000..18572543a --- /dev/null +++ b/fgt-bdns/scripts/helper-files/bdns-mobile-app-end @@ -0,0 +1,13 @@ + "vault": { + "replicas": [], + "brickStorages": [ + "$ORIGIN" + ], + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + } +} \ No newline at end of file diff --git a/fgt-bdns/scripts/helper-files/bdns-mobile-app-section b/fgt-bdns/scripts/helper-files/bdns-mobile-app-section new file mode 100644 index 000000000..73239d3ca --- /dev/null +++ b/fgt-bdns/scripts/helper-files/bdns-mobile-app-section @@ -0,0 +1,4 @@ + "$$ENV$$.traceability" : { + "anchoringServices": $$URLS$$, + "notifications": $$URLS$$ + }, \ No newline at end of file diff --git a/fgt-bdns/scripts/helper-files/bdns-section b/fgt-bdns/scripts/helper-files/bdns-section new file mode 100644 index 000000000..3d43fa8cd --- /dev/null +++ b/fgt-bdns/scripts/helper-files/bdns-section @@ -0,0 +1,11 @@ + "$$ENV$$.traceability.$$COMPANY$$" : { + "brickStorages": [ + "$$URL$$" + ], + "anchoringServices": [ + "$$URL$$" + ], + "notifications": [ + "$$URL$$" + ] + }, \ No newline at end of file diff --git a/fgt-bdns/scripts/helper-files/bdns-start b/fgt-bdns/scripts/helper-files/bdns-start new file mode 100644 index 000000000..6df71a6eb --- /dev/null +++ b/fgt-bdns/scripts/helper-files/bdns-start @@ -0,0 +1,9 @@ +{ + "$$ENV$$.traceability" : { + "anchoringServices": [ + "$ORIGIN" + ], + "notifications": [ + "$ORIGIN" + ] + }, \ No newline at end of file diff --git a/fgt-dsu-wizard/services/BatchService.js b/fgt-dsu-wizard/services/BatchService.js index a6e28ad11..ec1e3e5e9 100644 --- a/fgt-dsu-wizard/services/BatchService.js +++ b/fgt-dsu-wizard/services/BatchService.js @@ -18,12 +18,21 @@ function BatchService(domain, strategy){ let isSimple = strategies.SIMPLE === (strategy || strategies.SIMPLE); const statusService = new (require('./StatusService'))(domain, strategy); const productService = new ( require('./ProductService'))(domain, strategy); + const BRICKS_DOMAIN_KEY = require("opendsu").constants.BRICKS_DOMAIN_KEY - this.generateKey = function(gtin, batchNumber){ + const getBricksDomainFromProcess = function(){ + if (!globalThis.process || !globalThis.process["BRICKS_DOMAIN"]) + return undefined; + return globalThis.process["BRICKS_DOMAIN"]; + } + + this.generateKey = function(gtin, batchNumber, bricksDomain){ let keyGenData = { gtin: gtin, batch: batchNumber } + if (bricksDomain) + keyGenData[BRICKS_DOMAIN_KEY] = bricksDomain return keyGenFunction(keyGenData, domain); } @@ -106,7 +115,7 @@ function BatchService(domain, strategy){ return callback(_err); if (isSimple){ - let keySSI = this.generateKey(gtin, batch.batchNumber); + let keySSI = this.generateKey(gtin, batch.batchNumber, getBricksDomainFromProcess()); utils.selectMethod(keySSI)(keySSI, (err, dsu) => { if (err) return callback(err); diff --git a/fgt-dsu-wizard/services/IndividualProductService.js b/fgt-dsu-wizard/services/IndividualProductService.js index fa4f378df..6ba5f0466 100644 --- a/fgt-dsu-wizard/services/IndividualProductService.js +++ b/fgt-dsu-wizard/services/IndividualProductService.js @@ -12,16 +12,26 @@ function IndividualProductService(domain, strategy){ const IndividualProduct = require('../model/IndividualProduct'); const endpoint = 'individualproduct'; const keyGenFunction = require('../commands/setIndividualProductSSI').createIndividualProductSSI; + const BRICKS_DOMAIN_KEY = require("opendsu").constants.BRICKS_DOMAIN_KEY + domain = domain || "default"; let isSimple = strategies.SIMPLE === (strategy || strategies.SIMPLE); - this.generateKey = function(gtin, batchNumber, serialNumber){ + const getBricksDomainFromProcess = function(){ + if (!globalThis.process || !globalThis.process["BRICKS_DOMAIN"]) + return undefined; + return globalThis.process["BRICKS_DOMAIN"]; + } + + this.generateKey = function(gtin, batchNumber, serialNumber, bricksDomain){ let keyGenData = { gtin: gtin, batchNumber: batchNumber, serialNumber: serialNumber } + if (bricksDomain) + keyGenData[BRICKS_DOMAIN_KEY] = bricksDomain return keyGenFunction(keyGenData, domain); } @@ -62,7 +72,7 @@ function IndividualProductService(domain, strategy){ return callback(err); if (isSimple){ - let keySSI = this.generateKey(product.gtin, product.batchNumber, product.serialNumber); + let keySSI = this.generateKey(product.gtin, product.batchNumber, product.serialNumber, getBricksDomainFromProcess()); utils.selectMethod(keySSI)(keySSI, (err, dsu) => { if (err) return callback(err); diff --git a/fgt-dsu-wizard/services/OrderService.js b/fgt-dsu-wizard/services/OrderService.js index 9fac51387..fcfd0b904 100644 --- a/fgt-dsu-wizard/services/OrderService.js +++ b/fgt-dsu-wizard/services/OrderService.js @@ -1,6 +1,7 @@ const Utils = require('../../pdm-dsu-toolkit/services/utils'); const {STATUS_MOUNT_PATH, INFO_PATH, SHIPMENT_PATH, ORDER_MOUNT_PATH} = require('../constants'); const {OrderStatus, Batch} = require("../model"); +const {createBatchSSI: keyGenFunction} = require("../commands/setBatchSSI"); /** @@ -13,12 +14,18 @@ function OrderService(domain, strategy) { const strategies = require("../../pdm-dsu-toolkit/services/strategy"); const {Order, OrderStatus, utils} = require('../model'); const endpoint = 'order'; + const BRICKS_DOMAIN_KEY = require("opendsu").constants.BRICKS_DOMAIN_KEY domain = domain || "default"; const statusService = new (require('./StatusService'))(domain, strategy); let isSimple = strategies.SIMPLE === (strategy || strategies.SIMPLE); + const getBricksDomainFromProcess = function(){ + if (!globalThis.process || !globalThis.process["BRICKS_DOMAIN"]) + return undefined; + return globalThis.process["BRICKS_DOMAIN"]; + } this.resolveMAH = function(orderLine, callback){ const keyGen = require('../commands/setProductSSI').createProductSSI; @@ -197,9 +204,19 @@ function OrderService(domain, strategy) { }); } + this.generateKey = function(orderId, requesterId, bricksDomain){ + let keyGenFunction = require('../commands/setOrderSSI').createOrderSSI; + let keyGenData = { + data: orderId + requesterId + } + if (bricksDomain) + keyGenData[BRICKS_DOMAIN_KEY] = bricksDomain + return keyGenFunction(keyGenData, domain); + } + let createSimple = function (order, callback) { let keyGenFunction = require('../commands/setOrderSSI').createOrderSSI; - let templateKeySSI = keyGenFunction({data: order.orderId + order.requesterId}, domain); + let templateKeySSI = this.generateKey(order.orderId, order.requesterId, getBricksDomainFromProcess()); Utils.selectMethod(templateKeySSI)(templateKeySSI, (err, dsu) => { if (err) return callback(err); diff --git a/fgt-dsu-wizard/services/ProductService.js b/fgt-dsu-wizard/services/ProductService.js index 44ba526f8..841c4ffaf 100644 --- a/fgt-dsu-wizard/services/ProductService.js +++ b/fgt-dsu-wizard/services/ProductService.js @@ -15,11 +15,20 @@ function ProductService(domain, strategy){ domain = domain || "default"; let isSimple = strategies.SIMPLE === (strategy || strategies.SIMPLE); + const BRICKS_DOMAIN_KEY = require("opendsu").constants.BRICKS_DOMAIN_KEY - this.generateKey = function(gtin){ + const getBricksDomainFromProcess = function(){ + if (!globalThis.process || !globalThis.process["BRICKS_DOMAIN"]) + return undefined; + return globalThis.process["BRICKS_DOMAIN"]; + } + + this.generateKey = function(gtin, bricksDomain){ let keyGenData = { gtin: gtin } + if (bricksDomain) + keyGenData[BRICKS_DOMAIN_KEY] = bricksDomain return keyGenFunction(keyGenData, domain); } diff --git a/fgt-dsu-wizard/services/SaleService.js b/fgt-dsu-wizard/services/SaleService.js index 3562be251..8c2cb482b 100644 --- a/fgt-dsu-wizard/services/SaleService.js +++ b/fgt-dsu-wizard/services/SaleService.js @@ -16,6 +16,15 @@ function SaleService(domain, strategy){ domain = domain || "default"; let isSimple = strategies.SIMPLE === (strategy || strategies.SIMPLE); + const BRICKS_DOMAIN_KEY = require("opendsu").constants.BRICKS_DOMAIN_KEY + let keyGenFunction = require('../commands/setSaleSSI').createSaleSSI; + + const getBricksDomainFromProcess = function(){ + if (!globalThis.process || !globalThis.process["BRICKS_DOMAIN"]) + return undefined; + return globalThis.process["BRICKS_DOMAIN"]; + } + /** * Resolves the DSU and loads the OrderLine object with all its properties, mutable or not * @param {KeySSI} keySSI @@ -40,6 +49,19 @@ function SaleService(domain, strategy){ }); } + this.generateKey = function(sale, bricksDomain){ + let keyGenFunction = require('../commands/setSaleSSI').createSaleSSI; + let keyGenData = { + data: [ + sale.id, + sale.sellerId + ] + } + if (bricksDomain) + keyGenData[BRICKS_DOMAIN_KEY] = bricksDomain + return keyGenFunction(keyGenData, domain); + } + /** * Creates an orderLine DSU * @param {string | Sale} sale @@ -55,16 +77,8 @@ function SaleService(domain, strategy){ let data = typeof sale == 'object' ? JSON.stringify(sale) : sale; - let keyGenData = { - data: [ - sale.id, - sale.sellerId - ] - } - if (isSimple){ - let keyGenFunction = require('../commands/setSaleSSI').createSaleSSI; - let keySSI = keyGenFunction(keyGenData, domain); + let keySSI = this.generateKey(sale, getBricksDomainFromProcess()) utils.selectMethod(keySSI)(keySSI, (err, dsu) => { if (err) return callback(err); diff --git a/fgt-dsu-wizard/services/ShipmentCodeService.js b/fgt-dsu-wizard/services/ShipmentCodeService.js index 4b085a011..6796e2eb7 100644 --- a/fgt-dsu-wizard/services/ShipmentCodeService.js +++ b/fgt-dsu-wizard/services/ShipmentCodeService.js @@ -12,12 +12,21 @@ const {Shipment, ShipmentLine, ShipmentCode, TrackingCode} = require('../model') */ function ShipmentCodeService(domain, strategy){ const strategies = require("../../pdm-dsu-toolkit/services/strategy"); + let keyGenFunction = require('../commands/setShipmentCodeSSI').createShipmentCodeSSI; const endpoint = 'shipmentcode'; domain = domain || "default"; let isSimple = strategies.SIMPLE === (strategy || strategies.SIMPLE); + const BRICKS_DOMAIN_KEY = require("opendsu").constants.BRICKS_DOMAIN_KEY + + const getBricksDomainFromProcess = function(){ + if (!globalThis.process || !globalThis.process["BRICKS_DOMAIN"]) + return undefined; + return globalThis.process["BRICKS_DOMAIN"]; + } + this.getContainerGranularity = () => GRANULARITY.slice(); /** @@ -51,6 +60,12 @@ function ShipmentCodeService(domain, strategy){ }); } + this.generateKey = function(keyGenData, bricksDomain){ + if (bricksDomain) + keyGenData[BRICKS_DOMAIN_KEY] = bricksDomain + return keyGenFunction(keyGenData, domain); + } + /** * Creates an orderLine DSU * @param {ShipmentCode} shipmentCode @@ -63,8 +78,7 @@ function ShipmentCodeService(domain, strategy){ let data = typeof shipmentCode == 'object' ? JSON.stringify(shipmentCode) : shipmentCode; if (isSimple){ - let keyGenFunction = require('../commands/setShipmentCodeSSI').createShipmentCodeSSI; - let keySSI = keyGenFunction('shipmentcode', domain); + let keySSI = this.generateKey('shipmentcode', getBricksDomainFromProcess()); utils.selectMethod(keySSI)(keySSI, (err, dsu) => { if (err) return callback(err); diff --git a/fgt-dsu-wizard/services/ShipmentLineService.js b/fgt-dsu-wizard/services/ShipmentLineService.js index 9481a9eee..f42b8ea26 100644 --- a/fgt-dsu-wizard/services/ShipmentLineService.js +++ b/fgt-dsu-wizard/services/ShipmentLineService.js @@ -12,12 +12,30 @@ function ShipmentLineService(domain, strategy){ const strategies = require("../../pdm-dsu-toolkit/services/strategy"); const {ShipmentLine} = require('../model'); const endpoint = 'shipmentline'; + const BRICKS_DOMAIN_KEY = require("opendsu").constants.BRICKS_DOMAIN_KEY + let keyGenFunction = require('../commands/setShipmentLineSSI').createShipmentLineSSI; + domain = domain || "default"; let isSimple = strategies.SIMPLE === (strategy || strategies.SIMPLE); const statusService = new (require('./StatusService'))(domain, strategy); + const getBricksDomainFromProcess = function(){ + if (!globalThis.process || !globalThis.process["BRICKS_DOMAIN"]) + return undefined; + return globalThis.process["BRICKS_DOMAIN"]; + } + + this.generateKey = function(shipmentId, shipmentLine, bricksDomain){ + let keyGenData = { + data: shipmentId + shipmentLine.senderId + shipmentLine.gtin + shipmentLine.batch + } + if (bricksDomain) + keyGenData[BRICKS_DOMAIN_KEY] = bricksDomain + return keyGenFunction(keyGenData, domain); + } + /** * Resolves the DSU and loads the OrderLine object with all its properties, mutable or not * @param {KeySSI} keySSI @@ -64,13 +82,8 @@ function ShipmentLineService(domain, strategy){ let data = typeof shipmentLine == 'object' ? JSON.stringify(shipmentLine) : shipmentLine; - let keyGenData = { - data: shipmentId + shipmentLine.senderId + shipmentLine.gtin + shipmentLine.batch - } - if (isSimple){ - let keyGenFunction = require('../commands/setShipmentLineSSI').createShipmentLineSSI; - let keySSI = keyGenFunction(keyGenData, domain); + let keySSI = this.generateKey(shipmentId, shipmentLine, getBricksDomainFromProcess()) utils.selectMethod(keySSI)(keySSI, (err, dsu) => { if (err) return callback(err); diff --git a/fgt-dsu-wizard/services/ShipmentService.js b/fgt-dsu-wizard/services/ShipmentService.js index 30968d02e..eef0dcb3b 100644 --- a/fgt-dsu-wizard/services/ShipmentService.js +++ b/fgt-dsu-wizard/services/ShipmentService.js @@ -1,6 +1,6 @@ const utils = require('../../pdm-dsu-toolkit/services/utils'); const {STATUS_MOUNT_PATH, INFO_PATH, LINES_PATH, ORDER_MOUNT_PATH} = require('../constants'); -const {Shipment, ShipmentStatus, Status, Order} = require('../model'); +const {Shipment, ShipmentStatus} = require('../model'); /** * @param {string} domain: anchoring domain. defaults to 'default' * @param {strategy} strategy @@ -14,10 +14,17 @@ function ShipmentService(domain, strategy) { domain = domain || "default"; const shipmentLineService = new (require('./ShipmentLineService'))(domain, strategy); const statusService = new (require('./StatusService'))(domain, strategy); - const shipmentCodeService = new (require('./ShipmentCodeService'))(domain, strategy); + const BRICKS_DOMAIN_KEY = require("opendsu").constants.BRICKS_DOMAIN_KEY + let keyGenFunction = require('../commands/setShipmentSSI').createShipmentSSI; let isSimple = strategies.SIMPLE === (strategy || strategies.SIMPLE); + const getBricksDomainFromProcess = function(){ + if (!globalThis.process || !globalThis.process["BRICKS_DOMAIN"]) + return undefined; + return globalThis.process["BRICKS_DOMAIN"]; + } + let getDSUMountByPath = function(dsu, path, basePath, callback){ if (!callback && typeof basePath === 'function'){ callback = basePath; @@ -53,6 +60,16 @@ function ShipmentService(domain, strategy) { }); } + + this.generateKey = function(shipment, bricksDomain){ + let keyGenData = { + gtin: shipment.senderId + shipment.shipmentId + } + if (bricksDomain) + keyGenData[BRICKS_DOMAIN_KEY] = bricksDomain + return keyGenFunction(keyGenData, domain); + } + /** * Resolves the DSU and loads the Order object with all its properties, mutable or not * @param {KeySSI} keySSI @@ -158,9 +175,8 @@ function ShipmentService(domain, strategy) { }); } - let createSimple = function (shipment, orderSSI, callback) { - let keyGenFunction = require('../commands/setShipmentSSI').createShipmentSSI; - let templateKeySSI = keyGenFunction({data: shipment.senderId + shipment.shipmentId}, domain); + this.createSimple = function (shipment, orderSSI, callback) { + let templateKeySSI = this.generateKey(shipment, getBricksDomainFromProcess()); utils.selectMethod(templateKeySSI)(templateKeySSI, (err, dsu) => { if (err) return callback(err); diff --git a/fgt-dsu-wizard/services/StatusService.js b/fgt-dsu-wizard/services/StatusService.js index 0df489b43..99b9b5846 100644 --- a/fgt-dsu-wizard/services/StatusService.js +++ b/fgt-dsu-wizard/services/StatusService.js @@ -1,6 +1,7 @@ const utils = require('../../pdm-dsu-toolkit/services/utils'); const {INFO_PATH, LOG_PATH, EXTRA_INFO_PATH} = require('../constants'); const Status = require('../model/Status'); +const {createBatchSSI: keyGenFunction} = require("../commands/setBatchSSI"); /** * @param {string} domain: anchoring domain. defaults to 'default' @@ -12,6 +13,7 @@ function StatusService(domain, strategy){ const strategies = require("../../pdm-dsu-toolkit/services/strategy"); const OrderStatus = require('../model').OrderStatus; const endpoint = 'status'; + let keyGenFunction = require('../commands/setStatusSSI').createStatusSSI; domain = domain || "default"; let isSimple = strategies.SIMPLE === (strategy || strategies.SIMPLE); @@ -22,6 +24,20 @@ function StatusService(domain, strategy){ return utils.getResolver().createDSU; } + const BRICKS_DOMAIN_KEY = require("opendsu").constants.BRICKS_DOMAIN_KEY + + const getBricksDomainFromProcess = function(){ + if (!globalThis.process || !globalThis.process["BRICKS_DOMAIN"]) + return undefined; + return globalThis.process["BRICKS_DOMAIN"]; + } + + this.generateKey = function(status, bricksDomain){ + if (bricksDomain) + status[BRICKS_DOMAIN_KEY] = bricksDomain + return keyGenFunction(status, domain); + } + let createLog = function(id, prevStatus, status, timestamp){ const ts = timestamp ? timestamp : Date.now(); return prevStatus @@ -123,8 +139,7 @@ function StatusService(domain, strategy){ } if (isSimple){ - let keyGenFunction = require('../commands/setStatusSSI').createStatusSSI; - let keySSI = keyGenFunction(status, domain); + let keySSI = this.generateKey(status) selectMethod(keySSI)(keySSI, (err, dsu) => { if (err) return callback(err);