Skip to content

Commit

Permalink
Rename device model to be explicit and small fixes based on PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisWeissmann committed Jun 5, 2024
1 parent a435152 commit 09a33c7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions demo-iso15118-2-ac-plus-ocpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ CITRINEOS_BRANCH="feature/everest-demo"



usage="usage: $(basename "$0") [-r <repo>] [-b <branch>] [-j|1|2|3|m|c] [-h]
usage="usage: $(basename "$0") [-r <repo>] [-b <branch>] [-j|1|2|3|c] [-h]
This script will run EVerest ISO 15118-2 AC charging with OCPP demos.
Expand Down Expand Up @@ -64,14 +64,6 @@ if [[ ! "${DEMO_VERSION}" ]]; then

exit 1
fi
if [[ "${DEMO_VERSION}" != "v1.6j" && -z "${DEMO_CSMS}" ]]; then
echo 'Error: no 2.0.1 csms option provided.'
echo 'Use -c for CitrineOS or -m MaEVe'
echo
echo -e "$usage"

exit 1
fi

DEMO_DIR="$(mktemp -d)"

Expand Down Expand Up @@ -109,9 +101,8 @@ if [[ "$DEMO_VERSION" != v1.6j && "$DEMO_CSMS" == meave ]]; then
git reset --hard ${MAEVE_BRANCH}

Check warning on line 101 in demo-iso15118-2-ac-plus-ocpp.sh

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

demo-iso15118-2-ac-plus-ocpp.sh#L101

Double quote to prevent globbing and word splitting.
cp ../everest-demo/manager/cached_certs_correct_name_emaid.tar.gz .

echo "Patching the CSMS to disable load balancer"
patch -p1 -i ../everest-demo/maeve/maeve-csms-no-lb.patch
fi
echo "Patching the CSMS to disable load balancer"
patch -p1 -i ../everest-demo/maeve/maeve-csms-no-lb.patch

# Set up certificates for SP2 and SP3
if [[ "$DEMO_VERSION" =~ sp2 || "$DEMO_VERSION" =~ sp3 ]]; then
Expand Down Expand Up @@ -157,6 +148,7 @@ if [[ "$DEMO_VERSION" != v1.6j && "$DEMO_CSMS" == meave ]]; then
popd || exit 1
fi


if [[ "$DEMO_VERSION" != v1.6j && "$DEMO_CSMS" == 'citrineos' ]]; then
echo "Cloning CitrineOS CSMS from ${CITRINEOS_REPO} into ${DEMO_DIR}/citrineos-csms and starting it"
git clone --branch "${CITRINEOS_BRANCH}" "${CITRINEOS_REPO}" citrineos-csms
Expand Down Expand Up @@ -238,16 +230,16 @@ fi
if [[ "$DEMO_CSMS" == 'citrineos' ]]; then
if [[ "$DEMO_VERSION" =~ sp1 ]]; then
echo "Copying device DB, configured to SecurityProfile: 1"
docker cp manager/device_model_storage_sp1.db \
everest-ac-demo-manager-1:/workspace/dist/share/everest/modules/OCPP201/device_model_storage.db
docker cp manager/device_model_storage_citrineos_sp1.db \
everest-ac-demo-manager-1:/ext/source/build/dist/share/everest/modules/OCPP201/device_model_storage.db
elif [[ "$DEMO_VERSION" =~ sp2 ]]; then
echo "Copying device DB, configured to SecurityProfile: 2"
docker cp manager/device_model_storage_sp2.db \
everest-ac-demo-manager-1:/workspace/dist/share/everest/modules/OCPP201/device_model_storage.db
docker cp manager/device_model_storage_citrineos_sp2.db \
everest-ac-demo-manager-1:/ext/source/build/dist/share/everest/modules/OCPP201/device_model_storage.db
elif [[ "$DEMO_VERSION" =~ sp3 ]]; then
echo "Copying device DB, configured to SecurityProfile: 3"
docker cp manager/device_model_storage_sp3.db \
everest-ac-demo-manager-1:/workspace/dist/share/everest/modules/OCPP201/device_model_storage.db
docker cp manager/device_model_storage_citrineos_sp3.db \
everest-ac-demo-manager-1:/ext/source/build/dist/share/everest/modules/OCPP201/device_model_storage.db
fi
fi

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 09a33c7

Please sign in to comment.