airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject [23/50] [abbrv] git commit: Changed the configurations to ini files as discussed in AIRAVATA-1250
Date Mon, 30 Jun 2014 22:57:02 GMT
Changed the configurations to ini files as discussed in AIRAVATA-1250


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

Branch: refs/heads/master
Commit: 3bcac35f0c7a267c6dd091b2ea473ecbe34e1a54
Parents: 25cafc0
Author: Suresh Marru <smarru@apache.org>
Authored: Fri May 23 14:45:54 2014 -0400
Committer: Suresh Marru <smarru@apache.org>
Committed: Fri May 23 14:45:54 2014 -0400

----------------------------------------------------------------------
 client-samples/GetAPIVersion.php              | 11 +++++------
 client-samples/airavata-client-api-tester.php |  9 +++++----
 client-samples/airavata-client-properties.ini | 11 +++++++++++
 client-samples/cloneExperiment.php            | 21 +++------------------
 client-samples/createExperiment.php           | 12 ++++--------
 client-samples/createProject.php              | 10 +++-------
 client-samples/getAllExperimentsInProject.php |  9 ++++-----
 client-samples/getAllUserExperiments.php      |  9 ++++-----
 client-samples/getAllUserProjects.php         |  9 ++++-----
 client-samples/getExperiment.php              |  9 ++++-----
 client-samples/getExperimentOutputs.php       |  9 ++++-----
 client-samples/getExperimentStatus.php        |  9 ++++-----
 client-samples/launchExperiment.php           |  9 ++++-----
 client-samples/samples_config.php             |  7 -------
 client-samples/terminateExperiment.php        | 17 ++++-------------
 client-samples/updateExperiment.php           |  9 ++++-----
 client-samples/updateProject.php              |  9 ++++-----
 17 files changed, 71 insertions(+), 108 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/3bcac35f/client-samples/GetAPIVersion.php
----------------------------------------------------------------------
diff --git a/client-samples/GetAPIVersion.php b/client-samples/GetAPIVersion.php
index 22456a3..8d840f0 100644
--- a/client-samples/GetAPIVersion.php
+++ b/client-samples/GetAPIVersion.php
@@ -1,8 +1,6 @@
 <?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';
@@ -32,14 +30,15 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-/* this is the same as the factory */
-$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
-$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
+
 $protocol = new TBinaryProtocol($transport);
 $transport->open();
 $airavataclient = new AiravataClient($protocol);
 
