airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject airavata git commit: generating code to have token id in terminate - AIRAVATA-1661
Date Mon, 13 Apr 2015 19:05:36 GMT
Repository: airavata
Updated Branches:
  refs/heads/master e89ba3da0 -> 97d31b4da


generating code to have token id in terminate - AIRAVATA-1661


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/97d31b4d
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/97d31b4d
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/97d31b4d

Branch: refs/heads/master
Commit: 97d31b4dadd8dc0c1effa3e42b59cfa1fa81c14c
Parents: e89ba3d
Author: Chathuri Wimalasena <kamalasini@gmail.com>
Authored: Mon Apr 13 15:05:28 2015 -0400
Committer: Chathuri Wimalasena <kamalasini@gmail.com>
Committed: Mon Apr 13 15:05:28 2015 -0400

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   |   2 +-
 .../java/org/apache/airavata/api/Airavata.java  | 133 +++++++++++++++++--
 .../main/resources/lib/airavata/Airavata.cpp    |  25 +++-
 .../src/main/resources/lib/airavata/Airavata.h  |  27 ++--
 .../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         |  27 +++-
 airavata-api/generate-thrift-files.sh           |   2 +-
 .../airavataAPI.thrift                          |   2 +-
 .../server/OrchestratorServerHandler.java       |   2 +-
 .../orchestrator.cpi.service.thrift             |   2 +-
 .../TestFrameworkProps.java                     |  26 ++++
 .../src/main/resources/test-framework.json      |   0
 14 files changed, 240 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/97d31b4d/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index ce63366..66eca0d 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -1401,7 +1401,7 @@ public class AiravataServerHandler implements Airavata.Iface {
      *                                                                   rather an Airavata
Administrator will be notified to take corrective action.
      */
     @Override
-    public void terminateExperiment(String airavataExperimentId) throws InvalidRequestException,
ExperimentNotFoundException, AiravataClientException, AiravataSystemException, TException
{
+    public void terminateExperiment(String airavataExperimentId, String tokenId) throws InvalidRequestException,
ExperimentNotFoundException, AiravataClientException, AiravataSystemException, TException
{
     	Client client = getOrchestratorClient();
     	client.terminateExperiment(airavataExperimentId);
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/97d31b4d/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 ff7d330..44f1e60 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
@@ -510,8 +510,9 @@ import org.slf4j.LoggerFactory;
      * 
      * 
      * @param airavataExperimentId
+     * @param tokenId
      */
-    public void terminateExperiment(String airavataExperimentId) throws org.apache.airavata.model.error.InvalidRequestException,
org.apache.airavata.model.error.ExperimentNotFoundException, org.apache.airavata.model.error.AiravataClientException,
org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+    public void terminateExperiment(String airavataExperimentId, String tokenId) throws org.apache.airavata.model.error.InvalidRequestException,
org.apache.airavata.model.error.ExperimentNotFoundException, org.apache.airavata.model.error.AiravataClientException,
org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
 
     /**
      * Register a Application Module.
@@ -1579,7 +1580,7 @@ import org.slf4j.LoggerFactory;
 
     public void cloneExperiment(String existingExperimentID, String newExperimentName, org.apache.thrift.async.AsyncMethodCallback
resultHandler) throws org.apache.thrift.TException;
 
-    public void terminateExperiment(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback
resultHandler) throws org.apache.thrift.TException;
+    public void terminateExperiment(String airavataExperimentId, String tokenId, org.apache.thrift.async.AsyncMethodCallback
resultHandler) throws org.apache.thrift.TException;
 
     public void registerApplicationModule(String gatewayId, org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule
applicationModule, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
@@ -3010,16 +3011,17 @@ import org.slf4j.LoggerFactory;
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT,
"cloneExperiment failed: unknown result");
     }
 
-    public void terminateExperiment(String airavataExperimentId) throws org.apache.airavata.model.error.InvalidRequestException,
org.apache.airavata.model.error.ExperimentNotFoundException, org.apache.airavata.model.error.AiravataClientException,
org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    public void terminateExperiment(String airavataExperimentId, String tokenId) throws org.apache.airavata.model.error.InvalidRequestException,
org.apache.airavata.model.error.ExperimentNotFoundException, org.apache.airavata.model.error.AiravataClientException,
org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
     {
-      send_terminateExperiment(airavataExperimentId);
+      send_terminateExperiment(airavataExperimentId, tokenId);
       recv_terminateExperiment();
     }
 
-    public void send_terminateExperiment(String airavataExperimentId) throws org.apache.thrift.TException
+    public void send_terminateExperiment(String airavataExperimentId, String tokenId) throws
org.apache.thrift.TException
     {
       terminateExperiment_args args = new terminateExperiment_args();
       args.setAiravataExperimentId(airavataExperimentId);
+      args.setTokenId(tokenId);
       sendBase("terminateExperiment", args);
     }
 
@@ -6853,24 +6855,27 @@ import org.slf4j.LoggerFactory;
       }
     }
 
-    public void terminateExperiment(String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback
resultHandler) throws org.apache.thrift.TException {
+    public void terminateExperiment(String airavataExperimentId, String tokenId, org.apache.thrift.async.AsyncMethodCallback
resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      terminateExperiment_call method_call = new terminateExperiment_call(airavataExperimentId,
resultHandler, this, ___protocolFactory, ___transport);
+      terminateExperiment_call method_call = new terminateExperiment_call(airavataExperimentId,
tokenId, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class terminateExperiment_call extends org.apache.thrift.async.TAsyncMethodCall
{
       private String airavataExperimentId;
-      public terminateExperiment_call(String airavataExperimentId, 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 tokenId;
+      public terminateExperiment_call(String airavataExperimentId, String tokenId, 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.airavataExperimentId = airavataExperimentId;
+        this.tokenId = tokenId;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException
{
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("terminateExperiment",
org.apache.thrift.protocol.TMessageType.CALL, 0));
         terminateExperiment_args args = new terminateExperiment_args();
         args.setAiravataExperimentId(airavataExperimentId);
+        args.setTokenId(tokenId);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -10713,7 +10718,7 @@ import org.slf4j.LoggerFactory;
       public terminateExperiment_result getResult(I iface, terminateExperiment_args args)
throws org.apache.thrift.TException {
         terminateExperiment_result result = new terminateExperiment_result();
         try {
-          iface.terminateExperiment(args.airavataExperimentId);
+          iface.terminateExperiment(args.airavataExperimentId, args.tokenId);
         } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
           result.ire = ire;
         } catch (org.apache.airavata.model.error.ExperimentNotFoundException enf) {
@@ -15705,7 +15710,7 @@ import org.slf4j.LoggerFactory;
       }
 
       public void start(I iface, terminateExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<Void>
resultHandler) throws TException {
-        iface.terminateExperiment(args.airavataExperimentId,resultHandler);
+        iface.terminateExperiment(args.airavataExperimentId, args.tokenId,resultHandler);
       }
     }
 
@@ -62971,6 +62976,7 @@ import org.slf4j.LoggerFactory;
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("terminateExperiment_args");
 
     private static final org.apache.thrift.protocol.TField AIRAVATA_EXPERIMENT_ID_FIELD_DESC
= new org.apache.thrift.protocol.TField("airavataExperimentId", org.apache.thrift.protocol.TType.STRING,
(short)1);
+    private static final org.apache.thrift.protocol.TField TOKEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tokenId",
org.apache.thrift.protocol.TType.STRING, (short)2);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes
= new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
@@ -62979,10 +62985,12 @@ import org.slf4j.LoggerFactory;
     }
 
     public String airavataExperimentId; // required
+    public String tokenId; // 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_EXPERIMENT_ID((short)1, "airavataExperimentId");
+      AIRAVATA_EXPERIMENT_ID((short)1, "airavataExperimentId"),
+      TOKEN_ID((short)2, "tokenId");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -62999,6 +63007,8 @@ import org.slf4j.LoggerFactory;
         switch(fieldId) {
           case 1: // AIRAVATA_EXPERIMENT_ID
             return AIRAVATA_EXPERIMENT_ID;
+          case 2: // TOKEN_ID
+            return TOKEN_ID;
           default:
             return null;
         }
@@ -63044,6 +63054,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_EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("airavataExperimentId",
org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.TOKEN_ID, new org.apache.thrift.meta_data.FieldMetaData("tokenId",
org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(terminateExperiment_args.class,
metaDataMap);
     }
@@ -63052,10 +63064,12 @@ import org.slf4j.LoggerFactory;
     }
 
     public terminateExperiment_args(
-      String airavataExperimentId)
+      String airavataExperimentId,
+      String tokenId)
     {
       this();
       this.airavataExperimentId = airavataExperimentId;
+      this.tokenId = tokenId;
     }
 
     /**
@@ -63065,6 +63079,9 @@ import org.slf4j.LoggerFactory;
       if (other.isSetAiravataExperimentId()) {
         this.airavataExperimentId = other.airavataExperimentId;
       }
+      if (other.isSetTokenId()) {
+        this.tokenId = other.tokenId;
+      }
     }
 
     public terminateExperiment_args deepCopy() {
@@ -63074,6 +63091,7 @@ import org.slf4j.LoggerFactory;
     @Override
     public void clear() {
       this.airavataExperimentId = null;
+      this.tokenId = null;
     }
 
     public String getAiravataExperimentId() {
@@ -63100,6 +63118,30 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    public String getTokenId() {
+      return this.tokenId;
+    }
+
+    public terminateExperiment_args setTokenId(String tokenId) {
+      this.tokenId = tokenId;
+      return this;
+    }
+
+    public void unsetTokenId() {
+      this.tokenId = null;
+    }
+
+    /** Returns true if field tokenId is set (has been assigned a value) and false otherwise
*/
+    public boolean isSetTokenId() {
+      return this.tokenId != null;
+    }
+
+    public void setTokenIdIsSet(boolean value) {
+      if (!value) {
+        this.tokenId = null;
+      }
+    }
+
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
       case AIRAVATA_EXPERIMENT_ID:
@@ -63110,6 +63152,14 @@ import org.slf4j.LoggerFactory;
         }
         break;
 
+      case TOKEN_ID:
+        if (value == null) {
+          unsetTokenId();
+        } else {
+          setTokenId((String)value);
+        }
+        break;
+
       }
     }
 
