Repository: airavata Updated Branches: refs/heads/master 465ca53d6 -> 01f648a5c
http://git-wip-us.apache.org/repos/asf/airavata/blob/01f648a5/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/AppCatalog/Types.php ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/AppCatalog/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/AppCatalog/Types.php deleted file mode 100644 index 06e6b5c..0000000 --- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/AppCatalog/Types.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -namespace Airavata\API\AppCatalog; - -/** - * Autogenerated by Thrift Compiler (0.9.1) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -$GLOBALS['applicationCatalogAPI_CONSTANTS']['AIRAVATA_API_VERSION'] = "0.12.0"; - - http://git-wip-us.apache.org/repos/asf/airavata/blob/01f648a5/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Application/Deployment/Types.php ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Application/Deployment/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Application/Deployment/Types.php deleted file mode 100644 index 16be149..0000000 --- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Application/Deployment/Types.php +++ /dev/null @@ -1,602 +0,0 @@ -<?php -namespace Airavata\Model\Application\Deployment; - -/** - * Autogenerated by Thrift Compiler (0.9.1) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -class SetEnvPaths { - static $_TSPEC; - - public $name = null; - public $value = 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, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; - } - if (isset($vals['value'])) { - $this->value = $vals['value']; - } - } - } - - public function getName() { - return 'SetEnvPaths'; - } - - 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; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('SetEnvPaths'); - 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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ApplicationModule { - static $_TSPEC; - - public $isEmpty = false; - public $appModuleId = "DO_NOT_SET_AT_CLIENTS"; - public $appModuleName = null; - public $appModuleVersion = null; - public $appModuleDescription = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'isEmpty', - 'type' => TType::BOOL, - ), - 2 => array( - 'var' => 'appModuleId', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'appModuleName', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'appModuleVersion', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'appModuleDescription', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['isEmpty'])) { - $this->isEmpty = $vals['isEmpty']; - } - if (isset($vals['appModuleId'])) { - $this->appModuleId = $vals['appModuleId']; - } - if (isset($vals['appModuleName'])) { - $this->appModuleName = $vals['appModuleName']; - } - if (isset($vals['appModuleVersion'])) { - $this->appModuleVersion = $vals['appModuleVersion']; - } - if (isset($vals['appModuleDescription'])) { - $this->appModuleDescription = $vals['appModuleDescription']; - } - } - } - - public function getName() { - return 'ApplicationModule'; - } - - 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::BOOL) { - $xfer += $input->readBool($this->isEmpty); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->appModuleId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->appModuleName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->appModuleVersion); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->appModuleDescription); - } 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('ApplicationModule'); - if ($this->isEmpty !== null) { - $xfer += $output->writeFieldBegin('isEmpty', TType::BOOL, 1); - $xfer += $output->writeBool($this->isEmpty); - $xfer += $output->writeFieldEnd(); - } - if ($this->appModuleId !== null) { - $xfer += $output->writeFieldBegin('appModuleId', TType::STRING, 2); - $xfer += $output->writeString($this->appModuleId); - $xfer += $output->writeFieldEnd(); - } - if ($this->appModuleName !== null) { - $xfer += $output->writeFieldBegin('appModuleName', TType::STRING, 3); - $xfer += $output->writeString($this->appModuleName); - $xfer += $output->writeFieldEnd(); - } - if ($this->appModuleVersion !== null) { - $xfer += $output->writeFieldBegin('appModuleVersion', TType::STRING, 4); - $xfer += $output->writeString($this->appModuleVersion); - $xfer += $output->writeFieldEnd(); - } - if ($this->appModuleDescription !== null) { - $xfer += $output->writeFieldBegin('appModuleDescription', TType::STRING, 5); - $xfer += $output->writeString($this->appModuleDescription); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ApplicationDeploymentDescription { - static $_TSPEC; - - public $isEmpty = false; - public $appDeploymentId = "DO_NOT_SET_AT_CLIENTS"; - public $appModuleId = null; - public $computeHostId = null; - public $executablePath = null; - public $appDeploymentDescription = null; - public $moduleLoadCmd = null; - public $libPrependPaths = null; - public $libAppendPaths = null; - public $setEnvironment = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'isEmpty', - 'type' => TType::BOOL, - ), - 2 => array( - 'var' => 'appDeploymentId', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'appModuleId', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'computeHostId', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'executablePath', - 'type' => TType::STRING, - ), - 6 => array( - 'var' => 'appDeploymentDescription', - 'type' => TType::STRING, - ), - 7 => array( - 'var' => 'moduleLoadCmd', - 'type' => TType::STRING, - ), - 8 => array( - 'var' => 'libPrependPaths', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Airavata\Model\Application\Deployment\SetEnvPaths', - ), - ), - 9 => array( - 'var' => 'libAppendPaths', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Airavata\Model\Application\Deployment\SetEnvPaths', - ), - ), - 10 => array( - 'var' => 'setEnvironment', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Airavata\Model\Application\Deployment\SetEnvPaths', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['isEmpty'])) { - $this->isEmpty = $vals['isEmpty']; - } - if (isset($vals['appDeploymentId'])) { - $this->appDeploymentId = $vals['appDeploymentId']; - } - if (isset($vals['appModuleId'])) { - $this->appModuleId = $vals['appModuleId']; - } - if (isset($vals['computeHostId'])) { - $this->computeHostId = $vals['computeHostId']; - } - if (isset($vals['executablePath'])) { - $this->executablePath = $vals['executablePath']; - } - if (isset($vals['appDeploymentDescription'])) { - $this->appDeploymentDescription = $vals['appDeploymentDescription']; - } - if (isset($vals['moduleLoadCmd'])) { - $this->moduleLoadCmd = $vals['moduleLoadCmd']; - } - if (isset($vals['libPrependPaths'])) { - $this->libPrependPaths = $vals['libPrependPaths']; - } - if (isset($vals['libAppendPaths'])) { - $this->libAppendPaths = $vals['libAppendPaths']; - } - if (isset($vals['setEnvironment'])) { - $this->setEnvironment = $vals['setEnvironment']; - } - } - } - - public function getName() { - return 'ApplicationDeploymentDescription'; - } - - 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::BOOL) { - $xfer += $input->readBool($this->isEmpty); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->appDeploymentId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->appModuleId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->computeHostId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->executablePath); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->appDeploymentDescription); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->moduleLoadCmd); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::LST) { - $this->libPrependPaths = array(); - $_size0 = 0; - $_etype3 = 0; - $xfer += $input->readListBegin($_etype3, $_size0); - for ($_i4 = 0; $_i4 < $_size0; ++$_i4) - { - $elem5 = null; - $elem5 = new \Airavata\Model\Application\Deployment\SetEnvPaths(); - $xfer += $elem5->read($input); - $this->libPrependPaths []= $elem5; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 9: - if ($ftype == TType::LST) { - $this->libAppendPaths = array(); - $_size6 = 0; - $_etype9 = 0; - $xfer += $input->readListBegin($_etype9, $_size6); - for ($_i10 = 0; $_i10 < $_size6; ++$_i10) - { - $elem11 = null; - $elem11 = new \Airavata\Model\Application\Deployment\SetEnvPaths(); - $xfer += $elem11->read($input); - $this->libAppendPaths []= $elem11; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 10: - if ($ftype == TType::LST) { - $this->setEnvironment = array(); - $_size12 = 0; - $_etype15 = 0; - $xfer += $input->readListBegin($_etype15, $_size12); - for ($_i16 = 0; $_i16 < $_size12; ++$_i16) - { - $elem17 = null; - $elem17 = new \Airavata\Model\Application\Deployment\SetEnvPaths(); - $xfer += $elem17->read($input); - $this->setEnvironment []= $elem17; - } - $xfer += $input->readListEnd(); - } 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('ApplicationDeploymentDescription'); - if ($this->isEmpty !== null) { - $xfer += $output->writeFieldBegin('isEmpty', TType::BOOL, 1); - $xfer += $output->writeBool($this->isEmpty); - $xfer += $output->writeFieldEnd(); - } - if ($this->appDeploymentId !== null) { - $xfer += $output->writeFieldBegin('appDeploymentId', TType::STRING, 2); - $xfer += $output->writeString($this->appDeploymentId); - $xfer += $output->writeFieldEnd(); - } - if ($this->appModuleId !== null) { - $xfer += $output->writeFieldBegin('appModuleId', TType::STRING, 3); - $xfer += $output->writeString($this->appModuleId); - $xfer += $output->writeFieldEnd(); - } - if ($this->computeHostId !== null) { - $xfer += $output->writeFieldBegin('computeHostId', TType::STRING, 4); - $xfer += $output->writeString($this->computeHostId); - $xfer += $output->writeFieldEnd(); - } - if ($this->executablePath !== null) { - $xfer += $output->writeFieldBegin('executablePath', TType::STRING, 5); - $xfer += $output->writeString($this->executablePath); - $xfer += $output->writeFieldEnd(); - } - if ($this->appDeploymentDescription !== null) { - $xfer += $output->writeFieldBegin('appDeploymentDescription', TType::STRING, 6); - $xfer += $output->writeString($this->appDeploymentDescription); - $xfer += $output->writeFieldEnd(); - } - if ($this->moduleLoadCmd !== null) { - $xfer += $output->writeFieldBegin('moduleLoadCmd', TType::STRING, 7); - $xfer += $output->writeString($this->moduleLoadCmd); - $xfer += $output->writeFieldEnd(); - } - if ($this->libPrependPaths !== null) { - if (!is_array($this->libPrependPaths)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('libPrependPaths', TType::LST, 8); - { - $output->writeListBegin(TType::STRUCT, count($this->libPrependPaths)); - { - foreach ($this->libPrependPaths as $iter18) - { - $xfer += $iter18->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->libAppendPaths !== null) { - if (!is_array($this->libAppendPaths)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('libAppendPaths', TType::LST, 9); - { - $output->writeListBegin(TType::STRUCT, count($this->libAppendPaths)); - { - foreach ($this->libAppendPaths as $iter19) - { - $xfer += $iter19->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->setEnvironment !== null) { - if (!is_array($this->setEnvironment)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('setEnvironment', TType::LST, 10); - { - $output->writeListBegin(TType::STRUCT, count($this->setEnvironment)); - { - foreach ($this->setEnvironment as $iter20) - { - $xfer += $iter20->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -$GLOBALS['applicationDeploymentModel_CONSTANTS']['DEFAULT_ID'] = "DO_NOT_SET_AT_CLIENTS"; - - http://git-wip-us.apache.org/repos/asf/airavata/blob/01f648a5/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Application/Interface/Types.php ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Application/Interface/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Application/Interface/Types.php deleted file mode 100644 index 59ccc55..0000000 --- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Application/Interface/Types.php +++ /dev/null @@ -1,633 +0,0 @@ -<?php -namespace Airavata\Model\Application\Interface; - -/** - * Autogenerated by Thrift Compiler (0.9.1) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -use Thrift\Base\TBase; -use Thrift\Type\TType; -use Thrift\Type\TMessageType; -use Thrift\Exception\TException; -use Thrift\Exception\TProtocolException; -use Thrift\Protocol\TProtocol; -use Thrift\Protocol\TBinaryProtocolAccelerated; -use Thrift\Exception\TApplicationException; - - -final class DataType { - const STRING = 0; - const INTEGER = 1; - const FLOAT = 2; - const URI = 3; - static public $__names = array( - 0 => 'STRING', - 1 => 'INTEGER', - 2 => 'FLOAT', - 3 => 'URI', - ); -} - -class InputDataObjectType { - static $_TSPEC; - - public $isEmpty = false; - public $name = null; - public $value = null; - public $type = null; - public $applicationArguement = null; - public $standardInput = false; - public $userFriendlyDescription = null; - public $metaData = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'isEmpty', - 'type' => TType::BOOL, - ), - 2 => array( - 'var' => 'name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'value', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'type', - 'type' => TType::I32, - ), - 5 => array( - 'var' => 'applicationArguement', - 'type' => TType::STRING, - ), - 6 => array( - 'var' => 'standardInput', - 'type' => TType::BOOL, - ), - 7 => array( - 'var' => 'userFriendlyDescription', - 'type' => TType::STRING, - ), - 8 => array( - 'var' => 'metaData', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['isEmpty'])) { - $this->isEmpty = $vals['isEmpty']; - } - 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['applicationArguement'])) { - $this->applicationArguement = $vals['applicationArguement']; - } - if (isset($vals['standardInput'])) { - $this->standardInput = $vals['standardInput']; - } - if (isset($vals['userFriendlyDescription'])) { - $this->userFriendlyDescription = $vals['userFriendlyDescription']; - } - if (isset($vals['metaData'])) { - $this->metaData = $vals['metaData']; - } - } - } - - 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::BOOL) { - $xfer += $input->readBool($this->isEmpty); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->value); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->type); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->applicationArguement); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->standardInput); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->userFriendlyDescription); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->metaData); - } 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->isEmpty !== null) { - $xfer += $output->writeFieldBegin('isEmpty', TType::BOOL, 1); - $xfer += $output->writeBool($this->isEmpty); - $xfer += $output->writeFieldEnd(); - } - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 2); - $xfer += $output->writeString($this->name); - $xfer += $output->writeFieldEnd(); - } - if ($this->value !== null) { - $xfer += $output->writeFieldBegin('value', TType::STRING, 3); - $xfer += $output->writeString($this->value); - $xfer += $output->writeFieldEnd(); - } - if ($this->type !== null) { - $xfer += $output->writeFieldBegin('type', TType::I32, 4); - $xfer += $output->writeI32($this->type); - $xfer += $output->writeFieldEnd(); - } - if ($this->applicationArguement !== null) { - $xfer += $output->writeFieldBegin('applicationArguement', TType::STRING, 5); - $xfer += $output->writeString($this->applicationArguement); - $xfer += $output->writeFieldEnd(); - } - if ($this->standardInput !== null) { - $xfer += $output->writeFieldBegin('standardInput', TType::BOOL, 6); - $xfer += $output->writeBool($this->standardInput); - $xfer += $output->writeFieldEnd(); - } - if ($this->userFriendlyDescription !== null) { - $xfer += $output->writeFieldBegin('userFriendlyDescription', TType::STRING, 7); - $xfer += $output->writeString($this->userFriendlyDescription); - $xfer += $output->writeFieldEnd(); - } - if ($this->metaData !== null) { - $xfer += $output->writeFieldBegin('metaData', TType::STRING, 8); - $xfer += $output->writeString($this->metaData); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class OutputDataObjectType { - static $_TSPEC; - - public $isEmpty = false; - public $name = null; - public $value = null; - public $type = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'isEmpty', - 'type' => TType::BOOL, - ), - 2 => array( - 'var' => 'name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'value', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'type', - 'type' => TType::I32, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['isEmpty'])) { - $this->isEmpty = $vals['isEmpty']; - } - if (isset($vals['name'])) { - $this->name = $vals['name']; - } - if (isset($vals['value'])) { - $this->value = $vals['value']; - } - if (isset($vals['type'])) { - $this->type = $vals['type']; - } - } - } - - 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::BOOL) { - $xfer += $input->readBool($this->isEmpty); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->value); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->type); - } 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->isEmpty !== null) { - $xfer += $output->writeFieldBegin('isEmpty', TType::BOOL, 1); - $xfer += $output->writeBool($this->isEmpty); - $xfer += $output->writeFieldEnd(); - } - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 2); - $xfer += $output->writeString($this->name); - $xfer += $output->writeFieldEnd(); - } - if ($this->value !== null) { - $xfer += $output->writeFieldBegin('value', TType::STRING, 3); - $xfer += $output->writeString($this->value); - $xfer += $output->writeFieldEnd(); - } - if ($this->type !== null) { - $xfer += $output->writeFieldBegin('type', TType::I32, 4); - $xfer += $output->writeI32($this->type); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ApplicationInterfaceDescription { - static $_TSPEC; - - public $isEmpty = false; - public $applicationInterfaceId = "DO_NOT_SET_AT_CLIENTS"; - public $applicationName = null; - public $applicationModules = null; - public $applicationInputs = null; - public $applicationOutputs = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'isEmpty', - 'type' => TType::BOOL, - ), - 2 => array( - 'var' => 'applicationInterfaceId', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'applicationName', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'applicationModules', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 5 => array( - 'var' => 'applicationInputs', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Airavata\Model\Application\Interface\InputDataObjectType', - ), - ), - 6 => array( - 'var' => 'applicationOutputs', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Airavata\Model\Application\Interface\OutputDataObjectType', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['isEmpty'])) { - $this->isEmpty = $vals['isEmpty']; - } - if (isset($vals['applicationInterfaceId'])) { - $this->applicationInterfaceId = $vals['applicationInterfaceId']; - } - if (isset($vals['applicationName'])) { - $this->applicationName = $vals['applicationName']; - } - if (isset($vals['applicationModules'])) { - $this->applicationModules = $vals['applicationModules']; - } - if (isset($vals['applicationInputs'])) { - $this->applicationInputs = $vals['applicationInputs']; - } - if (isset($vals['applicationOutputs'])) { - $this->applicationOutputs = $vals['applicationOutputs']; - } - } - } - - public function getName() { - return 'ApplicationInterfaceDescription'; - } - - 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::BOOL) { - $xfer += $input->readBool($this->isEmpty); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->applicationInterfaceId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->applicationName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::LST) { - $this->applicationModules = array(); - $_size0 = 0; - $_etype3 = 0; - $xfer += $input->readListBegin($_etype3, $_size0); - for ($_i4 = 0; $_i4 < $_size0; ++$_i4) - { - $elem5 = null; - $xfer += $input->readString($elem5); - $this->applicationModules []= $elem5; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::LST) { - $this->applicationInputs = array(); - $_size6 = 0; - $_etype9 = 0; - $xfer += $input->readListBegin($_etype9, $_size6); - for ($_i10 = 0; $_i10 < $_size6; ++$_i10) - { - $elem11 = null; - $elem11 = new \Airavata\Model\Application\Interface\InputDataObjectType(); - $xfer += $elem11->read($input); - $this->applicationInputs []= $elem11; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::LST) { - $this->applicationOutputs = array(); - $_size12 = 0; - $_etype15 = 0; - $xfer += $input->readListBegin($_etype15, $_size12); - for ($_i16 = 0; $_i16 < $_size12; ++$_i16) - { - $elem17 = null; - $elem17 = new \Airavata\Model\Application\Interface\OutputDataObjectType(); - $xfer += $elem17->read($input); - $this->applicationOutputs []= $elem17; - } - $xfer += $input->readListEnd(); - } 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('ApplicationInterfaceDescription'); - if ($this->isEmpty !== null) { - $xfer += $output->writeFieldBegin('isEmpty', TType::BOOL, 1); - $xfer += $output->writeBool($this->isEmpty); - $xfer += $output->writeFieldEnd(); - } - if ($this->applicationInterfaceId !== null) { - $xfer += $output->writeFieldBegin('applicationInterfaceId', TType::STRING, 2); - $xfer += $output->writeString($this->applicationInterfaceId); - $xfer += $output->writeFieldEnd(); - } - if ($this->applicationName !== null) { - $xfer += $output->writeFieldBegin('applicationName', TType::STRING, 3); - $xfer += $output->writeString($this->applicationName); - $xfer += $output->writeFieldEnd(); - } - if ($this->applicationModules !== null) { - if (!is_array($this->applicationModules)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('applicationModules', TType::LST, 4); - { - $output->writeListBegin(TType::STRING, count($this->applicationModules)); - { - foreach ($this->applicationModules as $iter18) - { - $xfer += $output->writeString($iter18); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->applicationInputs !== null) { - if (!is_array($this->applicationInputs)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('applicationInputs', TType::LST, 5); - { - $output->writeListBegin(TType::STRUCT, count($this->applicationInputs)); - { - foreach ($this->applicationInputs as $iter19) - { - $xfer += $iter19->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->applicationOutputs !== null) { - if (!is_array($this->applicationOutputs)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('applicationOutputs', TType::LST, 6); - { - $output->writeListBegin(TType::STRUCT, count($this->applicationOutputs)); - { - foreach ($this->applicationOutputs as $iter20) - { - $xfer += $iter20->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -$GLOBALS['applicationInterfaceModel_CONSTANTS']['DEFAULT_ID'] = "DO_NOT_SET_AT_CLIENTS"; - - http://git-wip-us.apache.org/repos/asf/airavata/blob/01f648a5/samples/php-cli-samples/airavata-client-properties.ini ---------------------------------------------------------------------- diff --git a/samples/php-cli-samples/airavata-client-properties.ini b/samples/php-cli-samples/airavata-client-properties.ini index 87d2f41..4e24eaa 100644 --- a/samples/php-cli-samples/airavata-client-properties.ini +++ b/samples/php-cli-samples/airavata-client-properties.ini @@ -8,7 +8,8 @@ THRIFT_LIB_DIR = "../../airavata-api/airavata-client-sdks/airavata-php-sdk/src/m AIRAVATA_PHP_STUBS_DIR = "../../airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/" ; Host which runs the Airavata Server -AIRAVATA_SERVER = "gw111.iu.xsede.org" +; AIRAVATA_SERVER = "gw111.iu.xsede.org" +AIRAVATA_SERVER = "localhost" ; Airavata Server thrift port AIRAVATA_PORT = 8930 http://git-wip-us.apache.org/repos/asf/airavata/blob/01f648a5/samples/php-cli-samples/getAppModule.php ---------------------------------------------------------------------- diff --git a/samples/php-cli-samples/getAppModule.php b/samples/php-cli-samples/getAppModule.php new file mode 100644 index 0000000..1324b7d --- /dev/null +++ b/samples/php-cli-samples/getAppModule.php @@ -0,0 +1,95 @@ +<?php +namespace Airavata\Client\Samples; + +$airavataconfig = parse_ini_file("airavata-client-properties.ini"); + +$GLOBALS['THRIFT_ROOT'] = $airavataconfig['THRIFT_LIB_DIR']; +require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php'; + +$GLOBALS['AIRAVATA_ROOT'] = $airavataconfig['AIRAVATA_PHP_STUBS_DIR']; +require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php'; +require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php'; +require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/AppCatalog/AppDeployment/Types.php'; + +use Airavata\API\Error\AiravataClientException; +use Airavata\API\Error\AiravataSystemException; +use Airavata\API\Error\ExperimentNotFoundException; +use Airavata\API\Error\InvalidRequestException; +use Airavata\Client\AiravataClientFactory; +use Airavata\Model\Workspace\Experiment\ExperimentState; +use Thrift\Exception\TTransportException; +use Thrift\Protocol\TBinaryProtocol; +use Thrift\Transport\TBufferedTransport; +use Thrift\Transport\TSocket; +use Airavata\API\AiravataClient; + +$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']); +$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']); + +$protocol = new TBinaryProtocol($transport); +$transport->open(); +$airavataclient = new AiravataClient($protocol); + + +if (count($argv) < 2) { + exit("Please provide an appModuleID. \n"); +} + +$appModuleId = $argv[1]; + +$applicationModule = get_appModule($appModuleId); + +var_dump($applicationModule); + +$transport->close(); + +/** + * Get the appModule with the given ID + * @param $appModuleId + * @return null + */ +function get_appModule($appModuleId) +{ + global $airavataclient; + + try + { + return $airavataclient->getAppicationModule($appModuleId); + } + catch (InvalidRequestException $ire) + { + echo 'InvalidRequestException!<br><br>' . $ire->getMessage(); + } + catch (AiravataClientException $ace) + { + echo 'AiravataClientException!<br><br>' . $ace->getMessage(); + } + catch (AiravataSystemException $ase) + { + echo 'AiravataSystemException!<br><br>' . $ase->getMessage(); + } + catch (TTransportException $tte) + { + echo 'TTransportException!<br><br>' . $tte->getMessage(); + } + catch (\Exception $e) + { + echo 'Exception!<br><br>' . $e->getMessage(); + } + +} + +?> + http://git-wip-us.apache.org/repos/asf/airavata/blob/01f648a5/samples/php-cli-samples/registerAppModule.php ---------------------------------------------------------------------- diff --git a/samples/php-cli-samples/registerAppModule.php b/samples/php-cli-samples/registerAppModule.php new file mode 100755 index 0000000..7bec80e --- /dev/null +++ b/samples/php-cli-samples/registerAppModule.php @@ -0,0 +1,102 @@ +<?php +namespace Airavata\Client\Samples; + +$airavataconfig = parse_ini_file("airavata-client-properties.ini"); + +$GLOBALS['THRIFT_ROOT'] = $airavataconfig['THRIFT_LIB_DIR']; +require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php'; +require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php'; + +$GLOBALS['AIRAVATA_ROOT'] = $airavataconfig['AIRAVATA_PHP_STUBS_DIR']; +require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php'; +require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php'; +require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/AppCatalog/AppDeployment/Types.php'; + + +use Airavata\API\Error\AiravataClientException; +use Airavata\API\Error\AiravataSystemException; +use Airavata\API\Error\InvalidRequestException; +use Airavata\Client\AiravataClientFactory; +use Airavata\Model\AppCatalog\AppDeployment\ApplicationModule; +use Thrift\Protocol\TBinaryProtocol; +use Thrift\Transport\TBufferedTransport; +use Thrift\Transport\TSocket; +use Airavata\API\AiravataClient; + +use Airavata\Model\Workspace\Project; +use Airavata\Model\Workspace\Experiment\Experiment; +use Airavata\Model\Workspace\Experiment\DataObjectType; +use Airavata\Model\Workspace\Experiment\UserConfigurationData; +use Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling; +use Airavata\Model\Workspace\Experiment\DataType; + +$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']); +$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']); + +$protocol = new TBinaryProtocol($transport); +$transport->open(); +$airavataclient = new AiravataClient($protocol); + +try +{ + if ($argc != 4) + { + echo 'php registerAppModule.php <appModuleName> <appModuleVersion> <appModuleDescription>'; + } + else + { + $appModuleName = $argv[1]; + $appModuleVersion = $argv[2]; + $appModuleDescription = $argv[3]; + + + $appModule = new ApplicationModule(); + $appModule->appModuleName = $appModuleName; + $appModule->appModuleVersion = $appModuleVersion; + $appModule->appModuleDescription = $appModuleDescription; + + $appModuleId = $airavataclient->registerAppicationModule($appModule); + + if ($appModuleId) + { + var_dump($appModule); + echo "Application Module $appModuleId is registered! \n "; + } + else + { + echo "Failed to register application module. \n"; + } + } +} +catch (InvalidRequestException $ire) +{ + print 'InvalidRequestException: ' . $ire->getMessage()."\n"; +} +catch (AiravataClientException $ace) +{ + print 'Airavata System Exception: ' . $ace->getMessage()."\n"; +} +catch (AiravataSystemException $ase) +{ + print 'Airavata System Exception: ' . $ase->getMessage()."\n"; +} +catch (\Exception $e) +{ + echo 'Exception!<br><br>' . $e->getMessage(); +} + +$transport->close(); + +?> +
