You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2018/10/02 18:41:19 UTC

[airavata-php-gateway] 03/03: Merge branch 'iu-ldap-cybergateway-group' into develop

This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-php-gateway.git

commit 6e9f81a2c9a523a84929ad0704d4d97f7a63edbc
Merge: 4fa37a3 12c9c9b
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Tue Oct 2 14:31:12 2018 -0400

    Merge branch 'iu-ldap-cybergateway-group' into develop

 app/libraries/Airavata/API/Airavata.php | 381 ++++++++++++++++++++++++++++++++
 app/libraries/URPUtilities.php          |  13 +-
 2 files changed, 393 insertions(+), 1 deletion(-)

diff --cc app/libraries/Airavata/API/Airavata.php
index c8b5301,30fecc2..7786c2b
--- a/app/libraries/Airavata/API/Airavata.php
+++ b/app/libraries/Airavata/API/Airavata.php
@@@ -4129,67 -4139,10 +4142,69 @@@ interface AiravataIf 
     * @throws \Airavata\API\Error\AiravataSystemException
     * @throws \Airavata\API\Error\AuthorizationException
     */
 -  public function createGroup(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Group\GroupModel $groupModel);
 +  public function createGroupResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile $groupResourceProfile);
 +  /**
 +   * @param \Airavata\Model\Security\AuthzToken $authzToken
 +   * @param \Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile $groupResourceProfile
 +   * @throws \Airavata\API\Error\InvalidRequestException
 +   * @throws \Airavata\API\Error\AiravataClientException
 +   * @throws \Airavata\API\Error\AiravataSystemException
 +   * @throws \Airavata\API\Error\AuthorizationException
 +   */
 +  public function updateGroupResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile $groupResourceProfile);
 +  /**
 +   * @param \Airavata\Model\Security\AuthzToken $authzToken
 +   * @param string $groupResourceProfileId
 +   * @return \Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile Group Resource Profile
 +   * 
 +   * gatewayID:
 +   *  Unique identifier for the gateway assigned by Airavata. Corelate this to Airavata Admin API Gateway Registration.
 +   * 
 +   * groupResourceProfileId:
 +   * 
 +   * computeResourcePreferences:
 +   *  List of resource preferences for each of the registered compute resources.
 +   * 
 +   * computeResourcePolicies:
 +   *  List of enforced policies for each of the registered compute resources.
 +   * 
 +   * batchQueueResourcePolicies:
 +   *  List of enforced policies on registered batch queues
 +   * 
++   * defaultCredentialStoreToken:
++   *  The default credential store token to use for compute resources that don't specify a resource specific credential store token.
 +   * 
 +   * 
 +   * @throws \Airavata\API\Error\InvalidRequestException
 +   * @throws \Airavata\API\Error\AiravataClientException
 +   * @throws \Airavata\API\Error\AiravataSystemException
 +   * @throws \Airavata\API\Error\AuthorizationException
 +   */
 +  public function getGroupResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $groupResourceProfileId);
 +  /**
 +   * @param \Airavata\Model\Security\AuthzToken $authzToken
 +   * @param string $groupResourceProfileId
 +   * @return bool
 +   * @throws \Airavata\API\Error\InvalidRequestException
 +   * @throws \Airavata\API\Error\AiravataClientException
 +   * @throws \Airavata\API\Error\AiravataSystemException
 +   * @throws \Airavata\API\Error\AuthorizationException
 +   */
 +  public function removeGroupResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $groupResourceProfileId);
 +  /**
 +   * @param \Airavata\Model\Security\AuthzToken $authzToken
 +   * @param string $gatewayId
 +   * @return \Airavata\Model\AppCatalog\GroupResourceProfile\GroupResourceProfile[]
 +   * @throws \Airavata\API\Error\InvalidRequestException
 +   * @throws \Airavata\API\Error\AiravataClientException
 +   * @throws \Airavata\API\Error\AiravataSystemException
 +   * @throws \Airavata\API\Error\AuthorizationException
 +   */
 +  public function getGroupResourceList(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId);
    /**
     * @param \Airavata\Model\Security\AuthzToken $authzToken
 -   * @param \Airavata\Model\Group\GroupModel $groupModel
 +   * @param string $computeResourceId
 +   * @param string $groupResourceProfileId
     * @return bool
     * @throws \Airavata\API\Error\InvalidRequestException
     * @throws \Airavata\API\Error\AiravataClientException
@@@ -57616,12 -52071,321 +57696,313 @@@ class Airavata_doesUserHaveSSHAccount_r
  
    public function write($output) {
      $xfer = 0;
 -    $xfer += $output->writeStructBegin('Airavata_getGatewayResourceProfile_result');
 +    $xfer += $output->writeStructBegin('Airavata_doesUserHaveSSHAccount_result');
      if ($this->success !== null) {
 -      if (!is_object($this->success)) {
 -        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
 -      }
 -      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
 -      $xfer += $this->success->write($output);
 +      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
 +      $xfer += $output->writeBool($this->success);
        $xfer += $output->writeFieldEnd();
      }
+     if ($this->ire !== null) {
+       $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+       $xfer += $this->ire->write($output);
+       $xfer += $output->writeFieldEnd();
+     }
+     if ($this->ace !== null) {
+       $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+       $xfer += $this->ace->write($output);
+       $xfer += $output->writeFieldEnd();
+     }
+     if ($this->ase !== null) {
+       $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+       $xfer += $this->ase->write($output);
+       $xfer += $output->writeFieldEnd();
+     }
+     if ($this->ae !== null) {
+       $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 4);
+       $xfer += $this->ae->write($output);
+       $xfer += $output->writeFieldEnd();
+     }
+     $xfer += $output->writeFieldStop();
+     $xfer += $output->writeStructEnd();
+     return $xfer;
+   }
+ 
+ }
+ 
 -class Airavata_updateGatewayResourceProfile_args {
++class Airavata_isSSHSetupCompleteForUserComputeResourcePreference_args {
+   static $_TSPEC;
+ 
+   /**
+    * @var \Airavata\Model\Security\AuthzToken
+    */
+   public $authzToken = null;
+   /**
+    * @var string
+    */
 -  public $gatewayID = null;