@@ -63118,6 +63168,9 @@ import org.slf4j.LoggerFactory;
       case AIRAVATA_EXPERIMENT_ID:
         return getAiravataExperimentId();
 
+      case TOKEN_ID:
+        return getTokenId();
+
       }
       throw new IllegalStateException();
     }
@@ -63131,6 +63184,8 @@ import org.slf4j.LoggerFactory;
       switch (field) {
       case AIRAVATA_EXPERIMENT_ID:
         return isSetAiravataExperimentId();
+      case TOKEN_ID:
+        return isSetTokenId();
       }
       throw new IllegalStateException();
     }
@@ -63157,6 +63212,15 @@ import org.slf4j.LoggerFactory;
           return false;
       }
 
+      boolean this_present_tokenId = true && this.isSetTokenId();
+      boolean that_present_tokenId = true && that.isSetTokenId();
+      if (this_present_tokenId || that_present_tokenId) {
+        if (!(this_present_tokenId && that_present_tokenId))
+          return false;
+        if (!this.tokenId.equals(that.tokenId))
+          return false;
+      }
+
       return true;
     }
 
@@ -63183,6 +63247,16 @@ import org.slf4j.LoggerFactory;
           return lastComparison;
         }
       }
+      lastComparison = Boolean.valueOf(isSetTokenId()).compareTo(other.isSetTokenId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetTokenId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tokenId, other.tokenId);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
       return 0;
     }
 
