Repository: airavata Updated Branches: refs/heads/master c09963aaf -> 465ca53d6
Pointing libs to airavata SDK - AIRAVATA-1274 Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/465ca53d Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/465ca53d Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/465ca53d Branch: refs/heads/master Commit: 465ca53d6a91542560fd3fd1d0ea2fdc797f52d3 Parents: c09963a Author: Suresh Marru <[email protected]> Authored: Mon Jun 30 23:14:43 2014 -0400 Committer: Suresh Marru <[email protected]> Committed: Mon Jun 30 23:14:43 2014 -0400 ---------------------------------------------------------------------- samples/php-cli-samples/airavata-client-api-tester.php | 11 ++++------- samples/php-cli-samples/cloneExperiment.php | 11 ++++------- samples/php-cli-samples/createExperiment.php | 13 ++++--------- samples/php-cli-samples/createProject.php | 12 ++++-------- samples/php-cli-samples/getAllExperimentsInProject.php | 13 +++++-------- samples/php-cli-samples/getAllUserExperiments.php | 13 +++++-------- samples/php-cli-samples/getAllUserProjects.php | 12 ++++-------- samples/php-cli-samples/getExperiment.php | 12 ++++-------- samples/php-cli-samples/getExperimentOutputs.php | 13 +++++-------- samples/php-cli-samples/getExperimentStatus.php | 13 +++++-------- samples/php-cli-samples/launchExperiment.php | 12 ++++-------- .../search_experiments_by_application.php | 13 +++++-------- .../search_experiments_by_description.php | 13 +++++-------- samples/php-cli-samples/search_experiments_by_name.php | 13 +++++-------- samples/php-cli-samples/terminateExperiment.php | 13 +++++-------- samples/php-cli-samples/updateExperiment.php | 13 +++++-------- samples/php-cli-samples/updateProject.php | 13 +++++-------- 17 files changed, 78 insertions(+), 135 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/465ca53d/samples/php-cli-samples/airavata-client-api-tester.php ---------------------------------------------------------------------- diff --git a/samples/php-cli-samples/airavata-client-api-tester.php b/samples/php-cli-samples/airavata-client-api-tester.php index 06c0429..17d4b80 100755 --- a/samples/php-cli-samples/airavata-client-api-tester.php +++ b/samples/php-cli-samples/airavata-client-api-tester.php @@ -1,16 +1,16 @@ <?php namespace Airavata\Client\Samples; -$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/'; +$airavataconfig = parse_ini_file("airavata-client-properties.ini"); + +$GLOBALS['THRIFT_ROOT'] = $airavataconfig['THRIFT_LIB_DIR']; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php'; @@ -18,13 +18,12 @@ require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php'; -$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/'; +$GLOBALS['AIRAVATA_ROOT'] = $airavataconfig['AIRAVATA_PHP_STUBS_DIR']; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php'; -require_once '../lib/AiravataClientFactory.php'; use Airavata\API\Error\AiravataClientException; use Airavata\API\Error\AiravataSystemException; @@ -44,8 +43,6 @@ 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']); http://git-wip-us.apache.org/repos/asf/airavata/blob/465ca53d/samples/php-cli-samples/cloneExperiment.php ---------------------------------------------------------------------- diff --git a/samples/php-cli-samples/cloneExperiment.php b/samples/php-cli-samples/cloneExperiment.php index 42a39d7..35cd70c 100644 --- a/samples/php-cli-samples/cloneExperiment.php +++ b/samples/php-cli-samples/cloneExperiment.php @@ -1,16 +1,16 @@ <?php namespace Airavata\Client\Samples; -$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/'; +$airavataconfig = parse_ini_file("airavata-client-properties.ini"); + +$GLOBALS['THRIFT_ROOT'] = $airavataconfig['THRIFT_LIB_DIR']; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php'; @@ -18,7 +18,7 @@ require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php'; -$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/'; +$GLOBALS['AIRAVATA_ROOT'] = $airavataconfig['AIRAVATA_PHP_STUBS_DIR']; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php'; @@ -37,9 +37,6 @@ use Thrift\Transport\TBufferedTransport; use Thrift\Transport\TSocket; use Airavata\API\AiravataClient; - -$airavataconfig = parse_ini_file("airavata-client-properties.ini"); - $transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']); $transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']); http://git-wip-us.apache.org/repos/asf/airavata/blob/465ca53d/samples/php-cli-samples/createExperiment.php ---------------------------------------------------------------------- diff --git a/samples/php-cli-samples/createExperiment.php b/samples/php-cli-samples/createExperiment.php index 3545a37..e37c463 100755 --- a/samples/php-cli-samples/createExperiment.php +++ b/samples/php-cli-samples/createExperiment.php @@ -1,16 +1,16 @@ <?php namespace Airavata\Client\Samples; -$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/'; +$airavataconfig = parse_ini_file("airavata-client-properties.ini"); + +$GLOBALS['THRIFT_ROOT'] = $airavataconfig['THRIFT_LIB_DIR']; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php'; @@ -18,14 +18,12 @@ require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php'; -$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/'; +$GLOBALS['AIRAVATA_ROOT'] = $airavataconfig['AIRAVATA_PHP_STUBS_DIR']; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php'; -require_once '../lib/AiravataClientFactory.php'; - use Airavata\API\Error\AiravataClientException; use Airavata\API\Error\AiravataSystemException; use Airavata\API\Error\InvalidRequestException; @@ -42,8 +40,6 @@ use Airavata\Model\Workspace\Experiment\UserConfigurationData; use Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling; use Airavata\Model\Workspace\Experiment\DataType; -$airavataconfig = parse_ini_file("airavata-client-properties.ini"); - $transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']); $transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']); @@ -51,7 +47,6 @@ $protocol = new TBinaryProtocol($transport); $transport->open(); $airavataclient = new AiravataClient($protocol); - try { if ($argc != 4) http://git-wip-us.apache.org/repos/asf/airavata/blob/465ca53d/samples/php-cli-samples/createProject.php ---------------------------------------------------------------------- diff --git a/samples/php-cli-samples/createProject.php b/samples/php-cli-samples/createProject.php index 8a75b6f..6e33199 100755 --- a/samples/php-cli-samples/createProject.php +++ b/samples/php-cli-samples/createProject.php @@ -1,16 +1,16 @@ <?php namespace Airavata\Client\Samples; -$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/'; +$airavataconfig = parse_ini_file("airavata-client-properties.ini"); + +$GLOBALS['THRIFT_ROOT'] = $airavataconfig['THRIFT_LIB_DIR']; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php'; @@ -18,14 +18,12 @@ require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php'; -$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/'; +$GLOBALS['AIRAVATA_ROOT'] = $airavataconfig['AIRAVATA_PHP_STUBS_DIR']; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php'; -require_once '../lib/AiravataClientFactory.php'; - use Airavata\API\Error\AiravataClientException; use Airavata\API\Error\AiravataSystemException; use Airavata\API\Error\InvalidRequestException; @@ -36,8 +34,6 @@ use Thrift\Transport\TSocket; use Airavata\API\AiravataClient; use Airavata\Model\Workspace\Project; -$airavataconfig = parse_ini_file("airavata-client-properties.ini"); - $transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']); $transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']); http://git-wip-us.apache.org/repos/asf/airavata/blob/465ca53d/samples/php-cli-samples/getAllExperimentsInProject.php ---------------------------------------------------------------------- diff --git a/samples/php-cli-samples/getAllExperimentsInProject.php b/samples/php-cli-samples/getAllExperimentsInProject.php index 6b42ecc..0de2d2c 100644 --- a/samples/php-cli-samples/getAllExperimentsInProject.php +++ b/samples/php-cli-samples/getAllExperimentsInProject.php @@ -1,16 +1,16 @@ <?php namespace Airavata\Client\Samples; -$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/'; +$airavataconfig = parse_ini_file("airavata-client-properties.ini"); + +$GLOBALS['THRIFT_ROOT'] = $airavataconfig['THRIFT_LIB_DIR']; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php'; @@ -18,13 +18,12 @@ require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php'; -$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/'; +$GLOBALS['AIRAVATA_ROOT'] = $airavataconfig['AIRAVATA_PHP_STUBS_DIR']; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php'; +require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php'; -require_once '../lib/AiravataClientFactory.php'; - use Airavata\API\Error\AiravataClientException; use Airavata\API\Error\AiravataSystemException; use Airavata\API\Error\InvalidRequestException; @@ -34,8 +33,6 @@ use Thrift\Transport\TBufferedTransport; use Thrift\Transport\TSocket; use Airavata\API\AiravataClient; -$airavataconfig = parse_ini_file("airavata-client-properties.ini"); - $transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']); $transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']); http://git-wip-us.apache.org/repos/asf/airavata/blob/465ca53d/samples/php-cli-samples/getAllUserExperiments.php ---------------------------------------------------------------------- diff --git a/samples/php-cli-samples/getAllUserExperiments.php b/samples/php-cli-samples/getAllUserExperiments.php index 81e3685..f1877a0 100644 --- a/samples/php-cli-samples/getAllUserExperiments.php +++ b/samples/php-cli-samples/getAllUserExperiments.php @@ -1,16 +1,16 @@ <?php namespace Airavata\Client\Samples; -$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/'; +$airavataconfig = parse_ini_file("airavata-client-properties.ini"); + +$GLOBALS['THRIFT_ROOT'] = $airavataconfig['THRIFT_LIB_DIR']; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php'; @@ -18,13 +18,12 @@ require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php'; -$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/'; +$GLOBALS['AIRAVATA_ROOT'] = $airavataconfig['AIRAVATA_PHP_STUBS_DIR']; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php'; +require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php'; -require_once '../lib/AiravataClientFactory.php'; - use Airavata\API\Error\AiravataClientException; use Airavata\API\Error\AiravataSystemException; use Airavata\API\Error\InvalidRequestException; @@ -34,8 +33,6 @@ use Thrift\Transport\TBufferedTransport; use Thrift\Transport\TSocket; use Airavata\API\AiravataClient; -$airavataconfig = parse_ini_file("airavata-client-properties.ini"); - $transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']); $transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']); http://git-wip-us.apache.org/repos/asf/airavata/blob/465ca53d/samples/php-cli-samples/getAllUserProjects.php ---------------------------------------------------------------------- diff --git a/samples/php-cli-samples/getAllUserProjects.php b/samples/php-cli-samples/getAllUserProjects.php index 75d6dd4..274f5d9 100644 --- a/samples/php-cli-samples/getAllUserProjects.php +++ b/samples/php-cli-samples/getAllUserProjects.php @@ -1,16 +1,16 @@ <?php namespace Airavata\Client\Samples; -$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/'; +$airavataconfig = parse_ini_file("airavata-client-properties.ini"); + +$GLOBALS['THRIFT_ROOT'] = $airavataconfig['THRIFT_LIB_DIR']; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php'; @@ -18,14 +18,12 @@ require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php'; -$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/'; +$GLOBALS['AIRAVATA_ROOT'] = $airavataconfig['AIRAVATA_PHP_STUBS_DIR']; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php'; -require_once '../lib/AiravataClientFactory.php'; - use Airavata\API\Error\AiravataClientException; use Airavata\API\Error\AiravataSystemException; use Airavata\API\Error\InvalidRequestException; @@ -35,8 +33,6 @@ use Thrift\Transport\TBufferedTransport; use Thrift\Transport\TSocket; use Airavata\API\AiravataClient; -$airavataconfig = parse_ini_file("airavata-client-properties.ini"); - $transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']); $transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']); http://git-wip-us.apache.org/repos/asf/airavata/blob/465ca53d/samples/php-cli-samples/getExperiment.php ---------------------------------------------------------------------- diff --git a/samples/php-cli-samples/getExperiment.php b/samples/php-cli-samples/getExperiment.php index 48f84ea..2872a61 100644 --- a/samples/php-cli-samples/getExperiment.php +++ b/samples/php-cli-samples/getExperiment.php @@ -1,16 +1,16 @@ <?php namespace Airavata\Client\Samples; -$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/'; +$airavataconfig = parse_ini_file("airavata-client-properties.ini"); + +$GLOBALS['THRIFT_ROOT'] = $airavataconfig['THRIFT_LIB_DIR']; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php'; @@ -18,13 +18,11 @@ require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php'; -$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/'; +$GLOBALS['AIRAVATA_ROOT'] = $airavataconfig['AIRAVATA_PHP_STUBS_DIR']; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php'; -require_once '../lib/AiravataClientFactory.php'; - use Airavata\API\Error\AiravataClientException; use Airavata\API\Error\AiravataSystemException; use Airavata\API\Error\ExperimentNotFoundException; @@ -37,8 +35,6 @@ use Thrift\Transport\TBufferedTransport; use Thrift\Transport\TSocket; use Airavata\API\AiravataClient; -$airavataconfig = parse_ini_file("airavata-client-properties.ini"); - $transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']); $transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']); http://git-wip-us.apache.org/repos/asf/airavata/blob/465ca53d/samples/php-cli-samples/getExperimentOutputs.php ---------------------------------------------------------------------- diff --git a/samples/php-cli-samples/getExperimentOutputs.php b/samples/php-cli-samples/getExperimentOutputs.php index 697c3a0..34b5d6e 100644 --- a/samples/php-cli-samples/getExperimentOutputs.php +++ b/samples/php-cli-samples/getExperimentOutputs.php @@ -1,16 +1,16 @@ <?php namespace Airavata\Client\Samples; -$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/'; +$airavataconfig = parse_ini_file("airavata-client-properties.ini"); + +$GLOBALS['THRIFT_ROOT'] = $airavataconfig['THRIFT_LIB_DIR']; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php'; @@ -18,13 +18,12 @@ require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php'; -$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/'; +$GLOBALS['AIRAVATA_ROOT'] = $airavataconfig['AIRAVATA_PHP_STUBS_DIR']; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php'; +require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php'; -require_once '../lib/AiravataClientFactory.php'; - use Airavata\API\Error\AiravataClientException; use Airavata\API\Error\AiravataSystemException; use Airavata\API\Error\ExperimentNotFoundException; @@ -37,8 +36,6 @@ use Thrift\Transport\TBufferedTransport; use Thrift\Transport\TSocket; use Airavata\API\AiravataClient; -$airavataconfig = parse_ini_file("airavata-client-properties.ini"); - $transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']); $transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']); http://git-wip-us.apache.org/repos/asf/airavata/blob/465ca53d/samples/php-cli-samples/getExperimentStatus.php ---------------------------------------------------------------------- diff --git a/samples/php-cli-samples/getExperimentStatus.php b/samples/php-cli-samples/getExperimentStatus.php index 77b7feb..e931a4e 100644 --- a/samples/php-cli-samples/getExperimentStatus.php +++ b/samples/php-cli-samples/getExperimentStatus.php @@ -1,16 +1,16 @@ <?php namespace Airavata\Client\Samples; -$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/'; +$airavataconfig = parse_ini_file("airavata-client-properties.ini"); + +$GLOBALS['THRIFT_ROOT'] = $airavataconfig['THRIFT_LIB_DIR']; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php'; @@ -18,13 +18,12 @@ require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php'; -$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/'; +$GLOBALS['AIRAVATA_ROOT'] = $airavataconfig['AIRAVATA_PHP_STUBS_DIR']; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php'; +require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php'; -require_once '../lib/AiravataClientFactory.php'; - use Airavata\API\Error\AiravataClientException; use Airavata\API\Error\AiravataSystemException; use Airavata\API\Error\ExperimentNotFoundException; @@ -36,8 +35,6 @@ use Thrift\Transport\TBufferedTransport; use Thrift\Transport\TSocket; use Airavata\API\AiravataClient; -$airavataconfig = parse_ini_file("airavata-client-properties.ini"); - $transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']); $transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']); http://git-wip-us.apache.org/repos/asf/airavata/blob/465ca53d/samples/php-cli-samples/launchExperiment.php ---------------------------------------------------------------------- diff --git a/samples/php-cli-samples/launchExperiment.php b/samples/php-cli-samples/launchExperiment.php index fecbf2f..4f528b6 100755 --- a/samples/php-cli-samples/launchExperiment.php +++ b/samples/php-cli-samples/launchExperiment.php @@ -1,16 +1,16 @@ <?php namespace Airavata\Client\Samples; -$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/'; +$airavataconfig = parse_ini_file("airavata-client-properties.ini"); + +$GLOBALS['THRIFT_ROOT'] = $airavataconfig['THRIFT_LIB_DIR']; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php'; @@ -18,14 +18,12 @@ require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php'; -$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/'; +$GLOBALS['AIRAVATA_ROOT'] = $airavataconfig['AIRAVATA_PHP_STUBS_DIR']; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php'; -require_once '../lib/AiravataClientFactory.php'; - use Airavata\API\Error\AiravataClientException; use Airavata\API\Error\AiravataSystemException; use Airavata\API\Error\ExperimentNotFoundException; @@ -39,8 +37,6 @@ use Airavata\API\AiravataClient; use Airavata\Model\Workspace\Project; use Airavata\Model\Workspace\Experiment\Experiment; -$airavataconfig = parse_ini_file("airavata-client-properties.ini"); - $transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']); $transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']); http://git-wip-us.apache.org/repos/asf/airavata/blob/465ca53d/samples/php-cli-samples/search_experiments_by_application.php ---------------------------------------------------------------------- diff --git a/samples/php-cli-samples/search_experiments_by_application.php b/samples/php-cli-samples/search_experiments_by_application.php index cd98694..4340f9e 100644 --- a/samples/php-cli-samples/search_experiments_by_application.php +++ b/samples/php-cli-samples/search_experiments_by_application.php @@ -1,16 +1,16 @@ <?php namespace Airavata\Client\Samples; -$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/'; +$airavataconfig = parse_ini_file("airavata-client-properties.ini"); + +$GLOBALS['THRIFT_ROOT'] = $airavataconfig['THRIFT_LIB_DIR']; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php'; @@ -18,13 +18,12 @@ require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php'; -$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/'; +$GLOBALS['AIRAVATA_ROOT'] = $airavataconfig['AIRAVATA_PHP_STUBS_DIR']; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php'; +require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php'; -require_once '../lib/AiravataClientFactory.php'; - use Airavata\API\Error\AiravataClientException; use Airavata\API\Error\AiravataSystemException; use Airavata\API\Error\InvalidRequestException; @@ -34,8 +33,6 @@ use Thrift\Transport\TBufferedTransport; use Thrift\Transport\TSocket; use Airavata\API\AiravataClient; -$airavataconfig = parse_ini_file("airavata-client-properties.ini"); - $transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']); $transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']); http://git-wip-us.apache.org/repos/asf/airavata/blob/465ca53d/samples/php-cli-samples/search_experiments_by_description.php ---------------------------------------------------------------------- diff --git a/samples/php-cli-samples/search_experiments_by_description.php b/samples/php-cli-samples/search_experiments_by_description.php index 8243c0b..631ad15 100644 --- a/samples/php-cli-samples/search_experiments_by_description.php +++ b/samples/php-cli-samples/search_experiments_by_description.php @@ -1,16 +1,16 @@ <?php namespace Airavata\Client\Samples; -$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/'; +$airavataconfig = parse_ini_file("airavata-client-properties.ini"); + +$GLOBALS['THRIFT_ROOT'] = $airavataconfig['THRIFT_LIB_DIR']; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php'; @@ -18,13 +18,12 @@ require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php'; -$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/'; +$GLOBALS['AIRAVATA_ROOT'] = $airavataconfig['AIRAVATA_PHP_STUBS_DIR']; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php'; +require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php'; -require_once '../lib/AiravataClientFactory.php'; - use Airavata\API\Error\AiravataClientException; use Airavata\API\Error\AiravataSystemException; use Airavata\API\Error\InvalidRequestException; @@ -34,8 +33,6 @@ use Thrift\Transport\TBufferedTransport; use Thrift\Transport\TSocket; use Airavata\API\AiravataClient; -$airavataconfig = parse_ini_file("airavata-client-properties.ini"); - $transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']); $transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']); http://git-wip-us.apache.org/repos/asf/airavata/blob/465ca53d/samples/php-cli-samples/search_experiments_by_name.php ---------------------------------------------------------------------- diff --git a/samples/php-cli-samples/search_experiments_by_name.php b/samples/php-cli-samples/search_experiments_by_name.php index 4a51a15..d71a166 100644 --- a/samples/php-cli-samples/search_experiments_by_name.php +++ b/samples/php-cli-samples/search_experiments_by_name.php @@ -1,16 +1,16 @@ <?php namespace Airavata\Client\Samples; -$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/'; +$airavataconfig = parse_ini_file("airavata-client-properties.ini"); + +$GLOBALS['THRIFT_ROOT'] = $airavataconfig['THRIFT_LIB_DIR']; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php'; @@ -18,13 +18,12 @@ require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php'; -$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/'; +$GLOBALS['AIRAVATA_ROOT'] = $airavataconfig['AIRAVATA_PHP_STUBS_DIR']; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php'; +require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php'; -require_once '../lib/AiravataClientFactory.php'; - use Airavata\API\Error\AiravataClientException; use Airavata\API\Error\AiravataSystemException; use Airavata\API\Error\InvalidRequestException; @@ -34,8 +33,6 @@ use Thrift\Transport\TBufferedTransport; use Thrift\Transport\TSocket; use Airavata\API\AiravataClient; -$airavataconfig = parse_ini_file("airavata-client-properties.ini"); - $transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']); $transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']); http://git-wip-us.apache.org/repos/asf/airavata/blob/465ca53d/samples/php-cli-samples/terminateExperiment.php ---------------------------------------------------------------------- diff --git a/samples/php-cli-samples/terminateExperiment.php b/samples/php-cli-samples/terminateExperiment.php index 6eadb4c..b701abf 100644 --- a/samples/php-cli-samples/terminateExperiment.php +++ b/samples/php-cli-samples/terminateExperiment.php @@ -1,16 +1,16 @@ <?php namespace Airavata\Client\Samples; -$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/'; +$airavataconfig = parse_ini_file("airavata-client-properties.ini"); + +$GLOBALS['THRIFT_ROOT'] = $airavataconfig['THRIFT_LIB_DIR']; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php'; @@ -18,13 +18,12 @@ require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php'; -$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/'; +$GLOBALS['AIRAVATA_ROOT'] = $airavataconfig['AIRAVATA_PHP_STUBS_DIR']; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php'; +require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php'; -require_once '../lib/AiravataClientFactory.php'; - use Airavata\API\Error\AiravataClientException; use Airavata\API\Error\AiravataSystemException; use Airavata\API\Error\ExperimentNotFoundException; @@ -37,8 +36,6 @@ use Thrift\Transport\TBufferedTransport; use Thrift\Transport\TSocket; use Airavata\API\AiravataClient; -$airavataconfig = parse_ini_file("airavata-client-properties.ini"); - $transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']); $transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']); http://git-wip-us.apache.org/repos/asf/airavata/blob/465ca53d/samples/php-cli-samples/updateExperiment.php ---------------------------------------------------------------------- diff --git a/samples/php-cli-samples/updateExperiment.php b/samples/php-cli-samples/updateExperiment.php index a15e3a4..e3aefd3 100644 --- a/samples/php-cli-samples/updateExperiment.php +++ b/samples/php-cli-samples/updateExperiment.php @@ -1,16 +1,16 @@ <?php namespace Airavata\Client\Samples; -$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/'; +$airavataconfig = parse_ini_file("airavata-client-properties.ini"); + +$GLOBALS['THRIFT_ROOT'] = $airavataconfig['THRIFT_LIB_DIR']; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php'; @@ -18,13 +18,12 @@ require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php'; -$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/'; +$GLOBALS['AIRAVATA_ROOT'] = $airavataconfig['AIRAVATA_PHP_STUBS_DIR']; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php'; +require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php'; -require_once '../lib/AiravataClientFactory.php'; - use Airavata\API\Error\AiravataClientException; use Airavata\API\Error\AiravataSystemException; use Airavata\API\Error\ExperimentNotFoundException; @@ -37,8 +36,6 @@ use Thrift\Transport\TBufferedTransport; use Thrift\Transport\TSocket; use Airavata\API\AiravataClient; -$airavataconfig = parse_ini_file("airavata-client-properties.ini"); - $transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']); $transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']); http://git-wip-us.apache.org/repos/asf/airavata/blob/465ca53d/samples/php-cli-samples/updateProject.php ---------------------------------------------------------------------- diff --git a/samples/php-cli-samples/updateProject.php b/samples/php-cli-samples/updateProject.php index 75935e1..f77ab8c 100644 --- a/samples/php-cli-samples/updateProject.php +++ b/samples/php-cli-samples/updateProject.php @@ -1,16 +1,16 @@ <?php namespace Airavata\Client\Samples; -$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/'; +$airavataconfig = parse_ini_file("airavata-client-properties.ini"); + +$GLOBALS['THRIFT_ROOT'] = $airavataconfig['THRIFT_LIB_DIR']; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php'; -require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php'; @@ -18,13 +18,12 @@ require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php'; require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php'; -$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/'; +$GLOBALS['AIRAVATA_ROOT'] = $airavataconfig['AIRAVATA_PHP_STUBS_DIR']; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php'; +require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php'; require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php'; -require_once '../lib/AiravataClientFactory.php'; - use Airavata\API\Error\AiravataClientException; use Airavata\API\Error\AiravataSystemException; use Airavata\API\Error\InvalidRequestException; @@ -34,8 +33,6 @@ use Thrift\Transport\TBufferedTransport; use Thrift\Transport\TSocket; use Airavata\API\AiravataClient; -$airavataconfig = parse_ini_file("airavata-client-properties.ini"); - $transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']); $transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