++  public $computeResourceId = null;
+   /**
 -   * @var \Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile
++   * @var string
+    */
 -  public $gatewayResourceProfile = null;
++  public $airavataCredStoreToken = null;
+ 
+   public function __construct($vals=null) {
+     if (!isset(self::$_TSPEC)) {
+       self::$_TSPEC = array(
+         1 => array(
+           'var' => 'authzToken',
+           'type' => TType::STRUCT,
+           'class' => '\Airavata\Model\Security\AuthzToken',
+           ),
+         2 => array(
 -          'var' => 'gatewayID',
++          'var' => 'computeResourceId',
+           'type' => TType::STRING,
+           ),
+         3 => array(
 -          'var' => 'gatewayResourceProfile',
 -          'type' => TType::STRUCT,
 -          'class' => '\Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile',
++          'var' => 'airavataCredStoreToken',
++          'type' => TType::STRING,
+           ),
+         );
+     }
+     if (is_array($vals)) {
+       if (isset($vals['authzToken'])) {
+         $this->authzToken = $vals['authzToken'];
+       }
 -      if (isset($vals['gatewayID'])) {
 -        $this->gatewayID = $vals['gatewayID'];
++      if (isset($vals['computeResourceId'])) {
++        $this->computeResourceId = $vals['computeResourceId'];
+       }
 -      if (isset($vals['gatewayResourceProfile'])) {
 -        $this->gatewayResourceProfile = $vals['gatewayResourceProfile'];
++      if (isset($vals['airavataCredStoreToken'])) {
++        $this->airavataCredStoreToken = $vals['airavataCredStoreToken'];
+       }
+     }
+   }
+ 
+   public function getName() {
 -    return 'Airavata_updateGatewayResourceProfile_args';
++    return 'Airavata_isSSHSetupCompleteForUserComputeResourcePreference_args';
+   }
+ 
+   public function read($input)
+   {
+     $xfer = 0;
+     $fname = null;
+     $ftype = 0;
+     $fid = 0;
+     $xfer += $input->readStructBegin($fname);
+     while (true)
+     {
+       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+       if ($ftype == TType::STOP) {
+         break;
+       }
+       switch ($fid)
+       {
+         case 1:
+           if ($ftype == TType::STRUCT) {
+             $this->authzToken = new \Airavata\Model\Security\AuthzToken();
+             $xfer += $this->authzToken->read($input);
+           } else {
+             $xfer += $input->skip($ftype);
+           }
+           break;
+         case 2:
+           if ($ftype == TType::STRING) {
 -            $xfer += $input->readString($this->gatewayID);
++            $xfer += $input->readString($this->computeResourceId);
+           } else {
+             $xfer += $input->skip($ftype);
+           }
+           break;
+         case 3:
 -          if ($ftype == TType::STRUCT) {
 -            $this->gatewayResourceProfile = new \Airavata\Model\AppCatalog\GatewayProfile\GatewayResourceProfile();
 -            $xfer += $this->gatewayResourceProfile->read($input);
++          if ($ftype == TType::STRING) {
++            $xfer += $input->readString($this->airavataCredStoreToken);
+           } else {
+             $xfer += $input->skip($ftype);
+           }
+           break;
+         default:
+           $xfer += $input->skip($ftype);
+           break;
+       }
+       $xfer += $input->readFieldEnd();
+     }
+     $xfer += $input->readStructEnd();
+     return $xfer;
+   }
+ 
+   public function write($output) {
+     $xfer = 0;
 -    $xfer += $output->writeStructBegin('Airavata_updateGatewayResourceProfile_args');
++    $xfer += $output->writeStructBegin('Airavata_isSSHSetupCompleteForUserComputeResourcePreference_args');
+     if ($this->authzToken !== null) {
+       if (!is_object($this->authzToken)) {
+         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+       }
+       $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
+       $xfer += $this->authzToken->write($output);
+       $xfer += $output->writeFieldEnd();
+     }
 -    if ($this->gatewayID !== null) {
 -      $xfer += $output->writeFieldBegin('gatewayID', TType::STRING, 2);
 -      $xfer += $output->writeString($this->gatewayID);
++    if ($this->computeResourceId !== null) {
++      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 2);
++      $xfer += $output->writeString($this->computeResourceId);
+       $xfer += $output->writeFieldEnd();
+     }
 -    if ($this->gatewayResourceProfile !== null) {
 -      if (!is_object($this->gatewayResourceProfile)) {
 -        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
 -      }
 -      $xfer += $output->writeFieldBegin('gatewayResourceProfile', TType::STRUCT, 3);
 -      $xfer += $this->gatewayResourceProfile->write($output);
++    if ($this->airavataCredStoreToken !== null) {
++      $xfer += $output->writeFieldBegin('airavataCredStoreToken', TType::STRING, 3);
++      $xfer += $output->writeString($this->airavataCredStoreToken);
+       $xfer += $output->writeFieldEnd();
+     }
+     $xfer += $output->writeFieldStop();
+     $xfer += $output->writeStructEnd();
+     return $xfer;
+   }
+ 
+ }
+ 
 -class Airavata_updateGatewayResourceProfile_result {
++class Airavata_isSSHSetupCompleteForUserComputeResourcePreference_result {
+   static $_TSPEC;
+ 
+   /**
+    * @var bool
+    */
+   public $success = null;
+   /**
+    * @var \Airavata\API\Error\InvalidRequestException
+    */
+   public $ire = null;
+   /**
+    * @var \Airavata\API\Error\AiravataClientException
+    */
+   public $ace = null;
+   /**
+    * @var \Airavata\API\Error\AiravataSystemException
+    */
+   public $ase = null;
+   /**
+    * @var \Airavata\API\Error\AuthorizationException
+    */
+   public $ae = null;
+ 
+   public function __construct($vals=null) {
+     if (!isset(self::$_TSPEC)) {
+       self::$_TSPEC = array(
+         0 => array(
+           'var' => 'success',
+           'type' => TType::BOOL,
+           ),
+         1 => array(
+           'var' => 'ire',
+           'type' => TType::STRUCT,
+           'class' => '\Airavata\API\Error\InvalidRequestException',
+           ),
+         2 => array(
+           'var' => 'ace',
+           'type' => TType::STRUCT,
+           'class' => '\Airavata\API\Error\AiravataClientException',
+           ),
+         3 => array(
+           'var' => 'ase',
+           'type' => TType::STRUCT,
+           'class' => '\Airavata\API\Error\AiravataSystemException',
+           ),
+         4 => array(
+           'var' => 'ae',
+           'type' => TType::STRUCT,
+           'class' => '\Airavata\API\Error\AuthorizationException',
+           ),
+         );
+     }
+     if (is_array($vals)) {
+       if (isset($vals['success'])) {
+         $this->success = $vals['success'];
+       }
+       if (isset($vals['ire'])) {
+         $this->ire = $vals['ire'];
+       }
+       if (isset($vals['ace'])) {
+         $this->ace = $vals['ace'];
+       }
+       if (isset($vals['ase'])) {
+         $this->ase = $vals['ase'];
+       }
+       if (isset($vals['ae'])) {
+         $this->ae = $vals['ae'];
+       }
+     }
+   }
+ 
+   public function getName() {
 -    return 'Airavata_updateGatewayResourceProfile_result';
++    return 'Airavata_isSSHSetupCompleteForUserComputeResourcePreference_result';
+   }
+ 
+   public function read($input)
+   {
+     $xfer = 0;
+     $fname = null;
+     $ftype = 0;
+     $fid = 0;
+     $xfer += $input->readStructBegin($fname);
+     while (true)
+     {
+       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+       if ($ftype == TType::STOP) {
+         break;
+       }
+       switch ($fid)
+       {
+         case 0:
+           if ($ftype == TType::BOOL) {
+             $xfer += $input->readBool($this->success);
+           } else {
+             $xfer += $input->skip($ftype);
+           }
+           break;
+         case 1:
+           if ($ftype == TType::STRUCT) {
+             $this->ire = new \Airavata\API\Error\InvalidRequestException();
+             $xfer += $this->ire->read($input);
+           } else {
+             $xfer += $input->skip($ftype);
+           }
+           break;
+         case 2:
+           if ($ftype == TType::STRUCT) {
+             $this->ace = new \Airavata\API\Error\AiravataClientException();
+             $xfer += $this->ace->read($input);
+           } else {
+             $xfer += $input->skip($ftype);
+           }
+           break;
+         case 3:
+           if ($ftype == TType::STRUCT) {
+             $this->ase = new \Airavata\API\Error\AiravataSystemException();
+             $xfer += $this->ase->read($input);
+           } else {
+             $xfer += $input->skip($ftype);
+           }
+           break;
+         case 4:
+           if ($ftype == TType::STRUCT) {
+             $this->ae = new \Airavata\API\Error\AuthorizationException();
+             $xfer += $this->ae->read($input);
+           } else {
+             $xfer += $input->skip($ftype);
+           }
+           break;
+         default:
+           $xfer += $input->skip($ftype);
+           break;
+       }
+       $xfer += $input->readFieldEnd();
+     }
+     $xfer += $input->readStructEnd();
+     return $xfer;
+   }
+ 
+   public function write($output) {
+     $xfer = 0;
 -    $xfer += $output->writeStructBegin('Airavata_updateGatewayResourceProfile_result');
++    $xfer += $output->writeStructBegin('Airavata_isSSHSetupCompleteForUserComputeResourcePreference_result');
+     if ($this->success !== null) {
+       $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+       $xfer += $output->writeBool($this->success);
+       $xfer += $output->writeFieldEnd();
+     }
      if ($this->ire !== null) {
        $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
        $xfer += $this->ire->write($output);