代码拉取完成,页面将自动刷新
同步操作将从 EdgexFoundry/edgex-cli 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/usr/bin/env bash
echo ">make build"
make build
execute(){
slug=$1
shift
commands=("$@")
echo -e "*** $slug ***\n"
for cmd in "${commands[@]}"
do
echo "> ./edgex-cli $cmd"
./edgex-cli $cmd
echo -e "\n"
done
echo -e "*** End $slug ***\n"
}
test_deviceService() {
declare -a commands=("deviceservice list --no-pager"
)
execute "Device Service" "${commands[@]}"
}
test_device() {
#TODO add device fails because there is no deviceservice.
declare -a commands=("device list --no-pager"
# "device add -f samples/createDevice.toml"
# "device rm --name Car-001"
)
execute "Device" "${commands[@]}"
}
test_dp() {
declare -a commands=("profile list --no-pager"
"profile add samples/createDP.yaml"
"profile rm --name Simple-Device-1")
execute "DeviceProfile" "${commands[@]}"
}
test_intervals(){
declare -a commands=("interval add samples/createInterval.toml"
"interval list --no-pager" \
"interval rm --name noon"\
"interval rm --name fourteen-hundrend-hours")
execute "Intervals" "${commands[@]}"
}
test_notifications(){
declare -a commands=("notification add samples/createNotifications.toml"
"notification list --no-pager" \
"notification list --slug notice-001" \
"notification list --labels=temperature")
execute "Notification" "${commands[@]}"
}
test_others(){
declare -a commands=("addressable list --no-pager"
"deviceservice list --no-pager" \
"event list --no-pager" \
"reading list --no-pager"\
"subscription list --no-pager"
"status"
"version")
execute "Others" "${commands[@]}"
}
test_all(){
test_deviceService
test_dp
test_device
test_notifications
test_intervals
test_others
}
if [[ $# -eq 0 ]] ; then
test_all
exit 0
fi
for i in "$@"
do
case $i in
-d)
test_device
;;
-dp)
test_dp
;;
-ds)
test_deviceService
;;
-i)
test_intervals
;;
-n)
test_notifications
;;
-o)
test_others
;;
*)
test_all
;;
esac
done
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。