4
# Generates fake reporting data
6
# Be sure to build the test classes and install them before running this as it
7
# relies upon them. From /clc, execute ant build-test install
17
echo "arg missing: admin pw"
21
# Login, and get session id
22
wget -O /tmp/sessionId --no-check-certificate "https://$CLC_IP:8443/loginservlet?adminPw=$1"
23
if [ "$?" -ne "0" ]; then echo "Login failed"; exit 1; fi
24
SESSIONID=`cat /tmp/sessionId`
25
echo "session id:" $SESSIONID
27
# Clear and generate false data for instances
28
wget --no-check-certificate -O /tmp/nothing "https://$CLC_IP:8443/commandservlet?sessionId=$SESSIONID&className=com.eucalyptus.reporting.instance.FalseDataGenerator&methodName=removeFalseData"
29
if [ "$?" -ne "0" ]; then echo "Instance data removal failed"; exit 1; fi
30
wget --no-check-certificate -O /tmp/nothing "https://$CLC_IP:8443/commandservlet?sessionId=$SESSIONID&className=com.eucalyptus.reporting.instance.FalseDataGenerator&methodName=generateFalseData"
31
if [ "$?" -ne "0" ]; then echo "Instance data generation failed"; exit 1; fi
34
# Clear and generate false data for storages
35
wget --no-check-certificate -O /tmp/nothing "https://$CLC_IP:8443/commandservlet?sessionId=$SESSIONID&className=com.eucalyptus.reporting.storage.FalseDataGenerator&methodName=removeFalseData"
36
if [ "$?" -ne "0" ]; then echo "Storage data removal failed"; exit 1; fi
37
wget --no-check-certificate -O /tmp/nothing "https://$CLC_IP:8443/commandservlet?sessionId=$SESSIONID&className=com.eucalyptus.reporting.storage.FalseDataGenerator&methodName=generateFalseData"
38
if [ "$?" -ne "0" ]; then echo "Storage data generation failed"; exit 1; fi
41
# Clear and generate false data for s3
42
wget --no-check-certificate -O /tmp/nothing "https://$CLC_IP:8443/commandservlet?sessionId=$SESSIONID&className=com.eucalyptus.reporting.s3.FalseDataGenerator&methodName=removeFalseData"
43
if [ "$?" -ne "0" ]; then echo "S3 data removal failed"; exit 1; fi
44
wget --no-check-certificate -O /tmp/nothing "https://$CLC_IP:8443/commandservlet?sessionId=$SESSIONID&className=com.eucalyptus.reporting.s3.FalseDataGenerator&methodName=generateFalseData"
45
if [ "$?" -ne "0" ]; then echo "S3 data generation failed"; exit 1; fi