Add first work package for REST API implementation
[anna.git] / example / diameter / launcher / deployments / advanced / answerXml.sh
1 #!/bin/bash
2 echo
3 echo
4 echo "Use: $0 [json file for REST API] [2e]"
5 echo
6 echo "Program answer to the diameter client or to the server (entity) when"
7 echo "'2e' parameter is provided. If missing xml file, current programmed answers will"
8 echo "be shown: '$0' (answers to client), '$0 2e' (answers to server)."
9 echo
10 if test "$1" != ""
11 then
12    if test "$1" = "2e"
13    then
14      operation="answerxml2e"
15    else
16      [[ ! -f "$1" ]] && { echo "ERROR: file '$1' not found" ; echo; echo; exit ; }
17      operation="answerxml|$1"
18      [[ "$2" = "2e" ]] && operation="answerxml2e|$1"
19    fi
20 else
21    operation="answerxml"
22 fi
23 echo
24 ./operation.sh "$operation"