-
 try
 {
     $version = $airavataclient->getAPIVersion();

http://git-wip-us.apache.org/repos/asf/airavata/blob/3bcac35f/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 b099ff4..06c0429 100755
--- a/client-samples/airavata-client-api-tester.php
+++ b/client-samples/airavata-client-api-tester.php
@@ -1,8 +1,6 @@
 <?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';
@@ -46,16 +44,19 @@ use Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling;
 use Airavata\Model\Workspace\Experiment\DataType;
 use Airavata\Model\Workspace\Experiment\ExperimentState;
 
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
 
 /* this is the same as the factory */
+/* - Temporarity overriding to connect to test server.
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
+*/
 $transport = new TSocket('gw127.iu.xsede.org', 8930);
 $transport->setRecvTimeout(20000);
-
 $protocol = new TBinaryProtocol($transport);
 $transport->open();
 $airavataclient = new AiravataClient($protocol);
 
-
 try
 {
     if ($argc != 2)

http://git-wip-us.apache.org/repos/asf/airavata/blob/3bcac35f/client-samples/airavata-client-properties.ini
----------------------------------------------------------------------
diff --git a/client-samples/airavata-client-properties.ini b/client-samples/airavata-client-properties.ini
new file mode 100644
index 0000000..ca4b6f6
--- /dev/null
+++ b/client-samples/airavata-client-properties.ini
@@ -0,0 +1,11 @@
+; The is the configuration file with properties needed by Airavata Clients.
+;   Key properties specify location of Airavata Services, Ports and Such.
+
+; Host which runs the Airavata Server
+AIRAVATA_SERVER = "gw111.iu.xsede.org"
+
+; Airavata Server thrift port
+AIRAVATA_PORT = 8930
+
+; Time out value to give enough breathing room for client to get synchronous responses back
+AIRAVATA_TIMEOUT = 5000

http://git-wip-us.apache.org/repos/asf/airavata/blob/3bcac35f/client-samples/cloneExperiment.php
----------------------------------------------------------------------
diff --git a/client-samples/cloneExperiment.php b/client-samples/cloneExperiment.php
index 00dcf84..42a39d7 100644
--- a/client-samples/cloneExperiment.php
+++ b/client-samples/cloneExperiment.php
@@ -1,8 +1,6 @@
 <?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';
@@ -40,18 +38,16 @@ use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
 
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
 
-/* this is the same as the factory */
-$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
-$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();
 $airavataclient = new AiravataClient($protocol);
 
 
-
-
 //$expId = 'experiment2_8f9c0ccc-6392-47b3-bcde-f4e82557bc32';
 
 
@@ -73,20 +69,9 @@ else
 
 
 
-
-
-
-
-
-
-
 //var_dump($experiment);
 
 
-
-
-
-
 $transport->close();
 
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/3bcac35f/client-samples/createExperiment.php
----------------------------------------------------------------------
diff --git a/client-samples/createExperiment.php b/client-samples/createExperiment.php
index 2178672..3545a37 100755
--- a/client-samples/createExperiment.php
+++ b/client-samples/createExperiment.php
@@ -1,8 +1,6 @@
 <?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,9 +42,10 @@ use Airavata\Model\Workspace\Experiment\UserConfigurationData;
 use Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling;
 use Airavata\Model\Workspace\Experiment\DataType;
 
-/* this is the same as the factory */
-$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
-$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();
@@ -157,9 +156,6 @@ catch (AiravataSystemException $ase)
 }
 
 
-
-
-
 $transport->close();
 
 ?>

http://git-wip-us.apache.org/repos/asf/airavata/blob/3bcac35f/client-samples/createProject.php
----------------------------------------------------------------------
diff --git a/client-samples/createProject.php b/client-samples/createProject.php
index 78051b6..8a75b6f 100755
--- a/client-samples/createProject.php
+++ b/client-samples/createProject.php
@@ -1,8 +1,6 @@
 <?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';
@@ -38,18 +36,16 @@ use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 use Airavata\Model\Workspace\Project;
 
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
 
-/* this is the same as the factory */
-$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
-$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();
 $airavataclient = new AiravataClient($protocol);
 
 
-
-
 try
 {
     if ($argc != 3)

http://git-wip-us.apache.org/repos/asf/airavata/blob/3bcac35f/client-samples/getAllExperimentsInProject.php
----------------------------------------------------------------------
diff --git a/client-samples/getAllExperimentsInProject.php b/client-samples/getAllExperimentsInProject.php
index 69fa0ae..6b42ecc 100644
--- a/client-samples/getAllExperimentsInProject.php
+++ b/client-samples/getAllExperimentsInProject.php
@@ -1,8 +1,6 @@
 <?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,9 +34,10 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-/* this is the same as the factory */
-$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
-$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();

http://git-wip-us.apache.org/repos/asf/airavata/blob/3bcac35f/client-samples/getAllUserExperiments.php
----------------------------------------------------------------------
diff --git a/client-samples/getAllUserExperiments.php b/client-samples/getAllUserExperiments.php
index 423be2b..81e3685 100644
--- a/client-samples/getAllUserExperiments.php
+++ b/client-samples/getAllUserExperiments.php
@@ -1,8 +1,6 @@
 <?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,9 +34,10 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-/* this is the same as the factory */
-$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
-$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();

http://git-wip-us.apache.org/repos/asf/airavata/blob/3bcac35f/client-samples/getAllUserProjects.php
----------------------------------------------------------------------
diff --git a/client-samples/getAllUserProjects.php b/client-samples/getAllUserProjects.php
index c6140e2..75d6dd4 100644
--- a/client-samples/getAllUserProjects.php
+++ b/client-samples/getAllUserProjects.php
@@ -1,8 +1,6 @@
 <?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,9 +35,10 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-/* this is the same as the factory */
-$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
-$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();

http://git-wip-us.apache.org/repos/asf/airavata/blob/3bcac35f/client-samples/getExperiment.php
----------------------------------------------------------------------
diff --git a/client-samples/getExperiment.php b/client-samples/getExperiment.php
index f84d0f3..48f84ea 100644
--- a/client-samples/getExperiment.php
+++ b/client-samples/getExperiment.php
@@ -1,8 +1,6 @@
 <?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,9 +37,10 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-/* this is the same as the factory */
-$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
-$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();

http://git-wip-us.apache.org/repos/asf/airavata/blob/3bcac35f/client-samples/getExperimentOutputs.php
----------------------------------------------------------------------
diff --git a/client-samples/getExperimentOutputs.php b/client-samples/getExperimentOutputs.php
index d783503..697c3a0 100644
--- a/client-samples/getExperimentOutputs.php
+++ b/client-samples/getExperimentOutputs.php
@@ -1,8 +1,6 @@
 <?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,9 +37,10 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-/* this is the same as the factory */
-$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
-$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();

http://git-wip-us.apache.org/repos/asf/airavata/blob/3bcac35f/client-samples/getExperimentStatus.php
----------------------------------------------------------------------
diff --git a/client-samples/getExperimentStatus.php b/client-samples/getExperimentStatus.php
index 0db0270..77b7feb 100644
--- a/client-samples/getExperimentStatus.php
+++ b/client-samples/getExperimentStatus.php
@@ -1,8 +1,6 @@
 <?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';
@@ -38,9 +36,10 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-/* this is the same as the factory */
-$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
-$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();

http://git-wip-us.apache.org/repos/asf/airavata/blob/3bcac35f/client-samples/launchExperiment.php
----------------------------------------------------------------------
diff --git a/client-samples/launchExperiment.php b/client-samples/launchExperiment.php
index b84190b..fecbf2f 100755
--- a/client-samples/launchExperiment.php
+++ b/client-samples/launchExperiment.php
@@ -1,8 +1,6 @@
 <?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';
@@ -41,9 +39,10 @@ use Airavata\API\AiravataClient;
 use Airavata\Model\Workspace\Project;
 use Airavata\Model\Workspace\Experiment\Experiment;
 
-/* this is the same as the factory */ 
-$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
-$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();

http://git-wip-us.apache.org/repos/asf/airavata/blob/3bcac35f/client-samples/samples_config.php
----------------------------------------------------------------------
diff --git a/client-samples/samples_config.php b/client-samples/samples_config.php
deleted file mode 100644
index 0d7aff9..0000000
--- a/client-samples/samples_config.php
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-
-const AIRAVATA_SERVER='gw111.iu.xsede.org';
-const AIRAVATA_PORT='8930';
-const AIRAVATA_TIMEOUT=5000;
-
-?>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3bcac35f/client-samples/terminateExperiment.php
----------------------------------------------------------------------
diff --git a/client-samples/terminateExperiment.php b/client-samples/terminateExperiment.php
index 6a98828..6eadb4c 100644
--- a/client-samples/terminateExperiment.php
+++ b/client-samples/terminateExperiment.php
@@ -1,8 +1,6 @@
 <?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,9 +37,10 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-/* this is the same as the factory */
-$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
-$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();
@@ -60,14 +59,6 @@ else
 }
 
 
-
-
-
-
-
-
-
-
 $transport->close();
 
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/3bcac35f/client-samples/updateExperiment.php
----------------------------------------------------------------------
diff --git a/client-samples/updateExperiment.php b/client-samples/updateExperiment.php
index 4793239..a15e3a4 100644
--- a/client-samples/updateExperiment.php
+++ b/client-samples/updateExperiment.php
@@ -1,8 +1,6 @@
 <?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,9 +37,10 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-/* this is the same as the factory */
-$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
-$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();

http://git-wip-us.apache.org/repos/asf/airavata/blob/3bcac35f/client-samples/updateProject.php
----------------------------------------------------------------------
diff --git a/client-samples/updateProject.php b/client-samples/updateProject.php
index f161313..75935e1 100644
--- a/client-samples/updateProject.php
+++ b/client-samples/updateProject.php
@@ -1,8 +1,6 @@
 <?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,9 +34,10 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-/* this is the same as the factory */
-$transport = new TSocket(AIRAVATA_SERVER, AIRAVATA_PORT);
-$transport->setRecvTimeout(AIRAVATA_TIMEOUT);
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
 
 $protocol = new TBinaryProtocol($transport);
 $transport->open();


Mime
View raw message