airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject [08/50] [abbrv] git commit: (Airavata-1250) Adding a configuration php file and updating php clients to use it.
Date Mon, 30 Jun 2014 22:56:47 GMT
(Airavata-1250) Adding a configuration php file and updating php clients to use it.


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

Branch: refs/heads/master
Commit: 222a14d92455be07a9fe5330a972f47f9dc3c7a4
Parents: 7592a61
Author: marpierc <marpierc@iu.edu>
Authored: Wed May 21 17:13:44 2014 -0400
Committer: marpierc <marpierc@iu.edu>
Committed: Wed May 21 17:13:44 2014 -0400

----------------------------------------------------------------------
 client-samples/GetAPIVersion.php              | 20 ++++----------------
 client-samples/GetAiravataVersion.php         |  2 +-
 client-samples/airavata-client-api-tester.php | 19 ++++---------------
 client-samples/cloneExperiment.php            | 18 ++++--------------
 client-samples/createExperiment.php           | 20 ++++----------------
 client-samples/createProject.php              | 19 ++++---------------
 client-samples/getAllExperimentsInProject.php | 22 ++++------------------
 client-samples/getAllUserExperiments.php      | 20 ++++----------------
 client-samples/getAllUserProjects.php         | 20 ++++----------------
 client-samples/getExperiment.php              | 20 ++++----------------
 client-samples/getExperimentOutputs.php       | 20 ++++----------------
 client-samples/getExperimentStatus.php        | 20 ++++----------------
 client-samples/launchExperiment.php           | 20 ++++----------------
 client-samples/terminateExperiment.php        | 22 +++++-----------------
 client-samples/updateExperiment.php           | 20 ++++----------------
 client-samples/updateProject.php              | 20 ++++----------------
 16 files changed, 62 insertions(+), 240 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/222a14d9/client-samples/GetAPIVersion.php
----------------------------------------------------------------------
diff --git a/client-samples/GetAPIVersion.php b/client-samples/GetAPIVersion.php
index 26762d7..1a53c71 100644
--- a/client-samples/GetAPIVersion.php
+++ b/client-samples/GetAPIVersion.php
@@ -1,6 +1,8 @@
 <?php
 namespace Airavata\Client\Samples;
 
+require_once 'samples_config.php';
+
 $GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
@@ -30,23 +32,9 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-/* buffered transport
-$socket = new TSocket('gw111.iu.xsede.org', 8930);
-$transport = new TBufferedTransport($socket, 1024, 1024);
-$protocol = new TBinaryProtocol($transport);
-$airavataclient = new AiravataClient($protocol);
-
-$transport->open();
-*/
-
-/* client factory
-$airavataClientFactory = new AiravataClientFactory(array('airavataServerHost' => "gw111.iu.xsede.org",
'airavataServerPort' => "8930"));
-$airavataclient = $airavataClientFactory->getAiravataClient();
-*/
-
 /* this is the same as the factory */
