airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [05/10] airavata git commit: creating new branch for grouper integration
Date Thu, 07 Jul 2016 15:43:05 GMT
http://git-wip-us.apache.org/repos/asf/airavata/blob/70f85795/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Types.php
b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Types.php
index 61355c2..5ad921c 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Types.php
@@ -140,6 +140,10 @@ class Project {
   /**
    * @var string
    */
+  public $gatewayId = null;
+  /**
+   * @var string
+   */
   public $name = null;
   /**
    * @var string
@@ -170,18 +174,22 @@ class Project {
           'type' => TType::STRING,
           ),
         3 => array(
-          'var' => 'name',
+          'var' => 'gatewayId',
           'type' => TType::STRING,
           ),
         4 => array(
-          'var' => 'description',
+          'var' => 'name',
           'type' => TType::STRING,
           ),
         5 => array(
+          'var' => 'description',
+          'type' => TType::STRING,
+          ),
+        6 => array(
           'var' => 'creationTime',
           'type' => TType::I64,
           ),
-        6 => array(
+        7 => array(
           'var' => 'sharedUsers',
           'type' => TType::LST,
           'etype' => TType::STRING,
@@ -189,7 +197,7 @@ class Project {
             'type' => TType::STRING,
             ),
           ),
-        7 => array(
+        8 => array(
           'var' => 'sharedGroups',
           'type' => TType::LST,
           'etype' => TType::STRING,
@@ -206,6 +214,9 @@ class Project {
       if (isset($vals['owner'])) {
         $this->owner = $vals['owner'];
       }
+      if (isset($vals['gatewayId'])) {
+        $this->gatewayId = $vals['gatewayId'];
+      }
       if (isset($vals['name'])) {
         $this->name = $vals['name'];
       }
@@ -259,26 +270,33 @@ class Project {
           break;
         case 3:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->name);
+            $xfer += $input->readString($this->gatewayId);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 4:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->description);
+            $xfer += $input->readString($this->name);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 5:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->description);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
           if ($ftype == TType::I64) {
             $xfer += $input->readI64($this->creationTime);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 6:
+        case 7:
           if ($ftype == TType::LST) {
             $this->sharedUsers = array();
             $_size0 = 0;
@@ -295,7 +313,7 @@ class Project {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 7:
+        case 8:
           if ($ftype == TType::LST) {
             $this->sharedGroups = array();
             $_size6 = 0;
@@ -335,18 +353,23 @@ class Project {
       $xfer += $output->writeString($this->owner);
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->gatewayId !== null) {
+      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 3);
+      $xfer += $output->writeString($this->gatewayId);
+      $xfer += $output->writeFieldEnd();
+    }
     if ($this->name !== null) {
-      $xfer += $output->writeFieldBegin('name', TType::STRING, 3);
+      $xfer += $output->writeFieldBegin('name', TType::STRING, 4);
       $xfer += $output->writeString($this->name);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->description !== null) {
-      $xfer += $output->writeFieldBegin('description', TType::STRING, 4);
+      $xfer += $output->writeFieldBegin('description', TType::STRING, 5);
       $xfer += $output->writeString($this->description);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->creationTime !== null) {
-      $xfer += $output->writeFieldBegin('creationTime', TType::I64, 5);
+      $xfer += $output->writeFieldBegin('creationTime', TType::I64, 6);
       $xfer += $output->writeI64($this->creationTime);
       $xfer += $output->writeFieldEnd();
     }
@@ -354,7 +377,7 @@ class Project {
       if (!is_array($this->sharedUsers)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('sharedUsers', TType::LST, 6);
+      $xfer += $output->writeFieldBegin('sharedUsers', TType::LST, 7);
       {
         $output->writeListBegin(TType::STRING, count($this->sharedUsers));
         {
@@ -371,7 +394,7 @@ class Project {
       if (!is_array($this->sharedGroups)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('sharedGroups', TType::LST, 7);
+      $xfer += $output->writeFieldBegin('sharedGroups', TType::LST, 8);
       {
         $output->writeListBegin(TType::STRING, count($this->sharedGroups));
         {
@@ -397,36 +420,75 @@ class User {
   /**
    * @var string
    */
+  public $airavataInternalUserId = "DO_NOT_SET_AT_CLIENTS";
+  /**
+   * @var string
+   */
   public $userName = null;
   /**
-   * @var \Airavata\Model\Workspace\Group[]
+   * @var string
+   */
+  public $gatewayId = null;
+  /**
+   * @var string
+   */
+  public $firstName = null;
+  /**
+   * @var string
+   */
+  public $lastName = null;
+  /**
+   * @var string
    */
-  public $groupList = null;
+  public $email = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'userName',
+          'var' => 'airavataInternalUserId',
           'type' => TType::STRING,
           ),
         2 => array(
-          'var' => 'groupList',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\Airavata\Model\Workspace\Group',
-            ),
+          'var' => 'userName',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'gatewayId',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'firstName',
+          'type' => TType::STRING,
+          ),
+        5 => array(
+          'var' => 'lastName',
+          'type' => TType::STRING,
+          ),
+        6 => array(
+          'var' => 'email',
+          'type' => TType::STRING,
           ),
         );
     }
     if (is_array($vals)) {
+      if (isset($vals['airavataInternalUserId'])) {
+        $this->airavataInternalUserId = $vals['airavataInternalUserId'];
+      }
       if (isset($vals['userName'])) {
         $this->userName = $vals['userName'];
       }
-      if (isset($vals['groupList'])) {
-        $this->groupList = $vals['groupList'];
+      if (isset($vals['gatewayId'])) {
+        $this->gatewayId = $vals['gatewayId'];
+      }
+      if (isset($vals['firstName'])) {
+        $this->firstName = $vals['firstName'];
+      }
+      if (isset($vals['lastName'])) {
+        $this->lastName = $vals['lastName'];
+      }
+      if (isset($vals['email'])) {
+        $this->email = $vals['email'];
       }
     }
   }
