You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2016/07/28 17:46:05 UTC
[51/57] airavata git commit: adding missing files
adding missing files
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/ab43d4f5
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/ab43d4f5
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/ab43d4f5
Branch: refs/heads/develop
Commit: ab43d4f5ed021f625b428aedf586a771b2457633
Parents: 4e92050
Author: scnakandala <su...@gmail.com>
Authored: Thu Jul 14 03:01:21 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Thu Jul 14 03:01:21 2016 -0400
----------------------------------------------------------------------
.../main/resources/lib/airavata/Airavata.cpp | 54 ++++++++++++++++----
.../src/main/resources/lib/airavata/Airavata.h | 33 +++++++-----
.../apache/airavata/model/group/GroupModel.java | 2 +-
3 files changed, 65 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/ab43d4f5/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
index 97f056b..c77fd8b 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
@@ -1359,6 +1359,14 @@ uint32_t Airavata_updateGateway_result::read(::apache::thrift::protocol::TProtoc
}
switch (fid)
{
+ case 0:
+ if (ftype == ::apache::thrift::protocol::T_BOOL) {
+ xfer += iprot->readBool(this->success);
+ this->__isset.success = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
case 1:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->ire.read(iprot);
@@ -1409,7 +1417,11 @@ uint32_t Airavata_updateGateway_result::write(::apache::thrift::protocol::TProto
xfer += oprot->writeStructBegin("Airavata_updateGateway_result");
- if (this->__isset.ire) {
+ if (this->__isset.success) {
+ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0);
+ xfer += oprot->writeBool(this->success);
+ xfer += oprot->writeFieldEnd();
+ } else if (this->__isset.ire) {
xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
xfer += this->ire.write(oprot);
xfer += oprot->writeFieldEnd();
@@ -1457,6 +1469,14 @@ uint32_t Airavata_updateGateway_presult::read(::apache::thrift::protocol::TProto
}
switch (fid)
{
+ case 0:
+ if (ftype == ::apache::thrift::protocol::T_BOOL) {
+ xfer += iprot->readBool((*(this->success)));
+ this->__isset.success = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
case 1:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->ire.read(iprot);
@@ -46477,10 +46497,10 @@ void AiravataClient::recv_getAllUsersInGateway(std::vector<std::string> & _retur
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getAllUsersInGateway failed: unknown result");
}
-void AiravataClient::updateGateway(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const ::apache::airavata::model::workspace::Gateway& updatedGateway)
+bool AiravataClient::updateGateway(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const ::apache::airavata::model::workspace::Gateway& updatedGateway)
{
send_updateGateway(authzToken, gatewayId, updatedGateway);
- recv_updateGateway();
+ return recv_updateGateway();
}
void AiravataClient::send_updateGateway(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const ::apache::airavata::model::workspace::Gateway& updatedGateway)
@@ -46499,7 +46519,7 @@ void AiravataClient::send_updateGateway(const ::apache::airavata::model::securi
oprot_->getTransport()->flush();
}
-void AiravataClient::recv_updateGateway()
+bool AiravataClient::recv_updateGateway()
{
int32_t rseqid = 0;
@@ -46524,11 +46544,16 @@ void AiravataClient::recv_updateGateway()
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
}
+ bool _return;
Airavata_updateGateway_presult result;
+ result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
+ if (result.__isset.success) {
+ return _return;
+ }
if (result.__isset.ire) {
throw result.ire;
}
@@ -46541,7 +46566,7 @@ void AiravataClient::recv_updateGateway()
if (result.__isset.ae) {
throw result.ae;
}
- return;
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "updateGateway failed: unknown result");
}
void AiravataClient::getGateway( ::apache::airavata::model::workspace::Gateway& _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId)
@@ -57147,7 +57172,8 @@ void AiravataProcessor::process_updateGateway(int32_t seqid, ::apache::thrift::p
Airavata_updateGateway_result result;
try {
- iface_->updateGateway(args.authzToken, args.gatewayId, args.updatedGateway);
+ result.success = iface_->updateGateway(args.authzToken, args.gatewayId, args.updatedGateway);
+ result.__isset.success = true;
} catch ( ::apache::airavata::api::error::InvalidRequestException &ire) {
result.ire = ire;
result.__isset.ire = true;
@@ -67105,10 +67131,10 @@ void AiravataConcurrentClient::recv_getAllUsersInGateway(std::vector<std::string
} // end while(true)
}
-void AiravataConcurrentClient::updateGateway(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const ::apache::airavata::model::workspace::Gateway& updatedGateway)
+bool AiravataConcurrentClient::updateGateway(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const ::apache::airavata::model::workspace::Gateway& updatedGateway)
{
int32_t seqid = send_updateGateway(authzToken, gatewayId, updatedGateway);
- recv_updateGateway(seqid);
+ return recv_updateGateway(seqid);
}
int32_t AiravataConcurrentClient::send_updateGateway(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const ::apache::airavata::model::workspace::Gateway& updatedGateway)
@@ -67131,7 +67157,7 @@ int32_t AiravataConcurrentClient::send_updateGateway(const ::apache::airavata::
return cseqid;
}
-void AiravataConcurrentClient::recv_updateGateway(const int32_t seqid)
+bool AiravataConcurrentClient::recv_updateGateway(const int32_t seqid)
{
int32_t rseqid = 0;
@@ -67169,11 +67195,17 @@ void AiravataConcurrentClient::recv_updateGateway(const int32_t seqid)
using ::apache::thrift::protocol::TProtocolException;
throw TProtocolException(TProtocolException::INVALID_DATA);
}
+ bool _return;
Airavata_updateGateway_presult result;
+ result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
+ if (result.__isset.success) {
+ sentry.commit();
+ return _return;
+ }
if (result.__isset.ire) {
sentry.commit();
throw result.ire;
@@ -67190,8 +67222,8 @@ void AiravataConcurrentClient::recv_updateGateway(const int32_t seqid)
sentry.commit();
throw result.ae;
}
- sentry.commit();
- return;
+ // in a bad state, don't commit
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "updateGateway failed: unknown result");
}
// seqid != rseqid
this->sync_.updatePending(fname, mtype, rseqid);
http://git-wip-us.apache.org/repos/asf/airavata/blob/ab43d4f5/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
index 764d8cd..01b85ae 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
@@ -113,7 +113,7 @@ class AiravataIf {
* @param gatewayId
* @param updatedGateway
*/
- virtual void updateGateway(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const ::apache::airavata::model::workspace::Gateway& updatedGateway) = 0;
+ virtual bool updateGateway(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const ::apache::airavata::model::workspace::Gateway& updatedGateway) = 0;
/**
* Get Gateway details by providing gatewayId
@@ -2530,8 +2530,9 @@ class AiravataNull : virtual public AiravataIf {
void getAllUsersInGateway(std::vector<std::string> & /* _return */, const ::apache::airavata::model::security::AuthzToken& /* authzToken */, const std::string& /* gatewayId */) {
return;
}
- void updateGateway(const ::apache::airavata::model::security::AuthzToken& /* authzToken */, const std::string& /* gatewayId */, const ::apache::airavata::model::workspace::Gateway& /* updatedGateway */) {
- return;
+ bool updateGateway(const ::apache::airavata::model::security::AuthzToken& /* authzToken */, const std::string& /* gatewayId */, const ::apache::airavata::model::workspace::Gateway& /* updatedGateway */) {
+ bool _return = false;
+ return _return;
}
void getGateway( ::apache::airavata::model::workspace::Gateway& /* _return */, const ::apache::airavata::model::security::AuthzToken& /* authzToken */, const std::string& /* gatewayId */) {
return;
@@ -3617,7 +3618,8 @@ class Airavata_updateGateway_pargs {
};
typedef struct _Airavata_updateGateway_result__isset {
- _Airavata_updateGateway_result__isset() : ire(false), ace(false), ase(false), ae(false) {}
+ _Airavata_updateGateway_result__isset() : success(false), ire(false), ace(false), ase(false), ae(false) {}
+ bool success :1;
bool ire :1;
bool ace :1;
bool ase :1;
@@ -3629,10 +3631,11 @@ class Airavata_updateGateway_result {
Airavata_updateGateway_result(const Airavata_updateGateway_result&);
Airavata_updateGateway_result& operator=(const Airavata_updateGateway_result&);
- Airavata_updateGateway_result() {
+ Airavata_updateGateway_result() : success(0) {
}
virtual ~Airavata_updateGateway_result() throw();
+ bool success;
::apache::airavata::api::error::InvalidRequestException ire;
::apache::airavata::api::error::AiravataClientException ace;
::apache::airavata::api::error::AiravataSystemException ase;
@@ -3640,6 +3643,8 @@ class Airavata_updateGateway_result {
_Airavata_updateGateway_result__isset __isset;
+ void __set_success(const bool val);
+
void __set_ire(const ::apache::airavata::api::error::InvalidRequestException& val);
void __set_ace(const ::apache::airavata::api::error::AiravataClientException& val);
@@ -3650,6 +3655,8 @@ class Airavata_updateGateway_result {
bool operator == (const Airavata_updateGateway_result & rhs) const
{
+ if (!(success == rhs.success))
+ return false;
if (!(ire == rhs.ire))
return false;
if (!(ace == rhs.ace))
@@ -3672,7 +3679,8 @@ class Airavata_updateGateway_result {
};
typedef struct _Airavata_updateGateway_presult__isset {
- _Airavata_updateGateway_presult__isset() : ire(false), ace(false), ase(false), ae(false) {}
+ _Airavata_updateGateway_presult__isset() : success(false), ire(false), ace(false), ase(false), ae(false) {}
+ bool success :1;
bool ire :1;
bool ace :1;
bool ase :1;
@@ -3684,6 +3692,7 @@ class Airavata_updateGateway_presult {
virtual ~Airavata_updateGateway_presult() throw();
+ bool* success;
::apache::airavata::api::error::InvalidRequestException ire;
::apache::airavata::api::error::AiravataClientException ace;
::apache::airavata::api::error::AiravataSystemException ase;
@@ -23946,9 +23955,9 @@ class AiravataClient : virtual public AiravataIf {
void getAllUsersInGateway(std::vector<std::string> & _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId);
void send_getAllUsersInGateway(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId);
void recv_getAllUsersInGateway(std::vector<std::string> & _return);
- void updateGateway(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const ::apache::airavata::model::workspace::Gateway& updatedGateway);
+ bool updateGateway(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const ::apache::airavata::model::workspace::Gateway& updatedGateway);
void send_updateGateway(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const ::apache::airavata::model::workspace::Gateway& updatedGateway);
- void recv_updateGateway();
+ bool recv_updateGateway();
void getGateway( ::apache::airavata::model::workspace::Gateway& _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId);
void send_getGateway(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId);
void recv_getGateway( ::apache::airavata::model::workspace::Gateway& _return);
@@ -24764,13 +24773,13 @@ class AiravataMultiface : virtual public AiravataIf {
return;
}
- void updateGateway(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const ::apache::airavata::model::workspace::Gateway& updatedGateway) {
+ bool updateGateway(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const ::apache::airavata::model::workspace::Gateway& updatedGateway) {
size_t sz = ifaces_.size();
size_t i = 0;
for (; i < (sz - 1); ++i) {
ifaces_[i]->updateGateway(authzToken, gatewayId, updatedGateway);
}
- ifaces_[i]->updateGateway(authzToken, gatewayId, updatedGateway);
+ return ifaces_[i]->updateGateway(authzToken, gatewayId, updatedGateway);
}
void getGateway( ::apache::airavata::model::workspace::Gateway& _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId) {
@@ -26197,9 +26206,9 @@ class AiravataConcurrentClient : virtual public AiravataIf {
void getAllUsersInGateway(std::vector<std::string> & _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId);
int32_t send_getAllUsersInGateway(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId);
void recv_getAllUsersInGateway(std::vector<std::string> & _return, const int32_t seqid);
- void updateGateway(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const ::apache::airavata::model::workspace::Gateway& updatedGateway);
+ bool updateGateway(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const ::apache::airavata::model::workspace::Gateway& updatedGateway);
int32_t send_updateGateway(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId, const ::apache::airavata::model::workspace::Gateway& updatedGateway);
- void recv_updateGateway(const int32_t seqid);
+ bool recv_updateGateway(const int32_t seqid);
void getGateway( ::apache::airavata::model::workspace::Gateway& _return, const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId);
int32_t send_getGateway(const ::apache::airavata::model::security::AuthzToken& authzToken, const std::string& gatewayId);
void recv_getGateway( ::apache::airavata::model::workspace::Gateway& _return, const int32_t seqid);
http://git-wip-us.apache.org/repos/asf/airavata/blob/ab43d4f5/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/group/GroupModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/group/GroupModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/group/GroupModel.java
index dc5c13a..8b9fc44 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/group/GroupModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/group/GroupModel.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-07-13")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-07-14")
public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupModel._Fields>, java.io.Serializable, Cloneable, Comparable<GroupModel> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GroupModel");