-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix subType streaming validator errors (#272)
- Loading branch information
Showing
14 changed files
with
154 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ fi | |
project_id=$1 | ||
shift | ||
|
||
bin/clone_model | ||
site_path=udmi_site_model | ||
device_id=AHU-1 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#!/bin/bash -e | ||
|
||
ROOT_DIR=$(dirname $0)/.. | ||
cd $ROOT_DIR | ||
|
||
if [[ $# != 1 ]]; then | ||
echo Usage: $0 PROJECT_ID | ||
false | ||
fi | ||
project_id=$1 | ||
shift | ||
|
||
site_path=udmi_site_model | ||
device_id=AHU-1 | ||
|
||
serial_no=validator-$RANDOM | ||
echo Using pubber with serial $serial_no | ||
|
||
PUBBER_OUT=pubber.out | ||
|
||
pids=`ps ax | fgrep pubber | fgrep java | awk '{print $1}'` | ||
if [[ -n $pids ]]; then | ||
echo Killing pubber pids $pids | ||
kill $pids | ||
fi | ||
|
||
rm -rf out/devices | ||
|
||
# Prepare auth key used by reflector | ||
cp udmi_site_model/devices/AHU-1/rsa_private.pkcs8 \ | ||
udmi_site_model/gcp_reflect_key.pkcs8 | ||
|
||
bin/validator $site_path $project_id & | ||
vpid=$! | ||
sleep 10 | ||
echo Started validator pid $vpid | ||
|
||
pubber/bin/build | ||
|
||
echo Writing pubber output to $PUBBER_OUT | ||
echo bin/pubber $site_path $project_id $device_id $serial_no | ||
bin/pubber $site_path $project_id $device_id $serial_no > $PUBBER_OUT 2>&1 & | ||
|
||
WAITING=10 | ||
for i in `seq 1 $WAITING`; do | ||
if fgrep "Connection complete" $PUBBER_OUT; then | ||
break | ||
fi | ||
echo Waiting for pubber startup $((WAITING - i))... | ||
sleep 2 | ||
done | ||
|
||
if [[ $i == $WAITING ]]; then | ||
echo pubber startup failed: | ||
cat $PUBBER_OUT | ||
false | ||
fi | ||
|
||
echo Waiting for system to run for a bit... | ||
sleep 30 | ||
|
||
pids=`ps ax | fgrep pubber | fgrep java | awk '{print $1}'` | ||
echo Killing pids $vpid $pids | ||
kill $vpid $pids | ||
|
||
outfiles=`find out/devices -name \*.out` || true | ||
echo Found .out files $outfiles, copying to /tmp/validator.out | ||
more $outfiles > /tmp/validator.out || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
:::::::::::::: | ||
out/devices/AHU-1/state_pointset.out | ||
:::::::::::::: | ||
While converting to json node: 1 schema violations found | ||
1 schema violations found | ||
object instance has properties which are not allowed by the schema: ["version"] | ||
:::::::::::::: | ||
out/devices/AHU-1/state_system.out | ||
:::::::::::::: | ||
While converting to json node: 2 schema violations found | ||
2 schema violations found | ||
object has missing required properties (["last_config"]) | ||
object instance has properties which are not allowed by the schema: ["version"] | ||
:::::::::::::: | ||
out/devices/AHU-1/state.out | ||
:::::::::::::: | ||
While converting to json node: 2 schema violations found | ||
2 schema violations found | ||
instance value ("states") not found in enum (possible values: ["update","discovery","system","gateway","localnet","metadata","pointset","blobset"]) | ||
instance value ("update") not found in enum (possible values: ["event","command","state","config"]) | ||
While converting to json node: 1 schema violations found | ||
1 schema violations found | ||
object has missing required properties (["last_config"]) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters