http://git-wip-us.apache.org/repos/asf/airavata/blob/914799c1/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.cpp ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.cpp index 1b0a612..a744a1f 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.cpp +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.cpp @@ -35,18 +35,16 @@ int _kResourceJobManagerTypeValues[] = { ResourceJobManagerType::PBS, ResourceJobManagerType::SLURM, ResourceJobManagerType::LSF, - ResourceJobManagerType::UGE, - ResourceJobManagerType::CLOUD + ResourceJobManagerType::UGE }; const char* _kResourceJobManagerTypeNames[] = { "FORK", "PBS", "SLURM", "LSF", - "UGE", - "CLOUD" + "UGE" }; -const std::map<int, const char*> _ResourceJobManagerType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(6, _kResourceJobManagerTypeValues, _kResourceJobManagerTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); +const std::map<int, const char*> _ResourceJobManagerType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kResourceJobManagerTypeValues, _kResourceJobManagerTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); int _kJobManagerCommandValues[] = { JobManagerCommand::SUBMISSION, @@ -1391,10 +1389,6 @@ void CloudJobSubmission::__set_securityProtocol(const ::apache::airavata::model this->securityProtocol = val; } -void CloudJobSubmission::__set_jobManagerType(const ResourceJobManagerType::type val) { - this->jobManagerType = val; -} - void CloudJobSubmission::__set_nodeId(const std::string& val) { this->nodeId = val; } @@ -1425,7 +1419,6 @@ uint32_t CloudJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) bool isset_jobSubmissionInterfaceId = false; bool isset_securityProtocol = false; - bool isset_jobManagerType = false; bool isset_nodeId = false; bool isset_executableType = false; bool isset_providerName = false; @@ -1458,16 +1451,6 @@ uint32_t CloudJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) } break; case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast49; - xfer += iprot->readI32(ecast49); - this->jobManagerType = (ResourceJobManagerType::type)ecast49; - isset_jobManagerType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->nodeId); isset_nodeId = true; @@ -1475,7 +1458,7 @@ uint32_t CloudJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) xfer += iprot->skip(ftype); } break; - case 5: + case 4: if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->executableType); isset_executableType = true; @@ -1483,17 +1466,17 @@ uint32_t CloudJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) xfer += iprot->skip(ftype); } break; - case 6: + case 5: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast50; - xfer += iprot->readI32(ecast50); - this->providerName = (ProviderName::type)ecast50; + int32_t ecast49; + xfer += iprot->readI32(ecast49); + this->providerName = (ProviderName::type)ecast49; isset_providerName = true; } else { xfer += iprot->skip(ftype); } break; - case 7: + case 6: if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->userAccountName); isset_userAccountName = true; @@ -1514,8 +1497,6 @@ uint32_t CloudJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) throw TProtocolException(TProtocolException::INVALID_DATA); if (!isset_securityProtocol) throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_jobManagerType) - throw TProtocolException(TProtocolException::INVALID_DATA); if (!isset_nodeId) throw TProtocolException(TProtocolException::INVALID_DATA); if (!isset_executableType) @@ -1540,23 +1521,19 @@ uint32_t CloudJobSubmission::write(::apache::thrift::protocol::TProtocol* oprot) xfer += oprot->writeI32((int32_t)this->securityProtocol); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("jobManagerType", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32((int32_t)this->jobManagerType); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("nodeId", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeFieldBegin("nodeId", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->nodeId); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("executableType", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeFieldBegin("executableType", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString(this->executableType); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("providerName", ::apache::thrift::protocol::T_I32, 6); + xfer += oprot->writeFieldBegin("providerName", ::apache::thrift::protocol::T_I32, 5); xfer += oprot->writeI32((int32_t)this->providerName); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("userAccountName", ::apache::thrift::protocol::T_STRING, 7); + xfer += oprot->writeFieldBegin("userAccountName", ::apache::thrift::protocol::T_STRING, 6); xfer += oprot->writeString(this->userAccountName); xfer += oprot->writeFieldEnd(); @@ -1569,30 +1546,27 @@ void swap(CloudJobSubmission &a, CloudJobSubmission &b) { using ::std::swap; swap(a.jobSubmissionInterfaceId, b.jobSubmissionInterfaceId); swap(a.securityProtocol, b.securityProtocol); - swap(a.jobManagerType, b.jobManagerType); swap(a.nodeId, b.nodeId); swap(a.executableType, b.executableType); swap(a.providerName, b.providerName); swap(a.userAccountName, b.userAccountName); } -CloudJobSubmission::CloudJobSubmission(const CloudJobSubmission& other51) { +CloudJobSubmission::CloudJobSubmission(const CloudJobSubmission& other50) { + jobSubmissionInterfaceId = other50.jobSubmissionInterfaceId; + securityProtocol = other50.securityProtocol; + nodeId = other50.nodeId; + executableType = other50.executableType; + providerName = other50.providerName; + userAccountName = other50.userAccountName; +} +CloudJobSubmission& CloudJobSubmission::operator=(const CloudJobSubmission& other51) { jobSubmissionInterfaceId = other51.jobSubmissionInterfaceId; securityProtocol = other51.securityProtocol; - jobManagerType = other51.jobManagerType; nodeId = other51.nodeId; executableType = other51.executableType; providerName = other51.providerName; userAccountName = other51.userAccountName; -} -CloudJobSubmission& CloudJobSubmission::operator=(const CloudJobSubmission& other52) { - jobSubmissionInterfaceId = other52.jobSubmissionInterfaceId; - securityProtocol = other52.securityProtocol; - jobManagerType = other52.jobManagerType; - nodeId = other52.nodeId; - executableType = other52.executableType; - providerName = other52.providerName; - userAccountName = other52.userAccountName; return *this; } void CloudJobSubmission::printTo(std::ostream& out) const { @@ -1600,7 +1574,6 @@ void CloudJobSubmission::printTo(std::ostream& out) const { out << "CloudJobSubmission("; out << "jobSubmissionInterfaceId=" << to_string(jobSubmissionInterfaceId); out << ", " << "securityProtocol=" << to_string(securityProtocol); - out << ", " << "jobManagerType=" << to_string(jobManagerType); out << ", " << "nodeId=" << to_string(nodeId); out << ", " << "executableType=" << to_string(executableType); out << ", " << "providerName=" << to_string(providerName); @@ -1659,9 +1632,9 @@ uint32_t JobSubmissionInterface::read(::apache::thrift::protocol::TProtocol* ipr break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast53; - xfer += iprot->readI32(ecast53); - this->jobSubmissionProtocol = (JobSubmissionProtocol::type)ecast53; + int32_t ecast52; + xfer += iprot->readI32(ecast52); + this->jobSubmissionProtocol = (JobSubmissionProtocol::type)ecast52; isset_jobSubmissionProtocol = true; } else { xfer += iprot->skip(ftype); @@ -1722,15 +1695,15 @@ void swap(JobSubmissionInterface &a, JobSubmissionInterface &b) { swap(a.priorityOrder, b.priorityOrder); } -JobSubmissionInterface::JobSubmissionInterface(const JobSubmissionInterface& other54) { +JobSubmissionInterface::JobSubmissionInterface(const JobSubmissionInterface& other53) { + jobSubmissionInterfaceId = other53.jobSubmissionInterfaceId; + jobSubmissionProtocol = other53.jobSubmissionProtocol; + priorityOrder = other53.priorityOrder; +} +JobSubmissionInterface& JobSubmissionInterface::operator=(const JobSubmissionInterface& other54) { jobSubmissionInterfaceId = other54.jobSubmissionInterfaceId; jobSubmissionProtocol = other54.jobSubmissionProtocol; priorityOrder = other54.priorityOrder; -} -JobSubmissionInterface& JobSubmissionInterface::operator=(const JobSubmissionInterface& other55) { - jobSubmissionInterfaceId = other55.jobSubmissionInterfaceId; - jobSubmissionProtocol = other55.jobSubmissionProtocol; - priorityOrder = other55.priorityOrder; return *this; } void JobSubmissionInterface::printTo(std::ostream& out) const { @@ -1858,14 +1831,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol* if (ftype == ::apache::thrift::protocol::T_LIST) { { this->hostAliases.clear(); - uint32_t _size56; - ::apache::thrift::protocol::TType _etype59; - xfer += iprot->readListBegin(_etype59, _size56); - this->hostAliases.resize(_size56); - uint32_t _i60; - for (_i60 = 0; _i60 < _size56; ++_i60) + uint32_t _size55; + ::apache::thrift::protocol::TType _etype58; + xfer += iprot->readListBegin(_etype58, _size55); + this->hostAliases.resize(_size55); + uint32_t _i59; + for (_i59 = 0; _i59 < _size55; ++_i59) { - xfer += iprot->readString(this->hostAliases[_i60]); + xfer += iprot->readString(this->hostAliases[_i59]); } xfer += iprot->readListEnd(); } @@ -1878,14 +1851,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol* if (ftype == ::apache::thrift::protocol::T_LIST) { { this->ipAddresses.clear(); - uint32_t _size61; - ::apache::thrift::protocol::TType _etype64; - xfer += iprot->readListBegin(_etype64, _size61); - this->ipAddresses.resize(_size61); - uint32_t _i65; - for (_i65 = 0; _i65 < _size61; ++_i65) + uint32_t _size60; + ::apache::thrift::protocol::TType _etype63; + xfer += iprot->readListBegin(_etype63, _size60); + this->ipAddresses.resize(_size60); + uint32_t _i64; + for (_i64 = 0; _i64 < _size60; ++_i64) { - xfer += iprot->readString(this->ipAddresses[_i65]); + xfer += iprot->readString(this->ipAddresses[_i64]); } xfer += iprot->readListEnd(); } @@ -1914,14 +1887,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol* if (ftype == ::apache::thrift::protocol::T_LIST) { { this->batchQueues.clear(); - uint32_t _size66; - ::apache::thrift::protocol::TType _etype69; - xfer += iprot->readListBegin(_etype69, _size66); - this->batchQueues.resize(_size66); - uint32_t _i70; - for (_i70 = 0; _i70 < _size66; ++_i70) + uint32_t _size65; + ::apache::thrift::protocol::TType _etype68; + xfer += iprot->readListBegin(_etype68, _size65); + this->batchQueues.resize(_size65); + uint32_t _i69; + for (_i69 = 0; _i69 < _size65; ++_i69) { - xfer += this->batchQueues[_i70].read(iprot); + xfer += this->batchQueues[_i69].read(iprot); } xfer += iprot->readListEnd(); } @@ -1934,19 +1907,19 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol* if (ftype == ::apache::thrift::protocol::T_MAP) { { this->fileSystems.clear(); - uint32_t _size71; - ::apache::thrift::protocol::TType _ktype72; - ::apache::thrift::protocol::TType _vtype73; - xfer += iprot->readMapBegin(_ktype72, _vtype73, _size71); - uint32_t _i75; - for (_i75 = 0; _i75 < _size71; ++_i75) + uint32_t _size70; + ::apache::thrift::protocol::TType _ktype71; + ::apache::thrift::protocol::TType _vtype72; + xfer += iprot->readMapBegin(_ktype71, _vtype72, _size70); + uint32_t _i74; + for (_i74 = 0; _i74 < _size70; ++_i74) { - FileSystems::type _key76; - int32_t ecast78; - xfer += iprot->readI32(ecast78); - _key76 = (FileSystems::type)ecast78; - std::string& _val77 = this->fileSystems[_key76]; - xfer += iprot->readString(_val77); + FileSystems::type _key75; + int32_t ecast77; + xfer += iprot->readI32(ecast77); + _key75 = (FileSystems::type)ecast77; + std::string& _val76 = this->fileSystems[_key75]; + xfer += iprot->readString(_val76); } xfer += iprot->readMapEnd(); } @@ -1959,14 +1932,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol* if (ftype == ::apache::thrift::protocol::T_LIST) { { this->jobSubmissionInterfaces.clear(); - uint32_t _size79; - ::apache::thrift::protocol::TType _etype82; - xfer += iprot->readListBegin(_etype82, _size79); - this->jobSubmissionInterfaces.resize(_size79); - uint32_t _i83; - for (_i83 = 0; _i83 < _size79; ++_i83) + uint32_t _size78; + ::apache::thrift::protocol::TType _etype81; + xfer += iprot->readListBegin(_etype81, _size78); + this->jobSubmissionInterfaces.resize(_size78); + uint32_t _i82; + for (_i82 = 0; _i82 < _size78; ++_i82) { - xfer += this->jobSubmissionInterfaces[_i83].read(iprot); + xfer += this->jobSubmissionInterfaces[_i82].read(iprot); } xfer += iprot->readListEnd(); } @@ -1979,14 +1952,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol* if (ftype == ::apache::thrift::protocol::T_LIST) { { this->dataMovementInterfaces.clear(); - uint32_t _size84; - ::apache::thrift::protocol::TType _etype87; - xfer += iprot->readListBegin(_etype87, _size84); - this->dataMovementInterfaces.resize(_size84); - uint32_t _i88; - for (_i88 = 0; _i88 < _size84; ++_i88) + uint32_t _size83; + ::apache::thrift::protocol::TType _etype86; + xfer += iprot->readListBegin(_etype86, _size83); + this->dataMovementInterfaces.resize(_size83); + uint32_t _i87; + for (_i87 = 0; _i87 < _size83; ++_i87) { - xfer += this->dataMovementInterfaces[_i88].read(iprot); + xfer += this->dataMovementInterfaces[_i87].read(iprot); } xfer += iprot->readListEnd(); } @@ -2060,10 +2033,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol xfer += oprot->writeFieldBegin("hostAliases", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->hostAliases.size())); - std::vector<std::string> ::const_iterator _iter89; - for (_iter89 = this->hostAliases.begin(); _iter89 != this->hostAliases.end(); ++_iter89) + std::vector<std::string> ::const_iterator _iter88; + for (_iter88 = this->hostAliases.begin(); _iter88 != this->hostAliases.end(); ++_iter88) { - xfer += oprot->writeString((*_iter89)); + xfer += oprot->writeString((*_iter88)); } xfer += oprot->writeListEnd(); } @@ -2073,10 +2046,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol xfer += oprot->writeFieldBegin("ipAddresses", ::apache::thrift::protocol::T_LIST, 4); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->ipAddresses.size())); - std::vector<std::string> ::const_iterator _iter90; - for (_iter90 = this->ipAddresses.begin(); _iter90 != this->ipAddresses.end(); ++_iter90) + std::vector<std::string> ::const_iterator _iter89; + for (_iter89 = this->ipAddresses.begin(); _iter89 != this->ipAddresses.end(); ++_iter89) { - xfer += oprot->writeString((*_iter90)); + xfer += oprot->writeString((*_iter89)); } xfer += oprot->writeListEnd(); } @@ -2096,10 +2069,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol xfer += oprot->writeFieldBegin("batchQueues", ::apache::thrift::protocol::T_LIST, 7); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->batchQueues.size())); - std::vector<BatchQueue> ::const_iterator _iter91; - for (_iter91 = this->batchQueues.begin(); _iter91 != this->batchQueues.end(); ++_iter91) + std::vector<BatchQueue> ::const_iterator _iter90; + for (_iter90 = this->batchQueues.begin(); _iter90 != this->batchQueues.end(); ++_iter90) { - xfer += (*_iter91).write(oprot); + xfer += (*_iter90).write(oprot); } xfer += oprot->writeListEnd(); } @@ -2109,11 +2082,11 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol xfer += oprot->writeFieldBegin("fileSystems", ::apache::thrift::protocol::T_MAP, 8); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->fileSystems.size())); - std::map<FileSystems::type, std::string> ::const_iterator _iter92; - for (_iter92 = this->fileSystems.begin(); _iter92 != this->fileSystems.end(); ++_iter92) + std::map<FileSystems::type, std::string> ::const_iterator _iter91; + for (_iter91 = this->fileSystems.begin(); _iter91 != this->fileSystems.end(); ++_iter91) { - xfer += oprot->writeI32((int32_t)_iter92->first); - xfer += oprot->writeString(_iter92->second); + xfer += oprot->writeI32((int32_t)_iter91->first); + xfer += oprot->writeString(_iter91->second); } xfer += oprot->writeMapEnd(); } @@ -2123,10 +2096,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol xfer += oprot->writeFieldBegin("jobSubmissionInterfaces", ::apache::thrift::protocol::T_LIST, 9); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->jobSubmissionInterfaces.size())); - std::vector<JobSubmissionInterface> ::const_iterator _iter93; - for (_iter93 = this->jobSubmissionInterfaces.begin(); _iter93 != this->jobSubmissionInterfaces.end(); ++_iter93) + std::vector<JobSubmissionInterface> ::const_iterator _iter92; + for (_iter92 = this->jobSubmissionInterfaces.begin(); _iter92 != this->jobSubmissionInterfaces.end(); ++_iter92) { - xfer += (*_iter93).write(oprot); + xfer += (*_iter92).write(oprot); } xfer += oprot->writeListEnd(); } @@ -2136,10 +2109,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol xfer += oprot->writeFieldBegin("dataMovementInterfaces", ::apache::thrift::protocol::T_LIST, 10); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->dataMovementInterfaces.size())); - std::vector< ::apache::airavata::model::data::movement::DataMovementInterface> ::const_iterator _iter94; - for (_iter94 = this->dataMovementInterfaces.begin(); _iter94 != this->dataMovementInterfaces.end(); ++_iter94) + std::vector< ::apache::airavata::model::data::movement::DataMovementInterface> ::const_iterator _iter93; + for (_iter93 = this->dataMovementInterfaces.begin(); _iter93 != this->dataMovementInterfaces.end(); ++_iter93) { - xfer += (*_iter94).write(oprot); + xfer += (*_iter93).write(oprot); } xfer += oprot->writeListEnd(); } @@ -2189,7 +2162,24 @@ void swap(ComputeResourceDescription &a, ComputeResourceDescription &b) { swap(a.__isset, b.__isset); } -ComputeResourceDescription::ComputeResourceDescription(const ComputeResourceDescription& other95) { +ComputeResourceDescription::ComputeResourceDescription(const ComputeResourceDescription& other94) { + computeResourceId = other94.computeResourceId; + hostName = other94.hostName; + hostAliases = other94.hostAliases; + ipAddresses = other94.ipAddresses; + resourceDescription = other94.resourceDescription; + enabled = other94.enabled; + batchQueues = other94.batchQueues; + fileSystems = other94.fileSystems; + jobSubmissionInterfaces = other94.jobSubmissionInterfaces; + dataMovementInterfaces = other94.dataMovementInterfaces; + maxMemoryPerNode = other94.maxMemoryPerNode; + gatewayUsageReporting = other94.gatewayUsageReporting; + gatewayUsageModuleLoadCommand = other94.gatewayUsageModuleLoadCommand; + gatewayUsageExecutable = other94.gatewayUsageExecutable; + __isset = other94.__isset; +} +ComputeResourceDescription& ComputeResourceDescription::operator=(const ComputeResourceDescription& other95) { computeResourceId = other95.computeResourceId; hostName = other95.hostName; hostAliases = other95.hostAliases; @@ -2205,23 +2195,6 @@ ComputeResourceDescription::ComputeResourceDescription(const ComputeResourceDesc gatewayUsageModuleLoadCommand = other95.gatewayUsageModuleLoadCommand; gatewayUsageExecutable = other95.gatewayUsageExecutable; __isset = other95.__isset; -} -ComputeResourceDescription& ComputeResourceDescription::operator=(const ComputeResourceDescription& other96) { - computeResourceId = other96.computeResourceId; - hostName = other96.hostName; - hostAliases = other96.hostAliases; - ipAddresses = other96.ipAddresses; - resourceDescription = other96.resourceDescription; - enabled = other96.enabled; - batchQueues = other96.batchQueues; - fileSystems = other96.fileSystems; - jobSubmissionInterfaces = other96.jobSubmissionInterfaces; - dataMovementInterfaces = other96.dataMovementInterfaces; - maxMemoryPerNode = other96.maxMemoryPerNode; - gatewayUsageReporting = other96.gatewayUsageReporting; - gatewayUsageModuleLoadCommand = other96.gatewayUsageModuleLoadCommand; - gatewayUsageExecutable = other96.gatewayUsageExecutable; - __isset = other96.__isset; return *this; } void ComputeResourceDescription::printTo(std::ostream& out) const {
http://git-wip-us.apache.org/repos/asf/airavata/blob/914799c1/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.h ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.h index 479d828..89566a0 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.h +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.h @@ -45,8 +45,7 @@ struct ResourceJobManagerType { PBS = 1, SLURM = 2, LSF = 3, - UGE = 4, - CLOUD = 5 + UGE = 4 }; }; @@ -600,13 +599,12 @@ class CloudJobSubmission { CloudJobSubmission(const CloudJobSubmission&); CloudJobSubmission& operator=(const CloudJobSubmission&); - CloudJobSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol(( ::apache::airavata::model::data::movement::SecurityProtocol::type)0), jobManagerType((ResourceJobManagerType::type)0), nodeId(), executableType(), providerName((ProviderName::type)0), userAccountName() { + CloudJobSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol(( ::apache::airavata::model::data::movement::SecurityProtocol::type)0), nodeId(), executableType(), providerName((ProviderName::type)0), userAccountName() { } virtual ~CloudJobSubmission() throw(); std::string jobSubmissionInterfaceId; ::apache::airavata::model::data::movement::SecurityProtocol::type securityProtocol; - ResourceJobManagerType::type jobManagerType; std::string nodeId; std::string executableType; ProviderName::type providerName; @@ -616,8 +614,6 @@ class CloudJobSubmission { void __set_securityProtocol(const ::apache::airavata::model::data::movement::SecurityProtocol::type val); - void __set_jobManagerType(const ResourceJobManagerType::type val); - void __set_nodeId(const std::string& val); void __set_executableType(const std::string& val); @@ -632,8 +628,6 @@ class CloudJobSubmission { return false; if (!(securityProtocol == rhs.securityProtocol)) return false; - if (!(jobManagerType == rhs.jobManagerType)) - return false; if (!(nodeId == rhs.nodeId)) return false; if (!(executableType == rhs.executableType)) http://git-wip-us.apache.org/repos/asf/airavata/blob/914799c1/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/status_models_types.cpp ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/status_models_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/status_models_types.cpp index d178fa7..cda0fa1 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/status_models_types.cpp +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/status_models_types.cpp @@ -666,4 +666,205 @@ void JobStatus::printTo(std::ostream& out) const { out << ")"; } + +QueueStatusModel::~QueueStatusModel() throw() { +} + + +void QueueStatusModel::__set_hostName(const std::string& val) { + this->hostName = val; +} + +void QueueStatusModel::__set_queueName(const std::string& val) { + this->queueName = val; +} + +void QueueStatusModel::__set_queueUp(const bool val) { + this->queueUp = val; +} + +void QueueStatusModel::__set_runningJobs(const int32_t val) { + this->runningJobs = val; +} + +void QueueStatusModel::__set_queuedJobs(const int32_t val) { + this->queuedJobs = val; +} + +void QueueStatusModel::__set_time(const int64_t val) { + this->time = val; +} + +uint32_t QueueStatusModel::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_hostName = false; + bool isset_queueName = false; + bool isset_queueUp = false; + bool isset_runningJobs = false; + bool isset_queuedJobs = false; + bool isset_time = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->hostName); + isset_hostName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->queueName); + isset_queueName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->queueUp); + isset_queueUp = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->runningJobs); + isset_runningJobs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->queuedJobs); + isset_queuedJobs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->time); + isset_time = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_hostName) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_queueName) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_queueUp) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_runningJobs) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_queuedJobs) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_time) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t QueueStatusModel::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("QueueStatusModel"); + + xfer += oprot->writeFieldBegin("hostName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->hostName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("queueName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->queueName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("queueUp", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->queueUp); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("runningJobs", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32(this->runningJobs); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("queuedJobs", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->queuedJobs); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("time", ::apache::thrift::protocol::T_I64, 6); + xfer += oprot->writeI64(this->time); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(QueueStatusModel &a, QueueStatusModel &b) { + using ::std::swap; + swap(a.hostName, b.hostName); + swap(a.queueName, b.queueName); + swap(a.queueUp, b.queueUp); + swap(a.runningJobs, b.runningJobs); + swap(a.queuedJobs, b.queuedJobs); + swap(a.time, b.time); +} + +QueueStatusModel::QueueStatusModel(const QueueStatusModel& other12) { + hostName = other12.hostName; + queueName = other12.queueName; + queueUp = other12.queueUp; + runningJobs = other12.runningJobs; + queuedJobs = other12.queuedJobs; + time = other12.time; +} +QueueStatusModel& QueueStatusModel::operator=(const QueueStatusModel& other13) { + hostName = other13.hostName; + queueName = other13.queueName; + queueUp = other13.queueUp; + runningJobs = other13.runningJobs; + queuedJobs = other13.queuedJobs; + time = other13.time; + return *this; +} +void QueueStatusModel::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "QueueStatusModel("; + out << "hostName=" << to_string(hostName); + out << ", " << "queueName=" << to_string(queueName); + out << ", " << "queueUp=" << to_string(queueUp); + out << ", " << "runningJobs=" << to_string(runningJobs); + out << ", " << "queuedJobs=" << to_string(queuedJobs); + out << ", " << "time=" << to_string(time); + out << ")"; +} + }}}} // namespace http://git-wip-us.apache.org/repos/asf/airavata/blob/914799c1/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/status_models_types.h ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/status_models_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/status_models_types.h index c4cd170..f8045af 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/status_models_types.h +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/status_models_types.h @@ -108,6 +108,8 @@ class TaskStatus; class JobStatus; +class QueueStatusModel; + typedef struct _ExperimentStatus__isset { _ExperimentStatus__isset() : timeOfStateChange(false), reason(false) {} bool timeOfStateChange :1; @@ -352,6 +354,71 @@ inline std::ostream& operator<<(std::ostream& out, const JobStatus& obj) return out; } + +class QueueStatusModel { + public: + + QueueStatusModel(const QueueStatusModel&); + QueueStatusModel& operator=(const QueueStatusModel&); + QueueStatusModel() : hostName(), queueName(), queueUp(0), runningJobs(0), queuedJobs(0), time(0) { + } + + virtual ~QueueStatusModel() throw(); + std::string hostName; + std::string queueName; + bool queueUp; + int32_t runningJobs; + int32_t queuedJobs; + int64_t time; + + void __set_hostName(const std::string& val); + + void __set_queueName(const std::string& val); + + void __set_queueUp(const bool val); + + void __set_runningJobs(const int32_t val); + + void __set_queuedJobs(const int32_t val); + + void __set_time(const int64_t val); + + bool operator == (const QueueStatusModel & rhs) const + { + if (!(hostName == rhs.hostName)) + return false; + if (!(queueName == rhs.queueName)) + return false; + if (!(queueUp == rhs.queueUp)) + return false; + if (!(runningJobs == rhs.runningJobs)) + return false; + if (!(queuedJobs == rhs.queuedJobs)) + return false; + if (!(time == rhs.time)) + return false; + return true; + } + bool operator != (const QueueStatusModel &rhs) const { + return !(*this == rhs); + } + + bool operator < (const QueueStatusModel & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; +}; + +void swap(QueueStatusModel &a, QueueStatusModel &b); + +inline std::ostream& operator<<(std::ostream& out, const QueueStatusModel& obj) +{ + obj.printTo(out); + return out; +} + }}}} // namespace #endif http://git-wip-us.apache.org/repos/asf/airavata/blob/914799c1/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php index 5739ce5..0cea7e2 100644 --- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php +++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php @@ -3761,6 +3761,15 @@ interface AiravataIf { */ public function getAllWorkflows(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId); /** + * @param \Airavata\Model\Security\AuthzToken $authzToken + * @return \Airavata\Model\Status\QueueStatusModel[] + * @throws \Airavata\API\Error\InvalidRequestException + * @throws \Airavata\API\Error\AiravataClientException + * @throws \Airavata\API\Error\AiravataSystemException + * @throws \Airavata\API\Error\AuthorizationException + */ + public function getLatestQueueStatuses(\Airavata\Model\Security\AuthzToken $authzToken); + /** * * API Methods Related for Work-Flow Submission Features. * @@ -13562,6 +13571,69 @@ class AiravataClient implements \Airavata\API\AiravataIf { throw new \Exception("getAllWorkflows failed: unknown result"); } + public function getLatestQueueStatuses(\Airavata\Model\Security\AuthzToken $authzToken) + { + $this->send_getLatestQueueStatuses($authzToken); + return $this->recv_getLatestQueueStatuses(); + } + + public function send_getLatestQueueStatuses(\Airavata\Model\Security\AuthzToken $authzToken) + { + $args = new \Airavata\API\Airavata_getLatestQueueStatuses_args(); + $args->authzToken = $authzToken; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getLatestQueueStatuses', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getLatestQueueStatuses', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getLatestQueueStatuses() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getLatestQueueStatuses_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \Airavata\API\Airavata_getLatestQueueStatuses_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ire !== null) { + throw $result->ire; + } + if ($result->ace !== null) { + throw $result->ace; + } + if ($result->ase !== null) { + throw $result->ase; + } + if ($result->ae !== null) { + throw $result->ae; + } + throw new \Exception("getLatestQueueStatuses failed: unknown result"); + } + public function getWorkflow(\Airavata\Model\Security\AuthzToken $authzToken, $workflowTemplateId) { $this->send_getWorkflow($authzToken, $workflowTemplateId); @@ -60135,6 +60207,289 @@ class Airavata_getAllWorkflows_result { } +class Airavata_getLatestQueueStatuses_args { + static $_TSPEC; + + /** + * @var \Airavata\Model\Security\AuthzToken + */ + public $authzToken = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'authzToken', + 'type' => TType::STRUCT, + 'class' => '\Airavata\Model\Security\AuthzToken', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['authzToken'])) { + $this->authzToken = $vals['authzToken']; + } + } + } + + public function getName() { + return 'Airavata_getLatestQueueStatuses_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->authzToken = new \Airavata\Model\Security\AuthzToken(); + $xfer += $this->authzToken->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Airavata_getLatestQueueStatuses_args'); + if ($this->authzToken !== null) { + if (!is_object($this->authzToken)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1); + $xfer += $this->authzToken->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Airavata_getLatestQueueStatuses_result { + static $_TSPEC; + + /** + * @var \Airavata\Model\Status\QueueStatusModel[] + */ + public $success = null; + /** + * @var \Airavata\API\Error\InvalidRequestException + */ + public $ire = null; + /** + * @var \Airavata\API\Error\AiravataClientException + */ + public $ace = null; + /** + * @var \Airavata\API\Error\AiravataSystemException + */ + public $ase = null; + /** + * @var \Airavata\API\Error\AuthorizationException + */ + public $ae = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\Airavata\Model\Status\QueueStatusModel', + ), + ), + 1 => array( + 'var' => 'ire', + 'type' => TType::STRUCT, + 'class' => '\Airavata\API\Error\InvalidRequestException', + ), + 2 => array( + 'var' => 'ace', + 'type' => TType::STRUCT, + 'class' => '\Airavata\API\Error\AiravataClientException', + ), + 3 => array( + 'var' => 'ase', + 'type' => TType::STRUCT, + 'class' => '\Airavata\API\Error\AiravataSystemException', + ), + 4 => array( + 'var' => 'ae', + 'type' => TType::STRUCT, + 'class' => '\Airavata\API\Error\AuthorizationException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ire'])) { + $this->ire = $vals['ire']; + } + if (isset($vals['ace'])) { + $this->ace = $vals['ace']; + } + if (isset($vals['ase'])) { + $this->ase = $vals['ase']; + } + if (isset($vals['ae'])) { + $this->ae = $vals['ae']; + } + } + } + + public function getName() { + return 'Airavata_getLatestQueueStatuses_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size281 = 0; + $_etype284 = 0; + $xfer += $input->readListBegin($_etype284, $_size281); + for ($_i285 = 0; $_i285 < $_size281; ++$_i285) + { + $elem286 = null; + $elem286 = new \Airavata\Model\Status\QueueStatusModel(); + $xfer += $elem286->read($input); + $this->success []= $elem286; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ire = new \Airavata\API\Error\InvalidRequestException(); + $xfer += $this->ire->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->ace = new \Airavata\API\Error\AiravataClientException(); + $xfer += $this->ace->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->ase = new \Airavata\API\Error\AiravataSystemException(); + $xfer += $this->ase->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->ae = new \Airavata\API\Error\AuthorizationException(); + $xfer += $this->ae->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Airavata_getLatestQueueStatuses_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter287) + { + $xfer += $iter287->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->ire !== null) { + $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1); + $xfer += $this->ire->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ace !== null) { + $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2); + $xfer += $this->ace->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ase !== null) { + $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3); + $xfer += $this->ase->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ae !== null) { + $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 4); + $xfer += $this->ae->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + class Airavata_getWorkflow_args { static $_TSPEC; @@ -63152,15 +63507,15 @@ class Airavata_getChildDataProducts_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size281 = 0; - $_etype284 = 0; - $xfer += $input->readListBegin($_etype284, $_size281); - for ($_i285 = 0; $_i285 < $_size281; ++$_i285) + $_size288 = 0; + $_etype291 = 0; + $xfer += $input->readListBegin($_etype291, $_size288); + for ($_i292 = 0; $_i292 < $_size288; ++$_i292) { - $elem286 = null; - $elem286 = new \Airavata\Model\Data\Replica\DataProductModel(); - $xfer += $elem286->read($input); - $this->success []= $elem286; + $elem293 = null; + $elem293 = new \Airavata\Model\Data\Replica\DataProductModel(); + $xfer += $elem293->read($input); + $this->success []= $elem293; } $xfer += $input->readListEnd(); } else { @@ -63220,9 +63575,9 @@ class Airavata_getChildDataProducts_result { { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter287) + foreach ($this->success as $iter294) { - $xfer += $iter287->write($output); + $xfer += $iter294->write($output); } } $output->writeListEnd(); @@ -63366,17 +63721,17 @@ class Airavata_shareResourceWithUsers_args { case 4: if ($ftype == TType::MAP) { $this->userPermissionList = array(); - $_size288 = 0; - $_ktype289 = 0; - $_vtype290 = 0; - $xfer += $input->readMapBegin($_ktype289, $_vtype290, $_size288); - for ($_i292 = 0; $_i292 < $_size288; ++$_i292) + $_size295 = 0; + $_ktype296 = 0; + $_vtype297 = 0; + $xfer += $input->readMapBegin($_ktype296, $_vtype297, $_size295); + for ($_i299 = 0; $_i299 < $_size295; ++$_i299) { - $key293 = ''; - $val294 = 0; - $xfer += $input->readString($key293); - $xfer += $input->readI32($val294); - $this->userPermissionList[$key293] = $val294; + $key300 = ''; + $val301 = 0; + $xfer += $input->readString($key300); + $xfer += $input->readI32($val301); + $this->userPermissionList[$key300] = $val301; } $xfer += $input->readMapEnd(); } else { @@ -63422,10 +63777,10 @@ class Airavata_shareResourceWithUsers_args { { $output->writeMapBegin(TType::STRING, TType::I32, count($this->userPermissionList)); { - foreach ($this->userPermissionList as $kiter295 => $viter296) + foreach ($this->userPermissionList as $kiter302 => $viter303) { - $xfer += $output->writeString($kiter295); - $xfer += $output->writeI32($viter296); + $xfer += $output->writeString($kiter302); + $xfer += $output->writeI32($viter303); } } $output->writeMapEnd(); @@ -63724,17 +64079,17 @@ class Airavata_revokeSharingOfResourceFromUsers_args { case 4: if ($ftype == TType::MAP) { $this->userPermissionList = array(); - $_size297 = 0; - $_ktype298 = 0; - $_vtype299 = 0; - $xfer += $input->readMapBegin($_ktype298, $_vtype299, $_size297); - for ($_i301 = 0; $_i301 < $_size297; ++$_i301) + $_size304 = 0; + $_ktype305 = 0; + $_vtype306 = 0; + $xfer += $input->readMapBegin($_ktype305, $_vtype306, $_size304); + for ($_i308 = 0; $_i308 < $_size304; ++$_i308) { - $key302 = ''; - $val303 = 0; - $xfer += $input->readString($key302); - $xfer += $input->readI32($val303); - $this->userPermissionList[$key302] = $val303; + $key309 = ''; + $val310 = 0; + $xfer += $input->readString($key309); + $xfer += $input->readI32($val310); + $this->userPermissionList[$key309] = $val310; } $xfer += $input->readMapEnd(); } else { @@ -63780,10 +64135,10 @@ class Airavata_revokeSharingOfResourceFromUsers_args { { $output->writeMapBegin(TType::STRING, TType::I32, count($this->userPermissionList)); { - foreach ($this->userPermissionList as $kiter304 => $viter305) + foreach ($this->userPermissionList as $kiter311 => $viter312) { - $xfer += $output->writeString($kiter304); - $xfer += $output->writeI32($viter305); + $xfer += $output->writeString($kiter311); + $xfer += $output->writeI32($viter312); } } $output->writeMapEnd(); @@ -64219,14 +64574,14 @@ class Airavata_getAllAccessibleUsers_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size306 = 0; - $_etype309 = 0; - $xfer += $input->readListBegin($_etype309, $_size306); - for ($_i310 = 0; $_i310 < $_size306; ++$_i310) + $_size313 = 0; + $_etype316 = 0; + $xfer += $input->readListBegin($_etype316, $_size313); + for ($_i317 = 0; $_i317 < $_size313; ++$_i317) { - $elem311 = null; - $xfer += $input->readString($elem311); - $this->success []= $elem311; + $elem318 = null; + $xfer += $input->readString($elem318); + $this->success []= $elem318; } $xfer += $input->readListEnd(); } else { @@ -64286,9 +64641,9 @@ class Airavata_getAllAccessibleUsers_result { { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter312) + foreach ($this->success as $iter319) { - $xfer += $output->writeString($iter312); + $xfer += $output->writeString($iter319); } } $output->writeListEnd(); @@ -65720,15 +66075,15 @@ class Airavata_getAllGroupsUserBelongs_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size313 = 0; - $_etype316 = 0; - $xfer += $input->readListBegin($_etype316, $_size313); - for ($_i317 = 0; $_i317 < $_size313; ++$_i317) + $_size320 = 0; + $_etype323 = 0; + $xfer += $input->readListBegin($_etype323, $_size320); + for ($_i324 = 0; $_i324 < $_size320; ++$_i324) { - $elem318 = null; - $elem318 = new \Airavata\Model\Group\GroupModel(); - $xfer += $elem318->read($input); - $this->success []= $elem318; + $elem325 = null; + $elem325 = new \Airavata\Model\Group\GroupModel(); + $xfer += $elem325->read($input); + $this->success []= $elem325; } $xfer += $input->readListEnd(); } else { @@ -65788,9 +66143,9 @@ class Airavata_getAllGroupsUserBelongs_result { { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter319) + foreach ($this->success as $iter326) { - $xfer += $iter319->write($output); + $xfer += $iter326->write($output); } } $output->writeListEnd(); http://git-wip-us.apache.org/repos/asf/airavata/blob/914799c1/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php index 63cc404..39acd3c 100644 --- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php +++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php @@ -42,14 +42,12 @@ final class ResourceJobManagerType { const SLURM = 2; const LSF = 3; const UGE = 4; - const CLOUD = 5; static public $__names = array( 0 => 'FORK', 1 => 'PBS', 2 => 'SLURM', 3 => 'LSF', 4 => 'UGE', - 5 => 'CLOUD', ); } @@ -1486,10 +1484,6 @@ class CloudJobSubmission { */ public $securityProtocol = null; /** - * @var int - */ - public $jobManagerType = null; - /** * @var string */ public $nodeId = null; @@ -1518,22 +1512,18 @@ class CloudJobSubmission { 'type' => TType::I32, ), 3 => array( - 'var' => 'jobManagerType', - 'type' => TType::I32, - ), - 4 => array( 'var' => 'nodeId', 'type' => TType::STRING, ), - 5 => array( + 4 => array( 'var' => 'executableType', 'type' => TType::STRING, ), - 6 => array( + 5 => array( 'var' => 'providerName', 'type' => TType::I32, ), - 7 => array( + 6 => array( 'var' => 'userAccountName', 'type' => TType::STRING, ), @@ -1546,9 +1536,6 @@ class CloudJobSubmission { if (isset($vals['securityProtocol'])) { $this->securityProtocol = $vals['securityProtocol']; } - if (isset($vals['jobManagerType'])) { - $this->jobManagerType = $vals['jobManagerType']; - } if (isset($vals['nodeId'])) { $this->nodeId = $vals['nodeId']; } @@ -1598,34 +1585,27 @@ class CloudJobSubmission { } break; case 3: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->jobManagerType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: if ($ftype == TType::STRING) { $xfer += $input->readString($this->nodeId); } else { $xfer += $input->skip($ftype); } break; - case 5: + case 4: if ($ftype == TType::STRING) { $xfer += $input->readString($this->executableType); } else { $xfer += $input->skip($ftype); } break; - case 6: + case 5: if ($ftype == TType::I32) { $xfer += $input->readI32($this->providerName); } else { $xfer += $input->skip($ftype); } break; - case 7: + case 6: if ($ftype == TType::STRING) { $xfer += $input->readString($this->userAccountName); } else { @@ -1655,28 +1635,23 @@ class CloudJobSubmission { $xfer += $output->writeI32($this->securityProtocol); $xfer += $output->writeFieldEnd(); } - if ($this->jobManagerType !== null) { - $xfer += $output->writeFieldBegin('jobManagerType', TType::I32, 3); - $xfer += $output->writeI32($this->jobManagerType); - $xfer += $output->writeFieldEnd(); - } if ($this->nodeId !== null) { - $xfer += $output->writeFieldBegin('nodeId', TType::STRING, 4); + $xfer += $output->writeFieldBegin('nodeId', TType::STRING, 3); $xfer += $output->writeString($this->nodeId); $xfer += $output->writeFieldEnd(); } if ($this->executableType !== null) { - $xfer += $output->writeFieldBegin('executableType', TType::STRING, 5); + $xfer += $output->writeFieldBegin('executableType', TType::STRING, 4); $xfer += $output->writeString($this->executableType); $xfer += $output->writeFieldEnd(); } if ($this->providerName !== null) { - $xfer += $output->writeFieldBegin('providerName', TType::I32, 6); + $xfer += $output->writeFieldBegin('providerName', TType::I32, 5); $xfer += $output->writeI32($this->providerName); $xfer += $output->writeFieldEnd(); } if ($this->userAccountName !== null) { - $xfer += $output->writeFieldBegin('userAccountName', TType::STRING, 7); + $xfer += $output->writeFieldBegin('userAccountName', TType::STRING, 6); $xfer += $output->writeString($this->userAccountName); $xfer += $output->writeFieldEnd(); } http://git-wip-us.apache.org/repos/asf/airavata/blob/914799c1/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Status/Types.php ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Status/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Status/Types.php index 8457502..0a0a23b 100644 --- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Status/Types.php +++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Status/Types.php @@ -606,4 +606,194 @@ class JobStatus { } +class QueueStatusModel { + static $_TSPEC; + + /** + * @var string + */ + public $hostName = null; + /** + * @var string + */ + public $queueName = null; + /** + * @var bool + */ + public $queueUp = null; + /** + * @var int + */ + public $runningJobs = null; + /** + * @var int + */ + public $queuedJobs = null; + /** + * @var int + */ + public $time = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'hostName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'queueName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'queueUp', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'runningJobs', + 'type' => TType::I32, + ), + 5 => array( + 'var' => 'queuedJobs', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'time', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['hostName'])) { + $this->hostName = $vals['hostName']; + } + if (isset($vals['queueName'])) { + $this->queueName = $vals['queueName']; + } + if (isset($vals['queueUp'])) { + $this->queueUp = $vals['queueUp']; + } + if (isset($vals['runningJobs'])) { + $this->runningJobs = $vals['runningJobs']; + } + if (isset($vals['queuedJobs'])) { + $this->queuedJobs = $vals['queuedJobs']; + } + if (isset($vals['time'])) { + $this->time = $vals['time']; + } + } + } + + public function getName() { + return 'QueueStatusModel'; + } + + 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->hostName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->queueName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->queueUp); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->runningJobs); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->queuedJobs); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->time); + } 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('QueueStatusModel'); + if ($this->hostName !== null) { + $xfer += $output->writeFieldBegin('hostName', TType::STRING, 1); + $xfer += $output->writeString($this->hostName); + $xfer += $output->writeFieldEnd(); + } + if ($this->queueName !== null) { + $xfer += $output->writeFieldBegin('queueName', TType::STRING, 2); + $xfer += $output->writeString($this->queueName); + $xfer += $output->writeFieldEnd(); + } + if ($this->queueUp !== null) { + $xfer += $output->writeFieldBegin('queueUp', TType::BOOL, 3); + $xfer += $output->writeBool($this->queueUp); + $xfer += $output->writeFieldEnd(); + } + if ($this->runningJobs !== null) { + $xfer += $output->writeFieldBegin('runningJobs', TType::I32, 4); + $xfer += $output->writeI32($this->runningJobs); + $xfer += $output->writeFieldEnd(); + } + if ($this->queuedJobs !== null) { + $xfer += $output->writeFieldBegin('queuedJobs', TType::I32, 5); + $xfer += $output->writeI32($this->queuedJobs); + $xfer += $output->writeFieldEnd(); + } + if ($this->time !== null) { + $xfer += $output->writeFieldBegin('time', TType::I64, 6); + $xfer += $output->writeI64($this->time); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + http://git-wip-us.apache.org/repos/asf/airavata/blob/914799c1/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata-remote ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata-remote b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata-remote index 8a66c88..c545a8f 100755 --- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata-remote +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata-remote @@ -172,6 +172,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print(' bool deleteUserComputeResourcePreference(AuthzToken authzToken, string userId, string gatewayID, string userComputeResourceId)') print(' bool deleteUserStoragePreference(AuthzToken authzToken, string userId, string gatewayID, string userStorageId)') print(' getAllWorkflows(AuthzToken authzToken, string gatewayId)') + print(' getLatestQueueStatuses(AuthzToken authzToken)') print(' WorkflowModel getWorkflow(AuthzToken authzToken, string workflowTemplateId)') print(' void deleteWorkflow(AuthzToken authzToken, string workflowTemplateId)') print(' string registerWorkflow(AuthzToken authzToken, string gatewayId, WorkflowModel workflow)') @@ -1135,6 +1136,12 @@ elif cmd == 'getAllWorkflows': sys.exit(1) pp.pprint(client.getAllWorkflows(eval(args[0]),args[1],)) +elif cmd == 'getLatestQueueStatuses': + if len(args) != 1: + print('getLatestQueueStatuses requires 1 args') + sys.exit(1) + pp.pprint(client.getLatestQueueStatuses(eval(args[0]),)) + elif cmd == 'getWorkflow': if len(args) != 2: print('getWorkflow requires 2 args') http://git-wip-us.apache.org/repos/asf/airavata/blob/914799c1/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata.py index d43bdf8..a0f94d9 100644 --- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata.py +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata.py @@ -3179,6 +3179,13 @@ class Iface: """ pass + def getLatestQueueStatuses(self, authzToken): + """ + Parameters: + - authzToken + """ + pass + def getWorkflow(self, authzToken, workflowTemplateId): """ @@ -11517,6 +11524,45 @@ class Client(Iface): raise result.ae raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllWorkflows failed: unknown result") + def getLatestQueueStatuses(self, authzToken): + """ + Parameters: + - authzToken + """ + self.send_getLatestQueueStatuses(authzToken) + return self.recv_getLatestQueueStatuses() + + def send_getLatestQueueStatuses(self, authzToken): + self._oprot.writeMessageBegin('getLatestQueueStatuses', TMessageType.CALL, self._seqid) + args = getLatestQueueStatuses_args() + args.authzToken = authzToken + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getLatestQueueStatuses(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getLatestQueueStatuses_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.ire is not None: + raise result.ire + if result.ace is not None: + raise result.ace + if result.ase is not None: + raise result.ase + if result.ae is not None: + raise result.ae + raise TApplicationException(TApplicationException.MISSING_RESULT, "getLatestQueueStatuses failed: unknown result") + def getWorkflow(self, authzToken, workflowTemplateId): """ @@ -12477,6 +12523,7 @@ class Processor(Iface, TProcessor): self._processMap["deleteUserComputeResourcePreference"] = Processor.process_deleteUserComputeResourcePreference self._processMap["deleteUserStoragePreference"] = Processor.process_deleteUserStoragePreference self._processMap["getAllWorkflows"] = Processor.process_getAllWorkflows + self._processMap["getLatestQueueStatuses"] = Processor.process_getLatestQueueStatuses self._processMap["getWorkflow"] = Processor.process_getWorkflow self._processMap["deleteWorkflow"] = Processor.process_deleteWorkflow self._processMap["registerWorkflow"] = Processor.process_registerWorkflow @@ -17103,6 +17150,37 @@ class Processor(Iface, TProcessor): oprot.writeMessageEnd() oprot.trans.flush() + def process_getLatestQueueStatuses(self, seqid, iprot, oprot): + args = getLatestQueueStatuses_args() + args.read(iprot) + iprot.readMessageEnd() + result = getLatestQueueStatuses_result() + try: + result.success = self._handler.getLatestQueueStatuses(args.authzToken) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except apache.airavata.api.error.ttypes.InvalidRequestException as ire: + msg_type = TMessageType.REPLY + result.ire = ire + except apache.airavata.api.error.ttypes.AiravataClientException as ace: + msg_type = TMessageType.REPLY + result.ace = ace + except apache.airavata.api.error.ttypes.AiravataSystemException as ase: + msg_type = TMessageType.REPLY + result.ase = ase + except apache.airavata.api.error.ttypes.AuthorizationException as ae: + msg_type = TMessageType.REPLY + result.ae = ae + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getLatestQueueStatuses", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_getWorkflow(self, seqid, iprot, oprot): args = getWorkflow_args() args.read(iprot) @@ -49926,6 +50004,203 @@ class getAllWorkflows_result: def __ne__(self, other): return not (self == other) +class getLatestQueueStatuses_args: + """ + Attributes: + - authzToken + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'authzToken', (apache.airavata.model.security.ttypes.AuthzToken, apache.airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1 + ) + + def __init__(self, authzToken=None,): + self.authzToken = authzToken + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.authzToken = apache.airavata.model.security.ttypes.AuthzToken() + self.authzToken.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getLatestQueueStatuses_args') + if self.authzToken is not None: + oprot.writeFieldBegin('authzToken', TType.STRUCT, 1) + self.authzToken.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.authzToken is None: + raise TProtocol.TProtocolException(message='Required field authzToken is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.authzToken) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getLatestQueueStatuses_result: + """ + Attributes: + - success + - ire + - ace + - ase + - ae + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(apache.airavata.model.status.ttypes.QueueStatusModel, apache.airavata.model.status.ttypes.QueueStatusModel.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'ire', (apache.airavata.api.error.ttypes.InvalidRequestException, apache.airavata.api.error.ttypes.InvalidRequestException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'ace', (apache.airavata.api.error.ttypes.AiravataClientException, apache.airavata.api.error.ttypes.AiravataClientException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'ase', (apache.airavata.api.error.ttypes.AiravataSystemException, apache.airavata.api.error.ttypes.AiravataSystemException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'ae', (apache.airavata.api.error.ttypes.AuthorizationException, apache.airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 4 + ) + + def __init__(self, success=None, ire=None, ace=None, ase=None, ae=None,): + self.success = success + self.ire = ire + self.ace = ace + self.ase = ase + self.ae = ae + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype284, _size281) = iprot.readListBegin() + for _i285 in xrange(_size281): + _elem286 = apache.airavata.model.status.ttypes.QueueStatusModel() + _elem286.read(iprot) + self.success.append(_elem286) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.ire = apache.airavata.api.error.ttypes.InvalidRequestException() + self.ire.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.ace = apache.airavata.api.error.ttypes.AiravataClientException() + self.ace.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.ase = apache.airavata.api.error.ttypes.AiravataSystemException() + self.ase.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.ae = apache.airavata.api.error.ttypes.AuthorizationException() + self.ae.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getLatestQueueStatuses_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter287 in self.success: + iter287.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.ire is not None: + oprot.writeFieldBegin('ire', TType.STRUCT, 1) + self.ire.write(oprot) + oprot.writeFieldEnd() + if self.ace is not None: + oprot.writeFieldBegin('ace', TType.STRUCT, 2) + self.ace.write(oprot) + oprot.writeFieldEnd() + if self.ase is not None: + oprot.writeFieldBegin('ase', TType.STRUCT, 3) + self.ase.write(oprot) + oprot.writeFieldEnd() + if self.ae is not None: + oprot.writeFieldBegin('ae', TType.STRUCT, 4) + self.ae.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + value = (value * 31) ^ hash(self.ire) + value = (value * 31) ^ hash(self.ace) + value = (value * 31) ^ hash(self.ase) + value = (value * 31) ^ hash(self.ae) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + class getWorkflow_args: """ Attributes: @@ -52089,11 +52364,11 @@ class getChildDataProducts_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype284, _size281) = iprot.readListBegin() - for _i285 in xrange(_size281): - _elem286 = apache.airavata.model.data.replica.ttypes.DataProductModel() - _elem286.read(iprot) - self.success.append(_elem286) + (_etype291, _size288) = iprot.readListBegin() + for _i292 in xrange(_size288): + _elem293 = apache.airavata.model.data.replica.ttypes.DataProductModel() + _elem293.read(iprot) + self.success.append(_elem293) iprot.readListEnd() else: iprot.skip(ftype) @@ -52134,8 +52409,8 @@ class getChildDataProducts_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter287 in self.success: - iter287.write(oprot) + for iter294 in self.success: + iter294.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.ire is not None: @@ -52232,11 +52507,11 @@ class shareResourceWithUsers_args: elif fid == 4: if ftype == TType.MAP: self.userPermissionList = {} - (_ktype289, _vtype290, _size288 ) = iprot.readMapBegin() - for _i292 in xrange(_size288): - _key293 = iprot.readString() - _val294 = iprot.readI32() - self.userPermissionList[_key293] = _val294 + (_ktype296, _vtype297, _size295 ) = iprot.readMapBegin() + for _i299 in xrange(_size295): + _key300 = iprot.readString() + _val301 = iprot.readI32() + self.userPermissionList[_key300] = _val301 iprot.readMapEnd() else: iprot.skip(ftype) @@ -52265,9 +52540,9 @@ class shareResourceWithUsers_args: if self.userPermissionList is not None: oprot.writeFieldBegin('userPermissionList', TType.MAP, 4) oprot.writeMapBegin(TType.STRING, TType.I32, len(self.userPermissionList)) - for kiter295,viter296 in self.userPermissionList.items(): - oprot.writeString(kiter295) - oprot.writeI32(viter296) + for kiter302,viter303 in self.userPermissionList.items(): + oprot.writeString(kiter302) + oprot.writeI32(viter303) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -52473,11 +52748,11 @@ class revokeSharingOfResourceFromUsers_args: elif fid == 4: if ftype == TType.MAP: self.userPermissionList = {} - (_ktype298, _vtype299, _size297 ) = iprot.readMapBegin() - for _i301 in xrange(_size297): - _key302 = iprot.readString() - _val303 = iprot.readI32() - self.userPermissionList[_key302] = _val303 + (_ktype305, _vtype306, _size304 ) = iprot.readMapBegin() + for _i308 in xrange(_size304): + _key309 = iprot.readString() + _val310 = iprot.readI32() + self.userPermissionList[_key309] = _val310 iprot.readMapEnd() else: iprot.skip(ftype) @@ -52506,9 +52781,9 @@ class revokeSharingOfResourceFromUsers_args: if self.userPermissionList is not None: oprot.writeFieldBegin('userPermissionList', TType.MAP, 4) oprot.writeMapBegin(TType.STRING, TType.I32, len(self.userPermissionList)) - for kiter304,viter305 in self.userPermissionList.items(): - oprot.writeString(kiter304) - oprot.writeI32(viter305) + for kiter311,viter312 in self.userPermissionList.items(): + oprot.writeString(kiter311) + oprot.writeI32(viter312) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -52813,10 +53088,10 @@ class getAllAccessibleUsers_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype309, _size306) = iprot.readListBegin() - for _i310 in xrange(_size306): - _elem311 = iprot.readString() - self.success.append(_elem311) + (_etype316, _size313) = iprot.readListBegin() + for _i317 in xrange(_size313): + _elem318 = iprot.readString() + self.success.append(_elem318) iprot.readListEnd() else: iprot.skip(ftype) @@ -52857,8 +53132,8 @@ class getAllAccessibleUsers_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter312 in self.success: - oprot.writeString(iter312) + for iter319 in self.success: + oprot.writeString(iter319) oprot.writeListEnd() oprot.writeFieldEnd() if self.ire is not None: @@ -53884,11 +54159,11 @@ class getAllGroupsUserBelongs_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype316, _size313) = iprot.readListBegin() - for _i317 in xrange(_size313): - _elem318 = apache.airavata.model.group.ttypes.GroupModel() - _elem318.read(iprot) - self.success.append(_elem318) + (_etype323, _size320) = iprot.readListBegin() + for _i324 in xrange(_size320): + _elem325 = apache.airavata.model.group.ttypes.GroupModel() + _elem325.read(iprot) + self.success.append(_elem325) iprot.readListEnd() else: iprot.skip(ftype) @@ -53929,8 +54204,8 @@ class getAllGroupsUserBelongs_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter319 in self.success: - iter319.write(oprot) + for iter326 in self.success: + iter326.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.ire is not None:
