#!/bin/bash
-echo "parameters : $1 $2 $3" > /home/siman/check_params.txt
-echo "$#" >> /home/siman/check_params.txt
+echo "parameters : $1 $2 $3" > check_params.txt
+echo "$#" >> check_params.txt
if [ "$#" -ne 3 ] ; then
echo "Usage :
#echo dir1 = `dirname $0`
#echo dir2 = ${PWD}
-echo "pwd = " ${PWD} >> /home/siman/check_params.txt
-echo "display = " ${DISPLAY} >> /home/siman/check_params.txt
+echo "pwd = " ${PWD} >> check_params.txt
+echo "display = " ${DISPLAY} >> check_params.txt
env_script=${PWD}/env_products.sh
echo script = $env_script
if [ -e $env_script ] ; then
echo
- echo ">>> Setting SALOME environment" >> /home/siman/check_params.txt
- echo ">>> Environment script = " $env_script >> /home/siman/check_params.txt
- source $env_script >> /home/siman/check_params.txt
- echo ">>> After products " >> /home/siman/check_params.txt
+ echo ">>> Setting SALOME environment" >> check_params.txt
+ echo ">>> Environment script = " $env_script >> check_params.txt
+ source $env_script >> check_params.txt
+ echo ">>> After products " >> check_params.txt
else
echo
echo '!!! Warning !!! Environment is not set.'
echo 'Proceed with the current environment.'
fi
-echo ">>> Setting SALOME-SAMAN environment" >> /home/siman/check_params.txt
+echo ">>> Setting SALOME-SAMAN environment" >> check_params.txt
export WSFCPP_HOME=${PWD}/wso2-wsf-cpp-2.1.0
#export PATH=${WSFCPP_HOME}/lib:${PATH}
export LD_LIBRARY_PATH=${WSFCPP_HOME}/lib:${LD_LIBRARY_PATH}
-echo "WSFCPP_HOME = " ${WSFCPP_HOME} >> /home/siman/check_params.txt
+echo "WSFCPP_HOME = " ${WSFCPP_HOME} >> check_params.txt
export SIMANIO_ROOT_DIR=${PWD}/SIMANIO
export PATH=${SIMANIO_ROOT_DIR}/lib:${PATH}
export LD_LIBRARY_PATH=${SIMANIO_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
-export SIMAN_WS_HOST="172.22.2.65:8080"
+export SIMAN_WS_HOST="127.0.0.1:8080"
-export PYTHONPATH="/tmp/SimanSalome/${3##*=}/download":${PYTHONPATH}
+export PYTHONPATH="/tmp/SimanSalome/${1##*=}/${2##*=}/${3##*=}":${PYTHONPATH}
-echo "parameters 3: $1 $2 $3" >> /home/siman/check_params.txt
+echo "parameters 3: $1 $2 $3" >> check_params.txt
#export SALOME_ROOT_DIR=${PWD}
-echo ">>> SALOME-SIMAN running" >> /home/siman/check_params.txt
+echo ">>> SALOME-SIMAN running" >> check_params.txt
-echo "parameters 4: $1 $2 $3" >> /home/siman/check_params.txt
+echo "parameters 4: $1 $2 $3" >> check_params.txt
-runSalome --siman $1 $2 $3 -k >> /home/siman/check_params.txt
+runSalome --siman $1 $2 $3 -k >> check_params.txt
//Parse the response and get the filename
string aTmpDir = "/tmp";
- string aClientFileDir = aTmpDir + "/SimanSalome/" + myUser + "/download/";
+ string aClientFileDir = aTmpDir + "/SimanSalome/" + myStudy + "/" + myScenario + "/" + myUser + "/";
+ //string aClientFileDir = aTmpDir + "/SimanSalome/" + myUser + "/download/";
string aClientFilePath = aClientFileDir + aResponseFileName;
//Cretae the directories
void SimanIO_Link::StoreConf(/*const*/ SimanIO_Configuration& theConf)
{
+ cout << "StoreConf method is started\n";
char* aSimanHost = getenv("SIMAN_WS_HOST");
if (aSimanHost == NULL)
{
//Prepare salome-siman.conf file
string aTmpDir = "/tmp";
- string aClientFileDir = aTmpDir + "/SimanSalome/" + myUser + "/download/";
+ string aClientFileDir = aTmpDir + "/SimanSalome/" + myStudy + "/" + myScenario + "/" + myUser + "/";
+ //string aClientFileDir = aTmpDir + "/SimanSalome/" + myUser + "/download/";
string aClientFilePath = aClientFileDir + "salome-siman.conf";
ofstream aSalomeSimanFile;
aSalomeSimanFile.open(aClientFilePath.c_str());
aCheckInRequest->setArgs1(atoll(myUser.c_str()));
aCheckInResponse = aStub->checkIn(aCheckInRequest);
-
+ //Delete the directories
+ system(("rm -r " + aTmpDir + "/SimanSalome/").c_str());
+
+ //Delete objects
+ delete aPutFileRequest;
+ delete aPutFileResponse;
+ delete aCheckInRequest;
+ delete aCheckInResponse;
+ delete aStub;
}