airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject [1/2] git commit: Updating sample names to match API names
Date Wed, 09 Jul 2014 15:07:40 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 28fd065ec -> dfb744d28


Updating sample names to match API names


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

Branch: refs/heads/master
Commit: 3b9fae4e14da0b045a679a6f45bda999c62a72af
Parents: 7661ac6
Author: Suresh Marru <smarru@apache.org>
Authored: Wed Jul 9 11:07:29 2014 -0400
Committer: Suresh Marru <smarru@apache.org>
Committed: Wed Jul 9 11:07:29 2014 -0400

----------------------------------------------------------------------
 .../conf/airavata-client-properties.ini         |  2 +-
 .../src/main/resources/php-cli-samples/README   | 19 +----
 .../deleteApplicationInterface.php              | 60 ++++++++++++++++
 .../php-cli-samples/registerAppDeployment.php   | 74 --------------------
 .../php-cli-samples/registerAppInterface.php    | 66 -----------------
 .../php-cli-samples/registerAppModule.php       | 67 ------------------
 .../registerApplicationDeployment.php           | 74 ++++++++++++++++++++
 .../registerApplicationInterface.php            | 72 +++++++++++++++++++
 .../registerApplicationModule.php               | 67 ++++++++++++++++++
 9 files changed, 276 insertions(+), 225 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/3b9fae4e/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/conf/airavata-client-properties.ini
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/conf/airavata-client-properties.ini
b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/conf/airavata-client-properties.ini
index 4295308..0833d15 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/conf/airavata-client-properties.ini
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/conf/airavata-client-properties.ini
@@ -15,4 +15,4 @@ AIRAVATA_SERVER = "gw111.iu.xsede.org"
 AIRAVATA_PORT = 9930
 
 ; Time out value to give enough breathing room for client to get synchronous responses back
-AIRAVATA_TIMEOUT = 5000
+AIRAVATA_TIMEOUT = 50000

