3 OOM_HOME=${OOM_HOME:-$HOME}
5 if ! [ "$(command -v jq)" ]; then
6 echo "Error: jq is not installed."
7 echo "use: sudo apt install jq"
11 IS_PRIMARY_CLUSTER=`./sdnc.isPrimaryCluster`
13 case $IS_PRIMARY_CLUSTER in
21 echo "Error: isPrimaryODLCluster not defined in ${OOM_HOME}/oom/kubernetes/sdnc/values.yaml."
26 for pod_number in {0..2}
28 curl "http://localhost:3026$((${pod_number} + 1))" > /dev/null 2>&1
29 if [ "$?" = "7" ]; then
33 VOTING_RESULT=`curl -u admin:admin -H "Content-Type: application/json" -H "Accept: application/json" -X GET http://localhost:3026$((${pod_number} + 1))/jolokia/read/org.opendaylight.controller:Category=Shards,name=member-$((${MEMBER_NUMBER} + ${pod_number}))-shard-default-config,type=DistributedConfigDatastore 2>/dev/null | jq '.value.Voting'`
35 case $VOTING_RESULT in
45 echo "Error: Voting status could not be determined."
51 echo "Error: Voting status could not be determined."