Repository: airavata Updated Branches: refs/heads/airavata-0.15-release-branch 4e060ab64 -> 648c0d6bf
updating thrift generated files Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/648c0d6b Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/648c0d6b Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/648c0d6b Branch: refs/heads/airavata-0.15-release-branch Commit: 648c0d6bfd3174bedacd354c6fcde80b8e757427 Parents: 4e060ab Author: Supun Nakandala <[email protected]> Authored: Thu Jul 16 19:36:03 2015 +0530 Committer: Supun Nakandala <[email protected]> Committed: Thu Jul 16 19:36:03 2015 +0530 ---------------------------------------------------------------------- .../java/org/apache/airavata/api/Airavata.java | 124 +++++++++++++++++-- .../main/resources/lib/airavata/Airavata.cpp | 28 ++++- .../src/main/resources/lib/airavata/Airavata.h | 24 ++-- .../lib/airavata/Airavata_server.skeleton.cpp | 2 +- .../resources/lib/Airavata/API/Airavata.php | 29 ++++- .../lib/apache/airavata/api/Airavata-remote | 8 +- .../lib/apache/airavata/api/Airavata.py | 29 ++++- 7 files changed, 205 insertions(+), 39 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/648c0d6b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java index c1348c5..142306e 100644 --- a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java +++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java @@ -91,7 +91,7 @@ import org.slf4j.LoggerFactory; */ public String generateAndRegisterSSHKeys(String gatewayId, String userName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException; - public String getSSHPubKey(String airavataCredStoreToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException; + public String getSSHPubKey(String airavataCredStoreToken, String gatewayId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException; public Map<String,String> getAllUserSSHPubKeys(String userName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException; @@ -1847,7 +1847,7 @@ import org.slf4j.LoggerFactory; public void generateAndRegisterSSHKeys(String gatewayId, String userName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getSSHPubKey(String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getSSHPubKey(String airavataCredStoreToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getAllUserSSHPubKeys(String userName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -2365,16 +2365,17 @@ import org.slf4j.LoggerFactory; throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "generateAndRegisterSSHKeys failed: unknown result"); } - public String getSSHPubKey(String airavataCredStoreToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException + public String getSSHPubKey(String airavataCredStoreToken, String gatewayId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException { - send_getSSHPubKey(airavataCredStoreToken); + send_getSSHPubKey(airavataCredStoreToken, gatewayId); return recv_getSSHPubKey(); } - public void send_getSSHPubKey(String airavataCredStoreToken) throws org.apache.thrift.TException + public void send_getSSHPubKey(String airavataCredStoreToken, String gatewayId) throws org.apache.thrift.TException { getSSHPubKey_args args = new getSSHPubKey_args(); args.setAiravataCredStoreToken(airavataCredStoreToken); + args.setGatewayId(gatewayId); sendBase("getSSHPubKey", args); } @@ -6604,24 +6605,27 @@ import org.slf4j.LoggerFactory; } } - public void getSSHPubKey(String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getSSHPubKey(String airavataCredStoreToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getSSHPubKey_call method_call = new getSSHPubKey_call(airavataCredStoreToken, resultHandler, this, ___protocolFactory, ___transport); + getSSHPubKey_call method_call = new getSSHPubKey_call(airavataCredStoreToken, gatewayId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getSSHPubKey_call extends org.apache.thrift.async.TAsyncMethodCall { private String airavataCredStoreToken; - public getSSHPubKey_call(String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + private String gatewayId; + public getSSHPubKey_call(String airavataCredStoreToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.airavataCredStoreToken = airavataCredStoreToken; + this.gatewayId = gatewayId; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSSHPubKey", org.apache.thrift.protocol.TMessageType.CALL, 0)); getSSHPubKey_args args = new getSSHPubKey_args(); args.setAiravataCredStoreToken(airavataCredStoreToken); + args.setGatewayId(gatewayId); args.write(prot); prot.writeMessageEnd(); } @@ -11171,7 +11175,7 @@ import org.slf4j.LoggerFactory; public getSSHPubKey_result getResult(I iface, getSSHPubKey_args args) throws org.apache.thrift.TException { getSSHPubKey_result result = new getSSHPubKey_result(); try { - result.success = iface.getSSHPubKey(args.airavataCredStoreToken); + result.success = iface.getSSHPubKey(args.airavataCredStoreToken, args.gatewayId); } catch (org.apache.airavata.model.error.InvalidRequestException ire) { result.ire = ire; } catch (org.apache.airavata.model.error.AiravataClientException ace) { @@ -15317,7 +15321,7 @@ import org.slf4j.LoggerFactory; } public void start(I iface, getSSHPubKey_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException { - iface.getSSHPubKey(args.airavataCredStoreToken,resultHandler); + iface.getSSHPubKey(args.airavataCredStoreToken, args.gatewayId,resultHandler); } } @@ -31500,6 +31504,7 @@ import org.slf4j.LoggerFactory; private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSSHPubKey_args"); private static final org.apache.thrift.protocol.TField AIRAVATA_CRED_STORE_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataCredStoreToken", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -31508,10 +31513,12 @@ import org.slf4j.LoggerFactory; } public String airavataCredStoreToken; // required + public String gatewayId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum { - AIRAVATA_CRED_STORE_TOKEN((short)1, "airavataCredStoreToken"); + AIRAVATA_CRED_STORE_TOKEN((short)1, "airavataCredStoreToken"), + GATEWAY_ID((short)2, "gatewayId"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -31528,6 +31535,8 @@ import org.slf4j.LoggerFactory; switch(fieldId) { case 1: // AIRAVATA_CRED_STORE_TOKEN return AIRAVATA_CRED_STORE_TOKEN; + case 2: // GATEWAY_ID + return GATEWAY_ID; default: return null; } @@ -31573,6 +31582,8 @@ import org.slf4j.LoggerFactory; Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.AIRAVATA_CRED_STORE_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("airavataCredStoreToken", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSSHPubKey_args.class, metaDataMap); } @@ -31581,10 +31592,12 @@ import org.slf4j.LoggerFactory; } public getSSHPubKey_args( - String airavataCredStoreToken) + String airavataCredStoreToken, + String gatewayId) { this(); this.airavataCredStoreToken = airavataCredStoreToken; + this.gatewayId = gatewayId; } /** @@ -31594,6 +31607,9 @@ import org.slf4j.LoggerFactory; if (other.isSetAiravataCredStoreToken()) { this.airavataCredStoreToken = other.airavataCredStoreToken; } + if (other.isSetGatewayId()) { + this.gatewayId = other.gatewayId; + } } public getSSHPubKey_args deepCopy() { @@ -31603,6 +31619,7 @@ import org.slf4j.LoggerFactory; @Override public void clear() { this.airavataCredStoreToken = null; + this.gatewayId = null; } public String getAiravataCredStoreToken() { @@ -31629,6 +31646,30 @@ import org.slf4j.LoggerFactory; } } + public String getGatewayId() { + return this.gatewayId; + } + + public getSSHPubKey_args setGatewayId(String gatewayId) { + this.gatewayId = gatewayId; + return this; + } + + public void unsetGatewayId() { + this.gatewayId = null; + } + + /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */ + public boolean isSetGatewayId() { + return this.gatewayId != null; + } + + public void setGatewayIdIsSet(boolean value) { + if (!value) { + this.gatewayId = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case AIRAVATA_CRED_STORE_TOKEN: @@ -31639,6 +31680,14 @@ import org.slf4j.LoggerFactory; } break; + case GATEWAY_ID: + if (value == null) { + unsetGatewayId(); + } else { + setGatewayId((String)value); + } + break; + } } @@ -31647,6 +31696,9 @@ import org.slf4j.LoggerFactory; case AIRAVATA_CRED_STORE_TOKEN: return getAiravataCredStoreToken(); + case GATEWAY_ID: + return getGatewayId(); + } throw new IllegalStateException(); } @@ -31660,6 +31712,8 @@ import org.slf4j.LoggerFactory; switch (field) { case AIRAVATA_CRED_STORE_TOKEN: return isSetAiravataCredStoreToken(); + case GATEWAY_ID: + return isSetGatewayId(); } throw new IllegalStateException(); } @@ -31686,6 +31740,15 @@ import org.slf4j.LoggerFactory; return false; } + boolean this_present_gatewayId = true && this.isSetGatewayId(); + boolean that_present_gatewayId = true && that.isSetGatewayId(); + if (this_present_gatewayId || that_present_gatewayId) { + if (!(this_present_gatewayId && that_present_gatewayId)) + return false; + if (!this.gatewayId.equals(that.gatewayId)) + return false; + } + return true; } @@ -31712,6 +31775,16 @@ import org.slf4j.LoggerFactory; return lastComparison; } } + lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGatewayId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -31739,6 +31812,14 @@ import org.slf4j.LoggerFactory; sb.append(this.airavataCredStoreToken); } first = false; + if (!first) sb.append(", "); + sb.append("gatewayId:"); + if (this.gatewayId == null) { + sb.append("null"); + } else { + sb.append(this.gatewayId); + } + first = false; sb.append(")"); return sb.toString(); } @@ -31748,6 +31829,9 @@ import org.slf4j.LoggerFactory; if (airavataCredStoreToken == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataCredStoreToken' was not present! Struct: " + toString()); } + if (gatewayId == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); + } // check for sub-struct validity } @@ -31793,6 +31877,14 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 2: // GATEWAY_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.gatewayId = iprot.readString(); + struct.setGatewayIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -31813,6 +31905,11 @@ import org.slf4j.LoggerFactory; oprot.writeString(struct.airavataCredStoreToken); oprot.writeFieldEnd(); } + if (struct.gatewayId != null) { + oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); + oprot.writeString(struct.gatewayId); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -31831,6 +31928,7 @@ import org.slf4j.LoggerFactory; public void write(org.apache.thrift.protocol.TProtocol prot, getSSHPubKey_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.airavataCredStoreToken); + oprot.writeString(struct.gatewayId); } @Override @@ -31838,6 +31936,8 @@ import org.slf4j.LoggerFactory; TTupleProtocol iprot = (TTupleProtocol) prot; struct.airavataCredStoreToken = iprot.readString(); struct.setAiravataCredStoreTokenIsSet(true); + struct.gatewayId = iprot.readString(); + struct.setGatewayIdIsSet(true); } } http://git-wip-us.apache.org/repos/asf/airavata/blob/648c0d6b/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 0501def..9f8309b 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 @@ -1859,6 +1859,7 @@ uint32_t Airavata_getSSHPubKey_args::read(::apache::thrift::protocol::TProtocol* using ::apache::thrift::protocol::TProtocolException; bool isset_airavataCredStoreToken = false; + bool isset_gatewayId = false; while (true) { @@ -1876,6 +1877,14 @@ uint32_t Airavata_getSSHPubKey_args::read(::apache::thrift::protocol::TProtocol* xfer += iprot->skip(ftype); } break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->gatewayId); + isset_gatewayId = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -1887,6 +1896,8 @@ uint32_t Airavata_getSSHPubKey_args::read(::apache::thrift::protocol::TProtocol* if (!isset_airavataCredStoreToken) throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_gatewayId) + throw TProtocolException(TProtocolException::INVALID_DATA); return xfer; } @@ -1898,6 +1909,10 @@ uint32_t Airavata_getSSHPubKey_args::write(::apache::thrift::protocol::TProtocol xfer += oprot->writeString(this->airavataCredStoreToken); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("gatewayId", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->gatewayId); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1911,6 +1926,10 @@ uint32_t Airavata_getSSHPubKey_pargs::write(::apache::thrift::protocol::TProtoco xfer += oprot->writeString((*(this->airavataCredStoreToken))); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("gatewayId", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->gatewayId))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -32949,19 +32968,20 @@ void AiravataClient::recv_generateAndRegisterSSHKeys(std::string& _return) throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "generateAndRegisterSSHKeys failed: unknown result"); } -void AiravataClient::getSSHPubKey(std::string& _return, const std::string& airavataCredStoreToken) +void AiravataClient::getSSHPubKey(std::string& _return, const std::string& airavataCredStoreToken, const std::string& gatewayId) { - send_getSSHPubKey(airavataCredStoreToken); + send_getSSHPubKey(airavataCredStoreToken, gatewayId); recv_getSSHPubKey(_return); } -void AiravataClient::send_getSSHPubKey(const std::string& airavataCredStoreToken) +void AiravataClient::send_getSSHPubKey(const std::string& airavataCredStoreToken, const std::string& gatewayId) { int32_t cseqid = 0; oprot_->writeMessageBegin("getSSHPubKey", ::apache::thrift::protocol::T_CALL, cseqid); Airavata_getSSHPubKey_pargs args; args.airavataCredStoreToken = &airavataCredStoreToken; + args.gatewayId = &gatewayId; args.write(oprot_); oprot_->writeMessageEnd(); @@ -41646,7 +41666,7 @@ void AiravataProcessor::process_getSSHPubKey(int32_t seqid, ::apache::thrift::pr Airavata_getSSHPubKey_result result; try { - iface_->getSSHPubKey(result.success, args.airavataCredStoreToken); + iface_->getSSHPubKey(result.success, args.airavataCredStoreToken, args.gatewayId); result.__isset.success = true; } catch ( ::apache::airavata::api::error::InvalidRequestException &ire) { result.ire = ire; http://git-wip-us.apache.org/repos/asf/airavata/blob/648c0d6b/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 4a55771..84883de 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 @@ -40,7 +40,7 @@ class AiravataIf { virtual void getAllGateways(std::vector< ::apache::airavata::model::workspace::Gateway> & _return) = 0; virtual bool isGatewayExist(const std::string& gatewayId) = 0; virtual void generateAndRegisterSSHKeys(std::string& _return, const std::string& gatewayId, const std::string& userName) = 0; - virtual void getSSHPubKey(std::string& _return, const std::string& airavataCredStoreToken) = 0; + virtual void getSSHPubKey(std::string& _return, const std::string& airavataCredStoreToken, const std::string& gatewayId) = 0; virtual void getAllUserSSHPubKeys(std::map<std::string, std::string> & _return, const std::string& userName) = 0; virtual void createProject(std::string& _return, const std::string& gatewayId, const ::apache::airavata::model::workspace::Project& project) = 0; virtual void updateProject(const std::string& projectId, const ::apache::airavata::model::workspace::Project& updatedProject) = 0; @@ -215,7 +215,7 @@ class AiravataNull : virtual public AiravataIf { void generateAndRegisterSSHKeys(std::string& /* _return */, const std::string& /* gatewayId */, const std::string& /* userName */) { return; } - void getSSHPubKey(std::string& /* _return */, const std::string& /* airavataCredStoreToken */) { + void getSSHPubKey(std::string& /* _return */, const std::string& /* airavataCredStoreToken */, const std::string& /* gatewayId */) { return; } void getAllUserSSHPubKeys(std::map<std::string, std::string> & /* _return */, const std::string& /* userName */) { @@ -1670,21 +1670,28 @@ class Airavata_generateAndRegisterSSHKeys_presult { class Airavata_getSSHPubKey_args { public: - Airavata_getSSHPubKey_args() : airavataCredStoreToken() { + Airavata_getSSHPubKey_args() : airavataCredStoreToken(), gatewayId() { } virtual ~Airavata_getSSHPubKey_args() throw() {} std::string airavataCredStoreToken; + std::string gatewayId; void __set_airavataCredStoreToken(const std::string& val) { airavataCredStoreToken = val; } + void __set_gatewayId(const std::string& val) { + gatewayId = val; + } + bool operator == (const Airavata_getSSHPubKey_args & rhs) const { if (!(airavataCredStoreToken == rhs.airavataCredStoreToken)) return false; + if (!(gatewayId == rhs.gatewayId)) + return false; return true; } bool operator != (const Airavata_getSSHPubKey_args &rhs) const { @@ -1706,6 +1713,7 @@ class Airavata_getSSHPubKey_pargs { virtual ~Airavata_getSSHPubKey_pargs() throw() {} const std::string* airavataCredStoreToken; + const std::string* gatewayId; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -18494,8 +18502,8 @@ class AiravataClient : virtual public AiravataIf { void generateAndRegisterSSHKeys(std::string& _return, const std::string& gatewayId, const std::string& userName); void send_generateAndRegisterSSHKeys(const std::string& gatewayId, const std::string& userName); void recv_generateAndRegisterSSHKeys(std::string& _return); - void getSSHPubKey(std::string& _return, const std::string& airavataCredStoreToken); - void send_getSSHPubKey(const std::string& airavataCredStoreToken); + void getSSHPubKey(std::string& _return, const std::string& airavataCredStoreToken, const std::string& gatewayId); + void send_getSSHPubKey(const std::string& airavataCredStoreToken, const std::string& gatewayId); void recv_getSSHPubKey(std::string& _return); void getAllUserSSHPubKeys(std::map<std::string, std::string> & _return, const std::string& userName); void send_getAllUserSSHPubKeys(const std::string& userName); @@ -19233,13 +19241,13 @@ class AiravataMultiface : virtual public AiravataIf { return; } - void getSSHPubKey(std::string& _return, const std::string& airavataCredStoreToken) { + void getSSHPubKey(std::string& _return, const std::string& airavataCredStoreToken, const std::string& gatewayId) { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { - ifaces_[i]->getSSHPubKey(_return, airavataCredStoreToken); + ifaces_[i]->getSSHPubKey(_return, airavataCredStoreToken, gatewayId); } - ifaces_[i]->getSSHPubKey(_return, airavataCredStoreToken); + ifaces_[i]->getSSHPubKey(_return, airavataCredStoreToken, gatewayId); return; } http://git-wip-us.apache.org/repos/asf/airavata/blob/648c0d6b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp index f031bc9..d94818c 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp @@ -79,7 +79,7 @@ class AiravataHandler : virtual public AiravataIf { printf("generateAndRegisterSSHKeys\n"); } - void getSSHPubKey(std::string& _return, const std::string& airavataCredStoreToken) { + void getSSHPubKey(std::string& _return, const std::string& airavataCredStoreToken, const std::string& gatewayId) { // Your implementation goes here printf("getSSHPubKey\n"); } http://git-wip-us.apache.org/repos/asf/airavata/blob/648c0d6b/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 7ec2f28..e9001be 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 @@ -25,7 +25,7 @@ interface AiravataIf { public function getAllGateways(); public function isGatewayExist($gatewayId); public function generateAndRegisterSSHKeys($gatewayId, $userName); - public function getSSHPubKey($airavataCredStoreToken); + public function getSSHPubKey($airavataCredStoreToken, $gatewayId); public function getAllUserSSHPubKeys($userName); public function createProject($gatewayId, \Airavata\Model\Workspace\Project $project); public function updateProject($projectId, \Airavata\Model\Workspace\Project $updatedProject); @@ -638,16 +638,17 @@ class AiravataClient implements \Airavata\API\AiravataIf { throw new \Exception("generateAndRegisterSSHKeys failed: unknown result"); } - public function getSSHPubKey($airavataCredStoreToken) + public function getSSHPubKey($airavataCredStoreToken, $gatewayId) { - $this->send_getSSHPubKey($airavataCredStoreToken); + $this->send_getSSHPubKey($airavataCredStoreToken, $gatewayId); return $this->recv_getSSHPubKey(); } - public function send_getSSHPubKey($airavataCredStoreToken) + public function send_getSSHPubKey($airavataCredStoreToken, $gatewayId) { $args = new \Airavata\API\Airavata_getSSHPubKey_args(); $args->airavataCredStoreToken = $airavataCredStoreToken; + $args->gatewayId = $gatewayId; $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { @@ -9692,6 +9693,7 @@ class Airavata_getSSHPubKey_args { static $_TSPEC; public $airavataCredStoreToken = null; + public $gatewayId = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -9700,12 +9702,19 @@ class Airavata_getSSHPubKey_args { 'var' => 'airavataCredStoreToken', 'type' => TType::STRING, ), + 2 => array( + 'var' => 'gatewayId', + 'type' => TType::STRING, + ), ); } if (is_array($vals)) { if (isset($vals['airavataCredStoreToken'])) { $this->airavataCredStoreToken = $vals['airavataCredStoreToken']; } + if (isset($vals['gatewayId'])) { + $this->gatewayId = $vals['gatewayId']; + } } } @@ -9735,6 +9744,13 @@ class Airavata_getSSHPubKey_args { $xfer += $input->skip($ftype); } break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->gatewayId); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -9753,6 +9769,11 @@ class Airavata_getSSHPubKey_args { $xfer += $output->writeString($this->airavataCredStoreToken); $xfer += $output->writeFieldEnd(); } + if ($this->gatewayId !== null) { + $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2); + $xfer += $output->writeString($this->gatewayId); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; http://git-wip-us.apache.org/repos/asf/airavata/blob/648c0d6b/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 65092db..497333c 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 @@ -31,7 +31,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print ' getAllGateways()' print ' bool isGatewayExist(string gatewayId)' print ' string generateAndRegisterSSHKeys(string gatewayId, string userName)' - print ' string getSSHPubKey(string airavataCredStoreToken)' + print ' string getSSHPubKey(string airavataCredStoreToken, string gatewayId)' print ' getAllUserSSHPubKeys(string userName)' print ' string createProject(string gatewayId, Project project)' print ' void updateProject(string projectId, Project updatedProject)' @@ -251,10 +251,10 @@ elif cmd == 'generateAndRegisterSSHKeys': pp.pprint(client.generateAndRegisterSSHKeys(args[0],args[1],)) elif cmd == 'getSSHPubKey': - if len(args) != 1: - print 'getSSHPubKey requires 1 args' + if len(args) != 2: + print 'getSSHPubKey requires 2 args' sys.exit(1) - pp.pprint(client.getSSHPubKey(args[0],)) + pp.pprint(client.getSSHPubKey(args[0],args[1],)) elif cmd == 'getAllUserSSHPubKeys': if len(args) != 1: http://git-wip-us.apache.org/repos/asf/airavata/blob/648c0d6b/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 da80fad..86ed6a9 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 @@ -86,10 +86,11 @@ class Iface: """ pass - def getSSHPubKey(self, airavataCredStoreToken): + def getSSHPubKey(self, airavataCredStoreToken, gatewayId): """ Parameters: - airavataCredStoreToken + - gatewayId """ pass @@ -2462,18 +2463,20 @@ class Client(Iface): raise result.ase raise TApplicationException(TApplicationException.MISSING_RESULT, "generateAndRegisterSSHKeys failed: unknown result"); - def getSSHPubKey(self, airavataCredStoreToken): + def getSSHPubKey(self, airavataCredStoreToken, gatewayId): """ Parameters: - airavataCredStoreToken + - gatewayId """ - self.send_getSSHPubKey(airavataCredStoreToken) + self.send_getSSHPubKey(airavataCredStoreToken, gatewayId) return self.recv_getSSHPubKey() - def send_getSSHPubKey(self, airavataCredStoreToken): + def send_getSSHPubKey(self, airavataCredStoreToken, gatewayId): self._oprot.writeMessageBegin('getSSHPubKey', TMessageType.CALL, self._seqid) args = getSSHPubKey_args() args.airavataCredStoreToken = airavataCredStoreToken + args.gatewayId = gatewayId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() @@ -8432,7 +8435,7 @@ class Processor(Iface, TProcessor): iprot.readMessageEnd() result = getSSHPubKey_result() try: - result.success = self._handler.getSSHPubKey(args.airavataCredStoreToken) + result.success = self._handler.getSSHPubKey(args.airavataCredStoreToken, args.gatewayId) except apache.airavata.api.error.ttypes.InvalidRequestException, ire: result.ire = ire except apache.airavata.api.error.ttypes.AiravataClientException, ace: @@ -11897,15 +11900,18 @@ class getSSHPubKey_args: """ Attributes: - airavataCredStoreToken + - gatewayId """ thrift_spec = ( None, # 0 (1, TType.STRING, 'airavataCredStoreToken', None, None, ), # 1 + (2, TType.STRING, 'gatewayId', None, None, ), # 2 ) - def __init__(self, airavataCredStoreToken=None,): + def __init__(self, airavataCredStoreToken=None, gatewayId=None,): self.airavataCredStoreToken = airavataCredStoreToken + self.gatewayId = gatewayId 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: @@ -11921,6 +11927,11 @@ class getSSHPubKey_args: self.airavataCredStoreToken = iprot.readString(); else: iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.gatewayId = iprot.readString(); + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -11935,12 +11946,18 @@ class getSSHPubKey_args: oprot.writeFieldBegin('airavataCredStoreToken', TType.STRING, 1) oprot.writeString(self.airavataCredStoreToken) oprot.writeFieldEnd() + if self.gatewayId is not None: + oprot.writeFieldBegin('gatewayId', TType.STRING, 2) + oprot.writeString(self.gatewayId) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): if self.airavataCredStoreToken is None: raise TProtocol.TProtocolException(message='Required field airavataCredStoreToken is unset!') + if self.gatewayId is None: + raise TProtocol.TProtocolException(message='Required field gatewayId is unset!') return
