Repository: airavata-sandbox
Updated Branches:
  refs/heads/master 62ad0a537 -> e33bf99b0


http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/e33bf99b/airavata-mock-multiplexed-api/mock-airavata-api-server/src/main/java/MockAiravataAPIServer.java
----------------------------------------------------------------------
diff --git 
a/airavata-mock-multiplexed-api/mock-airavata-api-server/src/main/java/MockAiravataAPIServer.java
 
b/airavata-mock-multiplexed-api/mock-airavata-api-server/src/main/java/MockAiravataAPIServer.java
deleted file mode 100644
index 4d465f7..0000000
--- 
a/airavata-mock-multiplexed-api/mock-airavata-api-server/src/main/java/MockAiravataAPIServer.java
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
- *
- * 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.api.server;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.util.Random;
-
-import org.apache.airavata.api.Airavata;
-import org.apache.airavata.api.server.handler.AiravataServerHandler;
-import org.apache.airavata.api.server.util.AppCatalogInitUtil;
-import org.apache.airavata.api.server.util.Constants;
-import org.apache.airavata.api.server.util.RegistryInitUtil;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.AiravataUtils;
-import org.apache.airavata.common.utils.AiravataZKUtils;
-import org.apache.airavata.common.utils.IServer;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.model.error.AiravataErrorType;
-import org.apache.airavata.model.error.AiravataSystemException;
-import org.apache.thrift.server.TServer;
-import org.apache.thrift.server.TThreadPoolServer;
-import org.apache.thrift.transport.TServerSocket;
-import org.apache.thrift.transport.TServerTransport;
-import org.apache.thrift.transport.TTransportException;
-import org.apache.zookeeper.*;
-import org.apache.zookeeper.data.Stat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AiravataAPIServer implements IServer, Watcher{
-
-    private final static Logger logger = 
LoggerFactory.getLogger(AiravataAPIServer.class);
-       private static final String SERVER_NAME = "Airavata API Server";
-       private static final String SERVER_VERSION = "1.0";
-    private ZooKeeper zk;
-    private static Integer mutex = -1;
-
-    private ServerStatus status;
-
-       private TServer server;
-
-       public AiravataAPIServer() {
-               setStatus(ServerStatus.STOPPED);
-       }
-       
-    public void startAiravataServer(Airavata.Processor<Airavata.Iface> 
airavataAPIServer) throws AiravataSystemException {
-        try {
-            AiravataUtils.setExecutionAsServer();
-            RegistryInitUtil.initializeDB();
-            AppCatalogInitUtil.initializeDB();
-            final int serverPort = 
Integer.parseInt(ServerSettings.getSetting(Constants.API_SERVER_PORT,"8930"));
-            final String serverHost = 
ServerSettings.getSetting(Constants.API_SERVER_HOST, null);
-            
-                       TServerTransport serverTransport;
-                       
-                       if(serverHost == null){
-                               serverTransport = new TServerSocket(serverPort);
-                       }else{
-                               InetSocketAddress inetSocketAddress = new 
InetSocketAddress(serverHost, serverPort);
-                               serverTransport = new 
TServerSocket(inetSocketAddress);
-                       }
-                       
-            TThreadPoolServer.Args options = new 
TThreadPoolServer.Args(serverTransport);
-            options.minWorkerThreads = 
Integer.parseInt(ServerSettings.getSetting(Constants.API_SERVER_MIN_THREADS, 
"50"));
-                       server = new 
TThreadPoolServer(options.processor(airavataAPIServer));
-            new Thread() {
-                               public void run() {
-                                       server.serve();
-                                       
RegistryInitUtil.stopDerbyInServerMode();
-                                       setStatus(ServerStatus.STOPPED);
-                                       logger.info("Airavata API Server 
Stopped.");
-                               }
-                       }.start();
-                       new Thread() {
-                               public void run() {
-                                       while(!server.isServing()){
-                                               try {
-                                                       Thread.sleep(500);
-                                               } catch (InterruptedException 
e) {
-                                                       break;
-                                               }
-                                       }
-                                       if (server.isServing()){
-                                               setStatus(ServerStatus.STARTED);
-                                   logger.info("Starting Airavata API Server 
on Port " + serverPort);
-                                   logger.info("Listening to Airavata Clients 
....");
-                                       }
-                               }
-                       }.start();
-            storeServerConfig();
-        } catch (TTransportException e) {
-            logger.error(e.getMessage());
-            setStatus(ServerStatus.FAILED);
-            RegistryInitUtil.stopDerbyInServerMode();
-            throw new 
AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);
-        }
-    }
-
-    public void storeServerConfig() throws AiravataSystemException{
-        try {
-            String zkhostPort = AiravataZKUtils.getZKhostPort();
-            String airavataServerHostPort = 
ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.API_SERVER_HOST)
-                    + ":" + 
ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.API_SERVER_PORT);
-            String experimentCatalogJDBCURL = 
ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.REGISTRY_JDBC_URL);
-            String appCatalogJDBCURL = 
ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.APPCATALOG_JDBC_URL);
-            String rabbitMqBrokerURL = 
ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.RABBITMQ_BROKER_URL);
-            String rabbitMqExchange = 
ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.RABBITMQ_EXCHANGE);
-            String rabbitMq = rabbitMqBrokerURL + File.separator + 
rabbitMqExchange;
-            zk = new ZooKeeper(zkhostPort, 6000, this);   // no watcher is 
required, this will only use to store some data
-            String apiServer = 
ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.ZOOKEEPER_API_SERVER_NODE,
 "/airavata-server");