-$transport = new TSocket('gw111.iu.xsede.org', 8930);
-$protocol = new TBinaryProtocol($transport);
+$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
+$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
 $transport->open();
 $airavataclient = new AiravataClient($protocol);
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/222a14d9/client-samples/GetAiravataVersion.php
----------------------------------------------------------------------
diff --git a/client-samples/GetAiravataVersion.php b/client-samples/GetAiravataVersion.php
index 12e0b8a..60dbde1 100644
--- a/client-samples/GetAiravataVersion.php
+++ b/client-samples/GetAiravataVersion.php
@@ -14,4 +14,4 @@ $airavataClientFactory = new AiravataClientFactory(array('airavataServerHost'
=>
 
 $airavata = $airavataClientFactory->getAiravataClient();
 
-echo "Airavata Server Version is: " . $airavata->GetAPIVersion();
\ No newline at end of file
+echo "Airavata Server Version is: " . $airavata->GetAPIVersion()."\n";
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/222a14d9/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..8878943 100755
--- a/client-samples/airavata-client-api-tester.php
+++ b/client-samples/airavata-client-api-tester.php
@@ -1,6 +1,8 @@
 <?php
 namespace Airavata\Client\Samples;
 
+require_once 'samples_config.php';
+
 $GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
@@ -44,23 +46,10 @@ use Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling;
 use Airavata\Model\Workspace\Experiment\DataType;
 use Airavata\Model\Workspace\Experiment\ExperimentState;
 
-/* buffered transport
-$socket = new TSocket('gw111.iu.xsede.org', 8930);
-$transport = new TBufferedTransport($socket, 1024, 1024);
-$protocol = new TBinaryProtocol($transport);
-$airavataclient = new AiravataClient($protocol);
-
-$transport->open();
-*/
-
-/* client factory
-$airavataClientFactory = new AiravataClientFactory(array('airavataServerHost' => "gw111.iu.xsede.org",
'airavataServerPort' => "8930"));
-$airavataclient = $airavataClientFactory->getAiravataClient();
-*/
 
 /* this is the same as the factory */
-$transport = new TSocket('gw111.iu.xsede.org', 8930);
-$transport->setRecvTimeout(5000);
+$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
+$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();

http://git-wip-us.apache.org/repos/asf/airavata/blob/222a14d9/client-samples/cloneExperiment.php
----------------------------------------------------------------------
diff --git a/client-samples/cloneExperiment.php b/client-samples/cloneExperiment.php
index 8e172cd..00dcf84 100644
--- a/client-samples/cloneExperiment.php
+++ b/client-samples/cloneExperiment.php
@@ -1,6 +1,8 @@
 <?php
 namespace Airavata\Client\Samples;
 
+require_once 'samples_config.php';
+
 $GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
@@ -37,23 +39,11 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-/* buffered transport
-$socket = new TSocket('gw111.iu.xsede.org', 8930);
-$transport = new TBufferedTransport($socket, 1024, 1024);
-$protocol = new TBinaryProtocol($transport);
-$airavataclient = new AiravataClient($protocol);
-
-$transport->open();
-*/
 
-/* client factory
-$airavataClientFactory = new AiravataClientFactory(array('airavataServerHost' => "gw111.iu.xsede.org",
'airavataServerPort' => "8930"));
-$airavataclient = $airavataClientFactory->getAiravataClient();
-*/
 
 /* this is the same as the factory */
-$transport = new TSocket('gw111.iu.xsede.org', 8930);
-$transport->setRecvTimeout(5000);
+$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
+$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();

http://git-wip-us.apache.org/repos/asf/airavata/blob/222a14d9/client-samples/createExperiment.php
----------------------------------------------------------------------
diff --git a/client-samples/createExperiment.php b/client-samples/createExperiment.php
index 83aa6df..4ceae03 100755
--- a/client-samples/createExperiment.php
+++ b/client-samples/createExperiment.php
@@ -1,6 +1,8 @@
 <?php
 namespace Airavata\Client\Samples;
 
+require_once 'samples_config.php';
+
 $GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
@@ -42,23 +44,9 @@ use Airavata\Model\Workspace\Experiment\UserConfigurationData;
 use Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling;
 use Airavata\Model\Workspace\Experiment\DataType;
 
-/* buffered transport
-$socket = new TSocket('gw111.iu.xsede.org', 8930);
-$transport = new TBufferedTransport($socket, 1024, 1024);
-$protocol = new TBinaryProtocol($transport);
-$airavataclient = new AiravataClient($protocol);
-
-$transport->open();
-*/
-
-/* client factory
-$airavataClientFactory = new AiravataClientFactory(array('airavataServerHost' => "gw111.iu.xsede.org",
'airavataServerPort' => "8930"));
-$airavataclient = $airavataClientFactory->getAiravataClient();
-*/
-
 /* this is the same as the factory */
-$transport = new TSocket('gw111.iu.xsede.org', 8930);
-$transport->setRecvTimeout(5000);
+$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
+$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();

http://git-wip-us.apache.org/repos/asf/airavata/blob/222a14d9/client-samples/createProject.php
----------------------------------------------------------------------
diff --git a/client-samples/createProject.php b/client-samples/createProject.php
index 77ababb..78051b6 100755
--- a/client-samples/createProject.php
+++ b/client-samples/createProject.php
@@ -1,6 +1,8 @@
 <?php
 namespace Airavata\Client\Samples;
 
+require_once 'samples_config.php';
+
 $GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
@@ -36,23 +38,10 @@ use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 use Airavata\Model\Workspace\Project;
 
-/* buffered transport
-$socket = new TSocket('gw111.iu.xsede.org', 8930);
-$transport = new TBufferedTransport($socket, 1024, 1024);
-$protocol = new TBinaryProtocol($transport);
-$airavataclient = new AiravataClient($protocol);
-
-$transport->open();
-*/
-
-/* client factory
-$airavataClientFactory = new AiravataClientFactory(array('airavataServerHost' => "gw111.iu.xsede.org",
'airavataServerPort' => "8930"));
-$airavataclient = $airavataClientFactory->getAiravataClient();
-*/
 
 /* this is the same as the factory */
-$transport = new TSocket('gw111.iu.xsede.org', 8930);
-$transport->setRecvTimeout(5000);
+$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
+$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();

http://git-wip-us.apache.org/repos/asf/airavata/blob/222a14d9/client-samples/getAllExperimentsInProject.php
----------------------------------------------------------------------
diff --git a/client-samples/getAllExperimentsInProject.php b/client-samples/getAllExperimentsInProject.php
index 5ae8b17..69fa0ae 100644
--- a/client-samples/getAllExperimentsInProject.php
+++ b/client-samples/getAllExperimentsInProject.php
@@ -1,6 +1,8 @@
 <?php
 namespace Airavata\Client\Samples;
 
+require_once 'samples_config.php';
+
 $GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
@@ -34,31 +36,15 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-/* buffered transport
-$socket = new TSocket('gw111.iu.xsede.org', 8930);
-$transport = new TBufferedTransport($socket, 1024, 1024);
-$protocol = new TBinaryProtocol($transport);
-$airavataclient = new AiravataClient($protocol);
-
-$transport->open();
-*/
-
-/* client factory
-$airavataClientFactory = new AiravataClientFactory(array('airavataServerHost' => "gw111.iu.xsede.org",
'airavataServerPort' => "8930"));
-$airavataclient = $airavataClientFactory->getAiravataClient();
-*/
-
 /* this is the same as the factory */
-$transport = new TSocket('gw111.iu.xsede.org', 8930);
-$transport->setRecvTimeout(5000);
+$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
+$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();
 $airavataclient = new AiravataClient($protocol);
 
 
-
-
 try
 {
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/222a14d9/client-samples/getAllUserExperiments.php
----------------------------------------------------------------------
diff --git a/client-samples/getAllUserExperiments.php b/client-samples/getAllUserExperiments.php
index 9bcfe52..423be2b 100644
--- a/client-samples/getAllUserExperiments.php
+++ b/client-samples/getAllUserExperiments.php
@@ -1,6 +1,8 @@
 <?php
 namespace Airavata\Client\Samples;
 
+require_once 'samples_config.php';
+
 $GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
@@ -34,23 +36,9 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-/* buffered transport
-$socket = new TSocket('gw111.iu.xsede.org', 8930);
-$transport = new TBufferedTransport($socket, 1024, 1024);
-$protocol = new TBinaryProtocol($transport);
-$airavataclient = new AiravataClient($protocol);
-
-$transport->open();
-*/
-
-/* client factory
-$airavataClientFactory = new AiravataClientFactory(array('airavataServerHost' => "gw111.iu.xsede.org",
'airavataServerPort' => "8930"));
-$airavataclient = $airavataClientFactory->getAiravataClient();
-*/
-
 /* this is the same as the factory */
-$transport = new TSocket('gw111.iu.xsede.org', 8930);
-$transport->setRecvTimeout(20000);
+$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
+$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();

http://git-wip-us.apache.org/repos/asf/airavata/blob/222a14d9/client-samples/getAllUserProjects.php
----------------------------------------------------------------------
diff --git a/client-samples/getAllUserProjects.php b/client-samples/getAllUserProjects.php
index 307be7a..c6140e2 100644
--- a/client-samples/getAllUserProjects.php
+++ b/client-samples/getAllUserProjects.php
@@ -1,6 +1,8 @@
 <?php
 namespace Airavata\Client\Samples;
 
+require_once 'samples_config.php';
+
 $GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
@@ -35,23 +37,9 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-/* buffered transport
-$socket = new TSocket('gw111.iu.xsede.org', 8930);
-$transport = new TBufferedTransport($socket, 1024, 1024);
-$protocol = new TBinaryProtocol($transport);
-$airavataclient = new AiravataClient($protocol);
-
-$transport->open();
-*/
-
-/* client factory
-$airavataClientFactory = new AiravataClientFactory(array('airavataServerHost' => "gw111.iu.xsede.org",
'airavataServerPort' => "8930"));
-$airavataclient = $airavataClientFactory->getAiravataClient();
-*/
-
 /* this is the same as the factory */
-$transport = new TSocket('gw111.iu.xsede.org', 8930);
-$transport->setRecvTimeout(5000);
+$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
+$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();

http://git-wip-us.apache.org/repos/asf/airavata/blob/222a14d9/client-samples/getExperiment.php
----------------------------------------------------------------------
diff --git a/client-samples/getExperiment.php b/client-samples/getExperiment.php
index 87fbc44..f84d0f3 100644
--- a/client-samples/getExperiment.php
+++ b/client-samples/getExperiment.php
@@ -1,6 +1,8 @@
 <?php
 namespace Airavata\Client\Samples;
 
+require_once 'samples_config.php';
+
 $GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
@@ -37,23 +39,9 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-/* buffered transport
-$socket = new TSocket('gw111.iu.xsede.org', 8930);
-$transport = new TBufferedTransport($socket, 1024, 1024);
-$protocol = new TBinaryProtocol($transport);
-$airavataclient = new AiravataClient($protocol);
-
-$transport->open();
-*/
-
-/* client factory
-$airavataClientFactory = new AiravataClientFactory(array('airavataServerHost' => "gw111.iu.xsede.org",
'airavataServerPort' => "8930"));
-$airavataclient = $airavataClientFactory->getAiravataClient();
-*/
-
 /* this is the same as the factory */
-$transport = new TSocket('gw111.iu.xsede.org', 8930);
-$transport->setRecvTimeout(5000);
+$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
+$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();

http://git-wip-us.apache.org/repos/asf/airavata/blob/222a14d9/client-samples/getExperimentOutputs.php
----------------------------------------------------------------------
diff --git a/client-samples/getExperimentOutputs.php b/client-samples/getExperimentOutputs.php
index f073c77..6524d21 100644
--- a/client-samples/getExperimentOutputs.php
+++ b/client-samples/getExperimentOutputs.php
@@ -1,6 +1,8 @@
 <?php
 namespace Airavata\Client\Samples;
 
+require_once 'samples_config.php';
+
 $GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
@@ -37,23 +39,9 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-/* buffered transport
-$socket = new TSocket('gw111.iu.xsede.org', 8930);
-$transport = new TBufferedTransport($socket, 1024, 1024);
-$protocol = new TBinaryProtocol($transport);
-$airavataclient = new AiravataClient($protocol);
-
-$transport->open();
-*/
-
-/* client factory
-$airavataClientFactory = new AiravataClientFactory(array('airavataServerHost' => "gw111.iu.xsede.org",
'airavataServerPort' => "8930"));
-$airavataclient = $airavataClientFactory->getAiravataClient();
-*/
-
 /* this is the same as the factory */
-$transport = new TSocket('gw111.iu.xsede.org', 8930);
-$transport->setRecvTimeout(5000);
+$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
+$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();

http://git-wip-us.apache.org/repos/asf/airavata/blob/222a14d9/client-samples/getExperimentStatus.php
----------------------------------------------------------------------
diff --git a/client-samples/getExperimentStatus.php b/client-samples/getExperimentStatus.php
index ec086a1..0db0270 100644
--- a/client-samples/getExperimentStatus.php
+++ b/client-samples/getExperimentStatus.php
@@ -1,6 +1,8 @@
 <?php
 namespace Airavata\Client\Samples;
 
+require_once 'samples_config.php';
+
 $GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
@@ -36,23 +38,9 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-/* buffered transport
-$socket = new TSocket('gw111.iu.xsede.org', 8930);
-$transport = new TBufferedTransport($socket, 1024, 1024);
-$protocol = new TBinaryProtocol($transport);
-$airavataclient = new AiravataClient($protocol);
-
-$transport->open();
-*/
-
-/* client factory
-$airavataClientFactory = new AiravataClientFactory(array('airavataServerHost' => "gw111.iu.xsede.org",
'airavataServerPort' => "8930"));
-$airavataclient = $airavataClientFactory->getAiravataClient();
-*/
-
 /* this is the same as the factory */
-$transport = new TSocket('gw111.iu.xsede.org', 8930);
-$transport->setRecvTimeout(5000);
+$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
+$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();

http://git-wip-us.apache.org/repos/asf/airavata/blob/222a14d9/client-samples/launchExperiment.php
----------------------------------------------------------------------
diff --git a/client-samples/launchExperiment.php b/client-samples/launchExperiment.php
index 711e27f..b84190b 100755
--- a/client-samples/launchExperiment.php
+++ b/client-samples/launchExperiment.php
@@ -1,6 +1,8 @@
 <?php
 namespace Airavata\Client\Samples;
 
+require_once 'samples_config.php';
+
 $GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
@@ -39,23 +41,9 @@ use Airavata\API\AiravataClient;
 use Airavata\Model\Workspace\Project;
 use Airavata\Model\Workspace\Experiment\Experiment;
 
-/* buffered transport
-$socket = new TSocket('gw111.iu.xsede.org', 8930);
-$transport = new TBufferedTransport($socket, 1024, 1024);
-$protocol = new TBinaryProtocol($transport);
-$airavataclient = new AiravataClient($protocol);
-
-$transport->open();
-*/
-
-/* client factory
-$airavataClientFactory = new AiravataClientFactory(array('airavataServerHost' => "gw111.iu.xsede.org",
'airavataServerPort' => "8930"));
-$airavataclient = $airavataClientFactory->getAiravataClient();
-*/
-
 /* this is the same as the factory */ 
-$transport = new TSocket('gw111.iu.xsede.org', 8930);
-$transport->setRecvTimeout(5000);
+$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
+$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();

http://git-wip-us.apache.org/repos/asf/airavata/blob/222a14d9/client-samples/terminateExperiment.php
----------------------------------------------------------------------
diff --git a/client-samples/terminateExperiment.php b/client-samples/terminateExperiment.php
index 156dfe7..6a98828 100644
--- a/client-samples/terminateExperiment.php
+++ b/client-samples/terminateExperiment.php
@@ -1,6 +1,8 @@
 <?php
 namespace Airavata\Client\Samples;
 
+require_once 'samples_config.php';
+
 $GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
@@ -37,23 +39,9 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-/* buffered transport
-$socket = new TSocket('gw111.iu.xsede.org', 8930);
-$transport = new TBufferedTransport($socket, 1024, 1024);
-$protocol = new TBinaryProtocol($transport);
-$airavataclient = new AiravataClient($protocol);
-
-$transport->open();
-*/
-
-/* client factory
-$airavataClientFactory = new AiravataClientFactory(array('airavataServerHost' => "gw111.iu.xsede.org",
'airavataServerPort' => "8930"));
-$airavataclient = $airavataClientFactory->getAiravataClient();
-*/
-
 /* this is the same as the factory */
-$transport = new TSocket('gw111.iu.xsede.org', 8930);
-$transport->setRecvTimeout(5000);
+$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
+$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();
@@ -68,7 +56,7 @@ else
 {
     terminate_experiment($argv[1]);
 
-    echo '\n\nIf there are no exceptions, assume the experiment terminated successfully';
+    echo 'If there are no exceptions, assume the experiment terminated successfully';
 }
 
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/222a14d9/client-samples/updateExperiment.php
----------------------------------------------------------------------
diff --git a/client-samples/updateExperiment.php b/client-samples/updateExperiment.php
index f195be8..4793239 100644
--- a/client-samples/updateExperiment.php
+++ b/client-samples/updateExperiment.php
@@ -1,6 +1,8 @@
 <?php
 namespace Airavata\Client\Samples;
 
+require_once 'samples_config.php';
+
 $GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
@@ -37,23 +39,9 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-/* buffered transport
-$socket = new TSocket('gw111.iu.xsede.org', 8930);
-$transport = new TBufferedTransport($socket, 1024, 1024);
-$protocol = new TBinaryProtocol($transport);
-$airavataclient = new AiravataClient($protocol);
-
-$transport->open();
-*/
-
-/* client factory
-$airavataClientFactory = new AiravataClientFactory(array('airavataServerHost' => "gw111.iu.xsede.org",
'airavataServerPort' => "8930"));
-$airavataclient = $airavataClientFactory->getAiravataClient();
-*/
-
 /* this is the same as the factory */
-$transport = new TSocket('gw111.iu.xsede.org', 8930);
-$transport->setRecvTimeout(5000);
+$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
+$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();

http://git-wip-us.apache.org/repos/asf/airavata/blob/222a14d9/client-samples/updateProject.php
----------------------------------------------------------------------
diff --git a/client-samples/updateProject.php b/client-samples/updateProject.php
index faf4bd8..6093d23 100644
--- a/client-samples/updateProject.php
+++ b/client-samples/updateProject.php
@@ -1,6 +1,8 @@
 <?php
 namespace Airavata\Client\Samples;
 
+require_once 'samples_config.php';
+
 $GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
 require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
@@ -34,23 +36,9 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-/* buffered transport
-$socket = new TSocket('gw111.iu.xsede.org', 8930);
-$transport = new TBufferedTransport($socket, 1024, 1024);
-$protocol = new TBinaryProtocol($transport);
-$airavataclient = new AiravataClient($protocol);
-
-$transport->open();
-*/
-
-/* client factory
-$airavataClientFactory = new AiravataClientFactory(array('airavataServerHost' => "gw111.iu.xsede.org",
'airavataServerPort' => "8930"));
-$airavataclient = $airavataClientFactory->getAiravataClient();
-*/
-
 /* this is the same as the factory */
-$transport = new TSocket('gw111.iu.xsede.org', 8930);
-$transport->setRecvTimeout(5000);
+$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
+$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();


Mime
View raw message