@@ -452,25 +514,42 @@ class User {
       {
         case 1:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->userName);
+            $xfer += $input->readString($this->airavataInternalUserId);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 2:
-          if ($ftype == TType::LST) {
-            $this->groupList = array();
-            $_size14 = 0;
-            $_etype17 = 0;
-            $xfer += $input->readListBegin($_etype17, $_size14);
-            for ($_i18 = 0; $_i18 < $_size14; ++$_i18)
-            {
-              $elem19 = null;
-              $elem19 = new \Airavata\Model\Workspace\Group();
-              $xfer += $elem19->read($input);
-              $this->groupList []= $elem19;
-            }
-            $xfer += $input->readListEnd();
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->userName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->gatewayId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->firstName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->lastName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->email);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -488,26 +567,34 @@ class User {
   public function write($output) {
     $xfer = 0;
     $xfer += $output->writeStructBegin('User');
+    if ($this->airavataInternalUserId !== null) {
+      $xfer += $output->writeFieldBegin('airavataInternalUserId', TType::STRING, 1);
+      $xfer += $output->writeString($this->airavataInternalUserId);
+      $xfer += $output->writeFieldEnd();
+    }
     if ($this->userName !== null) {
-      $xfer += $output->writeFieldBegin('userName', TType::STRING, 1);
+      $xfer += $output->writeFieldBegin('userName', TType::STRING, 2);
       $xfer += $output->writeString($this->userName);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->groupList !== null) {
-      if (!is_array($this->groupList)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('groupList', TType::LST, 2);
-      {
-        $output->writeListBegin(TType::STRUCT, count($this->groupList));
-        {
-          foreach ($this->groupList as $iter20)
-          {
-            $xfer += $iter20->write($output);
-          }
-        }
-        $output->writeListEnd();
-      }
+    if ($this->gatewayId !== null) {
+      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 3);
+      $xfer += $output->writeString($this->gatewayId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->firstName !== null) {
+      $xfer += $output->writeFieldBegin('firstName', TType::STRING, 4);
+      $xfer += $output->writeString($this->firstName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->lastName !== null) {
+      $xfer += $output->writeFieldBegin('lastName', TType::STRING, 5);
+      $xfer += $output->writeString($this->lastName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->email !== null) {
+      $xfer += $output->writeFieldBegin('email', TType::STRING, 6);
+      $xfer += $output->writeString($this->email);
       $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();

http://git-wip-us.apache.org/repos/asf/airavata/blob/70f85795/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 a0dd723..aa94dce 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
@@ -165,6 +165,9 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
   print('  string registerReplicaLocation(AuthzToken authzToken, DataReplicaLocationModel
replicaLocationModel)')
   print('  DataProductModel getParentDataProduct(AuthzToken authzToken, string productUri)')
   print('   getChildDataProducts(AuthzToken authzToken, string productUri)')
+  print('  bool shareResourceWithUsers(AuthzToken authzToken, string resourceId, ResourceType
resourceType,  userPermissionList)')
+  print('  bool revokeSharingOfResourceFromUsers(AuthzToken authzToken, string resourceId,
ResourceType resourceType,  userPermissionList)')
+  print('   getAllAccessibleUsers(AuthzToken authzToken, string resourceId, ResourceType
resourceType, ResourcePermissionType permissionType)')
   print('')
   sys.exit(0)
 
@@ -1067,6 +1070,24 @@ elif cmd == 'getChildDataProducts':
     sys.exit(1)
   pp.pprint(client.getChildDataProducts(eval(args[0]),args[1],))
 
+elif cmd == 'shareResourceWithUsers':
+  if len(args) != 4:
+    print('shareResourceWithUsers requires 4 args')
+    sys.exit(1)
+  pp.pprint(client.shareResourceWithUsers(eval(args[0]),args[1],eval(args[2]),eval(args[3]),))
+
+elif cmd == 'revokeSharingOfResourceFromUsers':
+  if len(args) != 4:
+    print('revokeSharingOfResourceFromUsers requires 4 args')
+    sys.exit(1)
+  pp.pprint(client.revokeSharingOfResourceFromUsers(eval(args[0]),args[1],eval(args[2]),eval(args[3]),))
+
+elif cmd == 'getAllAccessibleUsers':
+  if len(args) != 4:
+    print('getAllAccessibleUsers requires 4 args')
+    sys.exit(1)
+  pp.pprint(client.getAllAccessibleUsers(eval(args[0]),args[1],eval(args[2]),eval(args[3]),))
+
 else:
   print('Unrecognized method %s' % cmd)
   sys.exit(1)


Mime
View raw message