-            String OrchServer = 
ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.ZOOKEEPER_ORCHESTRATOR_SERVER_NODE,
 "/orchestrator-server");
-            String gfacServer = 
ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.ZOOKEEPER_GFAC_SERVER_NODE,
 "/gfac-server");
-            String gfacExperiments = 
ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.ZOOKEEPER_GFAC_EXPERIMENT_NODE,
 "/gfac-experiments");
-            String experimentCatalog = 
ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.ZOOKEEPER_EXPERIMENT_CATALOG,
 "/experiment-catalog");
-            String appCatalog = 
ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.ZOOKEEPER_APPCATALOG,
 "/app-catalog");
-            String rabbitMQ = 
ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.ZOOKEEPER_RABBITMQ,
 "/rabbitMq");
-            Stat zkStat = zk.exists(experimentCatalog, false);
-            if (zkStat == null) {
-                zk.create(experimentCatalog, new byte[0], 
ZooDefs.Ids.OPEN_ACL_UNSAFE,
-                        CreateMode.PERSISTENT);
-            }
-            String exCatalogInstantNode = experimentCatalog + File.separator + 
String.valueOf(new Random().nextInt(Integer.MAX_VALUE));
-            zkStat = zk.exists(exCatalogInstantNode, false);
-            if (zkStat == null) {
-                zk.create(exCatalogInstantNode,
-                        experimentCatalogJDBCURL.getBytes(), 
ZooDefs.Ids.OPEN_ACL_UNSAFE,
-                        CreateMode.EPHEMERAL);      // other component will 
watch these childeren creation deletion to monitor the status of the node
-                logger.info("Successfully created experiment-catalog node");
-            }
-            zkStat = zk.exists(appCatalog, false);
-            if (zkStat == null) {
-                zk.create(appCatalog, new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE,
-                        CreateMode.PERSISTENT);
-            }
-            String appCatalogInstantNode = appCatalog + File.separator + 
String.valueOf(new Random().nextInt(Integer.MAX_VALUE));
-            zkStat = zk.exists(appCatalogInstantNode, false);
-            if (zkStat == null) {
-                zk.create(appCatalogInstantNode,
-                        appCatalogJDBCURL.getBytes(), 
ZooDefs.Ids.OPEN_ACL_UNSAFE,
-                        CreateMode.EPHEMERAL);      // other component will 
watch these childeren creation deletion to monitor the status of the node
-                logger.info("Successfully created app-catalog node");
-            }
-            if (getStatus().equals(ServerStatus.STARTED)) {
-                zkStat = zk.exists(apiServer, false);
-                if (zkStat == null) {
-                    zk.create(apiServer, new byte[0], 
ZooDefs.Ids.OPEN_ACL_UNSAFE,
-                            CreateMode.PERSISTENT);
-                }
-                String instantNode = apiServer + File.separator + 
String.valueOf(new Random().nextInt(Integer.MAX_VALUE));
-                zkStat = zk.exists(instantNode, false);
-                if (zkStat == null) {
-                    zk.create(instantNode,
-                            airavataServerHostPort.getBytes(), 
ZooDefs.Ids.OPEN_ACL_UNSAFE,
-                            CreateMode.EPHEMERAL);      // other component 
will watch these childeren creation deletion to monitor the status of the node
-                    logger.info("Successfully created airavata-server node");
-                }
-
-                zkStat = zk.exists(OrchServer, false);
-                if (zkStat == null) {
-                    zk.create(OrchServer, new byte[0], 
ZooDefs.Ids.OPEN_ACL_UNSAFE,
-                            CreateMode.PERSISTENT);
-                    logger.info("Successfully created orchestrator-server 
node");
-                }
-                zkStat = zk.exists(gfacServer, false);
-                if (zkStat == null) {
-                    zk.create(gfacServer, new byte[0], 
ZooDefs.Ids.OPEN_ACL_UNSAFE,
-                            CreateMode.PERSISTENT);
-                    logger.info("Successfully created gfac-server node");
-                }
-                zkStat = zk.exists(gfacServer, false);
-                if (zkStat == null) {
-                    zk.create(gfacExperiments, new byte[0], 
ZooDefs.Ids.OPEN_ACL_UNSAFE,
-                            CreateMode.PERSISTENT);
-                    logger.info("Successfully created gfac-server node");
-                }
-                zkStat = zk.exists(rabbitMQ, false);
-                if (zkStat == null) {
-                    zk.create(rabbitMQ, new byte[0], 
ZooDefs.Ids.OPEN_ACL_UNSAFE,
-                            CreateMode.PERSISTENT);
-                }
-                if (ServerSettings.isRabbitMqPublishEnabled()) {
-                    String rabbitMqInstantNode = rabbitMQ + File.separator + 
String.valueOf(new Random().nextInt(Integer.MAX_VALUE));
-                    zkStat = zk.exists(rabbitMqInstantNode, false);
-                    if (zkStat == null) {
-                        zk.create(rabbitMqInstantNode,
-                                rabbitMq.getBytes(), 
ZooDefs.Ids.OPEN_ACL_UNSAFE,
-                                CreateMode.EPHEMERAL);      // other component 
will watch these childeren creation deletion to monitor the status of the node
-                        logger.info("Successfully created rabbitMQ node");
-                    }
-                }
-                logger.info("Finished starting ZK: " + zk);
-            }
-        } catch (ApplicationSettingsException e) {
-            logger.error(e.getMessage());
-            setStatus(ServerStatus.FAILED);
-            RegistryInitUtil.stopDerbyInServerMode();
-            throw new 
AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);
-        } catch (IOException e) {
-            logger.error(e.getMessage());
-            setStatus(ServerStatus.FAILED);
-            RegistryInitUtil.stopDerbyInServerMode();
-            throw new 
AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);
-        } catch (InterruptedException e) {
-            logger.error(e.getMessage());
-            setStatus(ServerStatus.FAILED);
-            RegistryInitUtil.stopDerbyInServerMode();
-            throw new 
AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);
-        } catch (KeeperException e) {
-            logger.error(e.getMessage());
-            setStatus(ServerStatus.FAILED);
-            RegistryInitUtil.stopDerbyInServerMode();
-            throw new 
AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);
-        } catch (Exception e) {
-            logger.error(e.getMessage());
-            setStatus(ServerStatus.FAILED);
-            RegistryInitUtil.stopDerbyInServerMode();
-            throw new 
AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);
-        }
-    }
-
-    public static void main(String[] args) {
-       try {
-                       AiravataAPIServer server = new AiravataAPIServer();
-                       server.start();
-               } catch (Exception e) {
-                       logger.error("Error while initializing Airavata API 
server", e);
-               }
-    }
-
-       @Override
-       public void start() throws Exception {
-               setStatus(ServerStatus.STARTING);
-               Airavata.Processor<Airavata.Iface> airavataAPIServer =
-                new Airavata.Processor<Airavata.Iface>(new 
AiravataServerHandler());
-       startAiravataServer(airavataAPIServer);
-       }
-
-       @Override
-       public void stop() throws Exception {
-               if (server.isServing()){
-                       setStatus(ServerStatus.STOPING);
-                       server.stop();
-               }
-               
-       }
-
-       @Override
-       public void restart() throws Exception {
-               stop();
-               start();
-       }
-
-       @Override
-       public void configure() throws Exception {
-               // TODO Auto-generated method stub
-               
-       }
-
-       @Override
-       public ServerStatus getStatus() throws Exception {
-               return status;
-       }
-       
-       private void setStatus(ServerStatus stat){
-               status=stat;
-               status.updateTime();
-       }
-
-       @Override
-       public String getName() {
-               return SERVER_NAME;
-       }
-
-       @Override
-       public String getVersion() {
-               return SERVER_VERSION;
-       }
-
-    @Override
-    synchronized public void process(WatchedEvent watchedEvent) {
-        synchronized (mutex) {
-            Event.KeeperState state = watchedEvent.getState();
-            logger.info(state.name());
-            switch(state){
-                case SyncConnected:
-                    mutex.notify();
-                case Expired:case Disconnected:
-                    try {
-                        mutex = -1;
-                        zk = new ZooKeeper(AiravataZKUtils.getZKhostPort(), 
6000, this);
-                        synchronized (mutex) {
-                            mutex.wait();  // waiting for the syncConnected 
event
-                        }
-                        storeServerConfig();
-                    } catch (IOException e) {
-                        logger.error("Error while synchronizing with 
zookeeper", e);
-                    } catch (ApplicationSettingsException e) {
-                        logger.error("Error while synchronizing with 
zookeeper", e);
-                    } catch (InterruptedException e) {
-                        logger.error("Error while synchronizing with 
zookeeper", e);
-                    } catch (AiravataSystemException e) {
-                        logger.error("Error while synchronizing with 
zookeeper", e);
-                    }
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/e33bf99b/airavata-mock-multiplexed-api/mock-airavata-api-server/src/main/java/org/apache/airavata/api/handlers/CredentialManagementHandler.java
----------------------------------------------------------------------
diff --git 
a/airavata-mock-multiplexed-api/mock-airavata-api-server/src/main/java/org/apache/airavata/api/handlers/CredentialManagementHandler.java
 
b/airavata-mock-multiplexed-api/mock-airavata-api-server/src/main/java/org/apache/airavata/api/handlers/CredentialManagementHandler.java
new file mode 100644
index 0000000..540db96
--- /dev/null
+++ 
b/airavata-mock-multiplexed-api/mock-airavata-api-server/src/main/java/org/apache/airavata/api/handlers/CredentialManagementHandler.java
@@ -0,0 +1,44 @@
+/*
+*
+* 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.api.handlers;
+
+import org.apache.airavata.api.credentials.CredentialManagementService;
+import org.apache.thrift.TException;
+
+import java.util.Map;
+
+public class CredentialManagementHandler implements 
CredentialManagementService.Iface {
+    @Override
+    public String generateAndRegisterSSHKeys(String gatewayId, String 
userName) throws TException {
+        return "testSSHKeyToken";
+    }
+
+    @Override
+    public String getSSHPubKey(String airavataCredStoreToken) throws 
TException {
+        return "testsshpubkey";
+    }
+
+    @Override
+    public Map<String, String> getAllUserSSHPubKeys(String userName) throws 
TException {
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/e33bf99b/airavata-mock-multiplexed-api/mock-airavata-api-server/src/main/java/org/apache/airavata/api/handlers/GatewayManagementHandler.java
----------------------------------------------------------------------
diff --git 
a/airavata-mock-multiplexed-api/mock-airavata-api-server/src/main/java/org/apache/airavata/api/handlers/GatewayManagementHandler.java
 
b/airavata-mock-multiplexed-api/mock-airavata-api-server/src/main/java/org/apache/airavata/api/handlers/GatewayManagementHandler.java
new file mode 100644
index 0000000..5804309
--- /dev/null
+++ 
b/airavata-mock-multiplexed-api/mock-airavata-api-server/src/main/java/org/apache/airavata/api/handlers/GatewayManagementHandler.java
@@ -0,0 +1,37 @@
+/*
+*
+* 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.api.handlers;
+
+import org.apache.airavata.api.gateway.management.GatewayManagementService;
+import org.apache.thrift.TException;
+
+public class GatewayManagementHandler implements 
GatewayManagementService.Iface {
+    @Override
+    public String registerGateway(String gatewayName) throws TException {
+        return "testGatewayId";
+    }
+
+    @Override
+    public String getGatewayName(String gatewayId) throws TException {
+        return "TestGateway";
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/e33bf99b/airavata-mock-multiplexed-api/mock-airavata-api-server/src/main/java/org/apache/airavata/api/server/MockAiravataAPIServer.java
----------------------------------------------------------------------
diff --git 
a/airavata-mock-multiplexed-api/mock-airavata-api-server/src/main/java/org/apache/airavata/api/server/MockAiravataAPIServer.java
 
b/airavata-mock-multiplexed-api/mock-airavata-api-server/src/main/java/org/apache/airavata/api/server/MockAiravataAPIServer.java
new file mode 100644
index 0000000..2caedf8
--- /dev/null
+++ 
b/airavata-mock-multiplexed-api/mock-airavata-api-server/src/main/java/org/apache/airavata/api/server/MockAiravataAPIServer.java
@@ -0,0 +1,72 @@
+/*
+*
+* 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.api.server;
+
+import org.apache.airavata.api.credentials.CredentialManagementService;
+import org.apache.airavata.api.gateway.management.GatewayManagementService;
+import org.apache.airavata.api.handlers.CredentialManagementHandler;
+import org.apache.airavata.api.handlers.GatewayManagementHandler;
+import org.apache.thrift.TMultiplexedProcessor;
+import org.apache.thrift.server.TServer;
+import org.apache.thrift.server.TThreadPoolServer;
+import org.apache.thrift.transport.TServerSocket;
+import org.apache.thrift.transport.TServerTransport;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class MockAiravataAPIServer {
+
+    private final static Logger logger = 
LoggerFactory.getLogger(MockAiravataAPIServer.class);
+
+    public static CredentialManagementHandler credentialManagementHandler;
+    public static CredentialManagementService.Processor 
credentialManagementProcessor;
+
+    public static GatewayManagementHandler gatewayManagementHandler;
+    public static GatewayManagementService.Processor 
gatewayManagementProcessor;
+
+    public static void main(String [] args) {
+        try {
+            credentialManagementHandler = new CredentialManagementHandler();
+            credentialManagementProcessor = new 
CredentialManagementService.Processor(credentialManagementHandler);
+
+            gatewayManagementHandler = new GatewayManagementHandler();
+            gatewayManagementProcessor = new 
GatewayManagementService.Processor(gatewayManagementHandler);
+
+            TMultiplexedProcessor airavataServerProcessor = new 
TMultiplexedProcessor();
+
+            
airavataServerProcessor.registerProcessor("CredentialManagementService",credentialManagementProcessor);
+            
airavataServerProcessor.registerProcessor("GatewayManagementService",gatewayManagementProcessor);
+
+            TServerTransport serverTransport = new TServerSocket(9190);
+
+            TServer server = new TThreadPoolServer(new 
TThreadPoolServer.Args(serverTransport).processor(airavataServerProcessor));
+
+            System.out.println("Starting Mock Airavata API server...");
+            server.serve();
+
+        } catch (Exception x) {
+            x.printStackTrace();
+        }
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/e33bf99b/airavata-mock-multiplexed-api/mock-api-interface-descriptions/generate-thrift-stubs.sh
----------------------------------------------------------------------
diff --git 
a/airavata-mock-multiplexed-api/mock-api-interface-descriptions/generate-thrift-stubs.sh
 
b/airavata-mock-multiplexed-api/mock-api-interface-descriptions/generate-thrift-stubs.sh
index 3744494..81f624d 100755
--- 
a/airavata-mock-multiplexed-api/mock-api-interface-descriptions/generate-thrift-stubs.sh
+++ 
b/airavata-mock-multiplexed-api/mock-api-interface-descriptions/generate-thrift-stubs.sh
@@ -174,8 +174,7 @@ generate_java_stubs() {
     # Using thrift Java generator, generate the java classes based on Airavata 
API. This
     #   The airavataAPI.thrift includes rest of data models.
     thrift ${THRIFT_ARGS} --gen java mock-credential-management-api.thrift || 
fail unable to generate java thrift classes on AiravataAPI
-
-    #thrift ${THRIFT_ARGS} --gen java ${THRIFT_IDL_DIR}/workflowAPI.thrift || 
fail unable to generate java thrift classes on WorkflowAPI
+    thrift ${THRIFT_ARGS} --gen java mock-gateway-management-api.thrift || 
fail unable to generate java thrift classes on AiravataAPI
 
     # For the generated java classes add the ASF V2 License header
     add_license_header $JAVA_GEN_DIR

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/e33bf99b/airavata-mock-multiplexed-api/mock-api-interface-descriptions/mock-gateway-management-api.thrift
----------------------------------------------------------------------
diff --git 
a/airavata-mock-multiplexed-api/mock-api-interface-descriptions/mock-gateway-management-api.thrift
 
b/airavata-mock-multiplexed-api/mock-api-interface-descriptions/mock-gateway-management-api.thrift
index e69de29..155113b 100644
--- 
a/airavata-mock-multiplexed-api/mock-api-interface-descriptions/mock-gateway-management-api.thrift
+++ 
b/airavata-mock-multiplexed-api/mock-api-interface-descriptions/mock-gateway-management-api.thrift
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ *
+*/
+
+/**
+ * Gateway Management API
+*/
+
+namespace java org.apache.airavata.api.gateway.management
+namespace php Airavata.API.GatewayManagement
+namespace cpp apache.airavata.api.gateway.management
+namespace perl ApacheAiravataAPIGatewayManagement
+namespace py apache.airavata.api.gateway.management
+namespace js ApacheAiravataAPIGatewayManagement
+
+service GatewayManagementService {
+
+   string registerGateway (1: required string gatewayName)
+
+   string getGatewayName (1: required string gatewayId)
+
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-sandbox/blob/e33bf99b/airavata-mock-multiplexed-api/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-mock-multiplexed-api/pom.xml 
b/airavata-mock-multiplexed-api/pom.xml
index ee314bd..b4e8a1b 100644
--- a/airavata-mock-multiplexed-api/pom.xml
+++ b/airavata-mock-multiplexed-api/pom.xml
@@ -26,7 +26,7 @@
        </parent>
 
        <groupId>org.apache.airavata</groupId>
-       <artifactId>airavata-mock-api</artifactId>
+       <artifactId>mock-airavata-api</artifactId>
        <packaging>pom</packaging>
        <name>Airavata Mock API</name>
        <version>0.15-SNAPSHOT</version>
@@ -68,10 +68,10 @@
        <properties>
                
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-               <org.slf4j.version>1.7.6</org.slf4j.version>
+               <org.slf4j.version>1.7.10</org.slf4j.version>
                <log4j.version>1.2.16</log4j.version>
-               <surefire.version>2.12</surefire.version>
-               <junit.version>4.7</junit.version>
+               <surefire.version>2.18.1</surefire.version>
+               <junit.version>4.12</junit.version>
         <thrift.version>0.9.2</thrift.version>
        </properties>
 
@@ -140,10 +140,10 @@
                                        <plugin>
                                                
<groupId>org.apache.maven.plugins</groupId>
                                                
<artifactId>maven-compiler-plugin</artifactId>
-                                               <version>3.1</version>
+                                               <version>3.2</version>
                                                <configuration>
-                                                       <source>1.6</source>
-                                                       <target>1.6</target>
+                                                       <source>1.8</source>
+                                                       <target>1.8</target>
                                                </configuration>
                                        </plugin>
                                </plugins>
@@ -154,6 +154,7 @@
                        <modules>
                                <module>mock-airavata-api-java-stubs</module>
                                <module>mock-airavata-api-server</module>
+                <module>mock-airavata-api-client</module>
                        </modules>
                </profile>
 

Reply via email to