airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject [03/55] [abbrv] airavata git commit: adding replica catalog related API methods
Date Fri, 25 Mar 2016 21:22:26 GMT
http://git-wip-us.apache.org/repos/asf/airavata/blob/6c5645d3/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
index 64a406c..49fdf5a 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
@@ -717,13 +717,13 @@ class LOCALSubmission {
    */
   public $jobSubmissionInterfaceId = "DO_NOT_SET_AT_CLIENTS";
   /**
-   * @var int
-   */
-  public $securityProtocol = null;
-  /**
    * @var \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager
    */
   public $resourceJobManager = null;
+  /**
+   * @var int
+   */
+  public $securityProtocol = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -733,26 +733,26 @@ class LOCALSubmission {
           'type' => TType::STRING,
           ),
         2 => array(
-          'var' => 'securityProtocol',
-          'type' => TType::I32,
-          ),
-        3 => array(
           'var' => 'resourceJobManager',
           'type' => TType::STRUCT,
           'class' => '\Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager',
           ),
+        3 => array(
+          'var' => 'securityProtocol',
+          'type' => TType::I32,
+          ),
         );
     }
     if (is_array($vals)) {
       if (isset($vals['jobSubmissionInterfaceId'])) {
         $this->jobSubmissionInterfaceId = $vals['jobSubmissionInterfaceId'];
       }
-      if (isset($vals['securityProtocol'])) {
-        $this->securityProtocol = $vals['securityProtocol'];
-      }
       if (isset($vals['resourceJobManager'])) {
         $this->resourceJobManager = $vals['resourceJobManager'];
       }
+      if (isset($vals['securityProtocol'])) {
+        $this->securityProtocol = $vals['securityProtocol'];
+      }
     }
   }
 
@@ -783,16 +783,16 @@ class LOCALSubmission {
           }
           break;
         case 2:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->securityProtocol);
+          if ($ftype == TType::STRUCT) {
+            $this->resourceJobManager = new \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager();
+            $xfer += $this->resourceJobManager->read($input);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 3:
-          if ($ftype == TType::STRUCT) {
-            $this->resourceJobManager = new \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager();
-            $xfer += $this->resourceJobManager->read($input);
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->securityProtocol);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -815,19 +815,19 @@ class LOCALSubmission {
       $xfer += $output->writeString($this->jobSubmissionInterfaceId);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->securityProtocol !== null) {
-      $xfer += $output->writeFieldBegin('securityProtocol', TType::I32, 2);
-      $xfer += $output->writeI32($this->securityProtocol);
-      $xfer += $output->writeFieldEnd();
-    }
     if ($this->resourceJobManager !== null) {
       if (!is_object($this->resourceJobManager)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('resourceJobManager', TType::STRUCT, 3);
+      $xfer += $output->writeFieldBegin('resourceJobManager', TType::STRUCT, 2);
       $xfer += $this->resourceJobManager->write($output);
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->securityProtocol !== null) {
+      $xfer += $output->writeFieldBegin('securityProtocol', TType::I32, 3);
+      $xfer += $output->writeI32($this->securityProtocol);
+      $xfer += $output->writeFieldEnd();
+    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;

http://git-wip-us.apache.org/repos/asf/airavata/blob/6c5645d3/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata-remote
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata-remote
b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata-remote
index 20d9399..ac42357 100755
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata-remote
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata-remote
@@ -158,6 +158,9 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
   print('  void updateWorkflow(AuthzToken authzToken, string workflowTemplateId, WorkflowModel
workflow)')
   print('  string getWorkflowTemplateId(AuthzToken authzToken, string workflowName)')
   print('  bool isWorkflowExistWithName(AuthzToken authzToken, string workflowName)')
+  print('  string registerDataProduct(AuthzToken authzToken, DataProductModel dataProductModel)')
+  print('  DataProductModel getDataProduct(AuthzToken authzToken, string dataProductUri)')
+  print('  string registerReplicaLocation(AuthzToken authzToken, DataReplicaLocationModel
replicaLocationModel)')
   print('')
   sys.exit(0)
 
@@ -1018,6 +1021,24 @@ elif cmd == 'isWorkflowExistWithName':
     sys.exit(1)
   pp.pprint(client.isWorkflowExistWithName(eval(args[0]),args[1],))
 
+elif cmd == 'registerDataProduct':
+  if len(args) != 2:
+    print('registerDataProduct requires 2 args')
+    sys.exit(1)
+  pp.pprint(client.registerDataProduct(eval(args[0]),eval(args[1]),))
+
+elif cmd == 'getDataProduct':
+  if len(args) != 2:
+    print('getDataProduct requires 2 args')
+    sys.exit(1)
+  pp.pprint(client.getDataProduct(eval(args[0]),args[1],))
+
+elif cmd == 'registerReplicaLocation':
+  if len(args) != 2:
+    print('registerReplicaLocation requires 2 args')
+    sys.exit(1)
+  pp.pprint(client.registerReplicaLocation(eval(args[0]),eval(args[1]),))
+
 else:
   print('Unrecognized method %s' % cmd)
   sys.exit(1)


Mime
View raw message