@@ -63210,6 +63284,14 @@ import org.slf4j.LoggerFactory;
         sb.append(this.airavataExperimentId);
       }
       first = false;
+      if (!first) sb.append(", ");
+      sb.append("tokenId:");
+      if (this.tokenId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.tokenId);
+      }
+      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -63261,6 +63343,14 @@ import org.slf4j.LoggerFactory;
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
+            case 2: // TOKEN_ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.tokenId = iprot.readString();
+                struct.setTokenIdIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
             default:
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
           }
@@ -63281,6 +63371,11 @@ import org.slf4j.LoggerFactory;
           oprot.writeString(struct.airavataExperimentId);
           oprot.writeFieldEnd();
         }
+        if (struct.tokenId != null) {
+          oprot.writeFieldBegin(TOKEN_ID_FIELD_DESC);
+          oprot.writeString(struct.tokenId);
+          oprot.writeFieldEnd();
+        }
         oprot.writeFieldStop();
         oprot.writeStructEnd();
       }
@@ -63302,20 +63397,30 @@ import org.slf4j.LoggerFactory;
         if (struct.isSetAiravataExperimentId()) {
           optionals.set(0);
         }
-        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetTokenId()) {
+          optionals.set(1);
+        }
+        oprot.writeBitSet(optionals, 2);
         if (struct.isSetAiravataExperimentId()) {
           oprot.writeString(struct.airavataExperimentId);
         }
