~ubuntu-branches/ubuntu/raring/eucalyptus/raring

« back to all changes in this revision

Viewing changes to clc/modules/reporting/src/test/sh/generateFalseData.sh

  • Committer: Package Import Robot
  • Author(s): Brian Thomason
  • Date: 2011-11-29 13:17:52 UTC
  • mfrom: (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 185.
  • Revision ID: package-import@ubuntu.com-20111129131752-rq31al3ntutv2vvl
Tags: upstream-3.0.999beta1
ImportĀ upstreamĀ versionĀ 3.0.999beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
#
 
4
# Generates fake reporting data
 
5
#
 
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
 
8
#
 
9
# Author: Tom Werges
 
10
#
 
11
 
 
12
 
 
13
CLC_IP="localhost"
 
14
 
 
15
if [ -z "$1" ]
 
16
then
 
17
        echo "arg missing: admin pw"
 
18
        exit -1
 
19
fi
 
20
 
 
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
 
26
 
 
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
 
32
 
 
33
 
 
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
 
39
 
 
40
 
 
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
 
46
 
 
47