http://git-wip-us.apache.org/repos/asf/airavata/blob/3b9fae4e/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/README
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/README
b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/README
index 1f86c3f..c278c97 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/README
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/README
@@ -3,20 +3,5 @@
   To run a command from a terminal shell prompt, use, for example:
         [prompt%> php createProject.php project-name
 
-You can modify PHP files using any text editor.
-
-Run the commands in the following order for your first test.
-1. GetAPIVersion.php (a sanity check)
-2. createProject.php
-3. updateProject.php
-4. getAllUserProjects.php
-5. createExperiment.php
-6. getExperiment.php
-7. updateExperiment.php
-8. cloneExperiment.php
-9. getAllExperimentsInProject.php
-10. getAllUserExperiments.php
-11. launchExperiment.php
-12. getExperimentStatus.php
-13. getExperimentOutputs.php
-14. terminateExperiment.php
+Please see the wiki page for detailed descriptions and usage of the scripts:
+https://cwiki.apache.org/confluence/display/AIRAVATA/Airavata+API+PHP+Client+Samples

http://git-wip-us.apache.org/repos/asf/airavata/blob/3b9fae4e/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/deleteApplicationInterface.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/deleteApplicationInterface.php
b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/deleteApplicationInterface.php
new file mode 100644
index 0000000..604cc2d
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/deleteApplicationInterface.php
@@ -0,0 +1,60 @@
+<?php
+/**
+ * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant
way.
+ *  Contributions welcome to improve writing PHP Client Samples.
+ *
+ */
+include 'getAiravataClient.php';
+global $airavataclient;
+global $transport;
+
+use Airavata\API\Error\AiravataClientException;
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\API\Error\InvalidRequestException;
+use Thrift\Exception\TTransportException;
+
+use Airavata\Model\AppCatalog\AppDeployment\ApplicationModule;
+
+try
+{
+
+    if (count($argv) != 2) {
+        exit("\n Incorrect Arguments \n. Usage: deleteApplicationInterface.php <application
interface id>. \n");
+    } else {
+
+        $appInterfaceId = $argv[1];
+
+        $success = $airavataclient->deleteApplicationInterface($appInterfaceId);
+
+        if ($success) {
+            echo "Application Interface $appInterfaceId successfully deleted";
+        } else {
+            echo "\n Failed to delete application interface $appInterfaceId \n";
+        }
+    }
+}
+catch (InvalidRequestException $ire)
+{
+    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
+}
+catch (AiravataClientException $ace)
+{
+    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
+}
+catch (AiravataSystemException $ase)
+{
+    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
+}
+catch (TTransportException $tte)
+{
+    echo 'TTransportException!<br><br>' . $tte->getMessage();
+}
+catch (\Exception $e)
+{
+    echo 'Exception!<br><br>' . $e->getMessage();
+}
+
+$transport->close();
+
+?>
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/3b9fae4e/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerAppDeployment.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerAppDeployment.php
b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerAppDeployment.php
deleted file mode 100755
index 4872faf..0000000
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerAppDeployment.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-/**
- * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant
way.
- *  Contributions welcome to improve writing PHP Client Samples.
- *
- */
-include 'getAiravataClient.php';
-global $airavataclient;
-global $transport;
-
-use Airavata\API\Error\AiravataClientException;
-use Airavata\API\Error\AiravataSystemException;
-use Airavata\API\Error\InvalidRequestException;
-
-use Airavata\Model\AppCatalog\AppDeployment\ApplicationModule;
-use Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription;
-
-try
-{
-    if ($argc != 4)
-    {
-        echo 'php registerAppDeployment.php <appModuleId> <computeHostId> <executablePath>';
-    }
-    else
-    {
-        $appModuleId = $argv[1];
-        $computeHostId = $argv[2];
-        $executablePath = $argv[3];
-
-        $appDeployment = new ApplicationDeploymentDescription();
-        $appDeployment->appModuleId = $appModuleId;
-        $appDeployment->computeHostId = $computeHostId;
-        $appDeployment->executablePath = $executablePath;
-
-
-
-        $appDeploymentId = $airavataclient->registerApplicationDeployment($appDeployment);
-
-        if ($appDeploymentId)
-        {
-            var_dump($appDeployment);
-            echo "Application Deployment $appDeploymentId is registered! \n    ";
-        }
-        else
-        {
-            echo "Failed to register application deployment. \n";
-        }
-    }
-}
-catch (InvalidRequestException $ire)
-{
-    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
-}
-catch (AiravataClientException $ace)
-{
-    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
-}
-catch (AiravataSystemException $ase)
-{
-    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
-}
-catch (TTransportException $tte)
-{
-    echo 'TTransportException!<br><br>' . $tte->getMessage();
-}
-catch (\Exception $e)
-{
-    echo 'Exception!<br><br>' . $e->getMessage();
-}
-
-$transport->close();
-
-?>
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/3b9fae4e/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerAppInterface.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerAppInterface.php
b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerAppInterface.php
deleted file mode 100755
index 6f74b53..0000000
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerAppInterface.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-/**
- * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant
way.
- *  Contributions welcome to improve writing PHP Client Samples.
- *
- */
-include 'getAiravataClient.php';
-global $airavataclient;
-global $transport;
-
-use Airavata\API\Error\AiravataClientException;
-use Airavata\API\Error\AiravataSystemException;
-use Airavata\API\Error\InvalidRequestException;
-
-use Airavata\Model\AppCatalog\AppInterface\ApplicationInterfaceDescription;
-
-try
-{
-    if ($argc != 4)
-    {
-        echo 'php registerAppInterface.php <appName> <appDescription> <appModuleId>';
-    }
-    else
-    {
-        $appName = $argv[1];
-        $appDescription = $argv[2];
-        $appModuleId = $argv[3];
-
-        $appInterface = new ApplicationInterfaceDescription();
-        $appInterface->applicationName = $appName;
-        $appInterface->applicationDesription = $appDescription;
-
-        $appInterfaceId = $airavataclient->registerApplicationInterface($appInterface);
-
-        if ($appInterfaceId)
-        {
-            var_dump($appInterface);
-            echo "\n Application Interface $appInterfaceId is registered! \n    ";
-        }
-        else
-        {
-            echo "\n Failed to register application interface. \n";
-        }
-    }
-}
-catch (InvalidRequestException $ire)
-{
-    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
-}
-catch (AiravataClientException $ace)
-{
-    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
-}
-catch (AiravataSystemException $ase)
-{
-    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
-}
-catch (\Exception $e)
-{
-    echo 'Exception!<br><br>' . $e->getMessage();
-}
-
-$transport->close();
-
-?>
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/3b9fae4e/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerAppModule.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerAppModule.php
b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerAppModule.php
deleted file mode 100755
index b6007ab..0000000
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerAppModule.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-/**
- * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant
way.
- *  Contributions welcome to improve writing PHP Client Samples.
- *
- */
-include 'getAiravataClient.php';
-global $airavataclient;
-global $transport;
-
-use Airavata\API\Error\AiravataClientException;
-use Airavata\API\Error\AiravataSystemException;
-use Airavata\API\Error\InvalidRequestException;
-
-use Airavata\Model\AppCatalog\AppDeployment\ApplicationModule;
-
-try
-{
-    if ($argc != 4)
-    {
-        echo 'php registerAppModule.php <appModuleName> <appModuleVersion> <appModuleDescription>';
-    }
-    else
-    {
-        $appModuleName = $argv[1];
-        $appModuleVersion = $argv[2];
-        $appModuleDescription = $argv[3];
-
-        $appModule = new ApplicationModule();
-        $appModule->appModuleName = $appModuleName;
-        $appModule->appModuleVersion = $appModuleVersion;
-        $appModule->appModuleDescription = $appModuleDescription;
-
-        $appModuleId = $airavataclient->registerApplicationModule($appModule);
-
-        if ($appModuleId)
-        {
-            var_dump($appModule);
-            echo "Application Module $appModuleId is registered! \n    ";
-        }
-        else
-        {
-            echo "Failed to register application module. \n";
-        }
-    }
-}
-catch (InvalidRequestException $ire)
-{
-    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
-}
-catch (AiravataClientException $ace)
-{
-    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
-}
-catch (AiravataSystemException $ase)
-{
-    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
-}
-catch (\Exception $e)
-{
-    echo 'Exception!<br><br>' . $e->getMessage();
-}
-
-$transport->close();
-
-?>
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/3b9fae4e/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerApplicationDeployment.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerApplicationDeployment.php
b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerApplicationDeployment.php
new file mode 100755
index 0000000..034ea94
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerApplicationDeployment.php
@@ -0,0 +1,74 @@
+<?php
+/**
+ * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant
way.
+ *  Contributions welcome to improve writing PHP Client Samples.
+ *
+ */
+include 'getAiravataClient.php';
+global $airavataclient;
+global $transport;
+
+use Airavata\API\Error\AiravataClientException;
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\API\Error\InvalidRequestException;
+
+use Airavata\Model\AppCatalog\AppDeployment\ApplicationModule;
+use Airavata\Model\AppCatalog\AppDeployment\ApplicationDeploymentDescription;
+
+try
+{
+    if ($argc != 4)
+    {
+        echo 'php registerApplicationDeployment.php <appModuleId> <computeHostId>
<executablePath>';
+    }
+    else
+    {
+        $appModuleId = $argv[1];
+        $computeHostId = $argv[2];
+        $executablePath = $argv[3];
+
+        $appDeployment = new ApplicationDeploymentDescription();
+        $appDeployment->appModuleId = $appModuleId;
+        $appDeployment->computeHostId = $computeHostId;
+        $appDeployment->executablePath = $executablePath;
+
+
+
+        $appDeploymentId = $airavataclient->registerApplicationDeployment($appDeployment);
+
+        if ($appDeploymentId)
+        {
+            var_dump($appDeployment);
+            echo "Application Deployment $appDeploymentId is registered! \n    ";
+        }
+        else
+        {
+            echo "Failed to register application deployment. \n";
+        }
+    }
+}
+catch (InvalidRequestException $ire)
+{
+    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
+}
+catch (AiravataClientException $ace)
+{
+    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
+}
+catch (AiravataSystemException $ase)
+{
+    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
+}
+catch (TTransportException $tte)
+{
+    echo 'TTransportException!<br><br>' . $tte->getMessage();
+}
+catch (\Exception $e)
+{
+    echo 'Exception!<br><br>' . $e->getMessage();
+}
+
+$transport->close();
+
+?>
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/3b9fae4e/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerApplicationInterface.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerApplicationInterface.php
b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerApplicationInterface.php
new file mode 100755
index 0000000..bb7491e
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerApplicationInterface.php
@@ -0,0 +1,72 @@
+<?php
+/**
+ * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant
way.
+ *  Contributions welcome to improve writing PHP Client Samples.
+ *
+ */
+include 'getAiravataClient.php';
+global $airavataclient;
+global $transport;
+
+use Airavata\API\Error\AiravataClientException;
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\API\Error\InvalidRequestException;
+
+use Airavata\Model\AppCatalog\AppInterface\ApplicationInterfaceDescription;
+
+try
+{
+    if ($argc != 4)
+    {
+        echo 'php registerApplicationInterface.php <appName> <appDescription>
<appModuleId>';
+    }
+    else
+    {
+        $appName = $argv[1];
+        $appDescription = $argv[2];
+        $appModuleId = $argv[3];
+
+        $appInterface = new ApplicationInterfaceDescription();
+        $appInterface->applicationName = $appName;
+        $appInterface->applicationDesription = $appDescription;
+
+        //Add the module provided in argument. If you would like to add multiple modules,
you may modify this script or
+        // use the updateAppInterface.php script
+        $appModuleList = array($appModuleId);
+        $appInterface->applicationModules=$appModuleList;
+        var_dump($appModuleList);
+
+        $appInterfaceId = $airavataclient->registerApplicationInterface($appInterface);
+
+        if ($appInterfaceId)
+        {
+            var_dump($appInterface);
+            echo "\n Application Interface $appInterfaceId is registered! \n    ";
+        }
+        else
+        {
+            echo "\n Failed to register application interface. \n";
+        }
+    }
+}
+catch (InvalidRequestException $ire)
+{
+    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
+}
+catch (AiravataClientException $ace)
+{
+    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
+}
+catch (AiravataSystemException $ase)
+{
+    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
+}
+catch (\Exception $e)
+{
+    echo 'Exception!<br><br>' . $e->getMessage();
+}
+
+$transport->close();
+
+?>
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/3b9fae4e/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerApplicationModule.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerApplicationModule.php
b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerApplicationModule.php
new file mode 100755
index 0000000..bd67ee8
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerApplicationModule.php
@@ -0,0 +1,67 @@
+<?php
+/**
+ * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant
way.
+ *  Contributions welcome to improve writing PHP Client Samples.
+ *
+ */
+include 'getAiravataClient.php';
+global $airavataclient;
+global $transport;
+
+use Airavata\API\Error\AiravataClientException;
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\API\Error\InvalidRequestException;
+
+use Airavata\Model\AppCatalog\AppDeployment\ApplicationModule;
+
+try
+{
+    if ($argc != 4)
+    {
+        echo 'php registerApplicationModule.php <appModuleName> <appModuleVersion>
<appModuleDescription>';
+    }
+    else
+    {
+        $appModuleName = $argv[1];
+        $appModuleVersion = $argv[2];
+        $appModuleDescription = $argv[3];
+
+        $appModule = new ApplicationModule();
+        $appModule->appModuleName = $appModuleName;
+        $appModule->appModuleVersion = $appModuleVersion;
+        $appModule->appModuleDescription = $appModuleDescription;
+
+        $appModuleId = $airavataclient->registerApplicationModule($appModule);
+
+        if ($appModuleId)
+        {
+            var_dump($appModule);
+            echo "Application Module $appModuleId is registered! \n    ";
+        }
+        else
+        {
+            echo "Failed to register application module. \n";
+        }
+    }
+}
+catch (InvalidRequestException $ire)
+{
+    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
+}
+catch (AiravataClientException $ace)
+{
+    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
+}
+catch (AiravataSystemException $ase)
+{
+    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
+}
+catch (\Exception $e)
+{
+    echo 'Exception!<br><br>' . $e->getMessage();
+}
+
+$transport->close();
+
+?>
+


Mime
View raw message