+        if (struct.isSetTokenId()) {
+          oprot.writeString(struct.tokenId);
+        }
       }
 
       @Override
       public void read(org.apache.thrift.protocol.TProtocol prot, terminateExperiment_args
struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
-        BitSet incoming = iprot.readBitSet(1);
+        BitSet incoming = iprot.readBitSet(2);
         if (incoming.get(0)) {
           struct.airavataExperimentId = iprot.readString();
           struct.setAiravataExperimentIdIsSet(true);
         }
+        if (incoming.get(1)) {
+          struct.tokenId = iprot.readString();
+          struct.setTokenIdIsSet(true);
+        }
       }
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/97d31b4d/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 5a6df09..ac590e3 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
@@ -9680,6 +9680,14 @@ uint32_t Airavata_terminateExperiment_args::read(::apache::thrift::protocol::TPr
           xfer += iprot->skip(ftype);
         }
         break;
+      case 2:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->tokenId);
+          this->__isset.tokenId = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -9700,6 +9708,10 @@ uint32_t Airavata_terminateExperiment_args::write(::apache::thrift::protocol::TP
   xfer += oprot->writeString(this->airavataExperimentId);
   xfer += oprot->writeFieldEnd();
 
+  xfer += oprot->writeFieldBegin("tokenId", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString(this->tokenId);
+  xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -9713,6 +9725,10 @@ uint32_t Airavata_terminateExperiment_pargs::write(::apache::thrift::protocol::T
   xfer += oprot->writeString((*(this->airavataExperimentId)));
   xfer += oprot->writeFieldEnd();
 
+  xfer += oprot->writeFieldBegin("tokenId", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString((*(this->tokenId)));
+  xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -31027,19 +31043,20 @@ void AiravataClient::recv_cloneExperiment(std::string& _return)
   throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT,
"cloneExperiment failed: unknown result");
 }
 
-void AiravataClient::terminateExperiment(const std::string& airavataExperimentId)
+void AiravataClient::terminateExperiment(const std::string& airavataExperimentId, const
std::string& tokenId)
 {
-  send_terminateExperiment(airavataExperimentId);
+  send_terminateExperiment(airavataExperimentId, tokenId);
   recv_terminateExperiment();
 }
 
-void AiravataClient::send_terminateExperiment(const std::string& airavataExperimentId)
+void AiravataClient::send_terminateExperiment(const std::string& airavataExperimentId,
const std::string& tokenId)
 {
   int32_t cseqid = 0;
   oprot_->writeMessageBegin("terminateExperiment", ::apache::thrift::protocol::T_CALL,
cseqid);
 
   Airavata_terminateExperiment_pargs args;
   args.airavataExperimentId = &airavataExperimentId;
+  args.tokenId = &tokenId;
   args.write(oprot_);
 
   oprot_->writeMessageEnd();
@@ -38745,7 +38762,7 @@ void AiravataProcessor::process_terminateExperiment(int32_t seqid,
::apache::thr
 
   Airavata_terminateExperiment_result result;
   try {
-    iface_->terminateExperiment(args.airavataExperimentId);
+    iface_->terminateExperiment(args.airavataExperimentId, args.tokenId);
   } catch ( ::apache::airavata::api::error::InvalidRequestException &ire) {
     result.ire = ire;
     result.__isset.ire = true;

http://git-wip-us.apache.org/repos/asf/airavata/blob/97d31b4d/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 78a7e9c..78f2742 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
@@ -70,7 +70,7 @@ class AiravataIf {
   virtual void getJobDetails(std::vector< ::apache::airavata::model::workspace::experiment::JobDetails>
& _return, const std::string& airavataExperimentId) = 0;
   virtual void getDataTransferDetails(std::vector< ::apache::airavata::model::workspace::experiment::DataTransferDetails>
& _return, const std::string& airavataExperimentId) = 0;
   virtual void cloneExperiment(std::string& _return, const std::string& existingExperimentID,
const std::string& newExperimentName) = 0;
-  virtual void terminateExperiment(const std::string& airavataExperimentId) = 0;
+  virtual void terminateExperiment(const std::string& airavataExperimentId, const std::string&
tokenId) = 0;
   virtual void registerApplicationModule(std::string& _return, const std::string&
gatewayId, const  ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule&
applicationModule) = 0;
   virtual void getApplicationModule( ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule&
_return, const std::string& appModuleId) = 0;
   virtual bool updateApplicationModule(const std::string& appModuleId, const  ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule&
applicationModule) = 0;
@@ -295,7 +295,7 @@ class AiravataNull : virtual public AiravataIf {
   void cloneExperiment(std::string& /* _return */, const std::string& /* existingExperimentID
*/, const std::string& /* newExperimentName */) {
     return;
   }
-  void terminateExperiment(const std::string& /* airavataExperimentId */) {
+  void terminateExperiment(const std::string& /* airavataExperimentId */, const std::string&
/* tokenId */) {
     return;
   }
   void registerApplicationModule(std::string& /* _return */, const std::string& /*
gatewayId */, const  ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule&
/* applicationModule */) {
@@ -5806,19 +5806,21 @@ class Airavata_cloneExperiment_presult {
 };
 
 typedef struct _Airavata_terminateExperiment_args__isset {
-  _Airavata_terminateExperiment_args__isset() : airavataExperimentId(false) {}
+  _Airavata_terminateExperiment_args__isset() : airavataExperimentId(false), tokenId(false)
{}
   bool airavataExperimentId;
+  bool tokenId;
 } _Airavata_terminateExperiment_args__isset;
 
 class Airavata_terminateExperiment_args {
  public:
 
-  Airavata_terminateExperiment_args() : airavataExperimentId() {
+  Airavata_terminateExperiment_args() : airavataExperimentId(), tokenId() {
   }
 
   virtual ~Airavata_terminateExperiment_args() throw() {}
 
   std::string airavataExperimentId;
+  std::string tokenId;
 
   _Airavata_terminateExperiment_args__isset __isset;
 
@@ -5826,10 +5828,16 @@ class Airavata_terminateExperiment_args {
     airavataExperimentId = val;
   }
 
+  void __set_tokenId(const std::string& val) {
+    tokenId = val;
+  }
+
   bool operator == (const Airavata_terminateExperiment_args & rhs) const
   {
     if (!(airavataExperimentId == rhs.airavataExperimentId))
       return false;
+    if (!(tokenId == rhs.tokenId))
+      return false;
     return true;
   }
   bool operator != (const Airavata_terminateExperiment_args &rhs) const {
@@ -5851,6 +5859,7 @@ class Airavata_terminateExperiment_pargs {
   virtual ~Airavata_terminateExperiment_pargs() throw() {}
 
   const std::string* airavataExperimentId;
+  const std::string* tokenId;
 
   uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
 
@@ -16573,8 +16582,8 @@ class AiravataClient : virtual public AiravataIf {
   void cloneExperiment(std::string& _return, const std::string& existingExperimentID,
const std::string& newExperimentName);
   void send_cloneExperiment(const std::string& existingExperimentID, const std::string&
newExperimentName);
   void recv_cloneExperiment(std::string& _return);
-  void terminateExperiment(const std::string& airavataExperimentId);
-  void send_terminateExperiment(const std::string& airavataExperimentId);
+  void terminateExperiment(const std::string& airavataExperimentId, const std::string&
tokenId);
+  void send_terminateExperiment(const std::string& airavataExperimentId, const std::string&
tokenId);
   void recv_terminateExperiment();
   void registerApplicationModule(std::string& _return, const std::string& gatewayId,
const  ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule& applicationModule);
   void send_registerApplicationModule(const std::string& gatewayId, const  ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule&
applicationModule);
@@ -17455,13 +17464,13 @@ class AiravataMultiface : virtual public AiravataIf {
     return;
   }
 
-  void terminateExperiment(const std::string& airavataExperimentId) {
+  void terminateExperiment(const std::string& airavataExperimentId, const std::string&
tokenId) {
     size_t sz = ifaces_.size();
     size_t i = 0;
     for (; i < (sz - 1); ++i) {
-      ifaces_[i]->terminateExperiment(airavataExperimentId);
+      ifaces_[i]->terminateExperiment(airavataExperimentId, tokenId);
     }
-    ifaces_[i]->terminateExperiment(airavataExperimentId);
+    ifaces_[i]->terminateExperiment(airavataExperimentId, tokenId);
   }
 
   void registerApplicationModule(std::string& _return, const std::string& gatewayId,
const  ::apache::airavata::model::appcatalog::appdeployment::ApplicationModule& applicationModule)
{

http://git-wip-us.apache.org/repos/asf/airavata/blob/97d31b4d/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 96b9e0f..b39c56f 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
@@ -229,7 +229,7 @@ class AiravataHandler : virtual public AiravataIf {
     printf("cloneExperiment\n");
   }
 
-  void terminateExperiment(const std::string& airavataExperimentId) {
+  void terminateExperiment(const std::string& airavataExperimentId, const std::string&
tokenId) {
     // Your implementation goes here
     printf("terminateExperiment\n");
   }

http://git-wip-us.apache.org/repos/asf/airavata/blob/97d31b4d/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 0865706..5d20b4f 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
@@ -55,7 +55,7 @@ interface AiravataIf {
   public function getJobDetails($airavataExperimentId);
   public function getDataTransferDetails($airavataExperimentId);
   public function cloneExperiment($existingExperimentID, $newExperimentName);
-  public function terminateExperiment($airavataExperimentId);
+  public function terminateExperiment($airavataExperimentId, $tokenId);
   public function registerApplicationModule($gatewayId, \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule
$applicationModule);
   public function getApplicationModule($appModuleId);
   public function updateApplicationModule($appModuleId, \Airavata\Model\AppCatalog\AppDeployment\ApplicationModule
$applicationModule);
@@ -2463,16 +2463,17 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     throw new \Exception("cloneExperiment failed: unknown result");
   }
 
-  public function terminateExperiment($airavataExperimentId)
+  public function terminateExperiment($airavataExperimentId, $tokenId)
   {
-    $this->send_terminateExperiment($airavataExperimentId);
+    $this->send_terminateExperiment($airavataExperimentId, $tokenId);
     $this->recv_terminateExperiment();
   }
 
-  public function send_terminateExperiment($airavataExperimentId)
+  public function send_terminateExperiment($airavataExperimentId, $tokenId)
   {
     $args = new \Airavata\API\Airavata_terminateExperiment_args();
     $args->airavataExperimentId = $airavataExperimentId;
+    $args->tokenId = $tokenId;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
@@ -16311,6 +16312,7 @@ class Airavata_terminateExperiment_args {
   static $_TSPEC;
 
   public $airavataExperimentId = null;
+  public $tokenId = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -16319,12 +16321,19 @@ class Airavata_terminateExperiment_args {
           'var' => 'airavataExperimentId',
           'type' => TType::STRING,
           ),
+        2 => array(
+          'var' => 'tokenId',
+          'type' => TType::STRING,
+          ),
         );
     }
     if (is_array($vals)) {
       if (isset($vals['airavataExperimentId'])) {
         $this->airavataExperimentId = $vals['airavataExperimentId'];
       }
+      if (isset($vals['tokenId'])) {
+        $this->tokenId = $vals['tokenId'];
+      }
     }
   }
 
@@ -16354,6 +16363,13 @@ class Airavata_terminateExperiment_args {
             $xfer += $input->skip($ftype);
           }
           break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->tokenId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -16372,6 +16388,11 @@ class Airavata_terminateExperiment_args {
       $xfer += $output->writeString($this->airavataExperimentId);
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->tokenId !== null) {
+      $xfer += $output->writeFieldBegin('tokenId', TType::STRING, 2);
+      $xfer += $output->writeString($this->tokenId);
+      $xfer += $output->writeFieldEnd();
+    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;

http://git-wip-us.apache.org/repos/asf/airavata/blob/97d31b4d/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 f297497..240a5c7 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
@@ -61,7 +61,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
   print '   getJobDetails(string airavataExperimentId)'
   print '   getDataTransferDetails(string airavataExperimentId)'
   print '  string cloneExperiment(string existingExperimentID, string newExperimentName)'
-  print '  void terminateExperiment(string airavataExperimentId)'
+  print '  void terminateExperiment(string airavataExperimentId, string tokenId)'
   print '  string registerApplicationModule(string gatewayId, ApplicationModule applicationModule)'
   print '  ApplicationModule getApplicationModule(string appModuleId)'
   print '  bool updateApplicationModule(string appModuleId, ApplicationModule applicationModule)'
@@ -419,10 +419,10 @@ elif cmd == 'cloneExperiment':
   pp.pprint(client.cloneExperiment(args[0],args[1],))
 
 elif cmd == 'terminateExperiment':
-  if len(args) != 1:
-    print 'terminateExperiment requires 1 args'
+  if len(args) != 2:
+    print 'terminateExperiment requires 2 args'
     sys.exit(1)
-  pp.pprint(client.terminateExperiment(args[0],))
+  pp.pprint(client.terminateExperiment(args[0],args[1],))
 
 elif cmd == 'registerApplicationModule':
   if len(args) != 2:

http://git-wip-us.apache.org/repos/asf/airavata/blob/97d31b4d/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 ded8f77..cab0463 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
@@ -566,7 +566,7 @@ class Iface:
     """
     pass
 
-  def terminateExperiment(self, airavataExperimentId):
+  def terminateExperiment(self, airavataExperimentId, tokenId):
     """
     Terminate a running experiment.
 
@@ -602,6 +602,7 @@ class Iface:
 
     Parameters:
      - airavataExperimentId
+     - tokenId
     """
     pass
 
@@ -3493,7 +3494,7 @@ class Client(Iface):
       raise result.ase
     raise TApplicationException(TApplicationException.MISSING_RESULT, "cloneExperiment failed:
unknown result");
 
-  def terminateExperiment(self, airavataExperimentId):
+  def terminateExperiment(self, airavataExperimentId, tokenId):
     """
     Terminate a running experiment.
 
@@ -3529,14 +3530,16 @@ class Client(Iface):
 
     Parameters:
      - airavataExperimentId
+     - tokenId
     """
-    self.send_terminateExperiment(airavataExperimentId)
+    self.send_terminateExperiment(airavataExperimentId, tokenId)
     self.recv_terminateExperiment()
 
-  def send_terminateExperiment(self, airavataExperimentId):
+  def send_terminateExperiment(self, airavataExperimentId, tokenId):
     self._oprot.writeMessageBegin('terminateExperiment', TMessageType.CALL, self._seqid)
     args = terminateExperiment_args()
     args.airavataExperimentId = airavataExperimentId
+    args.tokenId = tokenId
     args.write(self._oprot)
     self._oprot.writeMessageEnd()
     self._oprot.trans.flush()
@@ -7876,7 +7879,7 @@ class Processor(Iface, TProcessor):
     iprot.readMessageEnd()
     result = terminateExperiment_result()
     try:
-      self._handler.terminateExperiment(args.airavataExperimentId)
+      self._handler.terminateExperiment(args.airavataExperimentId, args.tokenId)
     except apache.airavata.api.error.ttypes.InvalidRequestException, ire:
       result.ire = ire
     except apache.airavata.api.error.ttypes.ExperimentNotFoundException, enf:
@@ -15917,15 +15920,18 @@ class terminateExperiment_args:
   """
   Attributes:
    - airavataExperimentId
+   - tokenId
   """
 
   thrift_spec = (
     None, # 0
     (1, TType.STRING, 'airavataExperimentId', None, None, ), # 1
+    (2, TType.STRING, 'tokenId', None, None, ), # 2
   )
 
-  def __init__(self, airavataExperimentId=None,):
+  def __init__(self, airavataExperimentId=None, tokenId=None,):
     self.airavataExperimentId = airavataExperimentId
+    self.tokenId = tokenId
 
   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:
@@ -15941,6 +15947,11 @@ class terminateExperiment_args:
           self.airavataExperimentId = iprot.readString();
         else:
           iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.STRING:
+          self.tokenId = iprot.readString();
+        else:
+          iprot.skip(ftype)
       else:
         iprot.skip(ftype)
       iprot.readFieldEnd()
@@ -15955,6 +15966,10 @@ class terminateExperiment_args:
       oprot.writeFieldBegin('airavataExperimentId', TType.STRING, 1)
       oprot.writeString(self.airavataExperimentId)
       oprot.writeFieldEnd()
+    if self.tokenId is not None:
+      oprot.writeFieldBegin('tokenId', TType.STRING, 2)
+      oprot.writeString(self.tokenId)
+      oprot.writeFieldEnd()
     oprot.writeFieldStop()
     oprot.writeStructEnd()
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/97d31b4d/airavata-api/generate-thrift-files.sh
----------------------------------------------------------------------
diff --git a/airavata-api/generate-thrift-files.sh b/airavata-api/generate-thrift-files.sh
index 88d38ea..bf4d4e9 100755
--- a/airavata-api/generate-thrift-files.sh
+++ b/airavata-api/generate-thrift-files.sh
@@ -46,7 +46,7 @@ fi
 #  Verify is thrift is installed, is in the path is at a specified version.
 
 REQUIRED_THRIFT_VERSION='0.9.1'
-THRIFT_EXEC=/usr/local/Cellar/thrift/0.9.1/bin/thrift
+THRIFT_EXEC=/usr/local/bin/thrift
 
 VERSION=$($THRIFT_EXEC -version 2>/dev/null | grep -F "${REQUIRED_THRIFT_VERSION}" | 
wc -l)
 if [ "$VERSION" -ne 1 ] ; then

http://git-wip-us.apache.org/repos/asf/airavata/blob/97d31b4d/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
index b12c3b8..b1f644b 100644
--- a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
+++ b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
@@ -604,7 +604,7 @@ service Airavata {
    *       rather an Airavata Administrator will be notified to take corrective action.
    *
   */
-  void terminateExperiment(1: string airavataExperimentId)
+  void terminateExperiment(1: string airavataExperimentId, 2: string tokenId)
     throws (1: airavataErrors.InvalidRequestException ire,
             2: airavataErrors.ExperimentNotFoundException enf,
             3: airavataErrors.AiravataClientException ace,

http://git-wip-us.apache.org/repos/asf/airavata/blob/97d31b4d/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
index 80c57bd..df64638 100644
--- a/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
+++ b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
@@ -328,7 +328,7 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface,
 	 * @return
 	 * @throws TException
 	 */
-	public boolean terminateExperiment(String experimentId) throws TException {
+	public boolean terminateExperiment(String experimentId, String tokenId) throws TException
{
         log.infoId(experimentId, "Experiment: {} is cancelling  !!!!!", experimentId);
         return validateStatesAndCancel(experimentId);
 	}

http://git-wip-us.apache.org/repos/asf/airavata/blob/97d31b4d/modules/orchestrator/orchestrator-thrift-descriptions/orchestrator.cpi.service.thrift
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-thrift-descriptions/orchestrator.cpi.service.thrift
b/modules/orchestrator/orchestrator-thrift-descriptions/orchestrator.cpi.service.thrift
index 4803408..07c0834 100644
--- a/modules/orchestrator/orchestrator-thrift-descriptions/orchestrator.cpi.service.thrift
+++ b/modules/orchestrator/orchestrator-thrift-descriptions/orchestrator.cpi.service.thrift
@@ -74,5 +74,5 @@ service OrchestratorService {
      * @return sucess/failure
      *
     **/
-  bool terminateExperiment (1: required string experimentId)
+  bool terminateExperiment (1: required string experimentId, 2: required string tokenId)
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/97d31b4d/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/TestFrameworkProps.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/TestFrameworkProps.java
b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/TestFrameworkProps.java
new file mode 100644
index 0000000..cc7f7ea
--- /dev/null
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/TestFrameworkProps.java
@@ -0,0 +1,26 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+package org.apache.airavata.testsuite.multitenantedairavata;
+
+public class TestFrameworkProps {
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/97d31b4d/modules/test-suite/multi-tenanted-airavata/src/main/resources/test-framework.json
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/resources/test-framework.json
b/modules/test-suite/multi-tenanted-airavata/src/main/resources/test-framework.json
new file mode 100644
index 0000000..e69de29


Mime
View raw message