Code Review
/
nonrtric.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Update docker-compose of A1 simulator
[nonrtric.git]
/
test
/
common
/
controller_api_functions.sh
diff --git
a/test/common/controller_api_functions.sh
b/test/common/controller_api_functions.sh
index
ed298f1
..
c4ba71c
100644
(file)
--- a/
test/common/controller_api_functions.sh
+++ b/
test/common/controller_api_functions.sh
@@
-41,9
+41,9
@@
__do_curl_to_controller() {
body=$(echo "$3" | sed 's/"/\\"/g')
json='{"input":{"near-rt-ric-url":"'$2'","body":"'"$body"'"}}'
fi
body=$(echo "$3" | sed 's/"/\\"/g')
json='{"input":{"near-rt-ric-url":"'$2'","body":"'"$body"'"}}'
fi
- echo "$json" > .s
nd
c.payload.json
+ echo "$json" > .s
dn
c.payload.json
echo " FILE: $json" >> $HTTPLOG
echo " FILE: $json" >> $HTTPLOG
- curlString="curl -s
w %{http_code} -X POST http://$SDNC_USER:$SDNC_PWD@localhost:$SDNC_EXTERNAL_PORT$SDNC_API_URL$1 -H accept:application/json -H Content-Type:application/json --data-binary @.snd
c.payload.json"
+ curlString="curl -s
kw %{http_code} -X POST $SDNC_HTTPX://$SDNC_USER:$SDNC_PWD@localhost:$SDNC_LOCAL_PORT$SDNC_API_URL$1 -H accept:application/json -H Content-Type:application/json --data-binary @.sdn
c.payload.json"
echo " CMD: "$curlString >> $HTTPLOG
res=$($curlString)
retcode=$?
echo " CMD: "$curlString >> $HTTPLOG
res=$($curlString)
retcode=$?
@@
-61,8
+61,9
@@
__do_curl_to_controller() {
return 1
fi
body=${res:0:${#res}-3}
return 1
fi
body=${res:0:${#res}-3}
+ echo " JSON: "$body >> $HTTPLOG
echo "$body" > .sdnc-reply.json
echo "$body" > .sdnc-reply.json
- res=$(python ../common/extract_sdnc_reply.py .sdnc-reply.json)
+ res=$(python
3
../common/extract_sdnc_reply.py .sdnc-reply.json)
echo " EXTRACED BODY+CODE: "$res >> $HTTPLOG
echo "$res"
return 0
echo " EXTRACED BODY+CODE: "$res >> $HTTPLOG
echo "$res"
return 0
@@
-122,7
+123,7
@@
controller_api_get_A1_policy_ids() {
echo " TARGET JSON: $targetJson" >> $HTTPLOG
echo " TARGET JSON: $targetJson" >> $HTTPLOG
- res=$(python ../common/compare_json.py "$targetJson" "$body")
+ res=$(python
3
../common/compare_json.py "$targetJson" "$body")
if [ $res -ne 0 ]; then
echo -e $RED" FAIL, returned body not correct"$ERED
if [ $res -ne 0 ]; then
echo -e $RED" FAIL, returned body not correct"$ERED
@@
-178,7
+179,7
@@
controller_api_get_A1_policy_type() {
targetJson=$(< $5)
echo " TARGET JSON: $targetJson" >> $HTTPLOG
targetJson=$(< $5)
echo " TARGET JSON: $targetJson" >> $HTTPLOG
- res=$(python ../common/compare_json.py "$targetJson" "$body")
+ res=$(python
3
../common/compare_json.py "$targetJson" "$body")
if [ $res -ne 0 ]; then
echo -e $RED" FAIL, returned body not correct"$ERED
if [ $res -ne 0 ]; then
echo -e $RED" FAIL, returned body not correct"$ERED
@@
-337,7
+338,7
@@
controller_api_get_A1_policy_status() {
body=${res:0:${#res}-3}
echo " TARGET JSON: $targetJson" >> $HTTPLOG
body=${res:0:${#res}-3}
echo " TARGET JSON: $targetJson" >> $HTTPLOG
- res=$(python ../common/compare_json.py "$targetJson" "$body")
+ res=$(python
3
../common/compare_json.py "$targetJson" "$body")
if [ $res -ne 0 ]; then
echo -e $RED" FAIL, returned body not correct"$ERED
if [ $res -ne 0 ]; then
echo -e $RED" FAIL, returned body not correct"$ERED