airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject [05/50] [abbrv] git commit: Added updateProject, updateExperiment calls in tester.
Date Mon, 30 Jun 2014 22:56:44 GMT
Added updateProject, updateExperiment calls in tester.


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/0193ff9d
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/0193ff9d
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/0193ff9d

Branch: refs/heads/master
Commit: 0193ff9dfdcea4f2d30df3becc87f7a161dbaef8
Parents: 68dff5d
Author: marie-iub <marie.uits@gmail.com>
Authored: Wed May 21 15:53:01 2014 -0400
Committer: marie-iub <marie.uits@gmail.com>
Committed: Wed May 21 15:53:01 2014 -0400

----------------------------------------------------------------------
 client-samples/airavata-client-api-tester.php | 39 +++++++++++++++++++---
 client-samples/createExperiment.php           |  3 +-
 2 files changed, 35 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/0193ff9d/client-samples/airavata-client-api-tester.php
----------------------------------------------------------------------
diff --git a/client-samples/airavata-client-api-tester.php b/client-samples/airavata-client-api-tester.php
index e852cb5..07811a7 100755
--- a/client-samples/airavata-client-api-tester.php
+++ b/client-samples/airavata-client-api-tester.php
@@ -59,7 +59,7 @@ $airavataclient = $airavataClientFactory->getAiravataClient();
 */
 
 /* this is the same as the factory */
-$transport = new TSocket('gw111.iu.xsede.org', 8930);
+$transport = new TSocket('gw127.iu.xsede.org', 8930);
 $transport->setRecvTimeout(5000);
 
 $protocol = new TBinaryProtocol($transport);
@@ -88,7 +88,7 @@ try
         $cmRST->jobStartTime = 0;
         $cmRST->totalPhysicalMemory = 0;
 
-        /* ComputationalResourceScheduling data for Stampede
+        /* ComputationalResourceScheduling data for Stampede */
         $cmRSS = new ComputationalResourceScheduling();
         $cmRSS->resourceHostId = "stampede.tacc.xsede.org";
         $cmRSS->ComputationalProjectAccount = "TG-STA110014S";
@@ -99,7 +99,6 @@ try
         $cmRSS->wallTimeLimit = 15;
         $cmRSS->jobStartTime = 0;
         $cmRSS->totalPhysicalMemory = 0;
-        */
 
         /* UserConfigurationData using either Trestles or Stampede*/
         //$cmRS = $cmRSS;
@@ -154,9 +153,38 @@ try
 	echo "$user created experiment $expId. \n";
         //var_dump($experiment);
 
+        /* Update Project */
+        $update_project = new Project();
+	$update_project->projectID = $projId;
+	$update_project->owner = $user;
+	$update_project->name = "LoadTesterProject";
+	$update_project->description = "Updated project description: ".time();
+	$airavataclient->updateProject($update_project);
+	echo "$user updated project $projId. \n";
+
+	/* Update Experiment */
+        $update_experiment = new Experiment();
+        $update_experiment->userName = $user;
+        $update_experiment->name = "LoadTesterExperiment_".time();
+	$update_experiment->description = "Updated experiment description: ".time();
+	$airavataclient->updateExperiment($expId, $update_experiment);
+	echo "$user updated experiment $expId. \n";
+
+	/* Update Experiment Configuration */
+        $update_userConfigurationData = new UserConfigurationData();
+        $update_userConfigurationData->airavataAutoSchedule = 0;
+        $update_userConfigurationData->overrideManualScheduledParams = 0;
+        $update_userConfigurationData->computationalResourceScheduling = $cmRSS; 
+	$airavataclient->updateExperimentConfiguration($expId, $update_userConfigurationData);
+	echo "$user updated user configuration data for experiment $expId. \n";
+
+	/* Update Resource Scheduleing */
+	//$airavataclient->updateResourceScheduleing($expId, $cmRST);
+	//echo "$user updated resource scheduleing for experiment $expId. \n";
+
 	/* Validate experiment */
-	$valid = $airavataclient->validateExperiment($expId);
-	echo "$user experiment $expId validation is $valid. \n";
+	//$valid = $airavataclient->validateExperiment($expId);
+	//echo "$user experiment $expId validation is $valid. \n";
 
         /* Launch Experiment */
 	//$airavataclient->launchExperiment($expId, 'airavataToken');
@@ -188,6 +216,7 @@ try
 	$userExperiments = $airavataclient->getAllUserExperiments($user);
         echo "$user total number of experiments is " . sizeof($userExperiments) . ". \n";
 
+        echo $projId;
         $projectExperiments = $airavataclient->getAllExperimentsInProject($projId);
         echo "$user number of experiments in $projId is " . sizeof($projectExperiments) .
". \n";	
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/0193ff9d/client-samples/createExperiment.php
----------------------------------------------------------------------
diff --git a/client-samples/createExperiment.php b/client-samples/createExperiment.php
index 83aa6df..6e671ac 100755
--- a/client-samples/createExperiment.php
+++ b/client-samples/createExperiment.php
@@ -85,7 +85,7 @@ try
         $cmRST->jobStartTime = 0;
         $cmRST->totalPhysicalMemory = 0;
 
-        /* ComputationalResourceScheduling data for Stampede
+        /* ComputationalResourceScheduling data for Stampede */
         $cmRSS = new ComputationalResourceScheduling();
         $cmRSS->resourceHostId = "stampede.tacc.xsede.org";
         $cmRSS->ComputationalProjectAccount = "TG-STA110014S";
@@ -96,7 +96,6 @@ try
         $cmRSS->wallTimeLimit = 15;
         $cmRSS->jobStartTime = 0;
         $cmRSS->totalPhysicalMemory = 0;
-        */
 
         /* UserConfigurationData using either Trestles or Stampede*/
         //$cmRS = $cmRSS;


Mime
View raw message