http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/375afaf5/app/libraries/Airavata/API/Error/Types.php ---------------------------------------------------------------------- diff --git a/app/libraries/Airavata/API/Error/Types.php b/app/libraries/Airavata/API/Error/Types.php index de30884..7d26178 100644 --- a/app/libraries/Airavata/API/Error/Types.php +++ b/app/libraries/Airavata/API/Error/Types.php @@ -2,7 +2,7 @@ namespace Airavata\API\Error; /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.2) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -17,6 +17,25 @@ use Thrift\Protocol\TBinaryProtocolAccelerated; use Thrift\Exception\TApplicationException; +/** + * A list of Airavata API Error Message Types + * + * UNKNOWN: No information available about the error + * + * PERMISSION_DENIED: Not permitted to perform action + * + * INTERNAL_ERROR: Unexpected problem with the service + * + * AUTHENTICATION_FAILURE: The client failed to authenticate. + * + * INVALID_AUTHORIZATION: Security Token and/or Username and/or password is incorrect + * + * AUTHORIZATION_EXPIRED: Authentication token expired + * + * UNKNOWN_GATEWAY_ID: The gateway is not registered with Airavata. + * + * UNSUPPORTED_OPERATION: Operation denied because it is currently unsupported. + */ final class AiravataErrorType { const UNKNOWN = 0; const PERMISSION_DENIED = 1; @@ -38,9 +57,19 @@ final class AiravataErrorType { ); } +/** + * This exception is thrown when a client asks to perform an operation on an experiment that does not exist. + * + * identifier: A description of the experiment that was not found on the server. + * + * key: The value passed from the client in the identifier, which was not found. + */ class ExperimentNotFoundException extends TException { static $_TSPEC; + /** + * @var string + */ public $message = null; public function __construct($vals=null) { @@ -110,9 +139,17 @@ class ExperimentNotFoundException extends TException { } +/** + * 1: optional string identifier, + * 2: optional string key + * + */ class ProjectNotFoundException extends TException { static $_TSPEC; + /** + * @var string + */ public $message = null; public function __construct($vals=null) { @@ -182,9 +219,18 @@ class ProjectNotFoundException extends TException { } +/** + * This exception is thrown for invalid requests that occur from any reasons like required input parameters are missing, + * or a parameter is malformed. + * + * message: contains the associated error message. + */ class InvalidRequestException extends TException { static $_TSPEC; + /** + * @var string + */ public $message = null; public function __construct($vals=null) { @@ -254,6 +300,9 @@ class InvalidRequestException extends TException { } +/** + * This exception is thrown when RPC timeout gets exceeded. + */ class TimedOutException extends TException { static $_TSPEC; @@ -304,9 +353,17 @@ class TimedOutException extends TException { } +/** + * This exception is thrown for invalid authentication requests. + * + * message: contains the cause of the authorization failure. + */ class AuthenticationException extends TException { static $_TSPEC; + /** + * @var string + */ public $message = null; public function __construct($vals=null) { @@ -376,9 +433,17 @@ class AuthenticationException extends TException { } +/** + * This exception is thrown for invalid authorization requests such user does not have acces to an aplication or resource. + * + * message: contains the authorization failure message + */ class AuthorizationException extends TException { static $_TSPEC; + /** + * @var string + */ public $message = null; public function __construct($vals=null) { @@ -448,10 +513,31 @@ class AuthorizationException extends TException { } +/** + * This exception is thrown by Airavata Services when a call fails as a result of + * a problem that a client may be able to resolve. For example, if the user + * attempts to execute an application on a resource gateway does not have access to. + * + * This exception would not be used for internal system errors that do not + * reflect user actions, but rather reflect a problem within the service that + * the client cannot resolve. + * + * airavataErrorType: The message type indicating the error that occurred. + * must be one of the values of AiravataErrorType. + * + * parameter: If the error applied to a particular input parameter, this will + * indicate which parameter. + */ class AiravataClientException extends TException { static $_TSPEC; + /** + * @var int + */ public $airavataErrorType = null; + /** + * @var string + */ public $parameter = null; public function __construct($vals=null) { @@ -543,7 +629,13 @@ class AiravataClientException extends TException { class ValidatorResult { static $_TSPEC; + /** + * @var bool + */ public $result = null; + /** + * @var string + */ public $errorDetails = null; public function __construct($vals=null) { @@ -635,7 +727,13 @@ class ValidatorResult { class ValidationResults { static $_TSPEC; + /** + * @var bool + */ public $validationState = null; + /** + * @var \Airavata\API\Error\ValidatorResult[] + */ public $validationResultList = null; public function __construct($vals=null) { @@ -755,7 +853,13 @@ class ValidationResults { class LaunchValidationException extends TException { static $_TSPEC; + /** + * @var \Airavata\API\Error\ValidationResults + */ public $validationResult = null; + /** + * @var string + */ public $errorMessage = null; public function __construct($vals=null) { @@ -849,10 +953,26 @@ class LaunchValidationException extends TException { } +/** + * This exception is thrown by Airavata Services when a call fails as a result of + * a problem in the service that could not be changed through client's action. + * + * airavataErrorType: The message type indicating the error that occurred. + * must be one of the values of AiravataErrorType. + * + * message: This may contain additional information about the error + * + */ class AiravataSystemException extends TException { static $_TSPEC; + /** + * @var int + */ public $airavataErrorType = null; + /** + * @var string + */ public $message = null; public function __construct($vals=null) {
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/375afaf5/app/libraries/Airavata/API/Types.php ---------------------------------------------------------------------- diff --git a/app/libraries/Airavata/API/Types.php b/app/libraries/Airavata/API/Types.php index 481421f..7a574d4 100644 --- a/app/libraries/Airavata/API/Types.php +++ b/app/libraries/Airavata/API/Types.php @@ -2,7 +2,7 @@ namespace Airavata\API; /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.2) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -17,6 +17,26 @@ use Thrift\Protocol\TBinaryProtocolAccelerated; use Thrift\Exception\TApplicationException; -$GLOBALS['airavataAPI_CONSTANTS']['AIRAVATA_API_VERSION'] = "0.15.0"; +final class Constant extends \Thrift\Type\TConstant { + static protected $AIRAVATA_API_VERSION; + + static protected function init_AIRAVATA_API_VERSION() { + return /** + * Airavata Interface Versions depend upon this Thrift Interface File. When Making changes, please edit the + * Version Constants according to Semantic Versioning Specification (SemVer) http://semver.org. + * + * Note: The Airavata API version may be different from the Airavata software release versions. + * + * The Airavata API version is composed as a dot delimited string with major, minor, and patch level components. + * + * - Major: Incremented for backward incompatible changes. An example would be changes to interfaces. + * - Minor: Incremented for backward compatible changes. An example would be the addition of a new optional methods. + * - Patch: Incremented for bug fixes. The patch level should be increased for every edit that doesn't result + * in a change to major/minor version numbers. + * + */ +"0.15.0"; + } +} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/375afaf5/app/libraries/Airavata/Model/AppCatalog/AppDeployment/Types.php ---------------------------------------------------------------------- diff --git a/app/libraries/Airavata/Model/AppCatalog/AppDeployment/Types.php b/app/libraries/Airavata/Model/AppCatalog/AppDeployment/Types.php index f4bde8f..0b10708 100644 --- a/app/libraries/Airavata/Model/AppCatalog/AppDeployment/Types.php +++ b/app/libraries/Airavata/Model/AppCatalog/AppDeployment/Types.php @@ -2,7 +2,7 @@ namespace Airavata\Model\AppCatalog\AppDeployment; /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.2) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -17,6 +17,22 @@ use Thrift\Protocol\TBinaryProtocolAccelerated; use Thrift\Exception\TApplicationException; +/** + * Enumeration of application parallelism supported by Airavata + * + * SERIAL: + * Single processor applications without any parallelization. + * + * MPI: + * Messaging Passing Interface. + * + * OPENMP: + * Shared Memory Implementtaion. + * + * OPENMP_MPI: + * Hybrid Applications. + * + */ final class ApplicationParallelismType { const SERIAL = 0; const MPI = 1; @@ -30,10 +46,25 @@ final class ApplicationParallelismType { ); } +/** + * Key Value pairs to be used to set environments + * + * name: + * Name of the environment variable such as PATH, LD_LIBRARY_PATH, NETCDF_HOME. + * + * value: + * Value of the environment variable to set + */ class SetEnvPaths { static $_TSPEC; + /** + * @var string + */ public $name = null; + /** + * @var string + */ public $value = null; public function __construct($vals=null) { @@ -122,12 +153,39 @@ class SetEnvPaths { } +/** + * Application Module Information. A module has to be registered before registering a deployment. + * + * appModuleId: Airavata Internal Unique Job ID. This is set by the registry. + * + * appModuleName: + * Name of the application module. + * + * appModuleVersion: + * Version of the application. + * + * appModuleDescription: + * Descriprion of the Module + * + */ class ApplicationModule { static $_TSPEC; + /** + * @var string + */ public $appModuleId = "DO_NOT_SET_AT_CLIENTS"; + /** + * @var string + */ public $appModuleName = null; + /** + * @var string + */ public $appModuleVersion = null; + /** + * @var string + */ public $appModuleDescription = null; public function __construct($vals=null) { @@ -254,20 +312,82 @@ class ApplicationModule { } +/** + * Application Deployment Description + * + * appDeploymentId: Airavata Internal Unique Job ID. This is set by the registry. + * + * appModuleName: + * Application Module Name. This has to be precise describing the binary. + * + * computeHostId: + * This ID maps application deployment to a particular resource previously described within Airavata. + * Example: Stampede is first registered and refered when registering WRF. + * + * moduleLoadCmd: + * Command string to load modules. This will be placed in the job submisison + * Ex: module load amber + * + * libPrependPaths: + * prepend to a path variable the value + * + * libAppendPaths: + * append to a path variable the value + * + * setEnvironment: + * assigns to the environment variable "NAME" the value + * + */ class ApplicationDeploymentDescription { static $_TSPEC; + /** + * @var string + */ public $appDeploymentId = "DO_NOT_SET_AT_CLIENTS"; + /** + * @var string + */ public $appModuleId = null; + /** + * @var string + */ public $computeHostId = null; + /** + * @var string + */ public $executablePath = null; + /** + * @var int + */ public $parallelism = 0; + /** + * @var string + */ public $appDeploymentDescription = null; + /** + * @var string[] + */ public $moduleLoadCmds = null; + /** + * @var \Airavata\Model\AppCatalog\AppDeployment\SetEnvPaths[] + */ public $libPrependPaths = null; + /** + * @var \Airavata\Model\AppCatalog\AppDeployment\SetEnvPaths[] + */ public $libAppendPaths = null; + /** + * @var \Airavata\Model\AppCatalog\AppDeployment\SetEnvPaths[] + */ public $setEnvironment = null; + /** + * @var string[] + */ public $preJobCommands = null; + /** + * @var string[] + */ public $postJobCommands = null; public function __construct($vals=null) { @@ -708,6 +828,12 @@ class ApplicationDeploymentDescription { } -$GLOBALS['applicationDeploymentModel_CONSTANTS']['DEFAULT_ID'] = "DO_NOT_SET_AT_CLIENTS"; +final class Constant extends \Thrift\Type\TConstant { + static protected $DEFAULT_ID; + + static protected function init_DEFAULT_ID() { + return "DO_NOT_SET_AT_CLIENTS"; + } +} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/375afaf5/app/libraries/Airavata/Model/AppCatalog/AppInterface/Types.php ---------------------------------------------------------------------- diff --git a/app/libraries/Airavata/Model/AppCatalog/AppInterface/Types.php b/app/libraries/Airavata/Model/AppCatalog/AppInterface/Types.php index e6748f4..df31203 100644 --- a/app/libraries/Airavata/Model/AppCatalog/AppInterface/Types.php +++ b/app/libraries/Airavata/Model/AppCatalog/AppInterface/Types.php @@ -2,7 +2,7 @@ namespace Airavata\Model\AppCatalog\AppInterface; /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.2) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -17,535 +17,45 @@ use Thrift\Protocol\TBinaryProtocolAccelerated; use Thrift\Exception\TApplicationException; -final class DataType { - const STRING = 0; - const INTEGER = 1; - const FLOAT = 2; - const URI = 3; - const STDOUT = 4; - const STDERR = 5; - static public $__names = array( - 0 => 'STRING', - 1 => 'INTEGER', - 2 => 'FLOAT', - 3 => 'URI', - 4 => 'STDOUT', - 5 => 'STDERR', - ); -} - -class InputDataObjectType { - static $_TSPEC; - - public $name = null; - public $value = null; - public $type = null; - public $applicationArgument = null; - public $standardInput = false; - public $userFriendlyDescription = null; - public $metaData = null; - public $inputOrder = null; - public $isRequired = null; - public $requiredToAddedToCommandLine = null; - public $dataStaged = false; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'name', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'value', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'type', - 'type' => TType::I32, - ), - 4 => array( - 'var' => 'applicationArgument', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'standardInput', - 'type' => TType::BOOL, - ), - 6 => array( - 'var' => 'userFriendlyDescription', - 'type' => TType::STRING, - ), - 7 => array( - 'var' => 'metaData', - 'type' => TType::STRING, - ), - 8 => array( - 'var' => 'inputOrder', - 'type' => TType::I32, - ), - 9 => array( - 'var' => 'isRequired', - 'type' => TType::BOOL, - ), - 10 => array( - 'var' => 'requiredToAddedToCommandLine', - 'type' => TType::BOOL, - ), - 11 => array( - 'var' => 'dataStaged', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; - } - if (isset($vals['value'])) { - $this->value = $vals['value']; - } - if (isset($vals['type'])) { - $this->type = $vals['type']; - } - if (isset($vals['applicationArgument'])) { - $this->applicationArgument = $vals['applicationArgument']; - } - if (isset($vals['standardInput'])) { - $this->standardInput = $vals['standardInput']; - } - if (isset($vals['userFriendlyDescription'])) { - $this->userFriendlyDescription = $vals['userFriendlyDescription']; - } - if (isset($vals['metaData'])) { - $this->metaData = $vals['metaData']; - } - if (isset($vals['inputOrder'])) { - $this->inputOrder = $vals['inputOrder']; - } - if (isset($vals['isRequired'])) { - $this->isRequired = $vals['isRequired']; - } - if (isset($vals['requiredToAddedToCommandLine'])) { - $this->requiredToAddedToCommandLine = $vals['requiredToAddedToCommandLine']; - } - if (isset($vals['dataStaged'])) { - $this->dataStaged = $vals['dataStaged']; - } - } - } - - public function getName() { - return 'InputDataObjectType'; - } - - 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::STRING) { - $xfer += $input->readString($this->name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->value); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->type); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->applicationArgument); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->standardInput); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->userFriendlyDescription); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->metaData); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->inputOrder); - } else { - $xfer += $input->skip($ftype); - } - break; - case 9: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->isRequired); - } else { - $xfer += $input->skip($ftype); - } - break; - case 10: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->requiredToAddedToCommandLine); - } else { - $xfer += $input->skip($ftype); - } - break; - case 11: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->dataStaged); - } 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('InputDataObjectType'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); - $xfer += $output->writeFieldEnd(); - } - if ($this->value !== null) { - $xfer += $output->writeFieldBegin('value', TType::STRING, 2); - $xfer += $output->writeString($this->value); - $xfer += $output->writeFieldEnd(); - } - if ($this->type !== null) { - $xfer += $output->writeFieldBegin('type', TType::I32, 3); - $xfer += $output->writeI32($this->type); - $xfer += $output->writeFieldEnd(); - } - if ($this->applicationArgument !== null) { - $xfer += $output->writeFieldBegin('applicationArgument', TType::STRING, 4); - $xfer += $output->writeString($this->applicationArgument); - $xfer += $output->writeFieldEnd(); - } - if ($this->standardInput !== null) { - $xfer += $output->writeFieldBegin('standardInput', TType::BOOL, 5); - $xfer += $output->writeBool($this->standardInput); - $xfer += $output->writeFieldEnd(); - } - if ($this->userFriendlyDescription !== null) { - $xfer += $output->writeFieldBegin('userFriendlyDescription', TType::STRING, 6); - $xfer += $output->writeString($this->userFriendlyDescription); - $xfer += $output->writeFieldEnd(); - } - if ($this->metaData !== null) { - $xfer += $output->writeFieldBegin('metaData', TType::STRING, 7); - $xfer += $output->writeString($this->metaData); - $xfer += $output->writeFieldEnd(); - } - if ($this->inputOrder !== null) { - $xfer += $output->writeFieldBegin('inputOrder', TType::I32, 8); - $xfer += $output->writeI32($this->inputOrder); - $xfer += $output->writeFieldEnd(); - } - if ($this->isRequired !== null) { - $xfer += $output->writeFieldBegin('isRequired', TType::BOOL, 9); - $xfer += $output->writeBool($this->isRequired); - $xfer += $output->writeFieldEnd(); - } - if ($this->requiredToAddedToCommandLine !== null) { - $xfer += $output->writeFieldBegin('requiredToAddedToCommandLine', TType::BOOL, 10); - $xfer += $output->writeBool($this->requiredToAddedToCommandLine); - $xfer += $output->writeFieldEnd(); - } - if ($this->dataStaged !== null) { - $xfer += $output->writeFieldBegin('dataStaged', TType::BOOL, 11); - $xfer += $output->writeBool($this->dataStaged); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class OutputDataObjectType { - static $_TSPEC; - - public $name = null; - public $value = null; - public $type = null; - public $applicationArgument = null; - public $isRequired = null; - public $requiredToAddedToCommandLine = null; - public $dataMovement = null; - public $location = null; - public $searchQuery = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'name', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'value', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'type', - 'type' => TType::I32, - ), - 4 => array( - 'var' => 'applicationArgument', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'isRequired', - 'type' => TType::BOOL, - ), - 6 => array( - 'var' => 'requiredToAddedToCommandLine', - 'type' => TType::BOOL, - ), - 7 => array( - 'var' => 'dataMovement', - 'type' => TType::BOOL, - ), - 8 => array( - 'var' => 'location', - 'type' => TType::STRING, - ), - 9 => array( - 'var' => 'searchQuery', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; - } - if (isset($vals['value'])) { - $this->value = $vals['value']; - } - if (isset($vals['type'])) { - $this->type = $vals['type']; - } - if (isset($vals['applicationArgument'])) { - $this->applicationArgument = $vals['applicationArgument']; - } - if (isset($vals['isRequired'])) { - $this->isRequired = $vals['isRequired']; - } - if (isset($vals['requiredToAddedToCommandLine'])) { - $this->requiredToAddedToCommandLine = $vals['requiredToAddedToCommandLine']; - } - if (isset($vals['dataMovement'])) { - $this->dataMovement = $vals['dataMovement']; - } - if (isset($vals['location'])) { - $this->location = $vals['location']; - } - if (isset($vals['searchQuery'])) { - $this->searchQuery = $vals['searchQuery']; - } - } - } - - public function getName() { - return 'OutputDataObjectType'; - } - - 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::STRING) { - $xfer += $input->readString($this->name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->value); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->type); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->applicationArgument); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->isRequired); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->requiredToAddedToCommandLine); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->dataMovement); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->location); - } else { - $xfer += $input->skip($ftype); - } - break; - case 9: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->searchQuery); - } 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('OutputDataObjectType'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); - $xfer += $output->writeFieldEnd(); - } - if ($this->value !== null) { - $xfer += $output->writeFieldBegin('value', TType::STRING, 2); - $xfer += $output->writeString($this->value); - $xfer += $output->writeFieldEnd(); - } - if ($this->type !== null) { - $xfer += $output->writeFieldBegin('type', TType::I32, 3); - $xfer += $output->writeI32($this->type); - $xfer += $output->writeFieldEnd(); - } - if ($this->applicationArgument !== null) { - $xfer += $output->writeFieldBegin('applicationArgument', TType::STRING, 4); - $xfer += $output->writeString($this->applicationArgument); - $xfer += $output->writeFieldEnd(); - } - if ($this->isRequired !== null) { - $xfer += $output->writeFieldBegin('isRequired', TType::BOOL, 5); - $xfer += $output->writeBool($this->isRequired); - $xfer += $output->writeFieldEnd(); - } - if ($this->requiredToAddedToCommandLine !== null) { - $xfer += $output->writeFieldBegin('requiredToAddedToCommandLine', TType::BOOL, 6); - $xfer += $output->writeBool($this->requiredToAddedToCommandLine); - $xfer += $output->writeFieldEnd(); - } - if ($this->dataMovement !== null) { - $xfer += $output->writeFieldBegin('dataMovement', TType::BOOL, 7); - $xfer += $output->writeBool($this->dataMovement); - $xfer += $output->writeFieldEnd(); - } - if ($this->location !== null) { - $xfer += $output->writeFieldBegin('location', TType::STRING, 8); - $xfer += $output->writeString($this->location); - $xfer += $output->writeFieldEnd(); - } - if ($this->searchQuery !== null) { - $xfer += $output->writeFieldBegin('searchQuery', TType::STRING, 9); - $xfer += $output->writeString($this->searchQuery); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - +/** + * Application Interface Description + * + * applicationModules: + * Associate all application modules with versions which interface is applicable to. + * + * applicationInputs: + * Inputs to be passed to the application + * + * applicationOutputs: + * Outputs generated from the application + * + */ class ApplicationInterfaceDescription { static $_TSPEC; + /** + * @var string + */ public $applicationInterfaceId = "DO_NOT_SET_AT_CLIENTS"; + /** + * @var string + */ public $applicationName = null; + /** + * @var string + */ public $applicationDescription = null; + /** + * @var string[] + */ public $applicationModules = null; + /** + * @var \Airavata\Model\Application\Io\InputDataObjectType[] + */ public $applicationInputs = null; + /** + * @var \Airavata\Model\Application\Io\OutputDataObjectType[] + */ public $applicationOutputs = null; public function __construct($vals=null) { @@ -577,7 +87,7 @@ class ApplicationInterfaceDescription { 'etype' => TType::STRUCT, 'elem' => array( 'type' => TType::STRUCT, - 'class' => '\Airavata\Model\AppCatalog\AppInterface\InputDataObjectType', + 'class' => '\Airavata\Model\Application\Io\InputDataObjectType', ), ), 6 => array( @@ -586,7 +96,7 @@ class ApplicationInterfaceDescription { 'etype' => TType::STRUCT, 'elem' => array( 'type' => TType::STRUCT, - 'class' => '\Airavata\Model\AppCatalog\AppInterface\OutputDataObjectType', + 'class' => '\Airavata\Model\Application\Io\OutputDataObjectType', ), ), ); @@ -679,7 +189,7 @@ class ApplicationInterfaceDescription { for ($_i10 = 0; $_i10 < $_size6; ++$_i10) { $elem11 = null; - $elem11 = new \Airavata\Model\AppCatalog\AppInterface\InputDataObjectType(); + $elem11 = new \Airavata\Model\Application\Io\InputDataObjectType(); $xfer += $elem11->read($input); $this->applicationInputs []= $elem11; } @@ -697,7 +207,7 @@ class ApplicationInterfaceDescription { for ($_i16 = 0; $_i16 < $_size12; ++$_i16) { $elem17 = null; - $elem17 = new \Airavata\Model\AppCatalog\AppInterface\OutputDataObjectType(); + $elem17 = new \Airavata\Model\Application\Io\OutputDataObjectType(); $xfer += $elem17->read($input); $this->applicationOutputs []= $elem17; } @@ -792,6 +302,12 @@ class ApplicationInterfaceDescription { } -$GLOBALS['applicationInterfaceModel_CONSTANTS']['DEFAULT_ID'] = "DO_NOT_SET_AT_CLIENTS"; +final class Constant extends \Thrift\Type\TConstant { + static protected $DEFAULT_ID; + + static protected function init_DEFAULT_ID() { + return "DO_NOT_SET_AT_CLIENTS"; + } +} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/375afaf5/app/libraries/Airavata/Model/AppCatalog/ComputeResource/Types.php ---------------------------------------------------------------------- diff --git a/app/libraries/Airavata/Model/AppCatalog/ComputeResource/Types.php b/app/libraries/Airavata/Model/AppCatalog/ComputeResource/Types.php index 11f51dd..f1e2cd3 100644 --- a/app/libraries/Airavata/Model/AppCatalog/ComputeResource/Types.php +++ b/app/libraries/Airavata/Model/AppCatalog/ComputeResource/Types.php @@ -2,7 +2,7 @@ namespace Airavata\Model\AppCatalog\ComputeResource; /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.2) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -17,6 +17,25 @@ use Thrift\Protocol\TBinaryProtocolAccelerated; use Thrift\Exception\TApplicationException; +/** + * * Enumeration of local resource job manager types supported by Airavata + * * + * * FORK: + * * Forking of commands without any job manager + * * + * * PBS: + * * Job manager supporting the Portal Batch System (PBS) protocol. Some examples include TORQUE, PBSPro, Grid Engine. + * * + * * SLURM: + * * The Simple Linux Utility for Resource Management is a open source workload manager. + * * + * * UGE: + * * Univa Grid Engine, a variation of PBS implementation. + * * + * * LSF: + * * IBM Platform Load Sharing Facility is dominantly installed on IBM clusters. + * * + */ final class ResourceJobManagerType { const FORK = 0; const PBS = 1; @@ -32,6 +51,31 @@ final class ResourceJobManagerType { ); } +/** + * Enumeration of resource job manager commands + * + * SUBMISSION: + * Ex: qsub, sbatch + * + * JOBMONITORING: + * Ex: qstat, squeue + * + * DELETION: + * Ex: qdel, scancel + * + * CHECK_JOB: + * Detailed Status about the Job. Ex: checkjob + * + * SHOW_QUEUE: + * List of Queued Job by the schedular. Ex: showq + * + * SHOW_RESERVATION: + * List all reservations. Ex:showres, show_res + * + * SHOW_START: + * Display the start time of the specified job. Ex: showstart + * + */ final class JobManagerCommand { const SUBMISSION = 0; const JOB_MONITORING = 1; @@ -51,6 +95,22 @@ final class JobManagerCommand { ); } +/** + * Enumeration of File Systems on the resource + * + * FORK: + * Forking of commands without any job manager + * + * PBS: + * Job manager supporting the Portal Batch System (PBS) protocol. Some examples include TORQUE, PBSPro, Grid Engine. + * + * UGE: + * Univa Grid Engine, a variation of PBS implementation. + * + * SLURM: + * The Simple Linux Utility for Resource Management is a open source workload manager. + * + */ final class FileSystems { const HOME = 0; const WORK = 1; @@ -66,6 +126,20 @@ final class FileSystems { ); } +/** + * Enumeration of security authentication and authorization mechanisms supported by Airavata. This enumeration just + * describes the supported mechanism. The corresponding security credentials are registered with Airavata Credential + * store. + * + * USERNAME_PASSWORD: + * A User Name. + * + * SSH_KEYS: + * SSH Keys + * + * FIXME: Change GSI to a more precise generic security protocol - X509 + * + */ final class SecurityProtocol { const USERNAME_PASSWORD = 0; const SSH_KEYS = 1; @@ -81,6 +155,19 @@ final class SecurityProtocol { ); } +/** + * Enumeration of Airavata supported Job Submission Mechanisms for High Performance Computing Clusters. + * + * SSH: + * Execute remote job submission commands using via secure shell protocol. + * + * GRAM: + * Execute remote jobs via Globus GRAM service. + * + * UNICORE: + * Execute remote jobs via Unicore services + * + */ final class JobSubmissionProtocol { const LOCAL = 0; const SSH = 1; @@ -96,6 +183,17 @@ final class JobSubmissionProtocol { ); } +/** + * Monitoring modes + * + * POLL_JOB_MANAGER: + * GFac need to pull job status changes. + * + * XSEDE_AMQP_SUBSCRIBE: + * Server will publish job status changes to amqp servert. + * + * + */ final class MonitorMode { const POLL_JOB_MANAGER = 0; const JOB_EMAIL_NOTIFICATION_MONITOR = 1; @@ -107,6 +205,22 @@ final class MonitorMode { ); } +/** + * Enumeration of data movement supported by Airavata + * + * SCP: + * Job manager supporting the Portal Batch System (PBS) protocol. Some examples include TORQUE, PBSPro, Grid Engine. + * + * SFTP: + * The Simple Linux Utility for Resource Management is a open source workload manager. + * + * GridFTP: + * Globus File Transfer Protocol + * + * UNICORE_STORAGE_SERVICE: + * Storage Service Provided by Unicore + * + */ final class DataMovementProtocol { const LOCAL = 0; const SCP = 1; @@ -122,6 +236,10 @@ final class DataMovementProtocol { ); } +/** + * Provider name + * + */ final class ProviderName { const EC2 = 0; const AWSEC2 = 1; @@ -133,13 +251,45 @@ final class ProviderName { ); } +/** + * Resource Job Manager Information + * + * resourceJobManagerType: + * A typical HPC cluster has a single Job Manager to manage the resources. + * + * pushMonitoringEndpoint: + * If the job manager pushes out state changes to a database or bus, specify the service endpoint. + * Ex: Moab Web Service, Moab MongoDB URL, AMQP (GLUE2) Broker + * + * jobManagerBinPath: + * Path to the Job Manager Installation Binary directory. + * + * jobManagerCommands: + * An enumeration of commonly used manager commands. + * + */ class ResourceJobManager { static $_TSPEC; + /** + * @var string + */ public $resourceJobManagerId = "DO_NOT_SET_AT_CLIENTS"; + /** + * @var int + */ public $resourceJobManagerType = null; + /** + * @var string + */ public $pushMonitoringEndpoint = null; + /** + * @var string + */ public $jobManagerBinPath = null; + /** + * @var array + */ public $jobManagerCommands = null; public function __construct($vals=null) { @@ -319,15 +469,42 @@ class ResourceJobManager { } +/** + * Batch Queue Information on SuperComputers + * + * maxRunTime: + * Maximum allowed run time in hours. + */ class BatchQueue { static $_TSPEC; + /** + * @var string + */ public $queueName = null; + /** + * @var string + */ public $queueDescription = null; + /** + * @var int + */ public $maxRunTime = null; + /** + * @var int + */ public $maxNodes = null; + /** + * @var int + */ public $maxProcessors = null; + /** + * @var int + */ public $maxJobsInQueue = null; + /** + * @var int + */ public $maxMemory = null; public function __construct($vals=null) { @@ -511,12 +688,33 @@ class BatchQueue { } +/** + * Data Movement through Secured Copy + * + * alternativeSCPHostName: + * If the login to scp is different than the hostname itself, specify it here + * + * sshPort: + * If a non-default port needs to used, specify it. + */ class SCPDataMovement { static $_TSPEC; + /** + * @var string + */ public $dataMovementInterfaceId = "DO_NOT_SET_AT_CLIENTS"; + /** + * @var int + */ public $securityProtocol = null; + /** + * @var string + */ public $alternativeSCPHostName = null; + /** + * @var int + */ public $sshPort = 22; public function __construct($vals=null) { @@ -643,11 +841,29 @@ class SCPDataMovement { } +/** + * Data Movement through GridFTP + * + * alternativeSCPHostName: + * If the login to scp is different than the hostname itself, specify it here + * + * sshPort: + * If a non-default port needs to used, specify it. + */ class GridFTPDataMovement { static $_TSPEC; + /** + * @var string + */ public $dataMovementInterfaceId = "DO_NOT_SET_AT_CLIENTS"; + /** + * @var int + */ public $securityProtocol = null; + /** + * @var string[] + */ public $gridFTPEndPoints = null; public function __construct($vals=null) { @@ -781,11 +997,26 @@ class GridFTPDataMovement { } +/** + * Data Movement through UnicoreStorage + * + * unicoreEndPointURL: + * unicoreGateway End Point. The provider will query this service to fetch required service end points. + */ class UnicoreDataMovement { static $_TSPEC; + /** + * @var string + */ public $dataMovementInterfaceId = "DO_NOT_SET_AT_CLIENTS"; + /** + * @var int + */ public $securityProtocol = null; + /** + * @var string + */ public $unicoreEndPointURL = null; public function __construct($vals=null) { @@ -893,10 +1124,25 @@ class UnicoreDataMovement { } +/** + * Locally Fork Jobs as OS processes + * + * alternativeSSHHostName: + * If the login to ssh is different than the hostname itself, specify it here + * + * sshPort: + * If a non-default port needs to used, specify it. + */ class LOCALSubmission { static $_TSPEC; + /** + * @var string + */ public $jobSubmissionInterfaceId = "DO_NOT_SET_AT_CLIENTS"; + /** + * @var \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager + */ public $resourceJobManager = null; public function __construct($vals=null) { @@ -990,9 +1236,21 @@ class LOCALSubmission { } +/** + * LOCAL + * + * alternativeSCPHostName: + * If the login to scp is different than the hostname itself, specify it here + * + * sshPort: + * If a non-defualt port needs to used, specify it. + */ class LOCALDataMovement { static $_TSPEC; + /** + * @var string + */ public $dataMovementInterfaceId = "DO_NOT_SET_AT_CLIENTS"; public function __construct($vals=null) { @@ -1062,14 +1320,41 @@ class LOCALDataMovement { } +/** + * Authenticate using Secured Shell + * + * alternativeSSHHostName: + * If the login to ssh is different than the hostname itself, specify it here + * + * sshPort: + * If a non-default port needs to used, specify it. + */ class SSHJobSubmission { static $_TSPEC; + /** + * @var string + */ public $jobSubmissionInterfaceId = "DO_NOT_SET_AT_CLIENTS"; + /** + * @var int + */ public $securityProtocol = null; + /** + * @var \Airavata\Model\AppCatalog\ComputeResource\ResourceJobManager + */ public $resourceJobManager = null; + /** + * @var string + */ public $alternativeSSHHostName = null; + /** + * @var int + */ public $sshPort = 22; + /** + * @var int + */ public $monitorMode = null; public function __construct($vals=null) { @@ -1242,8 +1527,17 @@ class SSHJobSubmission { class GlobusJobSubmission { static $_TSPEC; + /** + * @var string + */ public $jobSubmissionInterfaceId = "DO_NOT_SET_AT_CLIENTS"; + /** + * @var int + */ public $securityProtocol = null; + /** + * @var string[] + */ public $globusGateKeeperEndPoint = null; public function __construct($vals=null) { @@ -1377,11 +1671,28 @@ class GlobusJobSubmission { } +/** + * Unicore Job Submission + * + * unicoreEndPointURL: + * unicoreGateway End Point. The provider will query this service to fetch required service end points. + * authenticationMode + * The authenticationMode defines the way certificate is fetched. + */ class UnicoreJobSubmission { static $_TSPEC; + /** + * @var string + */ public $jobSubmissionInterfaceId = "DO_NOT_SET_AT_CLIENTS"; + /** + * @var int + */ public $securityProtocol = null; + /** + * @var string + */ public $unicoreEndPointURL = null; public function __construct($vals=null) { @@ -1489,14 +1800,37 @@ class UnicoreJobSubmission { } +/** + * Cloud Job Submission + * + * + */ class CloudJobSubmission { static $_TSPEC; + /** + * @var string + */ public $jobSubmissionInterfaceId = "DO_NOT_SET_AT_CLIENTS"; + /** + * @var int + */ public $securityProtocol = null; + /** + * @var string + */ public $nodeId = null; + /** + * @var string + */ public $executableType = null; + /** + * @var int + */ public $providerName = null; + /** + * @var string + */ public $userAccountName = null; public function __construct($vals=null) { @@ -1661,11 +1995,30 @@ class CloudJobSubmission { } +/** + * Job Submission Interfaces + * + * jobSubmissionInterfaceId: The Job Submission Interface has to be previously registered and referenced here. + * + * priorityOrder: + * For resources with multiple interfaces, the priority order should be selected. + * Lower the numerical number, higher the priority + * + */ class JobSubmissionInterface { static $_TSPEC; + /** + * @var string + */ public $jobSubmissionInterfaceId = null; + /** + * @var int + */ public $jobSubmissionProtocol = null; + /** + * @var int + */ public $priorityOrder = 0; public function __construct($vals=null) { @@ -1773,11 +2126,30 @@ class JobSubmissionInterface { } +/** + * Data Movement Interfaces + * + * dataMovementInterfaceId: The Data Movement Interface has to be previously registered and referenced here. + * + * priorityOrder: + * For resources with multiple interfaces, the priority order should be selected. + * Lower the numerical number, higher the priority + * + */ class DataMovementInterface { static $_TSPEC; + /** + * @var string + */ public $dataMovementInterfaceId = null; + /** + * @var int + */ public $dataMovementProtocol = null; + /** + * @var int + */ public $priorityOrder = 0; public function __construct($vals=null) { @@ -1885,19 +2257,77 @@ class DataMovementInterface { } +/** + * Computational Resource Description + * + * computeResourceId: Airavata Internal Unique Identifier to distinguish Compute Resource. + * + * hostName: + * Fully Qualified Host Name. + * + * hostAliases: + * Aliases if any. + * + * ipAddress: + * IP Addresses of the Resource. + * + * resourceDescription: + * A user friendly description of the resource. + * + * JobSubmissionProtocols: + * A computational resources may have one or more ways of submitting Jobs. This structure + * will hold all available mechanisms to interact with the resource. + * The key is the priority + * + * DataMovementProtocol: + * Option to specify a prefered data movement mechanism of the available options. + * + * fileSystems: + * Map of file systems type and the path. + * + */ class ComputeResourceDescription { static $_TSPEC; + /** + * @var string + */ public $computeResourceId = "DO_NOT_SET_AT_CLIENTS"; + /** + * @var string + */ public $hostName = null; + /** + * @var string[] + */ public $hostAliases = null; + /** + * @var string[] + */ public $ipAddresses = null; + /** + * @var string + */ public $resourceDescription = null; - public $enabled = null; + /** + * @var \Airavata\Model\AppCatalog\ComputeResource\BatchQueue[] + */ public $batchQueues = null; + /** + * @var array + */ public $fileSystems = null; + /** + * @var \Airavata\Model\AppCatalog\ComputeResource\JobSubmissionInterface[] + */ public $jobSubmissionInterfaces = null; + /** + * @var \Airavata\Model\AppCatalog\ComputeResource\DataMovementInterface[] + */ public $dataMovementInterfaces = null; + /** + * @var int + */ public $maxMemoryPerNode = null; public function __construct($vals=null) { @@ -1932,10 +2362,6 @@ class ComputeResourceDescription { 'type' => TType::STRING, ), 6 => array( - 'var' => 'enabled', - 'type' => TType::BOOL, - ), - 7 => array( 'var' => 'batchQueues', 'type' => TType::LST, 'etype' => TType::STRUCT, @@ -1944,7 +2370,7 @@ class ComputeResourceDescription { 'class' => '\Airavata\Model\AppCatalog\ComputeResource\BatchQueue', ), ), - 8 => array( + 7 => array( 'var' => 'fileSystems', 'type' => TType::MAP, 'ktype' => TType::I32, @@ -1956,7 +2382,7 @@ class ComputeResourceDescription { 'type' => TType::STRING, ), ), - 9 => array( + 8 => array( 'var' => 'jobSubmissionInterfaces', 'type' => TType::LST, 'etype' => TType::STRUCT, @@ -1965,7 +2391,7 @@ class ComputeResourceDescription { 'class' => '\Airavata\Model\AppCatalog\ComputeResource\JobSubmissionInterface', ), ), - 10 => array( + 9 => array( 'var' => 'dataMovementInterfaces', 'type' => TType::LST, 'etype' => TType::STRUCT, @@ -1974,7 +2400,7 @@ class ComputeResourceDescription { 'class' => '\Airavata\Model\AppCatalog\ComputeResource\DataMovementInterface', ), ), - 11 => array( + 10 => array( 'var' => 'maxMemoryPerNode', 'type' => TType::I32, ), @@ -1996,9 +2422,6 @@ class ComputeResourceDescription { if (isset($vals['resourceDescription'])) { $this->resourceDescription = $vals['resourceDescription']; } - if (isset($vals['enabled'])) { - $this->enabled = $vals['enabled']; - } if (isset($vals['batchQueues'])) { $this->batchQueues = $vals['batchQueues']; } @@ -2092,13 +2515,6 @@ class ComputeResourceDescription { } break; case 6: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->enabled); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: if ($ftype == TType::LST) { $this->batchQueues = array(); $_size35 = 0; @@ -2116,7 +2532,7 @@ class ComputeResourceDescription { $xfer += $input->skip($ftype); } break; - case 8: + case 7: if ($ftype == TType::MAP) { $this->fileSystems = array(); $_size41 = 0; @@ -2136,7 +2552,7 @@ class ComputeResourceDescription { $xfer += $input->skip($ftype); } break; - case 9: + case 8: if ($ftype == TType::LST) { $this->jobSubmissionInterfaces = array(); $_size48 = 0; @@ -2154,7 +2570,7 @@ class ComputeResourceDescription { $xfer += $input->skip($ftype); } break; - case 10: + case 9: if ($ftype == TType::LST) { $this->dataMovementInterfaces = array(); $_size54 = 0; @@ -2172,7 +2588,7 @@ class ComputeResourceDescription { $xfer += $input->skip($ftype); } break; - case 11: + case 10: if ($ftype == TType::I32) { $xfer += $input->readI32($this->maxMemoryPerNode); } else { @@ -2241,16 +2657,11 @@ class ComputeResourceDescription { $xfer += $output->writeString($this->resourceDescription); $xfer += $output->writeFieldEnd(); } - if ($this->enabled !== null) { - $xfer += $output->writeFieldBegin('enabled', TType::BOOL, 6); - $xfer += $output->writeBool($this->enabled); - $xfer += $output->writeFieldEnd(); - } if ($this->batchQueues !== null) { if (!is_array($this->batchQueues)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('batchQueues', TType::LST, 7); + $xfer += $output->writeFieldBegin('batchQueues', TType::LST, 6); { $output->writeListBegin(TType::STRUCT, count($this->batchQueues)); { @@ -2267,7 +2678,7 @@ class ComputeResourceDescription { if (!is_array($this->fileSystems)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('fileSystems', TType::MAP, 8); + $xfer += $output->writeFieldBegin('fileSystems', TType::MAP, 7); { $output->writeMapBegin(TType::I32, TType::STRING, count($this->fileSystems)); { @@ -2285,7 +2696,7 @@ class ComputeResourceDescription { if (!is_array($this->jobSubmissionInterfaces)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('jobSubmissionInterfaces', TType::LST, 9); + $xfer += $output->writeFieldBegin('jobSubmissionInterfaces', TType::LST, 8); { $output->writeListBegin(TType::STRUCT, count($this->jobSubmissionInterfaces)); { @@ -2302,7 +2713,7 @@ class ComputeResourceDescription { if (!is_array($this->dataMovementInterfaces)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('dataMovementInterfaces', TType::LST, 10); + $xfer += $output->writeFieldBegin('dataMovementInterfaces', TType::LST, 9); { $output->writeListBegin(TType::STRUCT, count($this->dataMovementInterfaces)); { @@ -2316,7 +2727,7 @@ class ComputeResourceDescription { $xfer += $output->writeFieldEnd(); } if ($this->maxMemoryPerNode !== null) { - $xfer += $output->writeFieldBegin('maxMemoryPerNode', TType::I32, 11); + $xfer += $output->writeFieldBegin('maxMemoryPerNode', TType::I32, 10); $xfer += $output->writeI32($this->maxMemoryPerNode); $xfer += $output->writeFieldEnd(); } @@ -2327,6 +2738,12 @@ class ComputeResourceDescription { } -$GLOBALS['computeResourceModel_CONSTANTS']['DEFAULT_ID'] = "DO_NOT_SET_AT_CLIENTS"; +final class Constant extends \Thrift\Type\TConstant { + static protected $DEFAULT_ID; + + static protected function init_DEFAULT_ID() { + return "DO_NOT_SET_AT_CLIENTS"; + } +} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/375afaf5/app/libraries/Airavata/Model/AppCatalog/GatewayProfile/Types.php ---------------------------------------------------------------------- diff --git a/app/libraries/Airavata/Model/AppCatalog/GatewayProfile/Types.php b/app/libraries/Airavata/Model/AppCatalog/GatewayProfile/Types.php index e0e6227..a94dd88 100644 --- a/app/libraries/Airavata/Model/AppCatalog/GatewayProfile/Types.php +++ b/app/libraries/Airavata/Model/AppCatalog/GatewayProfile/Types.php @@ -2,7 +2,7 @@ namespace Airavata\Model\AppCatalog\GatewayProfile; /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.2) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -17,16 +17,70 @@ use Thrift\Protocol\TBinaryProtocolAccelerated; use Thrift\Exception\TApplicationException; +/** + * Gateway specific preferences for a Computer Resource + * + * computeResourceId: + * Corelate the preference to a compute resource. + * + * overridebyAiravata: + * If turned true, Airavata will override the preferences of better alternatives exist. + * + * loginUserName: + * If turned true, Airavata will override the preferences of better alternatives exist. + * + * preferredJobSubmissionProtocol: + * For resources with multiple job submission protocols, the gateway can pick a preferred option. + * + * preferredDataMovementProtocol: + * For resources with multiple data movement protocols, the gateway can pick a preferred option. + * + * preferredBatchQueue: + * Gateways can choose a defualt batch queue based on average job dimention, reservations or other metrics. + * + * scratchLocation: + * Path to the local scratch space on a HPC cluster. Typically used to create working directory for job execution. + * + * allocationProjectNumber: + * Typically used on HPC machines to charge computing usage to a account number. For instance, on XSEDE once an + * allocation is approved, an allocation number is assigned. Before passing this number with job submittions, the + * account to be used has to be added to the allocation. + * + */ class ComputeResourcePreference { static $_TSPEC; + /** + * @var string + */ public $computeResourceId = null; + /** + * @var bool + */ public $overridebyAiravata = true; + /** + * @var string + */ public $loginUserName = null; + /** + * @var int + */ public $preferredJobSubmissionProtocol = null; + /** + * @var int + */ public $preferredDataMovementProtocol = null; + /** + * @var string + */ public $preferredBatchQueue = null; + /** + * @var string + */ public $scratchLocation = null; + /** + * @var string + */ public $allocationProjectNumber = null; public function __construct($vals=null) { @@ -229,10 +283,27 @@ class ComputeResourcePreference { } +/** + * Gateway Resource Profile + * + * gatewayID: + * Unique identifier for the gateway assigned by Airavata. Corelate this to Airavata Admin API Gateway Registration. + * + * computeResourcePreferences: + * List of resource preferences for each of the registered compute resources. + * + * + */ class GatewayResourceProfile { static $_TSPEC; + /** + * @var string + */ public $gatewayID = null; + /** + * @var \Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference[] + */ public $computeResourcePreferences = null; public function __construct($vals=null) { http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/375afaf5/app/libraries/Airavata/Model/Messaging/Event/Types.php ---------------------------------------------------------------------- diff --git a/app/libraries/Airavata/Model/Messaging/Event/Types.php b/app/libraries/Airavata/Model/Messaging/Event/Types.php index 035e249..d90c6f8 100644 --- a/app/libraries/Airavata/Model/Messaging/Event/Types.php +++ b/app/libraries/Airavata/Model/Messaging/Event/Types.php @@ -2,7 +2,7 @@ namespace Airavata\Model\Messaging\Event; /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.2) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -33,27 +33,36 @@ final class MessageLevel { final class MessageType { const EXPERIMENT = 0; const TASK = 1; - const WORKFLOWNODE = 2; + const PROCESS = 2; const JOB = 3; - const LAUNCHTASK = 4; - const TERMINATETASK = 5; - const TASKOUTPUT = 6; + const LAUNCHPROCESS = 4; + const TERMINATEPROCESS = 5; + const PROCESSOUTPUT = 6; static public $__names = array( 0 => 'EXPERIMENT', 1 => 'TASK', - 2 => 'WORKFLOWNODE', + 2 => 'PROCESS', 3 => 'JOB', - 4 => 'LAUNCHTASK', - 5 => 'TERMINATETASK', - 6 => 'TASKOUTPUT', + 4 => 'LAUNCHPROCESS', + 5 => 'TERMINATEPROCESS', + 6 => 'PROCESSOUTPUT', ); } class ExperimentStatusChangeEvent { static $_TSPEC; + /** + * @var int + */ public $state = null; + /** + * @var string + */ public $experimentId = null; + /** + * @var string + */ public $gatewayId = null; public function __construct($vals=null) { @@ -161,18 +170,27 @@ class ExperimentStatusChangeEvent { } -class WorkflowIdentifier { +class ProcessIdentifier { static $_TSPEC; - public $workflowNodeId = null; + /** + * @var string + */ + public $processId = null; + /** + * @var string + */ public $experimentId = null; + /** + * @var string + */ public $gatewayId = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'workflowNodeId', + 'var' => 'processId', 'type' => TType::STRING, ), 2 => array( @@ -186,8 +204,8 @@ class WorkflowIdentifier { ); } if (is_array($vals)) { - if (isset($vals['workflowNodeId'])) { - $this->workflowNodeId = $vals['workflowNodeId']; + if (isset($vals['processId'])) { + $this->processId = $vals['processId']; } if (isset($vals['experimentId'])) { $this->experimentId = $vals['experimentId']; @@ -199,7 +217,7 @@ class WorkflowIdentifier { } public function getName() { - return 'WorkflowIdentifier'; + return 'ProcessIdentifier'; } public function read($input) @@ -219,7 +237,7 @@ class WorkflowIdentifier { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->workflowNodeId); + $xfer += $input->readString($this->processId); } else { $xfer += $input->skip($ftype); } @@ -250,10 +268,10 @@ class WorkflowIdentifier { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('WorkflowIdentifier'); - if ($this->workflowNodeId !== null) { - $xfer += $output->writeFieldBegin('workflowNodeId', TType::STRING, 1); - $xfer += $output->writeString($this->workflowNodeId); + $xfer += $output->writeStructBegin('ProcessIdentifier'); + if ($this->processId !== null) { + $xfer += $output->writeFieldBegin('processId', TType::STRING, 1); + $xfer += $output->writeString($this->processId); $xfer += $output->writeFieldEnd(); } if ($this->experimentId !== null) { @@ -273,109 +291,24 @@ class WorkflowIdentifier { } -class WorkflowNodeStatusChangeEvent { - static $_TSPEC; - - public $state = null; - public $workflowNodeIdentity = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'state', - 'type' => TType::I32, - ), - 2 => array( - 'var' => 'workflowNodeIdentity', - 'type' => TType::STRUCT, - 'class' => '\Airavata\Model\Messaging\Event\WorkflowIdentifier', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['state'])) { - $this->state = $vals['state']; - } - if (isset($vals['workflowNodeIdentity'])) { - $this->workflowNodeIdentity = $vals['workflowNodeIdentity']; - } - } - } - - public function getName() { - return 'WorkflowNodeStatusChangeEvent'; - } - - 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::I32) { - $xfer += $input->readI32($this->state); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->workflowNodeIdentity = new \Airavata\Model\Messaging\Event\WorkflowIdentifier(); - $xfer += $this->workflowNodeIdentity->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('WorkflowNodeStatusChangeEvent'); - if ($this->state !== null) { - $xfer += $output->writeFieldBegin('state', TType::I32, 1); - $xfer += $output->writeI32($this->state); - $xfer += $output->writeFieldEnd(); - } - if ($this->workflowNodeIdentity !== null) { - if (!is_object($this->workflowNodeIdentity)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('workflowNodeIdentity', TType::STRUCT, 2); - $xfer += $this->workflowNodeIdentity->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - class TaskIdentifier { static $_TSPEC; + /** + * @var string + */ public $taskId = null; - public $workflowNodeId = null; + /** + * @var string + */ + public $processId = null; + /** + * @var string + */ public $experimentId = null; + /** + * @var string + */ public $gatewayId = null; public function __construct($vals=null) { @@ -386,7 +319,7 @@ class TaskIdentifier { 'type' => TType::STRING, ), 2 => array( - 'var' => 'workflowNodeId', + 'var' => 'processId', 'type' => TType::STRING, ), 3 => array( @@ -403,8 +336,8 @@ class TaskIdentifier { if (isset($vals['taskId'])) { $this->taskId = $vals['taskId']; } - if (isset($vals['workflowNodeId'])) { - $this->workflowNodeId = $vals['workflowNodeId']; + if (isset($vals['processId'])) { + $this->processId = $vals['processId']; } if (isset($vals['experimentId'])) { $this->experimentId = $vals['experimentId']; @@ -443,7 +376,7 @@ class TaskIdentifier { break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->workflowNodeId); + $xfer += $input->readString($this->processId); } else { $xfer += $input->skip($ftype); } @@ -480,9 +413,9 @@ class TaskIdentifier { $xfer += $output->writeString($this->taskId); $xfer += $output->writeFieldEnd(); } - if ($this->workflowNodeId !== null) { - $xfer += $output->writeFieldBegin('workflowNodeId', TType::STRING, 2); - $xfer += $output->writeString($this->workflowNodeId); + if ($this->processId !== null) { + $xfer += $output->writeFieldBegin('processId', TType::STRING, 2); + $xfer += $output->writeString($this->processId); $xfer += $output->writeFieldEnd(); } if ($this->experimentId !== null) { @@ -505,7 +438,13 @@ class TaskIdentifier { class TaskStatusChangeEvent { static $_TSPEC; + /** + * @var int + */ public $state = null; + /** + * @var \Airavata\Model\Messaging\Event\TaskIdentifier + */ public $taskIdentity = null; public function __construct($vals=null) { @@ -602,7 +541,13 @@ class TaskStatusChangeEvent { class TaskStatusChangeRequestEvent { static $_TSPEC; + /** + * @var int + */ public $state = null; + /** + * @var \Airavata\Model\Messaging\Event\TaskIdentifier + */ public $taskIdentity = null; public function __construct($vals=null) { @@ -696,10 +641,222 @@ class TaskStatusChangeRequestEvent { } +class ProcessStatusChangeEvent { + static $_TSPEC; + + /** + * @var int + */ + public $state = null; + /** + * @var \Airavata\Model\Messaging\Event\ProcessIdentifier + */ + public $processIdentity = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'state', + 'type' => TType::I32, + ), + 2 => array( + 'var' => 'processIdentity', + 'type' => TType::STRUCT, + 'class' => '\Airavata\Model\Messaging\Event\ProcessIdentifier', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['state'])) { + $this->state = $vals['state']; + } + if (isset($vals['processIdentity'])) { + $this->processIdentity = $vals['processIdentity']; + } + } + } + + public function getName() { + return 'ProcessStatusChangeEvent'; + } + + 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::I32) { + $xfer += $input->readI32($this->state); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->processIdentity = new \Airavata\Model\Messaging\Event\ProcessIdentifier(); + $xfer += $this->processIdentity->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('ProcessStatusChangeEvent'); + if ($this->state !== null) { + $xfer += $output->writeFieldBegin('state', TType::I32, 1); + $xfer += $output->writeI32($this->state); + $xfer += $output->writeFieldEnd(); + } + if ($this->processIdentity !== null) { + if (!is_object($this->processIdentity)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('processIdentity', TType::STRUCT, 2); + $xfer += $this->processIdentity->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ProcessStatusChangeRequestEvent { + static $_TSPEC; + + /** + * @var int + */ + public $state = null; + /** + * @var \Airavata\Model\Messaging\Event\ProcessIdentifier + */ + public $processIdentity = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'state', + 'type' => TType::I32, + ), + 2 => array( + 'var' => 'processIdentity', + 'type' => TType::STRUCT, + 'class' => '\Airavata\Model\Messaging\Event\ProcessIdentifier', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['state'])) { + $this->state = $vals['state']; + } + if (isset($vals['processIdentity'])) { + $this->processIdentity = $vals['processIdentity']; + } + } + } + + public function getName() { + return 'ProcessStatusChangeRequestEvent'; + } + + 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::I32) { + $xfer += $input->readI32($this->state); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->processIdentity = new \Airavata\Model\Messaging\Event\ProcessIdentifier(); + $xfer += $this->processIdentity->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('ProcessStatusChangeRequestEvent'); + if ($this->state !== null) { + $xfer += $output->writeFieldBegin('state', TType::I32, 1); + $xfer += $output->writeI32($this->state); + $xfer += $output->writeFieldEnd(); + } + if ($this->processIdentity !== null) { + if (!is_object($this->processIdentity)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('processIdentity', TType::STRUCT, 2); + $xfer += $this->processIdentity->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + class TaskOutputChangeEvent { static $_TSPEC; + /** + * @var \Airavata\Model\Application\Io\OutputDataObjectType[] + */ public $output = null; + /** + * @var \Airavata\Model\Messaging\Event\TaskIdentifier + */ public $taskIdentity = null; public function __construct($vals=null) { @@ -711,7 +868,7 @@ class TaskOutputChangeEvent { 'etype' => TType::STRUCT, 'elem' => array( 'type' => TType::STRUCT, - 'class' => '\Airavata\Model\AppCatalog\AppInterface\OutputDataObjectType', + 'class' => '\Airavata\Model\Application\Io\OutputDataObjectType', ), ), 2 => array( @@ -759,7 +916,7 @@ class TaskOutputChangeEvent { for ($_i4 = 0; $_i4 < $_size0; ++$_i4) { $elem5 = null; - $elem5 = new \Airavata\Model\AppCatalog\AppInterface\OutputDataObjectType(); + $elem5 = new \Airavata\Model\Application\Io\OutputDataObjectType(); $xfer += $elem5->read($input); $this->output []= $elem5; } @@ -824,10 +981,25 @@ class TaskOutputChangeEvent { class JobIdentifier { static $_TSPEC; + /** + * @var string + */ public $jobId = null; + /** + * @var string + */ public $taskId = null; - public $workflowNodeId = null; + /** + * @var string + */ + public $processId = null; + /** + * @var string + */ public $experimentId = null; + /** + * @var string + */ public $gatewayId = null; public function __construct($vals=null) { @@ -842,7 +1014,7 @@ class JobIdentifier { 'type' => TType::STRING, ), 3 => array( - 'var' => 'workflowNodeId', + 'var' => 'processId', 'type' => TType::STRING, ), 4 => array( @@ -862,8 +1034,8 @@ class JobIdentifier { if (isset($vals['taskId'])) { $this->taskId = $vals['taskId']; } - if (isset($vals['workflowNodeId'])) { - $this->workflowNodeId = $vals['workflowNodeId']; + if (isset($vals['processId'])) { + $this->processId = $vals['processId']; } if (isset($vals['experimentId'])) { $this->experimentId = $vals['experimentId']; @@ -909,7 +1081,7 @@ class JobIdentifier { break; case 3: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->workflowNodeId); + $xfer += $input->readString($this->processId); } else { $xfer += $input->skip($ftype); } @@ -951,9 +1123,9 @@ class JobIdentifier { $xfer += $output->writeString($this->taskId); $xfer += $output->writeFieldEnd(); } - if ($this->workflowNodeId !== null) { - $xfer += $output->writeFieldBegin('workflowNodeId', TType::STRING, 3); - $xfer += $output->writeString($this->workflowNodeId); + if ($this->processId !== null) { + $xfer += $output->writeFieldBegin('processId', TType::STRING, 3); + $xfer += $output->writeString($this->processId); $xfer += $output->writeFieldEnd(); } if ($this->experimentId !== null) { @@ -976,130 +1148,39 @@ class JobIdentifier { class ProcessSubmitEvent { static $_TSPEC; - public $taskId = null; - public $credentialToken = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'taskId', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'credentialToken', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['taskId'])) { - $this->taskId = $vals['taskId']; - } - if (isset($vals['credentialToken'])) { - $this->credentialToken = $vals['credentialToken']; - } - } - } - - public function getName() { - return 'ProcessSubmitEvent'; - } - - 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::STRING) { - $xfer += $input->readString($this->taskId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->credentialToken); - } 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('ProcessSubmitEvent'); - if ($this->taskId !== null) { - $xfer += $output->writeFieldBegin('taskId', TType::STRING, 1); - $xfer += $output->writeString($this->taskId); - $xfer += $output->writeFieldEnd(); - } - if ($this->credentialToken !== null) { - $xfer += $output->writeFieldBegin('credentialToken', TType::STRING, 2); - $xfer += $output->writeString($this->credentialToken); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TaskSubmitEvent { - static $_TSPEC; - - public $experimentId = null; - public $taskId = null; + /** + * @var string + */ + public $processId = null; + /** + * @var string + */ public $gatewayId = null; + /** + * @var string + */ public $tokenId = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'experimentId', + 'var' => 'processId', 'type' => TType::STRING, ), 2 => array( - 'var' => 'taskId', - 'type' => TType::STRING, - ), - 3 => array( 'var' => 'gatewayId', 'type' => TType::STRING, ), - 4 => array( + 3 => array( 'var' => 'tokenId', 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['experimentId'])) { - $this->experimentId = $vals['experimentId']; - } - if (isset($vals['taskId'])) { - $this->taskId = $vals['taskId']; + if (isset($vals['processId'])) { + $this->processId = $vals['processId']; } if (isset($vals['gatewayId'])) { $this->gatewayId = $vals['gatewayId']; @@ -1111,7 +1192,7 @@ class TaskSubmitEvent { } public function getName() { - return 'TaskSubmitEvent'; + return 'ProcessSubmitEvent'; } public function read($input) @@ -1131,26 +1212,19 @@ class TaskSubmitEvent { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->experimentId); + $xfer += $input->readString($this->processId); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->taskId); - } 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: + case 3: if ($ftype == TType::STRING) { $xfer += $input->readString($this->tokenId); } else { @@ -1169,24 +1243,19 @@ class TaskSubmitEvent { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('TaskSubmitEvent'); - if ($this->experimentId !== null) { - $xfer += $output->writeFieldBegin('experimentId', TType::STRING, 1); - $xfer += $output->writeString($this->experimentId); - $xfer += $output->writeFieldEnd(); - } - if ($this->taskId !== null) { - $xfer += $output->writeFieldBegin('taskId', TType::STRING, 2); - $xfer += $output->writeString($this->taskId); + $xfer += $output->writeStructBegin('ProcessSubmitEvent'); + if ($this->processId !== null) { + $xfer += $output->writeFieldBegin('processId', TType::STRING, 1); + $xfer += $output->writeString($this->processId); $xfer += $output->writeFieldEnd(); } if ($this->gatewayId !== null) { - $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 3); + $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2); $xfer += $output->writeString($this->gatewayId); $xfer += $output->writeFieldEnd(); } if ($this->tokenId !== null) { - $xfer += $output->writeFieldBegin('tokenId', TType::STRING, 4); + $xfer += $output->writeFieldBegin('tokenId', TType::STRING, 3); $xfer += $output->writeString($this->tokenId); $xfer += $output->writeFieldEnd(); } @@ -1197,41 +1266,42 @@ class TaskSubmitEvent { } -class TaskTerminateEvent { +class ProcessTerminateEvent { static $_TSPEC; - public $experimentId = null; - public $taskId = null; + /** + * @var string + */ + public $processId = null; + /** + * @var string + */ public $gatewayId = null; + /** + * @var string + */ public $tokenId = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'experimentId', + 'var' => 'processId', 'type' => TType::STRING, ), 2 => array( - 'var' => 'taskId', - 'type' => TType::STRING, - ), - 3 => array( 'var' => 'gatewayId', 'type' => TType::STRING, ), - 4 => array( + 3 => array( 'var' => 'tokenId', 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['experimentId'])) { - $this->experimentId = $vals['experimentId']; - } - if (isset($vals['taskId'])) { - $this->taskId = $vals['taskId']; + if (isset($vals['processId'])) { + $this->processId = $vals['processId']; } if (isset($vals['gatewayId'])) { $this->gatewayId = $vals['gatewayId']; @@ -1243,7 +1313,7 @@ class TaskTerminateEvent { } public function getName() { - return 'TaskTerminateEvent'; + return 'ProcessTerminateEvent'; } public function read($input) @@ -1263,26 +1333,19 @@ class TaskTerminateEvent { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->experimentId); + $xfer += $input->readString($this->processId); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->taskId); - } 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: + case 3: if ($ftype == TType::STRING) { $xfer += $input->readString($this->tokenId); } else { @@ -1301,24 +1364,19 @@ class TaskTerminateEvent { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('TaskTerminateEvent'); - if ($this->experimentId !== null) { - $xfer += $output->writeFieldBegin('experimentId', TType::STRING, 1); - $xfer += $output->writeString($this->experimentId); - $xfer += $output->writeFieldEnd(); - } - if ($this->taskId !== null) { - $xfer += $output->writeFieldBegin('taskId', TType::STRING, 2); - $xfer += $output->writeString($this->taskId); + $xfer += $output->writeStructBegin('ProcessTerminateEvent'); + if ($this->processId !== null) { + $xfer += $output->writeFieldBegin('processId', TType::STRING, 1); + $xfer += $output->writeString($this->processId); $xfer += $output->writeFieldEnd(); } if ($this->gatewayId !== null) { - $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 3); + $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2); $xfer += $output->writeString($this->gatewayId); $xfer += $output->writeFieldEnd(); } if ($this->tokenId !== null) { - $xfer += $output->writeFieldBegin('tokenId', TType::STRING, 4); + $xfer += $output->writeFieldBegin('tokenId', TType::STRING, 3); $xfer += $output->writeString($this->tokenId); $xfer += $output->writeFieldEnd(); } @@ -1332,7 +1390,13 @@ class TaskTerminateEvent { class JobStatusChangeEvent { static $_TSPEC; + /** + * @var int + */ public $state = null; + /** + * @var \Airavata\Model\Messaging\Event\JobIdentifier + */ public $jobIdentity = null; public function __construct($vals=null) { @@ -1429,7 +1493,13 @@ class JobStatusChangeEvent { class JobStatusChangeRequestEvent { static $_TSPEC; + /** + * @var int + */ public $state = null; + /** + * @var \Airavata\Model\Messaging\Event\JobIdentifier + */ public $jobIdentity = null; public function __construct($vals=null) { @@ -1526,10 +1596,25 @@ class JobStatusChangeRequestEvent { class Message { static $_TSPEC; + /** + * @var string + */ public $event = null; + /** + * @var string + */ public $messageId = "DO_NOT_SET_AT_CLIENTS"; + /** + * @var int + */ public $messageType = null; + /** + * @var int + */ public $updatedTime = null; + /** + * @var int + */ public $messageLevel = null; public function __construct($vals=null) { @@ -1675,6 +1760,12 @@ class Message { } -$GLOBALS['messagingEvents_CONSTANTS']['DEFAULT_ID'] = "DO_NOT_SET_AT_CLIENTS"; +final class Constant extends \Thrift\Type\TConstant { + static protected $DEFAULT_ID; + + static protected function init_DEFAULT_ID() { + return "DO_NOT_SET_AT_CLIENTS"; + } +}
