You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2017/09/26 19:09:30 UTC

[01/40] airavata git commit: AIRAVATA-2500 Implement SSHAccountProvisionerFactory

Repository: airavata
Updated Branches:
  refs/heads/develop 666bcdf6e -> ebdf8977f


AIRAVATA-2500 Implement SSHAccountProvisionerFactory


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

Branch: refs/heads/develop
Commit: 77baac438f9a59629a9fc21a904dc7397245a029
Parents: 1c39e2e
Author: Marcus Christie <ma...@apache.org>
Authored: Thu Aug 10 15:24:26 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Tue Sep 19 15:07:40 2017 -0400

----------------------------------------------------------------------
 .../accountprovisioning/ConfigParam.java        | 32 +++++++--
 .../accountprovisioning/SSHAccountManager.java  | 37 +++++++++-
 .../SSHAccountProvisioner.java                  |  9 ---
 .../SSHAccountProvisionerFactory.java           | 28 +++++---
 .../SSHAccountProvisionerProvider.java          | 37 ++++++++++
 .../IULdapSSHAccountProvisioner.java            |  7 --
 .../IULdapSSHAccountProvisionerProvider.java    | 44 ++++++++++++
 ...ta.accountprovisioning.SSHAccountProvisioner | 22 ------
 ...ntprovisioning.SSHAccountProvisionerProvider | 22 ++++++
 .../SSHAccountProvisionerFactoryTest.java       | 75 ++++++++++++++++++++
 .../provisioner/TestSSHAccountProvisioner.java  | 71 ++++++++++++++++++
 .../TestSSHAccountProvisionerProvider.java      | 66 +++++++++++++++++
 ...ntprovisioning.SSHAccountProvisionerProvider | 21 ++++++
 .../account_provisioning_model.thrift           |  2 +-
 .../gateway_resource_profile_model.thrift       |  2 +-
 15 files changed, 420 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/77baac43/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/ConfigParam.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/ConfigParam.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/ConfigParam.java
index beb8bbc..cf27b7f 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/ConfigParam.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/ConfigParam.java
@@ -24,7 +24,7 @@ public class ConfigParam {
 
     public enum ConfigParamType {
         STRING,
-        CRED_TOKEN,
+        CRED_STORE_PASSWORD_TOKEN,
     }
 
     private boolean optional = false;
@@ -32,36 +32,58 @@ public class ConfigParam {
     private String description;
     private ConfigParamType type = ConfigParamType.STRING;
 
+    public ConfigParam(String name) {
+        this.name = name;
+    }
+
     public boolean isOptional() {
         return optional;
     }
 
-    public void setOptional(boolean optional) {
+    public ConfigParam setOptional(boolean optional) {
         this.optional = optional;
+        return this;
     }
 
     public String getName() {
         return name;
     }
 
-    public void setName(String name) {
+    public ConfigParam setName(String name) {
         this.name = name;
+        return this;
     }
 
     public String getDescription() {
         return description;
     }
 
-    public void setDescription(String description) {
+    public ConfigParam setDescription(String description) {
         this.description = description;
+        return this;
     }
 
     public ConfigParamType getType() {
         return type;
     }
 
-    public void setType(ConfigParamType type) {
+    public ConfigParam setType(ConfigParamType type) {
         this.type = type;
+        return this;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof ConfigParam)) return false;
+
+        ConfigParam that = (ConfigParam) o;
+
+        return name.equals(that.name);
     }
 
+    @Override
+    public int hashCode() {
+        return name.hashCode();
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/77baac43/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
index 4e00e4e..dcb819b 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
@@ -20,12 +20,18 @@
 
 package org.apache.airavata.accountprovisioning;
 
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.credential.store.client.CredentialStoreClientFactory;
 import org.apache.airavata.credential.store.cpi.CredentialStoreService;
 import org.apache.airavata.credential.store.exception.CredentialStoreException;
+import org.apache.airavata.model.credential.store.PasswordCredential;
+import org.apache.airavata.registry.api.RegistryService;
 import org.apache.airavata.registry.api.client.RegistryServiceClientFactory;
 import org.apache.airavata.registry.api.exception.RegistryServiceException;
+import org.apache.thrift.TException;
 
+import java.util.HashMap;
 import java.util.Map;
 
 public class SSHAccountManager {
@@ -41,8 +47,24 @@ public class SSHAccountManager {
         String provisionerName = null;
         Map<ConfigParam,String> provisionerConfig = null;
 
+        CredentialStoreService.Client credentialStoreServiceClient = getCredentialStoreClient();
+        // Resolve any CRED_STORE_PASSWORD_TOKEN config parameters to passwords
+        Map<ConfigParam,String> resolvedConfig = new HashMap<>();
+        for (Map.Entry<ConfigParam,String> configEntry : provisionerConfig.entrySet() ) {
+            if (configEntry.getKey().getType() == ConfigParam.ConfigParamType.CRED_STORE_PASSWORD_TOKEN) {
+                try {
+                    PasswordCredential password = credentialStoreServiceClient.getPasswordCredential(configEntry.getValue(), gatewayId);
+                    resolvedConfig.put(configEntry.getKey(), password.getPassword());
+                } catch (TException e) {
+                    throw new RuntimeException("Failed to get password needed to configure " + provisionerName);
+                }
+            } else {
+                resolvedConfig.put(configEntry.getKey(), configEntry.getValue());
+            }
+        }
+
         // instantiate and init the account provisioner
-        SSHAccountProvisioner sshAccountProvisioner = SSHAccountProvisionerFactory.createSSHAccountProvisioner(provisionerName, provisionerConfig);
+        SSHAccountProvisioner sshAccountProvisioner = SSHAccountProvisionerFactory.createSSHAccountProvisioner(provisionerName, resolvedConfig);
 
         // First check if username has an account
         boolean hasAccount = sshAccountProvisioner.hasAccount(username);
@@ -61,9 +83,20 @@ public class SSHAccountManager {
         String scratchLocation = sshAccountProvisioner.getScratchLocation(username);
     }
 
-    private RegistryService.Client getRegistryServiceClient() throws RegistryServiceException {
+    private static RegistryService.Client getRegistryServiceClient() throws RegistryServiceException {
 
         // TODO: finish implementing
         return RegistryServiceClientFactory.createRegistryClient(null, 0);
     }
+
+    private static CredentialStoreService.Client getCredentialStoreClient() {
+
+        try {
+            String credServerHost = ServerSettings.getCredentialStoreServerHost();
+            int credServerPort = Integer.valueOf(ServerSettings.getCredentialStoreServerPort());
+            return CredentialStoreClientFactory.createAiravataCSClient(null, 0);
+        } catch (CredentialStoreException | ApplicationSettingsException e) {
+            throw new RuntimeException("Failed to create credential store service client", e);
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/77baac43/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java
index d997c3c..5303081 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java
@@ -20,19 +20,10 @@
 
 package org.apache.airavata.accountprovisioning;
 
-import java.util.List;
 import java.util.Map;
 
 public interface SSHAccountProvisioner {
 
-    /**
-     * An identifying name for this SSHAccountProvisioner instance.  This name should be unique amongst
-     * all SSHAccountProvisioner implementations.
-     */
-    default String getName() {
-        return this.getClass().getName();
-    }
-    List<ConfigParam> getConfigParams();
     void init(Map<ConfigParam, String> config);
     boolean hasAccount(String username);
     boolean canCreateAccount();

http://git-wip-us.apache.org/repos/asf/airavata/blob/77baac43/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactory.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactory.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactory.java
index f691895..7b1f6c6 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactory.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactory.java
@@ -20,30 +20,42 @@
 
 package org.apache.airavata.accountprovisioning;
 
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.util.ServiceLoader;
 
 public class SSHAccountProvisionerFactory {
 
-    public static List<String> getSSHAccountProvisionerImplementationNames() {
+    private static ServiceLoader<SSHAccountProvisionerProvider> sshAccountProvisionerProviders = ServiceLoader.load(SSHAccountProvisionerProvider.class);
 
-        // TODO: implement
-        return null;
+    public static List<String> getSSHAccountProvisionerImplementationNames() {
+        List<String> names = new ArrayList<>();
+        for (SSHAccountProvisionerProvider sshAccountProvisionerProvider : sshAccountProvisionerProviders ) {
+            names.add(sshAccountProvisionerProvider.getName());
+        }
+        return names;
     }
 
     public static List<ConfigParam> getSSHAccountProvisionerConfigParams(String provisionerName) {
 
-        // TODO: implement
-        return null;
+        return getSSHAccountProvisionerProvider(provisionerName).getConfigParams();
     }
 
     public static SSHAccountProvisioner createSSHAccountProvisioner(String provisionerName, Map<ConfigParam, String> config) {
 
+        SSHAccountProvisionerProvider sshAccountProvisionerProvider = getSSHAccountProvisionerProvider(provisionerName);
+
+        return sshAccountProvisionerProvider.createSSHAccountProvisioner(config);
     }
 
-    private CredentialStoreService.Client getCredentialStoreClient() throws CredentialStoreException {
+    private static SSHAccountProvisionerProvider getSSHAccountProvisionerProvider(String provisionerName) {
 
-        // TODO: finish implementing
-        return CredentialStoreClientFactory.createAiravataCSClient(null, 0);
+        for (SSHAccountProvisionerProvider sshAccountProvisionerProvider : sshAccountProvisionerProviders ) {
+            if (sshAccountProvisionerProvider.getName().equals(provisionerName)) {
+                return sshAccountProvisionerProvider;
+            }
+        }
+        throw new RuntimeException("Unknown SSHAccountProvisioner named " + provisionerName);
     }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/77baac43/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerProvider.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerProvider.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerProvider.java
new file mode 100644
index 0000000..42f2794
--- /dev/null
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerProvider.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.accountprovisioning;
+
+import java.util.List;
+import java.util.Map;
+
+public interface SSHAccountProvisionerProvider {
+
+    /**
+     * An identifying name for the SSHAccountProvisioner instances created by this provider.
+     * This name should be unique amongst all SSHAccountProvisioner implementations.
+     */
+    default String getName() {
+        return this.getClass().getName();
+    }
+    List<ConfigParam> getConfigParams();
+    SSHAccountProvisioner createSSHAccountProvisioner(Map<ConfigParam,String> config);
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/77baac43/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
index 4ad3512..0714f49 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
@@ -23,18 +23,11 @@ package org.apache.airavata.accountprovisioning.provisioner;
 import org.apache.airavata.accountprovisioning.ConfigParam;
 import org.apache.airavata.accountprovisioning.SSHAccountProvisioner;
 
-import java.util.List;
 import java.util.Map;
 
 public class IULdapSSHAccountProvisioner implements SSHAccountProvisioner {
 
     @Override
-    public List<ConfigParam> getConfigParams() {
-        // TODO: implement
-        return null;
-    }
-
-    @Override
     public void init(Map<ConfigParam, String> config) {
 
         // TODO: implement

http://git-wip-us.apache.org/repos/asf/airavata/blob/77baac43/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisionerProvider.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisionerProvider.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisionerProvider.java
new file mode 100644
index 0000000..b54fdc4
--- /dev/null
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisionerProvider.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.accountprovisioning.provisioner;
+
+import org.apache.airavata.accountprovisioning.ConfigParam;
+import org.apache.airavata.accountprovisioning.SSHAccountProvisioner;
+import org.apache.airavata.accountprovisioning.SSHAccountProvisionerProvider;
+
+import java.util.List;
+import java.util.Map;
+
+public class IULdapSSHAccountProvisionerProvider implements SSHAccountProvisionerProvider {
+
+    @Override
+    public List<ConfigParam> getConfigParams() {
+        // TODO: implement
+        return null;
+    }
+
+    @Override
+    public SSHAccountProvisioner createSSHAccountProvisioner(Map<ConfigParam,String> config) {
+        SSHAccountProvisioner sshAccountProvisioner = new IULdapSSHAccountProvisioner();
+        sshAccountProvisioner.init(config);
+        return sshAccountProvisioner;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/77baac43/modules/compute-account-provisioning/src/main/resources/META-INF/services/org.apache.airavata.accountprovisioning.SSHAccountProvisioner
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/resources/META-INF/services/org.apache.airavata.accountprovisioning.SSHAccountProvisioner b/modules/compute-account-provisioning/src/main/resources/META-INF/services/org.apache.airavata.accountprovisioning.SSHAccountProvisioner
deleted file mode 100644
index 50d2859..0000000
--- a/modules/compute-account-provisioning/src/main/resources/META-INF/services/org.apache.airavata.accountprovisioning.SSHAccountProvisioner
+++ /dev/null
@@ -1,22 +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.
-#
-#
-
-
-org.apache.airavata.accountprovisioning.provisioner.IULdapSSHAccountProvisioner
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/77baac43/modules/compute-account-provisioning/src/main/resources/META-INF/services/org.apache.airavata.accountprovisioning.SSHAccountProvisionerProvider
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/resources/META-INF/services/org.apache.airavata.accountprovisioning.SSHAccountProvisionerProvider b/modules/compute-account-provisioning/src/main/resources/META-INF/services/org.apache.airavata.accountprovisioning.SSHAccountProvisionerProvider
new file mode 100644
index 0000000..d042cd1
--- /dev/null
+++ b/modules/compute-account-provisioning/src/main/resources/META-INF/services/org.apache.airavata.accountprovisioning.SSHAccountProvisionerProvider
@@ -0,0 +1,22 @@
+#
+# 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.
+#
+#
+
+
+org.apache.airavata.accountprovisioning.provisioner.IULdapSSHAccountProvisionerProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/77baac43/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactoryTest.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactoryTest.java b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactoryTest.java
new file mode 100644
index 0000000..466896e
--- /dev/null
+++ b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactoryTest.java
@@ -0,0 +1,75 @@
+/*
+ * 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.accountprovisioning;
+
+import org.apache.airavata.accountprovisioning.provisioner.TestSSHAccountProvisioner;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class SSHAccountProvisionerFactoryTest {
+
+    @Test
+    public void testGetSSHAccountProvisionerImplementationNames() {
+
+        List<String> sshAccountProvisionerNames = SSHAccountProvisionerFactory.getSSHAccountProvisionerImplementationNames();
+        Assert.assertTrue("names should contain TestSSHAccountProvisioner", sshAccountProvisionerNames.contains("TestSSHAccountProvisioner"));
+    }
+
+    @Test
+    public void testGetSSHAccountProvisionerConfigParams() {
+
+        List<ConfigParam> configParams = SSHAccountProvisionerFactory.getSSHAccountProvisionerConfigParams("TestSSHAccountProvisioner");
+        Assert.assertEquals(4, configParams.size());
+        ConfigParam ldaphost = configParams.get(0);
+        Assert.assertEquals("ldaphost", ldaphost.getName());
+        Assert.assertEquals(ConfigParam.ConfigParamType.STRING, ldaphost.getType());
+        ConfigParam ldapport = configParams.get(1);
+        Assert.assertEquals("ldapport", ldapport.getName());
+        Assert.assertEquals(ConfigParam.ConfigParamType.STRING, ldapport.getType());
+        ConfigParam ldapUsername = configParams.get(2);
+        Assert.assertEquals("ldap-username", ldapUsername.getName());
+        Assert.assertEquals(ConfigParam.ConfigParamType.STRING, ldapUsername.getType());
+        ConfigParam ldapPassword = configParams.get(3);
+        Assert.assertEquals("ldap-password", ldapPassword.getName());
+        Assert.assertEquals(ConfigParam.ConfigParamType.CRED_STORE_PASSWORD_TOKEN, ldapPassword.getType());
+    }
+
+    @Test
+    public void testCreateSSHAccountProvisioner() {
+
+        Map<ConfigParam, String> config = new HashMap<>();
+        ConfigParam test1 = new ConfigParam("test1");
+        config.put(test1, "value1");
+        ConfigParam test2 = new ConfigParam("test2");
+        config.put(test2, "value2");
+        ConfigParam test3 = new ConfigParam("test3");
+        config.put(test3, "value3");
+        TestSSHAccountProvisioner sshAccountProvisioner = (TestSSHAccountProvisioner) SSHAccountProvisionerFactory.createSSHAccountProvisioner("TestSSHAccountProvisioner", config);
+        // Make sure all of the config params and values were passed to SSHAccountProvisioner
+        Assert.assertTrue(sshAccountProvisioner.getConfig().containsKey(test1));
+        Assert.assertTrue(sshAccountProvisioner.getConfig().containsKey(test2));
+        Assert.assertTrue(sshAccountProvisioner.getConfig().containsKey(test3));
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/77baac43/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisioner.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisioner.java b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisioner.java
new file mode 100644
index 0000000..d2ef213
--- /dev/null
+++ b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisioner.java
@@ -0,0 +1,71 @@
+/*
+ * 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.accountprovisioning.provisioner;
+
+import org.apache.airavata.accountprovisioning.ConfigParam;
+import org.apache.airavata.accountprovisioning.SSHAccountProvisioner;
+
+import java.util.Map;
+
+public class TestSSHAccountProvisioner implements SSHAccountProvisioner {
+
+    private Map<ConfigParam, String> config;
+
+    @Override
+    public void init(Map<ConfigParam, String> config) {
+
+        this.config = config;
+    }
+
+    @Override
+    public boolean hasAccount(String username) {
+        return false;
+    }
+
+    @Override
+    public boolean canCreateAccount() {
+        return false;
+    }
+
+    @Override
+    public void createAccount(String username, String sshPublicKey) {
+
+    }
+
+    @Override
+    public boolean canInstallSSHKey() {
+        return false;
+    }
+
+    @Override
+    public void installSSHKey(String username, String sshPublicKey) {
+
+    }
+
+    @Override
+    public String getScratchLocation(String username) {
+        return null;
+    }
+
+    public Map<ConfigParam, String> getConfig() {
+        return config;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/77baac43/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisionerProvider.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisionerProvider.java b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisionerProvider.java
new file mode 100644
index 0000000..65fcfe5
--- /dev/null
+++ b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisionerProvider.java
@@ -0,0 +1,66 @@
+/*
+ * 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.accountprovisioning.provisioner;
+
+import org.apache.airavata.accountprovisioning.ConfigParam;
+import org.apache.airavata.accountprovisioning.SSHAccountProvisioner;
+import org.apache.airavata.accountprovisioning.SSHAccountProvisionerProvider;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class TestSSHAccountProvisionerProvider implements SSHAccountProvisionerProvider {
+
+    @Override
+    public String getName() {
+        return "TestSSHAccountProvisioner";
+    }
+
+    @Override
+    public List<ConfigParam> getConfigParams() {
+        List<ConfigParam> configParams = new ArrayList<>();
+        configParams.add(new ConfigParam("ldaphost")
+                .setDescription("Hostname of LDAP server")
+                .setOptional(false)
+                .setType(ConfigParam.ConfigParamType.STRING));
+        configParams.add(new ConfigParam("ldapport")
+                .setDescription("Port of LDAP server")
+                .setOptional(false)
+                .setType(ConfigParam.ConfigParamType.STRING));
+        configParams.add(new ConfigParam("ldap-username")
+                .setDescription("Username for LDAP server")
+                .setOptional(false)
+                .setType(ConfigParam.ConfigParamType.STRING));
+        configParams.add(new ConfigParam("ldap-password")
+                .setDescription("Password for LDAP server")
+                .setOptional(false)
+                .setType(ConfigParam.ConfigParamType.CRED_STORE_PASSWORD_TOKEN));
+        return configParams;
+    }
+
+    @Override
+    public SSHAccountProvisioner createSSHAccountProvisioner(Map<ConfigParam, String> config) {
+        SSHAccountProvisioner sshAccountProvisioner = new TestSSHAccountProvisioner();
+        sshAccountProvisioner.init(config);
+        return sshAccountProvisioner;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/77baac43/modules/compute-account-provisioning/src/test/resources/META-INF/services/org.apache.airavata.accountprovisioning.SSHAccountProvisionerProvider
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/test/resources/META-INF/services/org.apache.airavata.accountprovisioning.SSHAccountProvisionerProvider b/modules/compute-account-provisioning/src/test/resources/META-INF/services/org.apache.airavata.accountprovisioning.SSHAccountProvisionerProvider
new file mode 100644
index 0000000..c920421
--- /dev/null
+++ b/modules/compute-account-provisioning/src/test/resources/META-INF/services/org.apache.airavata.accountprovisioning.SSHAccountProvisionerProvider
@@ -0,0 +1,21 @@
+#
+# 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.
+#
+#
+
+org.apache.airavata.accountprovisioning.provisioner.TestSSHAccountProvisionerProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/77baac43/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift b/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift
index b13b1c3..627116e 100644
--- a/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift
+++ b/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift
@@ -25,7 +25,7 @@ namespace py apache.airavata.model.appcatalog.accountprovisioning
 
 enum SSHAccountProvisionerConfigParamType {
     STRING,
-    CRED_TOKEN
+    CRED_STORE_PASSWORD_TOKEN
 }
 
 struct SSHAccountProvisioner {

http://git-wip-us.apache.org/repos/asf/airavata/blob/77baac43/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift b/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
index e3686f2..6244c28 100644
--- a/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
+++ b/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
@@ -77,7 +77,7 @@ struct ComputeResourcePreference {
     13: optional i64 reservationStartTime,
     14: optional i64 reservationEndTime,
     15: optional string sshAccountProvisioner,
-    16: optional map<SSHAccountProvisionerConfigParam, String> sshAccountProvisionerConfig
+    16: optional map<account_provisioning_model.SSHAccountProvisionerConfigParam, String> sshAccountProvisionerConfig
 }
 
 struct StoragePreference {


[36/40] airavata git commit: AIRAVATA-2500 Returning/using username of cluster account

Posted by ma...@apache.org.
AIRAVATA-2500 Returning/using username of cluster account


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

Branch: refs/heads/develop
Commit: 50d7bb6a5b90966eb6cb78c1a5d95f7647345e1b
Parents: ba4982c
Author: Marcus Christie <ma...@apache.org>
Authored: Mon Sep 25 16:17:54 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Mon Sep 25 16:17:54 2017 -0400

----------------------------------------------------------------------
 .../accountprovisioning/SSHAccountManager.java  | 45 ++++++++++++++------
 .../SSHAccountProvisioner.java                  |  6 ++-
 .../IULdapSSHAccountProvisioner.java            |  5 ++-
 .../provisioner/TestSSHAccountProvisioner.java  |  6 ++-
 4 files changed, 44 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/50d7bb6a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
index 136bbee..d6b9eb1 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
@@ -50,7 +50,16 @@ public class SSHAccountManager {
 
     private final static Logger logger = LoggerFactory.getLogger(SSHAccountManager.class);
 
-    public static boolean doesUserHaveSSHAccount(String gatewayId, String computeResourceId, String username) throws InvalidSetupException, InvalidUsernameException {
+    /**
+     * Check if user has an SSH account on the compute resource.
+     * @param gatewayId
+     * @param computeResourceId
+     * @param userId Airavata user id
+     * @return
+     * @throws InvalidSetupException
+     * @throws InvalidUsernameException
+     */
+    public static boolean doesUserHaveSSHAccount(String gatewayId, String computeResourceId, String userId) throws InvalidSetupException, InvalidUsernameException {
 
         // get compute resource preferences for the gateway and hostname
         RegistryService.Client registryServiceClient = getRegistryServiceClient();
@@ -75,15 +84,25 @@ public class SSHAccountManager {
         SSHAccountProvisioner sshAccountProvisioner = createSshAccountProvisioner(gatewayId, computeResourcePreference);
 
         try {
-            return sshAccountProvisioner.hasAccount(username);
+            return sshAccountProvisioner.hasAccount(userId);
         } catch (InvalidUsernameException e) {
             throw e;
         } catch (Exception e) {
-            throw new RuntimeException("hasAccount call failed for username [" + username + "]: " + e.getMessage(), e);
+            throw new RuntimeException("hasAccount call failed for userId [" + userId + "]: " + e.getMessage(), e);
         }
     }
 
-    public static UserComputeResourcePreference setupSSHAccount(String gatewayId, String computeResourceId, String username, SSHCredential sshCredential) throws InvalidSetupException, InvalidUsernameException {
+    /**
+     * Add SSH key to compute resource on behalf of user.
+     * @param gatewayId
+     * @param computeResourceId
+     * @param userId Airavata user id
+     * @param sshCredential
+     * @return a populated but not persisted UserComputeResourcePreference instance
+     * @throws InvalidSetupException
+     * @throws InvalidUsernameException
+     */
+    public static UserComputeResourcePreference setupSSHAccount(String gatewayId, String computeResourceId, String userId, SSHCredential sshCredential) throws InvalidSetupException, InvalidUsernameException {
 
         // get compute resource preferences for the gateway and hostname
         RegistryService.Client registryServiceClient = getRegistryServiceClient();
@@ -127,32 +146,34 @@ public class SSHAccountManager {
         SSHAccountProvisioner sshAccountProvisioner = createSshAccountProvisioner(gatewayId, computeResourcePreference);
         boolean canCreateAccount = SSHAccountProvisionerFactory.canCreateAccount(computeResourcePreference.getSshAccountProvisioner());
 
-        // First check if username has an account
+        // First check if userId has an account
         boolean hasAccount = false;
         try {
-            hasAccount = sshAccountProvisioner.hasAccount(username);
+            hasAccount = sshAccountProvisioner.hasAccount(userId);
         } catch (InvalidUsernameException e) {
             throw e;
         } catch (Exception e) {
-            throw new RuntimeException("hasAccount call failed for username [" + username + "]: " + e.getMessage(), e);
+            throw new RuntimeException("hasAccount call failed for userId [" + userId + "]: " + e.getMessage(), e);
         }
 
         if (!hasAccount && !canCreateAccount) {
-            throw new InvalidSetupException("User [" + username + "] doesn't have account and [" + computeResourceId + "] doesn't " +
+            throw new InvalidSetupException("User [" + userId + "] doesn't have account and [" + computeResourceId + "] doesn't " +
                     "have a SSH Account Provisioner that supports creating accounts.");
         }
+        // TODO: create account for user if user doesn't have account
 
+        String username = null;
         // Install SSH key
         try {
-            sshAccountProvisioner.installSSHKey(username, sshCredential.getPublicKey());
+            username = sshAccountProvisioner.installSSHKey(userId, sshCredential.getPublicKey());
         } catch (InvalidUsernameException e) {
             throw e;
         } catch (Exception e) {
-            throw new RuntimeException("installSSHKey call failed for username [" + username + "]: " + e.getMessage(), e);
+            throw new RuntimeException("installSSHKey call failed for userId [" + userId + "]: " + e.getMessage(), e);
         }
 
         // Verify can authenticate to host
-        String sshHostname = sshJobSubmission.getAlternativeSSHHostName() != null ? sshJobSubmission.getAlternativeSSHHostName() : computeResourceDescription.getHostName();
+        String sshHostname = getSSHHostname(computeResourceDescription, sshJobSubmission);
         int sshPort = sshJobSubmission.getSshPort();
         boolean validated = false;
         try {
@@ -168,7 +189,7 @@ public class SSHAccountManager {
         }
 
         // create the scratch location on the host
-        String scratchLocation = sshAccountProvisioner.getScratchLocation(username);
+        String scratchLocation = sshAccountProvisioner.getScratchLocation(userId);
         try {
             SSHUtil.execute(sshHostname, sshPort, username, sshCredential, "mkdir -p " + scratchLocation);
         } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/50d7bb6a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java
index 395b622..6ad076d 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java
@@ -50,17 +50,19 @@ public interface SSHAccountProvisioner {
      * unimplemented for this SSHAccountProvisioner.
      * @param userId the Airavata user id
      * @param sshPublicKey the public key part of an Airavata managed SSH credential
+     * @return username
      * @throws InvalidUsernameException
      */
-    void createAccount(String userId, String sshPublicKey) throws InvalidUsernameException;
+    String createAccount(String userId, String sshPublicKey) throws InvalidUsernameException;
 
     /**
      * Install an SSH key for the user on the compute host.
      * @param userId the Airavata user id
      * @param sshPublicKey the public key part of an Airavata managed SSH credential
+     * @return username
      * @throws InvalidUsernameException
      */
-    void installSSHKey(String userId, String sshPublicKey) throws InvalidUsernameException;
+    String installSSHKey(String userId, String sshPublicKey) throws InvalidUsernameException;
 
     /**
      * Get the scratch location that should be created for the user. Note: this method doesn't create the scratch

http://git-wip-us.apache.org/repos/asf/airavata/blob/50d7bb6a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
index 69ed3f6..8e717c3 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
@@ -76,13 +76,13 @@ public class IULdapSSHAccountProvisioner implements SSHAccountProvisioner  {
     }
 
     @Override
-    public void createAccount(String userId, String sshPublicKey) throws InvalidUsernameException {
+    public String createAccount(String userId, String sshPublicKey) throws InvalidUsernameException {
 
         throw new UnsupportedOperationException("IULdapSSHAccountProvisioner does not support creating cluster accounts at this time.");
     }
 
     @Override
-    public void installSSHKey(String userId, String sshPublicKey) throws InvalidUsernameException {
+    public String installSSHKey(String userId, String sshPublicKey) throws InvalidUsernameException {
         String username = getUsername(userId);
         boolean success = withLdapConnection(ldapConnection -> {
             try {
@@ -127,6 +127,7 @@ public class IULdapSSHAccountProvisioner implements SSHAccountProvisioner  {
                 throw new RuntimeException(e);
             }
         });
+        return username;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/airavata/blob/50d7bb6a/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisioner.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisioner.java b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisioner.java
index f4f9958..4cdcbd6 100644
--- a/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisioner.java
+++ b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisioner.java
@@ -42,13 +42,15 @@ public class TestSSHAccountProvisioner implements SSHAccountProvisioner {
     }
 
     @Override
-    public void createAccount(String userId, String sshPublicKey) throws InvalidUsernameException {
+    public String createAccount(String userId, String sshPublicKey) throws InvalidUsernameException {
 
+        return userId;
     }
 
     @Override
-    public void installSSHKey(String userId, String sshPublicKey) throws InvalidUsernameException {
+    public String installSSHKey(String userId, String sshPublicKey) throws InvalidUsernameException {
 
+        return userId;
     }
 
     @Override


[15/40] airavata git commit: AIRAVATA-2500 Thrift stub generation

Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/469a7e79/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
index 0d52abb..5601424 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
@@ -23,32 +23,15 @@
  */
 package org.apache.airavata.model.appcatalog.gatewayprofile;
 
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
-
 import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
+
 import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.util.*;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 /**
@@ -127,7 +110,7 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
   private long reservationStartTime; // optional
   private long reservationEndTime; // optional
   private String sshAccountProvisioner; // optional
-  private Map<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam,String> sshAccountProvisionerConfig; // optional
+  private Map<String,String> sshAccountProvisionerConfig; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -281,7 +264,7 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.SSH_ACCOUNT_PROVISIONER_CONFIG, new org.apache.thrift.meta_data.FieldMetaData("sshAccountProvisionerConfig", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
-            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam.class), 
+            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), 
             new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ComputeResourcePreference.class, metaDataMap);
@@ -347,18 +330,7 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
       this.sshAccountProvisioner = other.sshAccountProvisioner;
     }
     if (other.isSetSshAccountProvisionerConfig()) {
-      Map<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam,String> __this__sshAccountProvisionerConfig = new HashMap<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam,String>(other.sshAccountProvisionerConfig.size());
-      for (Map.Entry<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam, String> other_element : other.sshAccountProvisionerConfig.entrySet()) {
-
-        org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam other_element_key = other_element.getKey();
-        String other_element_value = other_element.getValue();
-
-        org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam __this__sshAccountProvisionerConfig_copy_key = new org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam(other_element_key);
-
-        String __this__sshAccountProvisionerConfig_copy_value = other_element_value;
-
-        __this__sshAccountProvisionerConfig.put(__this__sshAccountProvisionerConfig_copy_key, __this__sshAccountProvisionerConfig_copy_value);
-      }
+      Map<String,String> __this__sshAccountProvisionerConfig = new HashMap<String,String>(other.sshAccountProvisionerConfig);
       this.sshAccountProvisionerConfig = __this__sshAccountProvisionerConfig;
     }
   }
@@ -752,18 +724,18 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
     return (this.sshAccountProvisionerConfig == null) ? 0 : this.sshAccountProvisionerConfig.size();
   }
 
-  public void putToSshAccountProvisionerConfig(org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam key, String val) {
+  public void putToSshAccountProvisionerConfig(String key, String val) {
     if (this.sshAccountProvisionerConfig == null) {
-      this.sshAccountProvisionerConfig = new HashMap<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam,String>();
+      this.sshAccountProvisionerConfig = new HashMap<String,String>();
     }
     this.sshAccountProvisionerConfig.put(key, val);
   }
 
-  public Map<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam,String> getSshAccountProvisionerConfig() {
+  public Map<String,String> getSshAccountProvisionerConfig() {
     return this.sshAccountProvisionerConfig;
   }
 
-  public void setSshAccountProvisionerConfig(Map<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam,String> sshAccountProvisionerConfig) {
+  public void setSshAccountProvisionerConfig(Map<String,String> sshAccountProvisionerConfig) {
     this.sshAccountProvisionerConfig = sshAccountProvisionerConfig;
   }
 
@@ -908,7 +880,7 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
       if (value == null) {
         unsetSshAccountProvisionerConfig();
       } else {
-        setSshAccountProvisionerConfig((Map<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam,String>)value);
+        setSshAccountProvisionerConfig((Map<String,String>)value);
       }
       break;
 
@@ -1767,13 +1739,12 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
             if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
               {
                 org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
-                struct.sshAccountProvisionerConfig = new HashMap<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam,String>(2*_map0.size);
-                org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam _key1;
+                struct.sshAccountProvisionerConfig = new HashMap<String,String>(2*_map0.size);
+                String _key1;
                 String _val2;
                 for (int _i3 = 0; _i3 < _map0.size; ++_i3)
                 {
-                  _key1 = new org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam();
-                  _key1.read(iprot);
+                  _key1 = iprot.readString();
                   _val2 = iprot.readString();
                   struct.sshAccountProvisionerConfig.put(_key1, _val2);
                 }
@@ -1896,10 +1867,10 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
         if (struct.isSetSshAccountProvisionerConfig()) {
           oprot.writeFieldBegin(SSH_ACCOUNT_PROVISIONER_CONFIG_FIELD_DESC);
           {
-            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.STRING, struct.sshAccountProvisionerConfig.size()));
-            for (Map.Entry<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam, String> _iter4 : struct.sshAccountProvisionerConfig.entrySet())
+            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.sshAccountProvisionerConfig.size()));
+            for (Map.Entry<String, String> _iter4 : struct.sshAccountProvisionerConfig.entrySet())
             {
-              _iter4.getKey().write(oprot);
+              oprot.writeString(_iter4.getKey());
               oprot.writeString(_iter4.getValue());
             }
             oprot.writeMapEnd();
@@ -2012,9 +1983,9 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
       if (struct.isSetSshAccountProvisionerConfig()) {
         {
           oprot.writeI32(struct.sshAccountProvisionerConfig.size());
-          for (Map.Entry<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam, String> _iter5 : struct.sshAccountProvisionerConfig.entrySet())
+          for (Map.Entry<String, String> _iter5 : struct.sshAccountProvisionerConfig.entrySet())
           {
-            _iter5.getKey().write(oprot);
+            oprot.writeString(_iter5.getKey());
             oprot.writeString(_iter5.getValue());
           }
         }
@@ -2083,14 +2054,13 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
       }
       if (incoming.get(13)) {
         {
-          org.apache.thrift.protocol.TMap _map6 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.sshAccountProvisionerConfig = new HashMap<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam,String>(2*_map6.size);
-          org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam _key7;
+          org.apache.thrift.protocol.TMap _map6 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.sshAccountProvisionerConfig = new HashMap<String,String>(2*_map6.size);
+          String _key7;
           String _val8;
           for (int _i9 = 0; _i9 < _map6.size; ++_i9)
           {
-            _key7 = new org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam();
-            _key7.read(iprot);
+            _key7 = iprot.readString();
             _val8 = iprot.readString();
             struct.sshAccountProvisionerConfig.put(_key7, _val8);
           }


[24/40] airavata git commit: AIRAVATA-2500 Thrift stub code generation

Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/3184c238/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 18bfcf5..c8976ba 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
@@ -3428,6 +3428,71 @@ interface AiravataIf {
    */
   public function deleteGatewayStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $storageId);
   /**
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @return \Airavata\Model\AppCatalog\AccountProvisioning\SSHAccountProvisioner[]
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function getSSHAccountProvisioners(\Airavata\Model\Security\AuthzToken $authzToken);
+  /**
+   * Check if user has an SSH account on the given compute resource. This
+   * method will only work if the compute resource has an SSHAccountProvisioner configured for it.
+   * 
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param string $computeResourceId
+   * @param string $userId
+   * @return bool
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function doesUserHaveSSHAccount(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $userId);
+  /**
+   * Setup and return a UserComputeResourcePreference object for this user to SSH into the given compute resource with
+   * the given SSH credential. This method will only work if the compute resource has an SSHAccountProvisioner
+   * configured for it. The returned UserComputeResourcePreference object is not saved; it is up to the client to
+   * call addUserComputeResourcePreference to persist it.
+   * 
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param string $computeResourceId
+   * @param string $userId
+   * @param string $airavataCredStoreToken
+   * @return \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference User specific preferences for a Computer Resource
+   * 
+   * computeResourceId:
+   *   Corelate the preference to a compute resource.
+   * 
+   * 
+   * loginUserName:
+   *   If turned true, Airavata will override the preferences of better alternatives exist.
+   * 
+   * 
+   * preferredBatchQueue:
+   *  Gateways can choose a defualt batch queue based on average job dimention, reservations or other metrics.
+   * 
+   * scratchLocation:
+   *  Path to the local scratch space on a HPC cluster. Typically used to create working directory for job execution.
+   * 
+   * allocationProjectNumber:
+   *  Typically used on HPC machines to charge computing usage to a account number. For instance, on XSEDE once an
+   *    allocation is approved, an allocation number is assigned. Before passing this number with job submittions, the
+   *    account to be used has to be added to the allocation.
+   * 
+   * resourceSpecificCredentialStoreToken:
+   *  Resource specific credential store token. If this token is specified, then it is superceeded by the gateway's
+   *   default credential store.
+   * 
+   * 
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function setupUserComputeResourcePreferencesForSSH(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $userId, $airavataCredStoreToken);
+  /**
    * Register User Resource Profile.
    * 
    * @param UserResourceProfile
@@ -12720,6 +12785,200 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     throw new \Exception("deleteGatewayStoragePreference failed: unknown result");
   }
 
+  public function getSSHAccountProvisioners(\Airavata\Model\Security\AuthzToken $authzToken)
+  {
+    $this->send_getSSHAccountProvisioners($authzToken);
+    return $this->recv_getSSHAccountProvisioners();
+  }
+
+  public function send_getSSHAccountProvisioners(\Airavata\Model\Security\AuthzToken $authzToken)
+  {
+    $args = new \Airavata\API\Airavata_getSSHAccountProvisioners_args();
+    $args->authzToken = $authzToken;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'getSSHAccountProvisioners', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('getSSHAccountProvisioners', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_getSSHAccountProvisioners()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getSSHAccountProvisioners_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Airavata_getSSHAccountProvisioners_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    if ($result->ae !== null) {
+      throw $result->ae;
+    }
+    throw new \Exception("getSSHAccountProvisioners failed: unknown result");
+  }
+
+  public function doesUserHaveSSHAccount(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $userId)
+  {
+    $this->send_doesUserHaveSSHAccount($authzToken, $computeResourceId, $userId);
+    return $this->recv_doesUserHaveSSHAccount();
+  }
+
+  public function send_doesUserHaveSSHAccount(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $userId)
+  {
+    $args = new \Airavata\API\Airavata_doesUserHaveSSHAccount_args();
+    $args->authzToken = $authzToken;
+    $args->computeResourceId = $computeResourceId;
+    $args->userId = $userId;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'doesUserHaveSSHAccount', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('doesUserHaveSSHAccount', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_doesUserHaveSSHAccount()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_doesUserHaveSSHAccount_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Airavata_doesUserHaveSSHAccount_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    if ($result->ae !== null) {
+      throw $result->ae;
+    }
+    throw new \Exception("doesUserHaveSSHAccount failed: unknown result");
+  }
+
+  public function setupUserComputeResourcePreferencesForSSH(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $userId, $airavataCredStoreToken)
+  {
+    $this->send_setupUserComputeResourcePreferencesForSSH($authzToken, $computeResourceId, $userId, $airavataCredStoreToken);
+    return $this->recv_setupUserComputeResourcePreferencesForSSH();
+  }
+
+  public function send_setupUserComputeResourcePreferencesForSSH(\Airavata\Model\Security\AuthzToken $authzToken, $computeResourceId, $userId, $airavataCredStoreToken)
+  {
+    $args = new \Airavata\API\Airavata_setupUserComputeResourcePreferencesForSSH_args();
+    $args->authzToken = $authzToken;
+    $args->computeResourceId = $computeResourceId;
+    $args->userId = $userId;
+    $args->airavataCredStoreToken = $airavataCredStoreToken;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'setupUserComputeResourcePreferencesForSSH', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('setupUserComputeResourcePreferencesForSSH', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_setupUserComputeResourcePreferencesForSSH()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_setupUserComputeResourcePreferencesForSSH_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Airavata_setupUserComputeResourcePreferencesForSSH_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    if ($result->ae !== null) {
+      throw $result->ae;
+    }
+    throw new \Exception("setupUserComputeResourcePreferencesForSSH failed: unknown result");
+  }
+
   public function registerUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile $userResourceProfile)
   {
     $this->send_registerUserResourceProfile($authzToken, $userResourceProfile);
@@ -26701,7 +26960,1039 @@ class Airavata_getDetailedExperimentTree_args {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_getDetailedExperimentTree_args');
+    $xfer += $output->writeStructBegin('Airavata_getDetailedExperimentTree_args');
+    if ($this->authzToken !== null) {
+      if (!is_object($this->authzToken)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
+      $xfer += $this->authzToken->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->airavataExperimentId !== null) {
+      $xfer += $output->writeFieldBegin('airavataExperimentId', TType::STRING, 2);
+      $xfer += $output->writeString($this->airavataExperimentId);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_getDetailedExperimentTree_result {
+  static $_TSPEC;
+
+  /**
+   * @var \Airavata\Model\Experiment\ExperimentModel
+   */
+  public $success = null;
+  /**
+   * @var \Airavata\API\Error\InvalidRequestException
+   */
+  public $ire = null;
+  /**
+   * @var \Airavata\API\Error\ExperimentNotFoundException
+   */
+  public $enf = null;
+  /**
+   * @var \Airavata\API\Error\AiravataClientException
+   */
+  public $ace = null;
+  /**
+   * @var \Airavata\API\Error\AiravataSystemException
+   */
+  public $ase = null;
+  /**
+   * @var \Airavata\API\Error\AuthorizationException
+   */
+  public $ae = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Experiment\ExperimentModel',
+          ),
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'enf',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\ExperimentNotFoundException',
+          ),
+        3 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        4 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        5 => array(
+          'var' => 'ae',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AuthorizationException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['enf'])) {
+        $this->enf = $vals['enf'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+      if (isset($vals['ae'])) {
+        $this->ae = $vals['ae'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_getDetailedExperimentTree_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::STRUCT) {
+            $this->success = new \Airavata\Model\Experiment\ExperimentModel();
+            $xfer += $this->success->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->enf = new \Airavata\API\Error\ExperimentNotFoundException();
+            $xfer += $this->enf->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::STRUCT) {
+            $this->ae = new \Airavata\API\Error\AuthorizationException();
+            $xfer += $this->ae->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_getDetailedExperimentTree_result');
+    if ($this->success !== null) {
+      if (!is_object($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+      $xfer += $this->success->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->enf !== null) {
+      $xfer += $output->writeFieldBegin('enf', TType::STRUCT, 2);
+      $xfer += $this->enf->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 3);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 4);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ae !== null) {
+      $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 5);
+      $xfer += $this->ae->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_updateExperiment_args {
+  static $_TSPEC;
+
+  /**
+   * @var \Airavata\Model\Security\AuthzToken
+   */
+  public $authzToken = null;
+  /**
+   * @var string
+   */
+  public $airavataExperimentId = null;
+  /**
+   * @var \Airavata\Model\Experiment\ExperimentModel
+   */
+  public $experiment = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'authzToken',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Security\AuthzToken',
+          ),
+        2 => array(
+          'var' => 'airavataExperimentId',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'experiment',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Experiment\ExperimentModel',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['authzToken'])) {
+        $this->authzToken = $vals['authzToken'];
+      }
+      if (isset($vals['airavataExperimentId'])) {
+        $this->airavataExperimentId = $vals['airavataExperimentId'];
+      }
+      if (isset($vals['experiment'])) {
+        $this->experiment = $vals['experiment'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_updateExperiment_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
+            $xfer += $this->authzToken->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->airavataExperimentId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->experiment = new \Airavata\Model\Experiment\ExperimentModel();
+            $xfer += $this->experiment->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_updateExperiment_args');
+    if ($this->authzToken !== null) {
+      if (!is_object($this->authzToken)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
+      $xfer += $this->authzToken->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->airavataExperimentId !== null) {
+      $xfer += $output->writeFieldBegin('airavataExperimentId', TType::STRING, 2);
+      $xfer += $output->writeString($this->airavataExperimentId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->experiment !== null) {
+      if (!is_object($this->experiment)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('experiment', TType::STRUCT, 3);
+      $xfer += $this->experiment->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_updateExperiment_result {
+  static $_TSPEC;
+
+  /**
+   * @var \Airavata\API\Error\InvalidRequestException
+   */
+  public $ire = null;
+  /**
+   * @var \Airavata\API\Error\ExperimentNotFoundException
+   */
+  public $enf = null;
+  /**
+   * @var \Airavata\API\Error\AiravataClientException
+   */
+  public $ace = null;
+  /**
+   * @var \Airavata\API\Error\AiravataSystemException
+   */
+  public $ase = null;
+  /**
+   * @var \Airavata\API\Error\AuthorizationException
+   */
+  public $ae = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'enf',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\ExperimentNotFoundException',
+          ),
+        3 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        4 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        5 => array(
+          'var' => 'ae',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AuthorizationException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['enf'])) {
+        $this->enf = $vals['enf'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+      if (isset($vals['ae'])) {
+        $this->ae = $vals['ae'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_updateExperiment_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->enf = new \Airavata\API\Error\ExperimentNotFoundException();
+            $xfer += $this->enf->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::STRUCT) {
+            $this->ae = new \Airavata\API\Error\AuthorizationException();
+            $xfer += $this->ae->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_updateExperiment_result');
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->enf !== null) {
+      $xfer += $output->writeFieldBegin('enf', TType::STRUCT, 2);
+      $xfer += $this->enf->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 3);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 4);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ae !== null) {
+      $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 5);
+      $xfer += $this->ae->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_updateExperimentConfiguration_args {
+  static $_TSPEC;
+
+  /**
+   * @var \Airavata\Model\Security\AuthzToken
+   */
+  public $authzToken = null;
+  /**
+   * @var string
+   */
+  public $airavataExperimentId = null;
+  /**
+   * @var \Airavata\Model\Experiment\UserConfigurationDataModel
+   */
+  public $userConfiguration = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'authzToken',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Security\AuthzToken',
+          ),
+        2 => array(
+          'var' => 'airavataExperimentId',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'userConfiguration',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Experiment\UserConfigurationDataModel',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['authzToken'])) {
+        $this->authzToken = $vals['authzToken'];
+      }
+      if (isset($vals['airavataExperimentId'])) {
+        $this->airavataExperimentId = $vals['airavataExperimentId'];
+      }
+      if (isset($vals['userConfiguration'])) {
+        $this->userConfiguration = $vals['userConfiguration'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_updateExperimentConfiguration_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
+            $xfer += $this->authzToken->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->airavataExperimentId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->userConfiguration = new \Airavata\Model\Experiment\UserConfigurationDataModel();
+            $xfer += $this->userConfiguration->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_updateExperimentConfiguration_args');
+    if ($this->authzToken !== null) {
+      if (!is_object($this->authzToken)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
+      $xfer += $this->authzToken->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->airavataExperimentId !== null) {
+      $xfer += $output->writeFieldBegin('airavataExperimentId', TType::STRING, 2);
+      $xfer += $output->writeString($this->airavataExperimentId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->userConfiguration !== null) {
+      if (!is_object($this->userConfiguration)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('userConfiguration', TType::STRUCT, 3);
+      $xfer += $this->userConfiguration->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_updateExperimentConfiguration_result {
+  static $_TSPEC;
+
+  /**
+   * @var \Airavata\API\Error\AuthorizationException
+   */
+  public $ae = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'ae',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AuthorizationException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['ae'])) {
+        $this->ae = $vals['ae'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_updateExperimentConfiguration_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ae = new \Airavata\API\Error\AuthorizationException();
+            $xfer += $this->ae->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_updateExperimentConfiguration_result');
+    if ($this->ae !== null) {
+      $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 1);
+      $xfer += $this->ae->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_updateResourceScheduleing_args {
+  static $_TSPEC;
+
+  /**
+   * @var \Airavata\Model\Security\AuthzToken
+   */
+  public $authzToken = null;
+  /**
+   * @var string
+   */
+  public $airavataExperimentId = null;
+  /**
+   * @var \Airavata\Model\Scheduling\ComputationalResourceSchedulingModel
+   */
+  public $resourceScheduling = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'authzToken',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Security\AuthzToken',
+          ),
+        2 => array(
+          'var' => 'airavataExperimentId',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'resourceScheduling',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Scheduling\ComputationalResourceSchedulingModel',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['authzToken'])) {
+        $this->authzToken = $vals['authzToken'];
+      }
+      if (isset($vals['airavataExperimentId'])) {
+        $this->airavataExperimentId = $vals['airavataExperimentId'];
+      }
+      if (isset($vals['resourceScheduling'])) {
+        $this->resourceScheduling = $vals['resourceScheduling'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_updateResourceScheduleing_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
+            $xfer += $this->authzToken->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->airavataExperimentId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->resourceScheduling = new \Airavata\Model\Scheduling\ComputationalResourceSchedulingModel();
+            $xfer += $this->resourceScheduling->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_updateResourceScheduleing_args');
+    if ($this->authzToken !== null) {
+      if (!is_object($this->authzToken)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
+      $xfer += $this->authzToken->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->airavataExperimentId !== null) {
+      $xfer += $output->writeFieldBegin('airavataExperimentId', TType::STRING, 2);
+      $xfer += $output->writeString($this->airavataExperimentId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->resourceScheduling !== null) {
+      if (!is_object($this->resourceScheduling)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('resourceScheduling', TType::STRUCT, 3);
+      $xfer += $this->resourceScheduling->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_updateResourceScheduleing_result {
+  static $_TSPEC;
+
+  /**
+   * @var \Airavata\API\Error\AuthorizationException
+   */
+  public $ae = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'ae',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AuthorizationException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['ae'])) {
+        $this->ae = $vals['ae'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_updateResourceScheduleing_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ae = new \Airavata\API\Error\AuthorizationException();
+            $xfer += $this->ae->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_updateResourceScheduleing_result');
+    if ($this->ae !== null) {
+      $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 1);
+      $xfer += $this->ae->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_validateExperiment_args {
+  static $_TSPEC;
+
+  /**
+   * @var \Airavata\Model\Security\AuthzToken
+   */
+  public $authzToken = null;
+  /**
+   * @var string
+   */
+  public $airavataExperimentId = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'authzToken',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Security\AuthzToken',
+          ),
+        2 => array(
+          'var' => 'airavataExperimentId',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['authzToken'])) {
+        $this->authzToken = $vals['authzToken'];
+      }
+      if (isset($vals['airavataExperimentId'])) {
+        $this->airavataExperimentId = $vals['airavataExperimentId'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_validateExperiment_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
+            $xfer += $this->authzToken->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->airavataExperimentId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Airavata_validateExperiment_args');
     if ($this->authzToken !== null) {
       if (!is_object($this->authzToken)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
@@ -26722,11 +28013,11 @@ class Airavata_getDetailedExperimentTree_args {
 
 }
 
-class Airavata_getDetailedExperimentTree_result {
+class Airavata_validateExperiment_result {
   static $_TSPEC;
 
   /**
-   * @var \Airavata\Model\Experiment\ExperimentModel
+   * @var bool
    */
   public $success = null;
   /**
@@ -26755,8 +28046,7 @@ class Airavata_getDetailedExperimentTree_result {
       self::$_TSPEC = array(
         0 => array(
           'var' => 'success',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Experiment\ExperimentModel',
+          'type' => TType::BOOL,
           ),
         1 => array(
           'var' => 'ire',
@@ -26808,7 +28098,7 @@ class Airavata_getDetailedExperimentTree_result {
   }
 
   public function getName() {
-    return 'Airavata_getDetailedExperimentTree_result';
+    return 'Airavata_validateExperiment_result';
   }
 
   public function read($input)
@@ -26827,9 +28117,8 @@ class Airavata_getDetailedExperimentTree_result {
       switch ($fid)
       {
         case 0:
-          if ($ftype == TType::STRUCT) {
-            $this->success = new \Airavata\Model\Experiment\ExperimentModel();
-            $xfer += $this->success->read($input);
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->success);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -26886,13 +28175,10 @@ class Airavata_getDetailedExperimentTree_result {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_getDetailedExperimentTree_result');
+    $xfer += $output->writeStructBegin('Airavata_validateExperiment_result');
     if ($this->success !== null) {
-      if (!is_object($this->success)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
-      $xfer += $this->success->write($output);
+      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+      $xfer += $output->writeBool($this->success);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->ire !== null) {
@@ -26927,7 +28213,7 @@ class Airavata_getDetailedExperimentTree_result {
 
 }
 
-class Airavata_updateExperiment_args {
+class Airavata_launchExperiment_args {
   static $_TSPEC;
 
   /**
@@ -26939,9 +28225,9 @@ class Airavata_updateExperiment_args {
    */
   public $airavataExperimentId = null;
   /**
-   * @var \Airavata\Model\Experiment\ExperimentModel
+   * @var string
    */
-  public $experiment = null;
+  public $gatewayId = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -26956,9 +28242,8 @@ class Airavata_updateExperiment_args {
           'type' => TType::STRING,
           ),
         3 => array(
-          'var' => 'experiment',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Experiment\ExperimentModel',
+          'var' => 'gatewayId',
+          'type' => TType::STRING,
           ),
         );
     }
@@ -26969,14 +28254,14 @@ class Airavata_updateExperiment_args {
       if (isset($vals['airavataExperimentId'])) {
         $this->airavataExperimentId = $vals['airavataExperimentId'];
       }
-      if (isset($vals['experiment'])) {
-        $this->experiment = $vals['experiment'];
+      if (isset($vals['gatewayId'])) {
+        $this->gatewayId = $vals['gatewayId'];
       }
     }
   }
 
   public function getName() {
-    return 'Airavata_updateExperiment_args';
+    return 'Airavata_launchExperiment_args';
   }
 
   public function read($input)
@@ -27010,9 +28295,8 @@ class Airavata_updateExperiment_args {
           }
           break;
         case 3:
-          if ($ftype == TType::STRUCT) {
-            $this->experiment = new \Airavata\Model\Experiment\ExperimentModel();
-            $xfer += $this->experiment->read($input);
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->gatewayId);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -27029,7 +28313,7 @@ class Airavata_updateExperiment_args {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_updateExperiment_args');
+    $xfer += $output->writeStructBegin('Airavata_launchExperiment_args');
     if ($this->authzToken !== null) {
       if (!is_object($this->authzToken)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
@@ -27043,12 +28327,9 @@ class Airavata_updateExperiment_args {
       $xfer += $output->writeString($this->airavataExperimentId);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->experiment !== null) {
-      if (!is_object($this->experiment)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('experiment', TType::STRUCT, 3);
-      $xfer += $this->experiment->write($output);
+    if ($this->gatewayId !== null) {
+      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 3);
+      $xfer += $output->writeString($this->gatewayId);
       $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
@@ -27058,7 +28339,7 @@ class Airavata_updateExperiment_args {
 
 }
 
-class Airavata_updateExperiment_result {
+class Airavata_launchExperiment_result {
   static $_TSPEC;
 
   /**
@@ -27132,7 +28413,7 @@ class Airavata_updateExperiment_result {
   }
 
   public function getName() {
-    return 'Airavata_updateExperiment_result';
+    return 'Airavata_launchExperiment_result';
   }
 
   public function read($input)
@@ -27202,7 +28483,7 @@ class Airavata_updateExperiment_result {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_updateExperiment_result');
+    $xfer += $output->writeStructBegin('Airavata_launchExperiment_result');
     if ($this->ire !== null) {
       $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
       $xfer += $this->ire->write($output);
@@ -27235,215 +28516,7 @@ class Airavata_updateExperiment_result {
 
 }
 
-class Airavata_updateExperimentConfiguration_args {
-  static $_TSPEC;
-
-  /**
-   * @var \Airavata\Model\Security\AuthzToken
-   */
-  public $authzToken = null;
-  /**
-   * @var string
-   */
-  public $airavataExperimentId = null;
-  /**
-   * @var \Airavata\Model\Experiment\UserConfigurationDataModel
-   */
-  public $userConfiguration = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'authzToken',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Security\AuthzToken',
-          ),
-        2 => array(
-          'var' => 'airavataExperimentId',
-          'type' => TType::STRING,
-          ),
-        3 => array(
-          'var' => 'userConfiguration',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Experiment\UserConfigurationDataModel',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['authzToken'])) {
-        $this->authzToken = $vals['authzToken'];
-      }
-      if (isset($vals['airavataExperimentId'])) {
-        $this->airavataExperimentId = $vals['airavataExperimentId'];
-      }
-      if (isset($vals['userConfiguration'])) {
-        $this->userConfiguration = $vals['userConfiguration'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'Airavata_updateExperimentConfiguration_args';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRUCT) {
-            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
-            $xfer += $this->authzToken->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->airavataExperimentId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRUCT) {
-            $this->userConfiguration = new \Airavata\Model\Experiment\UserConfigurationDataModel();
-            $xfer += $this->userConfiguration->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_updateExperimentConfiguration_args');
-    if ($this->authzToken !== null) {
-      if (!is_object($this->authzToken)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
-      $xfer += $this->authzToken->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->airavataExperimentId !== null) {
-      $xfer += $output->writeFieldBegin('airavataExperimentId', TType::STRING, 2);
-      $xfer += $output->writeString($this->airavataExperimentId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->userConfiguration !== null) {
-      if (!is_object($this->userConfiguration)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('userConfiguration', TType::STRUCT, 3);
-      $xfer += $this->userConfiguration->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class Airavata_updateExperimentConfiguration_result {
-  static $_TSPEC;
-
-  /**
-   * @var \Airavata\API\Error\AuthorizationException
-   */
-  public $ae = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'ae',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AuthorizationException',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['ae'])) {
-        $this->ae = $vals['ae'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'Airavata_updateExperimentConfiguration_result';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRUCT) {
-            $this->ae = new \Airavata\API\Error\AuthorizationException();
-            $xfer += $this->ae->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_updateExperimentConfiguration_result');
-    if ($this->ae !== null) {
-      $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 1);
-      $xfer += $this->ae->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class Airavata_updateResourceScheduleing_args {
+class Airavata_getExperimentStatus_args {
   static $_TSPEC;
 
   /**
@@ -27454,10 +28527,6 @@ class Airavata_updateResourceScheduleing_args {
    * @var string
    */
   public $airavataExperimentId = null;
-  /**
-   * @var \Airavata\Model\Scheduling\ComputationalResourceSchedulingModel
-   */
-  public $resourceScheduling = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -27471,11 +28540,6 @@ class Airavata_updateResourceScheduleing_args {
           'var' => 'airavataExperimentId',
           'type' => TType::STRING,
           ),
-        3 => array(
-          'var' => 'resourceScheduling',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Scheduling\ComputationalResourceSchedulingModel',
-          ),
         );
     }
     if (is_array($vals)) {
@@ -27485,14 +28549,11 @@ class Airavata_updateResourceScheduleing_args {
       if (isset($vals['airavataExperimentId'])) {
         $this->airavataExperimentId = $vals['airavataExperimentId'];
       }
-      if (isset($vals['resourceScheduling'])) {
-        $this->resourceScheduling = $vals['resourceScheduling'];
-      }
     }
   }
 
   public function getName() {
-    return 'Airavata_updateResourceScheduleing_args';
+    return 'Airavata_getExperimentStatus_args';
   }
 
   public function read($input)
@@ -27525,14 +28586,6 @@ class Airavata_updateResourceScheduleing_args {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 3:
-          if ($ftype == TType::STRUCT) {
-            $this->resourceScheduling = new \Airavata\Model\Scheduling\ComputationalResourceSchedulingModel();
-            $xfer += $this->resourceScheduling->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -27545,7 +28598,7 @@ class Airavata_updateResourceScheduleing_args {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_updateResourceScheduleing_args');
+    $xfer += $output->writeStructBegin('Airavata_getExperimentStatus_args');
     if ($this->authzToken !== null) {
       if (!is_object($this->authzToken)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
@@ -27559,14 +28612,6 @@ class Airavata_updateResourceScheduleing_args {
       $xfer += $output->writeString($this->airavataExperimentId);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->resourceScheduling !== null) {
-      if (!is_object($this->resourceScheduling)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('resourceScheduling', TType::STRUCT, 3);
-      $xfer += $this->resourceScheduling->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
@@ -27574,10 +28619,30 @@ class Airavata_updateResourceScheduleing_args {
 
 }
 
-class Airavata_updateResourceScheduleing_result {
+class Airavata_getExperimentStatus_result {
   static $_TSPEC;
 
   /**
+   * @var \Airavata\Model\Status\ExperimentStatus
+   */
+  public $success = null;
+  /**
+   * @var \Airavata\API\Error\InvalidRequestException
+   */
+  public $ire = null;
+  /**
+   * @var \Airavata\API\Error\ExperimentNotFoundException
+   */
+  public $enf = null;
+  /**
+   * @var \Airavata\API\Error\AiravataClientException
+   */
+  public $ace = null;
+  /**
+   * @var \Airavata\API\Error\AiravataSystemException
+   */
+  public $ase = null;
+  /**
    * @var \Airavata\API\Error\AuthorizationException
    */
   public $ae = null;
@@ -27585,7 +28650,32 @@ class Airavata_updateResourceScheduleing_result {
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Status\ExperimentStatus',
+          ),
         1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'enf',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\ExperimentNotFoundException',
+          ),
+        3 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        4 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        5 => array(
           'var' => 'ae',
           'type' => TType::STRUCT,
           'class' => '\Airavata\API\Error\AuthorizationException',
@@ -27593,6 +28683,21 @@ class Airavata_updateResourceScheduleing_result {
         );
     }
     if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['enf'])) {
+        $this->enf = $vals['enf'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
       if (isset($vals['ae'])) {
         $this->ae = $vals['ae'];
       }
@@ -27600,7 +28705,7 @@ class Airavata_updateResourceScheduleing_result {
   }
 
   public function getName() {
-    return 'Airavata_updateResourceScheduleing_result';
+    return 'Airavata_getExperimentStatus_result';
   }
 
   public function read($input)
@@ -27618,8 +28723,48 @@ class Airavata_updateResourceScheduleing_result {
       }
       switch ($fid)
       {
+        case 0:
+          if ($ftype == TType::STRUCT) {
+            $this->success = new \Airavata\Model\Status\ExperimentStatus();
+            $xfer += $this->success->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         case 1:
           if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->enf = new \Airavata\API\Error\ExperimentNotFoundException();
+            $xfer += $this->enf->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::STRUCT) {
             $this->ae = new \Airavata\API\Error\AuthorizationException();
             $xfer += $this->ae->read($input);
           } else {
@@ -27638,9 +28783,37 @@ class Airavata_updateResourceScheduleing_result {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_updateResourceScheduleing_result');
+    $xfer += $output->writeStructBegin('Airavata_getExperimentStatus_result');
+    if ($this->success !== null) {
+      if (!is_object($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+      $xfer += $this->success->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->enf !== null) {
+      $xfer += $output->writeFieldBegin('enf', TType::STRUCT, 2);
+      $xfer += $this->enf->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 3);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 4);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
     if ($this->ae !== null) {
-      $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 1);
+      $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 5);
       $xfer += $this->ae->write($output);
       $xfer += $output->writeFieldEnd();
     }
@@ -27651,7 +28824,7 @@ class Airavata_updateResourceScheduleing_result {
 
 }
 
-class Airavata_validateExperiment_args {
+class Airavata_getExperimentOutputs_args {
   static $_TSPEC;
 
   /**
@@ -27688,7 +28861,7 @@ class Airavata_validateExperiment_args {
   }
 
   public function getName() {
-    return 'Airavata_validateExperiment_args';
+    return 'Airavata_getExperimentOutputs_args';
   }
 
   public function read($input)
@@ -27733,7 +28906,7 @@ class Airavata_validateExperiment_args {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_validateExperiment_args');
+    $xfer += $output->writeStructBegin('Airavata_getExperimentOutputs_args');
     if ($this->authzToken !== null) {
       if (!is_object($this->authzToken)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
@@ -27754,11 +28927,11 @@ class Airavata_validateExperiment_args {
 
 }
 
-class Airavata_validateExperiment_result {
+class Airavata_getExperimentOutputs_result {
   static $_TSPEC;
 
   /**
-   * @var bool
+   * @var \Airavata\Model\Application\Io\OutputDataObjectType[]
    */
   public $success = null;
   /**
@@ -27787,7 +28960,12 @@ class Airavata_validateExperiment_result {
       self::$_TSPEC = array(
         0 => array(
           'var' => 'success',
-          'type' => TType::BOOL,
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\Application\Io\OutputDataObjectType',
+            ),
           ),
         1 => array(
           'var' => 'ire',
@@ -27839,7 +29017,7 @@ class Airavata_validateExperiment_result {
   }
 
   public function getName() {
-    return 'Airavata_validateExperiment_result';
+    return 'Airavata_getExperimentOutputs_result';
   }
 
   public function read($input)
@@ -27858,8 +29036,19 @@ class Airavata_validateExperiment_result {
       switch ($fid)
       {
         case 0:
-          if ($ftype == TType::BOOL) {
-            $xfer += $input->readBool($this->success);
+          if ($ftype == TType::LST) {
+            $this->success = array();
+            $_size106 = 0;
+            $_etype109 = 0;
+            $xfer += $input->readListBegin($_etype109, $_size106);
+            for ($_i110 = 0; $_i110 < $_size106; ++$_i110)
+            {
+              $elem111 = null;
+              $elem111 = new \Airavata\Model\Application\Io\OutputDataObjectType();
+              $xfer += $elem111->read($input);
+              $this->success []= $elem111;
+            }
+            $xfer += $input->readListEnd();
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -27916,10 +29105,22 @@ class Airavata_validateExperiment_result {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_validateExperiment_result');
+    $xfer += $output->writeStructBegin('Airavata_getExperimentOutputs_result');
     if ($this->success !== null) {
-      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
-      $xfer += $output->writeBool($this->success);
+      if (!is_array($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->success));
+        {
+          foreach ($this->success as $iter112)
+          {
+            $xfer += $iter112->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
       $xfer += $output->writeFieldEnd();
     }
     if ($this->ire !== null) {
@@ -27954,7 +29155,7 @@ class Airavata_validateExperiment_result {
 
 }
 
-class Airavata_launchExperiment_args {
+class Airavata_getIntermediateOutputs_args {
   static $_TSPEC;
 
   /**
@@ -27965,10 +29166,6 @@ class Airavata_launchExperiment_args {
    * @var string
    */
   public $airavataExperimentId = null;
-  /**
-   * @var string
-   */
-  public $gatewayId = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -27982,10 +29179,6 @@ class Airavata_launchExperiment_args {
           'var' => 'airavataExperimentId',
           'type' => TType::STRING,
           ),
-        3 => array(
-          'var' => 'gatewayId',
-          'type' => TType::STRING,
-          ),
         );
     }
     if (is_array($vals)) {
@@ -27995,14 +29188,11 @@ class Airavata_launchExperiment_args {
       if (isset($vals['airavataExperimentId'])) {
         $this->airavataExperimentId = $vals['airavataExperimentId'];
       }
-      if (isset($vals['gatewayId'])) {
-        $this->gatewayId = $vals['gatewayId'];
-      }
     }
   }
 
   public function getName() {
-    return 'Airavata_launchExperiment_args';
+    return 'Airavata_getIntermediateOutputs_args';
   }
 
   public function read($input)
@@ -28035,13 +29225,6 @@ class Airavata_launchExperiment_args {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 3:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->gatewayId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -28054,7 +29237,7 @@ class Airavata_launchExperiment_args {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_launchExperiment_args');
+    $xfer += $output->writeStructBegin('Airavata_getIntermediateOutputs_args');
     if ($this->authzToken !== null) {
       if (!is_object($this->authzToken)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
@@ -28068,11 +29251,6 @@ class Airavata_launchExperiment_args {
       $xfer += $output->writeString($this->airavataExperimentId);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->gatewayId !== null) {
-      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 3);
-      $xfer += $output->writeString($this->gatewayId);
-      $xfer += $output->writeFieldEnd();
-    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
@@ -28080,10 +29258,14 @@ class Airavata_launchExperiment_args {
 
 }
 
-class Airavata_launchExperiment_result {
+class Airavata_getIntermediateOutputs_result {
   static $_TSPEC;
 
   /**
+   * @var \Airavata\Model\Application\Io\OutputDataObjectType[]
+   */
+  public $success = null;
+  /**
    * @var \Airavata\API\Error\InvalidRequestException
    */
   public $ire = null;
@@ -28107,6 +29289,15 @@ class Airavata_launchExperiment_result {
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\Application\Io\OutputDataObjectType',
+            ),
+          ),
         1 => array(
           'var' => 'ire',
           'type' => TType::STRUCT,
@@ -28135,6 +29326,9 @@ class Airavata_launchExperiment_result {
         );
     }
     if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
       if (isset($vals['ire'])) {
         $this->ire = $vals['ire'];
       }
@@ -28154,7 +29348,7 @@ class Airavata_launchExperiment_result {
   }
 
   public function getName() {
-    return 'Airavata_launchExperiment_result';
+    return 'Airavata_getIntermediateOutputs_result';
   }
 
   public function read($input)
@@ -28172,6 +29366,24 @@ class Airavata_launchExperiment_result {
       }
       switch ($fid)
       {
+        case 0:
+          if ($ftype == TType::LST) {
+            $this->success = array();
+            $_size113 = 0;
+            $_etype116 = 0;
+            $xfer += $input->readListBegin($_etype116, $_size113);
+            for ($_i117 = 0; $_i117 < $_size113; ++$_i117)
+            {
+              $elem118 = null;
+              $elem118 = new \Airavata\Model\Application\Io\OutputDataObjectType();
+              $xfer += $elem118->read($input);
+              $this->success []= $elem118;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         case 1:
           if ($ftype == TType::STRUCT) {
             $this->ire = new \Airavata\API\Error\InvalidRequestException();
@@ -28224,7 +29436,24 @@ class Airavata_launchExperiment_result {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_launchExperiment_result');
+    $xfer += $output->writeStructBegin('Airavata_getIntermediateOutputs_result');
+    if ($this->success !== null) {
+      if (!is_array($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->success));
+        {
+          foreach ($this->success as $iter119)
+          {
+            $xfer += $iter119->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
     if ($this->ire !== null) {
       $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
       $xfer += $this->ire->write($output);
@@ -28257,7 +29486,7 @@ class Airavata_launchExperiment_result {
 
 }
 
-class Airavata_getExperimentStatus_args {
+class Airavata_getJobStatuses_args {
   static $_TSPEC;
 
   /**
@@ -28294,7 +29523,7 @@ class Airavata_getExperimentStatus_args {
   }
 
   public function getName() {
-    return 'Airavata_getExperimentStatus_args';
+    return 'Airavata_getJobStatuses_args';
   }
 
   public function read($input)
@@ -28339,7 +29568,7 @@ class Airavata_getExperimentStatus_args {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_getExperimentStatus_args');
+    $xfer += $output->writeStructBegin('Airavata_getJobStatuses_args');
     if ($this->authzToken !== null) {
       if (!is_object($this->authzToken)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
@@ -28360,11 +29589,11 @@ class Airavata_getExperimentStatus_args {
 
 }
 
-class Airavata_getExperimentStatus_result {
+class Airavata_getJobStatuses_result {
   static $_TSPEC;
 
   /**
-   * @var \Airavata\Model\Status\ExperimentStatus
+   * @var array
    */
   public $success = null;
   /**
@@ -28393,8 +29622,16 @@ class Airavata_getExperimentStatus_result {
       self::$_TSPEC = array(
         0 => array(
           'var' => 'success',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Status\ExperimentStatus',
+          'type' => TType::MAP,
+          'ktype' => TType::STRING,
+          'vtype' => TType::STRUCT,
+          'key' => array(
+            'type' => TType::STRING,
+          ),
+          'val' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\Status\JobStatus',
+            ),
           ),
         1 => array(
           'var' => 'ire',
@@ -28446,7 +29683,7 @@ class Airavata_getExperimentStatus_result {
   }
 
   public function getName() {
-    return 'Airavata_getExperimentStatus_result';
+    return 'Airavata_getJobStatuses_result';
   }
 
   public function read($input)
@@ -28465,9 +29702,22 @@ class Airavata_getExperimentStatus_result {
       switch ($fid)
       {
         case 0:
-          if ($ftype == TType::STRUCT) {
-            $this->success = new \Airavata\Model\Status\ExperimentStatus();
-            $xfer += $this->success->read($input);
+          if ($ftype == TType::MAP) {
+            $this->success = array();
+            $_size120 = 0;
+            $_ktype121 = 0;
+            $_vtype122 = 0;
+            $xfer += $input->readMapBegin($_ktype121, $_vtype122, $_size120);
+            for ($_i124 = 0; $_i124 < $_size120; ++$_i124)
+            {
+              $key125 = '';
+              $val126 = new \Airavata\Model\Status\JobStatus();
+              $xfer += $input->readString($key125);
+              $val126 = new \Airavata\Model\Status\JobStatus();
+              $xfer += $val126->read($input);
+              $this->success[$key125] = $val126;
+            }
+            $xfer += $input->readMapEnd();
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -28524,13 +29774,23 @@ class Airavata_getExperimentStatus_result {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_getExperimentStatus_result');
+    $xfer += $output->writeStructBegin('Airavata_getJobStatuses_result');
     if ($this->success !== null) {
-      if (!is_object($this->success)) {
+      if (!is_array($this->success)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
-      $xfer += $this->success->write($output);
+      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
+      {
+        $output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->success));
+        {
+          foreach ($this->success as $kiter127 => $viter128)
+          {
+            $xfer += $output->writeString($kiter127);
+            $xfer += $viter128->write($output);
+          }
+        }
+        $output->writeMapEnd();
+      }
       $xfer += $output->writeFieldEnd();
     }
     if ($this->ire !== null) {
@@ -28565,7 +29825,7 @@ class Airavata_getExperimentStatus_result {
 
 }
 
-class Airavata_getExperimentOutputs_args {
+class Airavata_getJobDetails_args {
   static $_TSPEC;
 
   /**
@@ -28602,7 +29862,7 @@ class Airavata_getExperimentOutputs_args {
   }
 
   public function getName() {
-    return 'Airavata_getExperimentOutputs_args';
+    return 'Airavata_getJobDetails_args';
   }
 
   public function read($input)
@@ -28647,7 +29907,7 @@ class Airavata_getExperimentOutputs_args {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_getExperimentOutputs_args');
+    $xfer += $output->writeStructBegin('Airavata_getJobDetails_args');
     if ($this->authzToken !== null) {
       if (!is_object($this->authzToken)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
@@ -28668,11 +29928,11 @@ class Airavata_getExperimentOutputs_args {
 
 }
 
-class Airavata_getExperimentOutputs_result {
+class Airavata_getJobDetails_result {
   static $_TSPEC;
 
   /**
-   * @var \Airavata\Model\Application\Io\OutputDataObjectType[]
+   * @var \Airavata\Model\Job\JobModel[]
    */
   public $success = null;
   /**
@@ -28705,7 +29965,7 @@ class Airavata_getExperimentOutputs_result {
           'etype' => TType::STRUCT,
           'elem' => array(
             'type' => TType::STRUCT,
-            'class' => '\Airavata\Model\Application\Io\OutputDataObjectType',
+            'class' => '\Airavata\Model\Job\JobModel',
             ),
           ),
         1 => array(
@@ -28758,7 +30018,7 @@ class Airavata_getExperimentOutputs_result {
   }
 
   public function getName() {
-    return 'Airavata_getExperimentOutputs_result';
+    return 'Airavata_getJobDetails_result';
   }
 
   public function read($input)
@@ -28779,15 +30039,15 @@ class Airavata_getExperimentOutputs_result {
         case 0:
           if ($ftype == TType::LST) {
             $this->success = array();
-            $_size106 = 0;
-            $_etype109 = 0;
-            $xfer += $input->readListBegin($_etype109, $_size106);
-            for ($_i110 = 0; $_i110 < $_size106; ++$_i110)
+            $_size129 = 0;
+            $_etype132 = 0;
+            $xfer += $input->readListBegin($_etype132, $_size129);
+            for ($_i133 = 0; $_i133 < $_size129; ++$_i133)
             {
-              $elem111 = null;
-              $elem111 = new \Airavata\Model\Application\Io\OutputDataObjectType();
-              $xfer += $elem111->read($input);
-              $this->success []= $elem111;
+              $elem134 = null;
+              $elem134 = new \Airavata\Model\Job\JobModel();
+              $xfer += $elem134->read($input);
+              $this->success []= $elem134;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -28846,7 +30106,7 @@ class Airavata_getExperimentOutputs_result {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_getExperimentOutputs_result');
+    $xfer += $output->writeStructBegin('Airavata_getJobDetails_result');
     if ($this->success !== null) {
       if (!is_array($this->success)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
@@ -28855,9 +30115,9 @@ class Airavata_getExperimentOutputs_result {
       {
         $output->writeListBegin(TType::STRUCT, count($this->success));
         {
-          foreach ($this->success as $iter112)
+          foreach ($this->success as $iter135)
           {
-            $xfer += $iter112->write($output);
+            $xfer += $iter135->write($output);
           }
         }
         $output->writeListEnd();
@@ -28896,7 +30156,7 @@ class Airavata_getExperimentOutputs_result {
 
 }
 
-class Airavata_getIntermediateOutputs_args {
+class Airavata_cloneExperiment_args {
   static $_TSPEC;
 
   /**
@@ -28906,7 +30166,15 @@ class Airavata_getIntermediateOutputs_args {
   /**
    * @var string
    */
-  public $airavataExperimentId = null;
+  public $existingExperimentID = null;
+  /**
+   * @var string
+   */
+  public $newExperimentName = null;
+  /**
+   * @var string
+   */
+  public $newExperimentProjectId = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -28917,7 +30185,15 @@ class Airavata_getIntermediateOutputs_args {
           'class' => '\Airavata\Model\Security\AuthzToken',
           ),
         2 => array(
-          'var' => 'airavataExperimentId',
+          'var' => 'existingExperimentID',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'newExperimentName',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'newExperimentProjectId',
           'type' => TType::STRING,
           ),
         );
@@ -28926,14 +30202,20 @@ class Airavata_getIntermediateOutputs_args {
       if (isset($vals['authzToken'])) {
         $this->authzToken = $vals['authzToken'];
       }
-      if (isset($vals['airavataExperimentId'])) {
-        $this->airavataExperimentId = $vals['airavataExperimentId'];
+      if (isset($vals['existingExperimentID'])) {
+        $this->existingExperimentID = $vals['existingExperimentID'];
+      }
+      if (isset($vals['newExperimentName'])) {
+        $this->newExperimentName = $vals['newExperimentName'];
+      }
+      if (isset($vals['newExperimentProjectId'])) {
+        $this->newExperimentProjectId = $vals['newExperimentProjectId'];
       }
     }
   }
 
   public function getName() {
-    return 'Airavata_getIntermediateOutputs_args';
+    return 'Airavata_cloneExperiment_args';
   }
 
   public function read($input)
@@ -28961,7 +30243,21 @@ class Airavata_getIntermediateOutputs_args {
           break;
         case 2:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->airavataExperimentId);
+            $xfer += $input->readString($this->existingExperimentID);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->newExperimentName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->newExperimentProjectId);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -28978,7 +30274,7 @@ class Airavata_getIntermediateOutputs_args {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_getIntermediateOutputs_args');
+    $xfer += $output->writeStructBegin('Airavata_cloneExperiment_args');
     if ($this->authzToken !== null) {
       if (!is_object($this->authzToken)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
@@ -28987,9 +30283,19 @@ class Airavata_getIntermediateOutputs_args {
       $xfer += $this->authzToken->write($output);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->airavataExperimentId !== null) {
-      $xfer += $output->writeFieldBegin('airavataExperimentId', TType::STRING, 2);
-      $xfer += $output->writeString($this->airavataExperimentId);
+    if ($this->existingExperimentID !== null) {
+      $xfer += $output->writeFieldBegin('existingExperimentID', TType::STRING, 2);
+      $xfer += $output->writeString($this->existingExperimentID);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->newExperimentName !== null) {
+      $xfer += $output->writeFieldBegin('newExperimentName', TType::STRING, 3);
+      $xfer += $output->writeString($this->newExperimentName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->newExperimentProjectId !== null) {
+      $xfer += $output->writeFieldBegin('newExperimentProjectId', TType::STRING, 4);
+      $xfer += $output->writeString($this->newExperimentProjectId);
       $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
@@ -28999,11 +30305,11 @@ class Airavata_getIntermediateOutputs_args {
 
 }
 
-class Airavata_getIntermediateOutputs_result {
+class Airavata_cloneExperiment_result {
   static $_TSPEC;
 
   /**
-   * @var \Airavata\Model\Application\Io\OutputDataObjectType[]
+   * @var string
    */
   public $success = null;
   /**
@@ -29026,18 +30332,17 @@ class Airavata_getIntermediateOutputs_result {
    * @var \Airavata\API\Error\AuthorizationException
    */
   public $ae = null;
+  /**
+   * @var \Airavata\API\Error\ProjectNotFoundException
+   */
+  public $pnfe = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         0 => array(
           'var' => 'success',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\Airavata\Model\Application\Io\OutputDataObjectType',
-            ),
+          'type' => TType::STRING,
           ),
         1 => array(
           'var' => 'ire',
@@ -29064,6 +30369,11 @@ class Airavata_getIntermediateOutputs_result {
           'type' => TType::STRUCT,
           'class' => '\Airavata\API\Error\AuthorizationException',
           ),
+        6 => array(
+          'var' => 'pnfe',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\ProjectNotFoundException',
+          ),
         );
     }
     if (is_array($vals)) {
@@ -29085,11 +30395,14 @@ class Airavata_getIntermediateOutputs_result {
       if (isset($vals['ae'])) {
         $this->ae = $vals['ae'];
       }
+      if (isset($vals['pnfe'])) {
+        $this->pnfe = $vals['pnfe'];
+      }
     }
   }
 
   public function getName() {
-    return 'Airavata_getIntermediateOutputs_result';
+    return 'Airavata_cloneExperiment_result';
   }
 
   public function read($input)
@@ -29108,19 +30421,8 @@ class Airavata_getIntermediateOutputs_result {
       switch ($fid)
       {
         case 0:
-          if ($ftype == TType::LST) {
-            $this->success = array();
-            $_size113 = 0;
-            $_etype116 = 0;
-            $xfer += $input->readListBegin($_etype116, $_size113);
-            for ($_i117 = 0; $_i117 < $_size113; ++$_i117)
-            {
-              $elem118 = null;
-              $elem118 = new \Airavata\Model\Application\Io\OutputDataObjectType();
-              $xfer += $elem118->read($input);
-              $this->success []= $elem118;
-            }
-            $xfer += $input->readListEnd();
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->success);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -29165,6 +30467,14 @@ class Airavata_getIntermediateOutputs_result {
             $xfer += $input->skip($ftype);
           }
           break;
+        case 6:
+          if ($ftype == TType::STRUCT) {
+            $this->pnfe = new \Airavata\API\Error\ProjectNotFound

<TRUNCATED>

[05/40] airavata git commit: AIRAVATA-2500 SSHAccountManager: install SSH key and verify

Posted by ma...@apache.org.
AIRAVATA-2500 SSHAccountManager: install SSH key and verify


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

Branch: refs/heads/develop
Commit: 3d161b8161975be658259739047e36df3bd6ef38
Parents: 2a90139
Author: Marcus Christie <ma...@apache.org>
Authored: Mon Aug 14 12:38:53 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Tue Sep 19 15:07:56 2017 -0400

----------------------------------------------------------------------
 .../accountprovisioning/SSHAccountManager.java  | 104 ++++++++++++++-----
 .../airavata/accountprovisioning/SSHUtil.java   |  83 +++++++++++++++
 2 files changed, 162 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/3d161b81/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
index dcb819b..d565fe9 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
@@ -25,43 +25,48 @@ import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.credential.store.client.CredentialStoreClientFactory;
 import org.apache.airavata.credential.store.cpi.CredentialStoreService;
 import org.apache.airavata.credential.store.exception.CredentialStoreException;
+import org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam;
+import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
 import org.apache.airavata.model.credential.store.PasswordCredential;
+import org.apache.airavata.model.credential.store.SSHCredential;
 import org.apache.airavata.registry.api.RegistryService;
 import org.apache.airavata.registry.api.client.RegistryServiceClientFactory;
 import org.apache.airavata.registry.api.exception.RegistryServiceException;
 import org.apache.thrift.TException;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
 
 public class SSHAccountManager {
 
-    // TODO: need private key too to verify
-    public static void setupSSHAccount(String gatewayId, String hostname, String username, String sshPublicKey) {
-
-        // TODO: finish implementing
+    // TODO: change return type to one that returns some details of the SSH account setup, for example the scratch location
+    public static void setupSSHAccount(String gatewayId, String computeResourceId, String username, SSHCredential sshCredential) {
 
         // get compute resource preferences for the gateway and hostname
+        // TODO: close the registry service client transport when done with it
+        RegistryService.Client registryServiceClient = getRegistryServiceClient();
+        ComputeResourcePreference computeResourcePreference = null;
+        ComputeResourceDescription computeResourceDescription = null;
+        try {
+            computeResourcePreference = registryServiceClient.getGatewayComputeResourcePreference(gatewayId, computeResourceId);
+            computeResourceDescription = registryServiceClient.getComputeResource(computeResourceId);
+        } catch(TException e) {
+            throw new RuntimeException(e);
+        }
 
         // get the account provisioner and config values for the preferences
-        String provisionerName = null;
-        Map<ConfigParam,String> provisionerConfig = null;
-
-        CredentialStoreService.Client credentialStoreServiceClient = getCredentialStoreClient();
-        // Resolve any CRED_STORE_PASSWORD_TOKEN config parameters to passwords
-        Map<ConfigParam,String> resolvedConfig = new HashMap<>();
-        for (Map.Entry<ConfigParam,String> configEntry : provisionerConfig.entrySet() ) {
-            if (configEntry.getKey().getType() == ConfigParam.ConfigParamType.CRED_STORE_PASSWORD_TOKEN) {
-                try {
-                    PasswordCredential password = credentialStoreServiceClient.getPasswordCredential(configEntry.getValue(), gatewayId);
-                    resolvedConfig.put(configEntry.getKey(), password.getPassword());
-                } catch (TException e) {
-                    throw new RuntimeException("Failed to get password needed to configure " + provisionerName);
-                }
-            } else {
-                resolvedConfig.put(configEntry.getKey(), configEntry.getValue());
-            }
+        if (!computeResourcePreference.isSetSshAccountProvisioner()) {
+            // TODO: provide better exception?
+            throw new RuntimeException("Compute resource [" + computeResourceId + "] does not have an SSH Account Provisioner configured for it.");
         }
+        String provisionerName = computeResourcePreference.getSshAccountProvisioner();
+        Map<ConfigParam,String> provisionerConfig = convertConfigParams(provisionerName, computeResourcePreference.getSshAccountProvisionerConfig());
+
+        Map<ConfigParam, String> resolvedConfig = resolveProvisionerConfig(gatewayId, provisionerName, provisionerConfig);
 
         // instantiate and init the account provisioner
         SSHAccountProvisioner sshAccountProvisioner = SSHAccountProvisionerFactory.createSSHAccountProvisioner(provisionerName, resolvedConfig);
@@ -70,23 +75,72 @@ public class SSHAccountManager {
         boolean hasAccount = sshAccountProvisioner.hasAccount(username);
 
         if (!hasAccount && !sshAccountProvisioner.canCreateAccount()) {
-            // TODO: throw an exception
+            // TODO: provide better exception
+            throw new RuntimeException("User [" + username + "] doesn't have account and [" + provisionerName + "] doesn't support creating account.");
         }
 
         // TODO: first check if SSH key is already installed, or do we care?
 
         // Install SSH key
+        sshAccountProvisioner.installSSHKey(username, sshCredential.getPublicKey());
 
         // Verify can authenticate to host
+        boolean validated = SSHUtil.validate(username, computeResourceDescription.getHostName(), 22, sshCredential);
+        if (!validated) {
+            throw new RuntimeException("Failed to validate installation of key for [" + username
+                    + "] on [" + computeResourceDescription.getHostName() + "] using SSH Account Provisioner ["
+                    + computeResourcePreference.getSshAccountProvisioner() + "]");
+        }
 
         // create the scratch location on the host
+        // TODO: create the scratch location
         String scratchLocation = sshAccountProvisioner.getScratchLocation(username);
     }
 
-    private static RegistryService.Client getRegistryServiceClient() throws RegistryServiceException {
+    private static Map<ConfigParam, String> resolveProvisionerConfig(String gatewayId, String provisionerName, Map<ConfigParam, String> provisionerConfig) {
+        CredentialStoreService.Client credentialStoreServiceClient = null;
+        try {
+            credentialStoreServiceClient = getCredentialStoreClient();
+            // Resolve any CRED_STORE_PASSWORD_TOKEN config parameters to passwords
+            Map<ConfigParam, String> resolvedConfig = new HashMap<>();
+            for (Map.Entry<ConfigParam, String> configEntry : provisionerConfig.entrySet()) {
+                if (configEntry.getKey().getType() == ConfigParam.ConfigParamType.CRED_STORE_PASSWORD_TOKEN) {
+                    try {
+                        PasswordCredential password = credentialStoreServiceClient.getPasswordCredential(configEntry.getValue(), gatewayId);
+                        resolvedConfig.put(configEntry.getKey(), password.getPassword());
+                    } catch (TException e) {
+                        throw new RuntimeException("Failed to get password needed to configure " + provisionerName);
+                    }
+                } else {
+                    resolvedConfig.put(configEntry.getKey(), configEntry.getValue());
+                }
+            }
+            return resolvedConfig;
+        } finally {
+            if (credentialStoreServiceClient != null) {
+                if (credentialStoreServiceClient.getInputProtocol().getTransport().isOpen()) {
+                    credentialStoreServiceClient.getInputProtocol().getTransport().close();
+                }
+            }
+        }
+    }
+
+    private static Map<ConfigParam, String> convertConfigParams(String provisionerName, Map<SSHAccountProvisionerConfigParam, String> thriftConfigParams) {
+        List<ConfigParam> configParams = SSHAccountProvisionerFactory.getSSHAccountProvisionerConfigParams(provisionerName);
+        Map<String, ConfigParam> configParamMap = configParams.stream().collect(Collectors.toMap(ConfigParam::getName, Function.identity()));
 
-        // TODO: finish implementing
-        return RegistryServiceClientFactory.createRegistryClient(null, 0);
+        return thriftConfigParams.entrySet().stream().collect(Collectors.toMap(entry -> configParamMap.get(entry.getKey().getName()), entry -> entry.getValue()));
+    }
+
+    private static RegistryService.Client getRegistryServiceClient() {
+
+        try {
+            String registryServerHost = ServerSettings.getRegistryServerHost();
+            int registryServerPort = Integer.valueOf(ServerSettings.getRegistryServerPort());
+            return RegistryServiceClientFactory.createRegistryClient(registryServerHost, registryServerPort);
+        } catch (ApplicationSettingsException|RegistryServiceException e) {
+            throw new RuntimeException("Failed to create registry service client", e);
+        }
     }
 
     private static CredentialStoreService.Client getCredentialStoreClient() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/3d161b81/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHUtil.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHUtil.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHUtil.java
new file mode 100644
index 0000000..4b5452a
--- /dev/null
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHUtil.java
@@ -0,0 +1,83 @@
+/*
+ * 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.accountprovisioning;
+
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.Session;
+import org.apache.airavata.model.credential.store.SSHCredential;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.UUID;
+
+/**
+ * Created by machrist on 2/10/17.
+ */
+public class SSHUtil {
+
+    public static boolean validate(String username, String hostname, int port, SSHCredential sshCredential) {
+
+        JSch jSch = new JSch();
+        Session session = null;
+        try {
+            jSch.addIdentity(UUID.randomUUID().toString(), sshCredential.getPrivateKey().getBytes(), sshCredential.getPublicKey().getBytes(), sshCredential.getPassphrase().getBytes());
+            session = jSch.getSession(username, hostname, port);
+            java.util.Properties config = new java.util.Properties();
+            config.put("StrictHostKeyChecking", "no");
+            session.setConfig(config);
+            session.connect();
+            return true;
+        } catch (JSchException e) {
+            throw new RuntimeException(e.getMessage(), e);
+        } finally {
+            if (session != null && session.isConnected()) {
+                session.disconnect();
+            }
+        }
+    }
+
+    public static void main(String[] args) throws JSchException {
+
+        // Test the validate method
+        String username = System.getProperty("user.name");
+        String privateKeyFilepath = System.getProperty("user.home") + "/.ssh/id_rsa";
+        String publicKeyFilepath = privateKeyFilepath + ".pub";
+        String passphrase = "changeme";
+        String hostname = "changeme";
+
+        Path privateKeyPath = Paths.get(privateKeyFilepath);
+        Path publicKeyPath = Paths.get(publicKeyFilepath);
+
+        SSHCredential sshCredential = new SSHCredential();
+        sshCredential.setPassphrase(passphrase);
+        try {
+            sshCredential.setPublicKey(new String(Files.readAllBytes(publicKeyPath), "UTF-8"));
+            sshCredential.setPrivateKey(new String(Files.readAllBytes(privateKeyPath), "UTF-8"));
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+        boolean result = validate(username, hostname, 22, sshCredential);
+        System.out.println(result);
+    }
+}


[35/40] airavata git commit: AIRAVATA-2500 data migration for new validated flag

Posted by ma...@apache.org.
AIRAVATA-2500 data migration for new validated flag


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

Branch: refs/heads/develop
Commit: ba4982c1fe90b841b250f085a5b536c21c4f3201
Parents: 29fedaf
Author: Marcus Christie <ma...@apache.org>
Authored: Mon Sep 25 10:38:28 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Mon Sep 25 10:38:28 2017 -0400

----------------------------------------------------------------------
 .../0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql           | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/ba4982c1/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql
----------------------------------------------------------------------
diff --git a/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql b/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql
index 04241e2..672b43b 100644
--- a/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql
+++ b/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql
@@ -31,4 +31,6 @@ CREATE TABLE SSH_ACCOUNT_PROVISIONER_CONFIG
         FOREIGN KEY (GATEWAY_ID, RESOURCE_ID) REFERENCES COMPUTE_RESOURCE_PREFERENCE (GATEWAY_ID, RESOURCE_ID) ON DELETE CASCADE
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
-alter table USER_COMPUTE_RESOURCE_PREFERENCE add VALIDATED tinyint(1) NOT NULL DEFAULT 0;
\ No newline at end of file
+alter table USER_COMPUTE_RESOURCE_PREFERENCE add VALIDATED tinyint(1) NOT NULL DEFAULT 0;
+-- VALIDATED defaults to false (0) but set all existing ones to be true (1)
+update USER_COMPUTE_RESOURCE_PREFERENCE set VALIDATED = 1;
\ No newline at end of file


[16/40] airavata git commit: AIRAVATA-2500 Thrift stub generation

Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/469a7e79/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 6214caf..d92d222 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
@@ -2626,27 +2626,27 @@ public class Airavata {
     public List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam> getSSHAccountProvisionerConfigParams(org.apache.airavata.model.security.AuthzToken authzToken, String provisionerName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
 
     /**
-     * Setup and return a UserComputeResourcePreference object for this user to SSH into the given compute resource with
-     * the given SSH credential. This method will only work if the compute resource has an SSHAccountProvisioner
-     * configured for it. The returned UserComputeResourcePreference object is not saved; it is up to the client to
-     * call addUserComputeResourcePreference to persist it.
+     * Check if user has an SSH account on the given compute resource. This
+     * method will only work if the compute resource has an SSHAccountProvisioner configured for it.
      * 
      * @param authzToken
      * @param computeResourceId
      * @param username
-     * @param airavataCredStoreToken
      */
-    public org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, String airavataCredStoreToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+    public boolean doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
 
     /**
-     * Check if user has an SSH account on the given compute resource. This
-     * method will only work if the compute resource has an SSHAccountProvisioner configured for it.
+     * Setup and return a UserComputeResourcePreference object for this user to SSH into the given compute resource with
+     * the given SSH credential. This method will only work if the compute resource has an SSHAccountProvisioner
+     * configured for it. The returned UserComputeResourcePreference object is not saved; it is up to the client to
+     * call addUserComputeResourcePreference to persist it.
      * 
      * @param authzToken
      * @param computeResourceId
      * @param username
+     * @param airavataCredStoreToken
      */
-    public boolean doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+    public org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, String airavataCredStoreToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
 
     /**
      * Register User Resource Profile.
@@ -3322,10 +3322,10 @@ public class Airavata {
 
     public void getSSHAccountProvisionerConfigParams(org.apache.airavata.model.security.AuthzToken authzToken, String provisionerName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
     public void doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
+    public void setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
     public void registerUserResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile userResourceProfile, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void getUserResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, String userId, String gatewayID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -8381,26 +8381,25 @@ public class Airavata {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSSHAccountProvisionerConfigParams failed: unknown result");
     }
 
-    public org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, String airavataCredStoreToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public boolean doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
     {
-      send_setupUserComputeResourcePreferencesForSSH(authzToken, computeResourceId, username, airavataCredStoreToken);
-      return recv_setupUserComputeResourcePreferencesForSSH();
+      send_doesUserHaveSSHAccount(authzToken, computeResourceId, username);
+      return recv_doesUserHaveSSHAccount();
     }
 
-    public void send_setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, String airavataCredStoreToken) throws org.apache.thrift.TException
+    public void send_doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username) throws org.apache.thrift.TException
     {
-      setupUserComputeResourcePreferencesForSSH_args args = new setupUserComputeResourcePreferencesForSSH_args();
+      doesUserHaveSSHAccount_args args = new doesUserHaveSSHAccount_args();
       args.setAuthzToken(authzToken);
       args.setComputeResourceId(computeResourceId);
       args.setUsername(username);
-      args.setAiravataCredStoreToken(airavataCredStoreToken);
-      sendBase("setupUserComputeResourcePreferencesForSSH", args);
+      sendBase("doesUserHaveSSHAccount", args);
     }
 
-    public org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference recv_setupUserComputeResourcePreferencesForSSH() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public boolean recv_doesUserHaveSSHAccount() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
     {
-      setupUserComputeResourcePreferencesForSSH_result result = new setupUserComputeResourcePreferencesForSSH_result();
-      receiveBase(result, "setupUserComputeResourcePreferencesForSSH");
+      doesUserHaveSSHAccount_result result = new doesUserHaveSSHAccount_result();
+      receiveBase(result, "doesUserHaveSSHAccount");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -8416,28 +8415,29 @@ public class Airavata {
       if (result.ae != null) {
         throw result.ae;
       }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setupUserComputeResourcePreferencesForSSH failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "doesUserHaveSSHAccount failed: unknown result");
     }
 
-    public boolean doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, String airavataCredStoreToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
     {
-      send_doesUserHaveSSHAccount(authzToken, computeResourceId, username);
-      return recv_doesUserHaveSSHAccount();
+      send_setupUserComputeResourcePreferencesForSSH(authzToken, computeResourceId, username, airavataCredStoreToken);
+      return recv_setupUserComputeResourcePreferencesForSSH();
     }
 
-    public void send_doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username) throws org.apache.thrift.TException
+    public void send_setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, String airavataCredStoreToken) throws org.apache.thrift.TException
     {
-      doesUserHaveSSHAccount_args args = new doesUserHaveSSHAccount_args();
+      setupUserComputeResourcePreferencesForSSH_args args = new setupUserComputeResourcePreferencesForSSH_args();
       args.setAuthzToken(authzToken);
       args.setComputeResourceId(computeResourceId);
       args.setUsername(username);
-      sendBase("doesUserHaveSSHAccount", args);
+      args.setAiravataCredStoreToken(airavataCredStoreToken);
+      sendBase("setupUserComputeResourcePreferencesForSSH", args);
     }
 
-    public boolean recv_doesUserHaveSSHAccount() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference recv_setupUserComputeResourcePreferencesForSSH() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
     {
-      doesUserHaveSSHAccount_result result = new doesUserHaveSSHAccount_result();
-      receiveBase(result, "doesUserHaveSSHAccount");
+      setupUserComputeResourcePreferencesForSSH_result result = new setupUserComputeResourcePreferencesForSSH_result();
+      receiveBase(result, "setupUserComputeResourcePreferencesForSSH");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -8453,7 +8453,7 @@ public class Airavata {
       if (result.ae != null) {
         throw result.ae;
       }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "doesUserHaveSSHAccount failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setupUserComputeResourcePreferencesForSSH failed: unknown result");
     }
 
     public String registerUserResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile userResourceProfile) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
@@ -14834,82 +14834,82 @@ public class Airavata {
       }
     }
 
-    public void setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      setupUserComputeResourcePreferencesForSSH_call method_call = new setupUserComputeResourcePreferencesForSSH_call(authzToken, computeResourceId, username, airavataCredStoreToken, resultHandler, this, ___protocolFactory, ___transport);
+      doesUserHaveSSHAccount_call method_call = new doesUserHaveSSHAccount_call(authzToken, computeResourceId, username, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class setupUserComputeResourcePreferencesForSSH_call extends org.apache.thrift.async.TAsyncMethodCall {
+    public static class doesUserHaveSSHAccount_call extends org.apache.thrift.async.TAsyncMethodCall {
       private org.apache.airavata.model.security.AuthzToken authzToken;
       private String computeResourceId;
       private String username;
-      private String airavataCredStoreToken;
-      public setupUserComputeResourcePreferencesForSSH_call(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, 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 {
+      public doesUserHaveSSHAccount_call(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, 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.authzToken = authzToken;
         this.computeResourceId = computeResourceId;
         this.username = username;
-        this.airavataCredStoreToken = airavataCredStoreToken;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setupUserComputeResourcePreferencesForSSH", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        setupUserComputeResourcePreferencesForSSH_args args = new setupUserComputeResourcePreferencesForSSH_args();
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("doesUserHaveSSHAccount", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        doesUserHaveSSHAccount_args args = new doesUserHaveSSHAccount_args();
         args.setAuthzToken(authzToken);
         args.setComputeResourceId(computeResourceId);
         args.setUsername(username);
-        args.setAiravataCredStoreToken(airavataCredStoreToken);
         args.write(prot);
         prot.writeMessageEnd();
       }
 
-      public org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
+      public boolean getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_setupUserComputeResourcePreferencesForSSH();
+        return (new Client(prot)).recv_doesUserHaveSSHAccount();
       }
     }
 
-    public void doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      doesUserHaveSSHAccount_call method_call = new doesUserHaveSSHAccount_call(authzToken, computeResourceId, username, resultHandler, this, ___protocolFactory, ___transport);
+      setupUserComputeResourcePreferencesForSSH_call method_call = new setupUserComputeResourcePreferencesForSSH_call(authzToken, computeResourceId, username, airavataCredStoreToken, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class doesUserHaveSSHAccount_call extends org.apache.thrift.async.TAsyncMethodCall {
+    public static class setupUserComputeResourcePreferencesForSSH_call extends org.apache.thrift.async.TAsyncMethodCall {
       private org.apache.airavata.model.security.AuthzToken authzToken;
       private String computeResourceId;
       private String username;
-      public doesUserHaveSSHAccount_call(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, 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 airavataCredStoreToken;
+      public setupUserComputeResourcePreferencesForSSH_call(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, 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 {
         super(client, protocolFactory, transport, resultHandler, false);
         this.authzToken = authzToken;
         this.computeResourceId = computeResourceId;
         this.username = username;
+        this.airavataCredStoreToken = airavataCredStoreToken;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("doesUserHaveSSHAccount", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        doesUserHaveSSHAccount_args args = new doesUserHaveSSHAccount_args();
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setupUserComputeResourcePreferencesForSSH", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        setupUserComputeResourcePreferencesForSSH_args args = new setupUserComputeResourcePreferencesForSSH_args();
         args.setAuthzToken(authzToken);
         args.setComputeResourceId(computeResourceId);
         args.setUsername(username);
+        args.setAiravataCredStoreToken(airavataCredStoreToken);
         args.write(prot);
         prot.writeMessageEnd();
       }
 
-      public boolean getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
+      public org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_doesUserHaveSSHAccount();
+        return (new Client(prot)).recv_setupUserComputeResourcePreferencesForSSH();
       }
     }
 
@@ -16420,8 +16420,8 @@ public class Airavata {
       processMap.put("deleteGatewayStoragePreference", new deleteGatewayStoragePreference());
       processMap.put("getSSHAccountProvisionerNames", new getSSHAccountProvisionerNames());
       processMap.put("getSSHAccountProvisionerConfigParams", new getSSHAccountProvisionerConfigParams());
-      processMap.put("setupUserComputeResourcePreferencesForSSH", new setupUserComputeResourcePreferencesForSSH());
       processMap.put("doesUserHaveSSHAccount", new doesUserHaveSSHAccount());
+      processMap.put("setupUserComputeResourcePreferencesForSSH", new setupUserComputeResourcePreferencesForSSH());
       processMap.put("registerUserResourceProfile", new registerUserResourceProfile());
       processMap.put("getUserResourceProfile", new getUserResourceProfile());
       processMap.put("updateUserResourceProfile", new updateUserResourceProfile());
@@ -20567,23 +20567,24 @@ public class Airavata {
       }
     }
 
-    public static class setupUserComputeResourcePreferencesForSSH<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setupUserComputeResourcePreferencesForSSH_args> {
-      public setupUserComputeResourcePreferencesForSSH() {
-        super("setupUserComputeResourcePreferencesForSSH");
+    public static class doesUserHaveSSHAccount<I extends Iface> extends org.apache.thrift.ProcessFunction<I, doesUserHaveSSHAccount_args> {
+      public doesUserHaveSSHAccount() {
+        super("doesUserHaveSSHAccount");
       }
 
-      public setupUserComputeResourcePreferencesForSSH_args getEmptyArgsInstance() {
-        return new setupUserComputeResourcePreferencesForSSH_args();
+      public doesUserHaveSSHAccount_args getEmptyArgsInstance() {
+        return new doesUserHaveSSHAccount_args();
       }
 
       protected boolean isOneway() {
         return false;
       }
 
-      public setupUserComputeResourcePreferencesForSSH_result getResult(I iface, setupUserComputeResourcePreferencesForSSH_args args) throws org.apache.thrift.TException {
-        setupUserComputeResourcePreferencesForSSH_result result = new setupUserComputeResourcePreferencesForSSH_result();
+      public doesUserHaveSSHAccount_result getResult(I iface, doesUserHaveSSHAccount_args args) throws org.apache.thrift.TException {
+        doesUserHaveSSHAccount_result result = new doesUserHaveSSHAccount_result();
         try {
-          result.success = iface.setupUserComputeResourcePreferencesForSSH(args.authzToken, args.computeResourceId, args.username, args.airavataCredStoreToken);
+          result.success = iface.doesUserHaveSSHAccount(args.authzToken, args.computeResourceId, args.username);
+          result.setSuccessIsSet(true);
         } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
           result.ire = ire;
         } catch (org.apache.airavata.model.error.AiravataClientException ace) {
@@ -20597,24 +20598,23 @@ public class Airavata {
       }
     }
 
-    public static class doesUserHaveSSHAccount<I extends Iface> extends org.apache.thrift.ProcessFunction<I, doesUserHaveSSHAccount_args> {
-      public doesUserHaveSSHAccount() {
-        super("doesUserHaveSSHAccount");
+    public static class setupUserComputeResourcePreferencesForSSH<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setupUserComputeResourcePreferencesForSSH_args> {
+      public setupUserComputeResourcePreferencesForSSH() {
+        super("setupUserComputeResourcePreferencesForSSH");
       }
 
-      public doesUserHaveSSHAccount_args getEmptyArgsInstance() {
-        return new doesUserHaveSSHAccount_args();
+      public setupUserComputeResourcePreferencesForSSH_args getEmptyArgsInstance() {
+        return new setupUserComputeResourcePreferencesForSSH_args();
       }
 
       protected boolean isOneway() {
         return false;
       }
 
-      public doesUserHaveSSHAccount_result getResult(I iface, doesUserHaveSSHAccount_args args) throws org.apache.thrift.TException {
-        doesUserHaveSSHAccount_result result = new doesUserHaveSSHAccount_result();
+      public setupUserComputeResourcePreferencesForSSH_result getResult(I iface, setupUserComputeResourcePreferencesForSSH_args args) throws org.apache.thrift.TException {
+        setupUserComputeResourcePreferencesForSSH_result result = new setupUserComputeResourcePreferencesForSSH_result();
         try {
-          result.success = iface.doesUserHaveSSHAccount(args.authzToken, args.computeResourceId, args.username);
-          result.setSuccessIsSet(true);
+          result.success = iface.setupUserComputeResourcePreferencesForSSH(args.authzToken, args.computeResourceId, args.username, args.airavataCredStoreToken);
         } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
           result.ire = ire;
         } catch (org.apache.airavata.model.error.AiravataClientException ace) {
@@ -21869,8 +21869,8 @@ public class Airavata {
       processMap.put("deleteGatewayStoragePreference", new deleteGatewayStoragePreference());
       processMap.put("getSSHAccountProvisionerNames", new getSSHAccountProvisionerNames());
       processMap.put("getSSHAccountProvisionerConfigParams", new getSSHAccountProvisionerConfigParams());
-      processMap.put("setupUserComputeResourcePreferencesForSSH", new setupUserComputeResourcePreferencesForSSH());
       processMap.put("doesUserHaveSSHAccount", new doesUserHaveSSHAccount());
+      processMap.put("setupUserComputeResourcePreferencesForSSH", new setupUserComputeResourcePreferencesForSSH());
       processMap.put("registerUserResourceProfile", new registerUserResourceProfile());
       processMap.put("getUserResourceProfile", new getUserResourceProfile());
       processMap.put("updateUserResourceProfile", new updateUserResourceProfile());
@@ -31695,21 +31695,22 @@ public class Airavata {
       }
     }
 
-    public static class setupUserComputeResourcePreferencesForSSH<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setupUserComputeResourcePreferencesForSSH_args, org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> {
-      public setupUserComputeResourcePreferencesForSSH() {
-        super("setupUserComputeResourcePreferencesForSSH");
+    public static class doesUserHaveSSHAccount<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, doesUserHaveSSHAccount_args, Boolean> {
+      public doesUserHaveSSHAccount() {
+        super("doesUserHaveSSHAccount");
       }
 
-      public setupUserComputeResourcePreferencesForSSH_args getEmptyArgsInstance() {
-        return new setupUserComputeResourcePreferencesForSSH_args();
+      public doesUserHaveSSHAccount_args getEmptyArgsInstance() {
+        return new doesUserHaveSSHAccount_args();
       }
 
-      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>() { 
-          public void onComplete(org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference o) {
-            setupUserComputeResourcePreferencesForSSH_result result = new setupUserComputeResourcePreferencesForSSH_result();
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            doesUserHaveSSHAccount_result result = new doesUserHaveSSHAccount_result();
             result.success = o;
+            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -31721,7 +31722,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            setupUserComputeResourcePreferencesForSSH_result result = new setupUserComputeResourcePreferencesForSSH_result();
+            doesUserHaveSSHAccount_result result = new doesUserHaveSSHAccount_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31762,27 +31763,26 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, setupUserComputeResourcePreferencesForSSH_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> resultHandler) throws TException {
-        iface.setupUserComputeResourcePreferencesForSSH(args.authzToken, args.computeResourceId, args.username, args.airavataCredStoreToken,resultHandler);
+      public void start(I iface, doesUserHaveSSHAccount_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.doesUserHaveSSHAccount(args.authzToken, args.computeResourceId, args.username,resultHandler);
       }
     }
 
-    public static class doesUserHaveSSHAccount<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, doesUserHaveSSHAccount_args, Boolean> {
-      public doesUserHaveSSHAccount() {
-        super("doesUserHaveSSHAccount");
+    public static class setupUserComputeResourcePreferencesForSSH<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setupUserComputeResourcePreferencesForSSH_args, org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> {
+      public setupUserComputeResourcePreferencesForSSH() {
+        super("setupUserComputeResourcePreferencesForSSH");
       }
 
-      public doesUserHaveSSHAccount_args getEmptyArgsInstance() {
-        return new doesUserHaveSSHAccount_args();
+      public setupUserComputeResourcePreferencesForSSH_args getEmptyArgsInstance() {
+        return new setupUserComputeResourcePreferencesForSSH_args();
       }
 
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            doesUserHaveSSHAccount_result result = new doesUserHaveSSHAccount_result();
+        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>() { 
+          public void onComplete(org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference o) {
+            setupUserComputeResourcePreferencesForSSH_result result = new setupUserComputeResourcePreferencesForSSH_result();
             result.success = o;
-            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -31794,7 +31794,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            doesUserHaveSSHAccount_result result = new doesUserHaveSSHAccount_result();
+            setupUserComputeResourcePreferencesForSSH_result result = new setupUserComputeResourcePreferencesForSSH_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31835,8 +31835,8 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, doesUserHaveSSHAccount_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.doesUserHaveSSHAccount(args.authzToken, args.computeResourceId, args.username,resultHandler);
+      public void start(I iface, setupUserComputeResourcePreferencesForSSH_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> resultHandler) throws TException {
+        iface.setupUserComputeResourcePreferencesForSSH(args.authzToken, args.computeResourceId, args.username, args.airavataCredStoreToken,resultHandler);
       }
     }
 
@@ -215889,31 +215889,28 @@ public class Airavata {
 
   }
 
-  public static class setupUserComputeResourcePreferencesForSSH_args implements org.apache.thrift.TBase<setupUserComputeResourcePreferencesForSSH_args, setupUserComputeResourcePreferencesForSSH_args._Fields>, java.io.Serializable, Cloneable, Comparable<setupUserComputeResourcePreferencesForSSH_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setupUserComputeResourcePreferencesForSSH_args");
+  public static class doesUserHaveSSHAccount_args implements org.apache.thrift.TBase<doesUserHaveSSHAccount_args, doesUserHaveSSHAccount_args._Fields>, java.io.Serializable, Cloneable, Comparable<doesUserHaveSSHAccount_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("doesUserHaveSSHAccount_args");
 
     private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
     private static final org.apache.thrift.protocol.TField COMPUTE_RESOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("computeResourceId", org.apache.thrift.protocol.TType.STRING, (short)2);
     private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)3);
-    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)4);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new setupUserComputeResourcePreferencesForSSH_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new setupUserComputeResourcePreferencesForSSH_argsTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new doesUserHaveSSHAccount_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new doesUserHaveSSHAccount_argsTupleSchemeFactory());
     }
 
     public org.apache.airavata.model.security.AuthzToken authzToken; // required
     public String computeResourceId; // required
     public String username; // required
-    public String airavataCredStoreToken; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
       AUTHZ_TOKEN((short)1, "authzToken"),
       COMPUTE_RESOURCE_ID((short)2, "computeResourceId"),
-      USERNAME((short)3, "username"),
-      AIRAVATA_CRED_STORE_TOKEN((short)4, "airavataCredStoreToken");
+      USERNAME((short)3, "username");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -215934,8 +215931,6 @@ public class Airavata {
             return COMPUTE_RESOURCE_ID;
           case 3: // USERNAME
             return USERNAME;
-          case 4: // AIRAVATA_CRED_STORE_TOKEN
-            return AIRAVATA_CRED_STORE_TOKEN;
           default:
             return null;
         }
@@ -215985,32 +215980,28 @@ public class Airavata {
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.REQUIRED, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      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)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setupUserComputeResourcePreferencesForSSH_args.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(doesUserHaveSSHAccount_args.class, metaDataMap);
     }
 
-    public setupUserComputeResourcePreferencesForSSH_args() {
+    public doesUserHaveSSHAccount_args() {
     }
 
-    public setupUserComputeResourcePreferencesForSSH_args(
+    public doesUserHaveSSHAccount_args(
       org.apache.airavata.model.security.AuthzToken authzToken,
       String computeResourceId,
-      String username,
-      String airavataCredStoreToken)
+      String username)
     {
       this();
       this.authzToken = authzToken;
       this.computeResourceId = computeResourceId;
       this.username = username;
-      this.airavataCredStoreToken = airavataCredStoreToken;
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public setupUserComputeResourcePreferencesForSSH_args(setupUserComputeResourcePreferencesForSSH_args other) {
+    public doesUserHaveSSHAccount_args(doesUserHaveSSHAccount_args other) {
       if (other.isSetAuthzToken()) {
         this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
       }
@@ -216020,13 +216011,10 @@ public class Airavata {
       if (other.isSetUsername()) {
         this.username = other.username;
       }
-      if (other.isSetAiravataCredStoreToken()) {
-        this.airavataCredStoreToken = other.airavataCredStoreToken;
-      }
     }
 
-    public setupUserComputeResourcePreferencesForSSH_args deepCopy() {
-      return new setupUserComputeResourcePreferencesForSSH_args(this);
+    public doesUserHaveSSHAccount_args deepCopy() {
+      return new doesUserHaveSSHAccount_args(this);
     }
 
     @Override
@@ -216034,14 +216022,13 @@ public class Airavata {
       this.authzToken = null;
       this.computeResourceId = null;
       this.username = null;
-      this.airavataCredStoreToken = null;
     }
 
     public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
       return this.authzToken;
     }
 
-    public setupUserComputeResourcePreferencesForSSH_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
+    public doesUserHaveSSHAccount_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
       this.authzToken = authzToken;
       return this;
     }
@@ -216065,7 +216052,7 @@ public class Airavata {
       return this.computeResourceId;
     }
 
-    public setupUserComputeResourcePreferencesForSSH_args setComputeResourceId(String computeResourceId) {
+    public doesUserHaveSSHAccount_args setComputeResourceId(String computeResourceId) {
       this.computeResourceId = computeResourceId;
       return this;
     }
@@ -216089,7 +216076,7 @@ public class Airavata {
       return this.username;
     }
 
-    public setupUserComputeResourcePreferencesForSSH_args setUsername(String username) {
+    public doesUserHaveSSHAccount_args setUsername(String username) {
       this.username = username;
       return this;
     }
@@ -216109,30 +216096,6 @@ public class Airavata {
       }
     }
 
-    public String getAiravataCredStoreToken() {
-      return this.airavataCredStoreToken;
-    }
-
-    public setupUserComputeResourcePreferencesForSSH_args setAiravataCredStoreToken(String airavataCredStoreToken) {
-      this.airavataCredStoreToken = airavataCredStoreToken;
-      return this;
-    }
-
-    public void unsetAiravataCredStoreToken() {
-      this.airavataCredStoreToken = null;
-    }
-
-    /** Returns true if field airavataCredStoreToken is set (has been assigned a value) and false otherwise */
-    public boolean isSetAiravataCredStoreToken() {
-      return this.airavataCredStoreToken != null;
-    }
-
-    public void setAiravataCredStoreTokenIsSet(boolean value) {
-      if (!value) {
-        this.airavataCredStoreToken = null;
-      }
-    }
-
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
       case AUTHZ_TOKEN:
@@ -216159,14 +216122,6 @@ public class Airavata {
         }
         break;
 
-      case AIRAVATA_CRED_STORE_TOKEN:
-        if (value == null) {
-          unsetAiravataCredStoreToken();
-        } else {
-          setAiravataCredStoreToken((String)value);
-        }
-        break;
-
       }
     }
 
@@ -216181,9 +216136,6 @@ public class Airavata {
       case USERNAME:
         return getUsername();
 
-      case AIRAVATA_CRED_STORE_TOKEN:
-        return getAiravataCredStoreToken();
-
       }
       throw new IllegalStateException();
     }
@@ -216201,8 +216153,6 @@ public class Airavata {
         return isSetComputeResourceId();
       case USERNAME:
         return isSetUsername();
-      case AIRAVATA_CRED_STORE_TOKEN:
-        return isSetAiravataCredStoreToken();
       }
       throw new IllegalStateException();
     }
@@ -216211,12 +216161,12 @@ public class Airavata {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof setupUserComputeResourcePreferencesForSSH_args)
-        return this.equals((setupUserComputeResourcePreferencesForSSH_args)that);
+      if (that instanceof doesUserHaveSSHAccount_args)
+        return this.equals((doesUserHaveSSHAccount_args)that);
       return false;
     }
 
-    public boolean equals(setupUserComputeResourcePreferencesForSSH_args that) {
+    public boolean equals(doesUserHaveSSHAccount_args that) {
       if (that == null)
         return false;
 
@@ -216247,15 +216197,6 @@ public class Airavata {
           return false;
       }
 
-      boolean this_present_airavataCredStoreToken = true && this.isSetAiravataCredStoreToken();
-      boolean that_present_airavataCredStoreToken = true && that.isSetAiravataCredStoreToken();
-      if (this_present_airavataCredStoreToken || that_present_airavataCredStoreToken) {
-        if (!(this_present_airavataCredStoreToken && that_present_airavataCredStoreToken))
-          return false;
-        if (!this.airavataCredStoreToken.equals(that.airavataCredStoreToken))
-          return false;
-      }
-
       return true;
     }
 
@@ -216278,16 +216219,11 @@ public class Airavata {
       if (present_username)
         list.add(username);
 
-      boolean present_airavataCredStoreToken = true && (isSetAiravataCredStoreToken());
-      list.add(present_airavataCredStoreToken);
-      if (present_airavataCredStoreToken)
-        list.add(airavataCredStoreToken);
-
       return list.hashCode();
     }
 
     @Override
-    public int compareTo(setupUserComputeResourcePreferencesForSSH_args other) {
+    public int compareTo(doesUserHaveSSHAccount_args other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
@@ -216324,16 +216260,6 @@ public class Airavata {
           return lastComparison;
         }
       }
-      lastComparison = Boolean.valueOf(isSetAiravataCredStoreToken()).compareTo(other.isSetAiravataCredStoreToken());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetAiravataCredStoreToken()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airavataCredStoreToken, other.airavataCredStoreToken);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
       return 0;
     }
 
@@ -216351,7 +216277,7 @@ public class Airavata {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("setupUserComputeResourcePreferencesForSSH_args(");
+      StringBuilder sb = new StringBuilder("doesUserHaveSSHAccount_args(");
       boolean first = true;
 
       sb.append("authzToken:");
@@ -216377,14 +216303,6 @@ public class Airavata {
         sb.append(this.username);
       }
       first = false;
-      if (!first) sb.append(", ");
-      sb.append("airavataCredStoreToken:");
-      if (this.airavataCredStoreToken == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.airavataCredStoreToken);
-      }
-      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -216400,9 +216318,6 @@ public class Airavata {
       if (username == null) {
         throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' was not present! Struct: " + toString());
       }
-      if (airavataCredStoreToken == null) {
-        throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataCredStoreToken' was not present! Struct: " + toString());
-      }
       // check for sub-struct validity
       if (authzToken != null) {
         authzToken.validate();
@@ -216425,15 +216340,15 @@ public class Airavata {
       }
     }
 
-    private static class setupUserComputeResourcePreferencesForSSH_argsStandardSchemeFactory implements SchemeFactory {
-      public setupUserComputeResourcePreferencesForSSH_argsStandardScheme getScheme() {
-        return new setupUserComputeResourcePreferencesForSSH_argsStandardScheme();
+    private static class doesUserHaveSSHAccount_argsStandardSchemeFactory implements SchemeFactory {
+      public doesUserHaveSSHAccount_argsStandardScheme getScheme() {
+        return new doesUserHaveSSHAccount_argsStandardScheme();
       }
     }
 
-    private static class setupUserComputeResourcePreferencesForSSH_argsStandardScheme extends StandardScheme<setupUserComputeResourcePreferencesForSSH_args> {
+    private static class doesUserHaveSSHAccount_argsStandardScheme extends StandardScheme<doesUserHaveSSHAccount_args> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, setupUserComputeResourcePreferencesForSSH_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, doesUserHaveSSHAccount_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -216468,14 +216383,6 @@ public class Airavata {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
-            case 4: // AIRAVATA_CRED_STORE_TOKEN
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-                struct.airavataCredStoreToken = iprot.readString();
-                struct.setAiravataCredStoreTokenIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
             default:
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
           }
@@ -216487,7 +216394,7 @@ public class Airavata {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, setupUserComputeResourcePreferencesForSSH_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, doesUserHaveSSHAccount_args struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
@@ -216506,36 +216413,30 @@ public class Airavata {
           oprot.writeString(struct.username);
           oprot.writeFieldEnd();
         }
-        if (struct.airavataCredStoreToken != null) {
-          oprot.writeFieldBegin(AIRAVATA_CRED_STORE_TOKEN_FIELD_DESC);
-          oprot.writeString(struct.airavataCredStoreToken);
-          oprot.writeFieldEnd();
-        }
         oprot.writeFieldStop();
         oprot.writeStructEnd();
       }
 
     }
 
-    private static class setupUserComputeResourcePreferencesForSSH_argsTupleSchemeFactory implements SchemeFactory {
-      public setupUserComputeResourcePreferencesForSSH_argsTupleScheme getScheme() {
-        return new setupUserComputeResourcePreferencesForSSH_argsTupleScheme();
+    private static class doesUserHaveSSHAccount_argsTupleSchemeFactory implements SchemeFactory {
+      public doesUserHaveSSHAccount_argsTupleScheme getScheme() {
+        return new doesUserHaveSSHAccount_argsTupleScheme();
       }
     }
 
-    private static class setupUserComputeResourcePreferencesForSSH_argsTupleScheme extends TupleScheme<setupUserComputeResourcePreferencesForSSH_args> {
+    private static class doesUserHaveSSHAccount_argsTupleScheme extends TupleScheme<doesUserHaveSSHAccount_args> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, setupUserComputeResourcePreferencesForSSH_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, doesUserHaveSSHAccount_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         struct.authzToken.write(oprot);
         oprot.writeString(struct.computeResourceId);
         oprot.writeString(struct.username);
-        oprot.writeString(struct.airavataCredStoreToken);
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, setupUserComputeResourcePreferencesForSSH_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, doesUserHaveSSHAccount_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
         struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
         struct.authzToken.read(iprot);
@@ -216544,17 +216445,15 @@ public class Airavata {
         struct.setComputeResourceIdIsSet(true);
         struct.username = iprot.readString();
         struct.setUsernameIsSet(true);
-        struct.airavataCredStoreToken = iprot.readString();
-        struct.setAiravataCredStoreTokenIsSet(true);
       }
     }
 
   }
 
-  public static class setupUserComputeResourcePreferencesForSSH_result implements org.apache.thrift.TBase<setupUserComputeResourcePreferencesForSSH_result, setupUserComputeResourcePreferencesForSSH_result._Fields>, java.io.Serializable, Cloneable, Comparable<setupUserComputeResourcePreferencesForSSH_result>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setupUserComputeResourcePreferencesForSSH_result");
+  public static class doesUserHaveSSHAccount_result implements org.apache.thrift.TBase<doesUserHaveSSHAccount_result, doesUserHaveSSHAccount_result._Fields>, java.io.Serializable, Cloneable, Comparable<doesUserHaveSSHAccount_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("doesUserHaveSSHAccount_result");
 
-    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
     private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1);
     private static final org.apache.thrift.protocol.TField ACE_FIELD_DESC = new org.apache.thrift.protocol.TField("ace", org.apache.thrift.protocol.TType.STRUCT, (short)2);
     private static final org.apache.thrift.protocol.TField ASE_FIELD_DESC = new org.apache.thrift.protocol.TField("ase", org.apache.thrift.protocol.TType.STRUCT, (short)3);
@@ -216562,11 +216461,11 @@ public class Airavata {
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new setupUserComputeResourcePreferencesForSSH_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new setupUserComputeResourcePreferencesForSSH_resultTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new doesUserHaveSSHAccount_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new doesUserHaveSSHAccount_resultTupleSchemeFactory());
     }
 
-    public org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference success; // required
+    public boolean success; // required
     public org.apache.airavata.model.error.InvalidRequestException ire; // required
     public org.apache.airavata.model.error.AiravataClientException ace; // required
     public org.apache.airavata.model.error.AiravataSystemException ase; // required
@@ -216643,11 +216542,13 @@ public class Airavata {
     }
 
     // isset id assignments
+    private static final int __SUCCESS_ISSET_ID = 0;
+    private byte __isset_bitfield = 0;
     public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
     static {
       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference.class)));
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
       tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
       tmpMap.put(_Fields.ACE, new org.apache.thrift.meta_data.FieldMetaData("ace", org.apache.thrift.TFieldRequirementType.DEFAULT, 
@@ -216657,14 +216558,14 @@ public class Airavata {
       tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setupUserComputeResourcePreferencesForSSH_result.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(doesUserHaveSSHAccount_result.class, metaDataMap);
     }
 
-    public setupUserComputeResourcePreferencesForSSH_result() {
+    public doesUserHaveSSHAccount_result() {
     }
 
-    public setupUserComputeResourcePreferencesForSSH_result(
-      org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference success,
+    public doesUserHaveSSHAccount_result(
+      boolean success,
       org.apache.airavata.model.error.InvalidRequestException ire,
       org.apache.airavata.model.error.AiravataClientException ace,
       org.apache.airavata.model.error.AiravataSystemException ase,
@@ -216672,6 +216573,7 @@ public class Airavata {
     {
       this();
       this.success = success;
+      setSuccessIsSet(true);
       this.ire = ire;
       this.ace = ace;
       this.ase = ase;
@@ -216681,10 +216583,9 @@ public class Airavata {
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public setupUserComputeResourcePreferencesForSSH_result(setupUserComputeResourcePreferencesForSSH_result other) {
-      if (other.isSetSuccess()) {
-        this.success = new org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference(other.success);
-      }
+    public doesUserHaveSSHAccount_result(doesUserHaveSSHAccount_result other) {
+      __isset_bitfield = other.__isset_bitfield;
+      this.success = other.success;
       if (other.isSetIre()) {
         this.ire = new org.apache.airavata.model.error.InvalidRequestException(other.ire);
       }
@@ -216699,48 +216600,48 @@ public class Airavata {
       }
     }
 
-    public setupUserComputeResourcePreferencesForSSH_result deepCopy() {
-      return new setupUserComputeResourcePreferencesForSSH_result(this);
+    public doesUserHaveSSHAccount_result deepCopy() {
+      return new doesUserHaveSSHAccount_result(this);
     }
 
     @Override
     public void clear() {
-      this.success = null;
+      setSuccessIsSet(false);
+      this.success = false;
       this.ire = null;
       this.ace = null;
       this.ase = null;
       this.ae = null;
     }
 
-    public org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference getSuccess() {
+    public boolean isSuccess() {
       return this.success;
     }
 
-    public setupUserComputeResourcePreferencesForSSH_result setSuccess(org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference success) {
+    public doesUserHaveSSHAccount_result setSuccess(boolean success) {
       this.success = success;
+      setSuccessIsSet(true);
       return this;
     }
 
     public void unsetSuccess() {
-      this.success = null;
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
     }
 
     /** Returns true if field success is set (has been assigned a value) and false otherwise */
     public boolean isSetSuccess() {
-      return this.success != null;
+      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
     }
 
     public void setSuccessIsSet(boolean value) {
-      if (!value) {
-        this.success = null;
-      }
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
     }
 
     public org.apache.airavata.model.error.InvalidRequestException getIre() {
       return this.ire;
     }
 
-    public setupUserComputeResourcePreferencesForSSH_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) {
+    public doesUserHaveSSHAccount_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) {
       this.ire = ire;
       return this;
     }
@@ -216764,7 +216665,7 @@ public class Airavata {
       return this.ace;
     }
 
-    public setupUserComputeResourcePreferencesForSSH_result setAce(org.apache.airavata.model.error.AiravataClientException ace) {
+    public doesUserHaveSSHAccount_result setAce(org.apache.airavata.model.error.AiravataClientException ace) {
       this.ace = ace;
       return this;
     }
@@ -216788,7 +216689,7 @@ public class Airavata {
       return this.ase;
     }
 
-    public setupUserComputeResourcePreferencesForSSH_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) {
+    public doesUserHaveSSHAccount_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) {
       this.ase = ase;
       return this;
     }
@@ -216812,7 +216713,7 @@ public class Airavata {
       return this.ae;
     }
 
-    public setupUserComputeResourcePreferencesForSSH_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
+    public doesUserHaveSSHAccount_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
       this.ae = ae;
       return this;
     }
@@ -216838,7 +216739,7 @@ public class Airavata {
         if (value == null) {
           unsetSuccess();
         } else {
-          setSuccess((org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference)value);
+          setSuccess((Boolean)value);
         }
         break;
 
@@ -216880,7 +216781,7 @@ public class Airavata {
     public Object getFieldValue(_Fields field) {
       switch (field) {
       case SUCCESS:
-        return getSuccess();
+        return isSuccess();
 
       case IRE:
         return getIre();
@@ -216923,21 +216824,21 @@ public class Airavata {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof setupUserComputeResourcePreferencesForSSH_result)
-        return this.equals((setupUserComputeResourcePreferencesForSSH_result)that);
+      if (that instanceof doesUserHaveSSHAccount_result)
+        return this.equals((doesUserHaveSSHAccount_result)that);
       return false;
     }
 
-    public boolean equals(setupUserComputeResourcePreferencesForSSH_result that) {
+    public boolean equals(doesUserHaveSSHAccount_result that) {
       if (that == null)
         return false;
 
-      boolean this_present_success = true && this.isSetSuccess();
-      boolean that_present_success = true && that.isSetSuccess();
+      boolean this_present_success = true;
+      boolean that_present_success = true;
       if (this_present_success || that_present_success) {
         if (!(this_present_success && that_present_success))
           return false;
-        if (!this.success.equals(that.success))
+        if (this.success != that.success)
           return false;
       }
 
@@ -216984,7 +216885,7 @@ public class Airavata {
     public int hashCode() {
       List<Object> list = new ArrayList<Object>();
 
-      boolean present_success = true && (isSetSuccess());
+      boolean present_success = true;
       list.add(present_success);
       if (present_success)
         list.add(success);
@@ -217013,7 +216914,7 @@ public class Airavata {
     }
 
     @Override
-    public int compareTo(setupUserComputeResourcePreferencesForSSH_result other) {
+    public int compareTo(doesUserHaveSSHAccount_result other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
@@ -217087,15 +216988,11 @@ public class Airavata {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("setupUserComputeResourcePreferencesForSSH_result(");
+      StringBuilder sb = new StringBuilder("doesUserHaveSSHAccount_result(");
       boolean first = true;
 
       sb.append("success:");
-      if (this.success == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.success);
-      }
+      sb.append(this.success);
       first = false;
       if (!first) sb.append(", ");
       sb.append("ire:");
@@ -217136,9 +217033,6 @@ public class Airavata {
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
       // check for sub-struct validity
-      if (success != null) {
-        success.validate();
-      }
     }
 
     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -217151,21 +217045,23 @@ public class Airavata {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
       try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+        __isset_bitfield = 0;
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
       }
     }
 
-    private static class setupUserComputeResourcePreferencesForSSH_resultStandardSchemeFactory implements SchemeFactory {
-      public setupUserComputeResourcePreferencesForSSH_resultStandardScheme getScheme() {
-        return new setupUserComputeResourcePreferencesForSSH_resultStandardScheme();
+    private static class doesUserHaveSSHAccount_resultStandardSchemeFactory implements SchemeFactory {
+      public doesUserHaveSSHAccount_resultStandardScheme getScheme() {
+        return new doesUserHaveSSHAccount_resultStandardScheme();
       }
     }
 
-    private static class setupUserComputeResourcePreferencesForSSH_resultStandardScheme extends StandardScheme<setupUserComputeResourcePreferencesForSSH_result> {
+    private static class doesUserHaveSSHAccount_resultStandardScheme extends StandardScheme<doesUserHaveSSHAccount_result> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, setupUserComputeResourcePreferencesForSSH_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, doesUserHaveSSHAccount_result struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -217176,9 +217072,8 @@ public class Airavata {
           }
           switch (schemeField.id) {
             case 0: // SUCCESS
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.success = new org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference();
-                struct.success.read(iprot);
+              if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+                struct.success = iprot.readBool();
                 struct.setSuccessIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
@@ -217231,13 +217126,13 @@ public class Airavata {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, setupUserComputeResourcePreferencesForSSH_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, doesUserHaveSSHAccount_result struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.success != null) {
+        if (struct.isSetSuccess()) {
           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-          struct.success.write(oprot);
+          oprot.writeBool(struct.success);
           oprot.writeFieldEnd();
         }
         if (struct.ire != null) {
@@ -217266,16 +217161,16 @@ public class Airavata {
 
     }
 
-    private static class setupUserComputeResourcePreferencesForSSH_resultTupleSchemeFactory implements SchemeFactory {
-      public setupUserComputeResourcePreferencesForSSH_resultTupleScheme getScheme() {
-        return new setupUserComputeResourcePreferencesForSSH_resultTupleScheme();
+    private static class doesUserHaveSSHAccount_resultTupleSchemeFactory implements SchemeFactory {
+      public doesUserHaveSSHAccount_resultTupleScheme getScheme() {
+        return new doesUserHaveSSHAccount_resultTupleScheme();
       }
     }
 
-    private static class setupUserComputeResourcePreferencesForSSH_resultTupleScheme extends TupleScheme<setupUserComputeResourcePreferencesForSSH_result> {
+    private static class doesUserHaveSSHAccount_resultTupleScheme extends TupleScheme<doesUserHaveSSHAccount_result> {
 
       @Override
-      public void write(org.apache.thrift.protocol.TProtocol prot, setupUserComputeResourcePreferencesForSSH_result struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol prot, doesUserHaveSSHAccount_result struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         BitSet optionals = new BitSet();
         if (struct.isSetSuccess()) {
@@ -217295,7 +217190,7 @@ public class Airavata {
         }
         oprot.writeBitSet(optionals, 5);
         if (struct.isSetSuccess()) {
-          struct.success.write(oprot);
+          oprot.writeBool(struct.success);
         }
         if (struct.isSetIre()) {
           struct.ire.write(oprot);
@@ -217312,12 +217207,11 @@ public class Airavata {
       }
 
       @Override
-      public void read(org.apache.thrift.protocol.TProtocol prot, setupUserComputeResourcePreferencesForSSH_result struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol prot, doesUserHaveSSHAccount_result struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
         BitSet incoming = iprot.readBitSet(5);
         if (incoming.get(0)) {
-          struct.success = new org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference();
-          struct.success.read(iprot);
+          struct.success = iprot.readBool();
           struct.setSuccessIsSet(true);
         }
         if (incoming.get(1)) {
@@ -217345,28 +217239,31 @@ public class Airavata {
 
   }
 
-  public static class doesUserHaveSSHAccount_args implements org.apache.thrift.TBase<doesUserHaveSSHAccount_args, doesUserHaveSSHAccount_args._Fields>, java.io.Serializable, Cloneable, Comparable<doesUserHaveSSHAccount_args>   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("doesUserHaveSSHAccount_args");
+  public static class setupUserComputeResourcePreferencesForSSH_args implements org.apache.thrift.TBase<setupUserComputeResourcePreferencesForSSH_args, setupUserComputeResourcePreferencesForSSH_args._Fields>, java.io.Serializable, Cloneable, Comparable<setupUserComputeResourcePreferencesForSSH_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setupUserComputeResourcePreferencesForSSH_args");
 
     private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
     private static final org.apache.thrift.protocol.TField COMPUTE_RESOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("computeResourceId", org.apache.thrift.protocol.TType.STRING, (short)2);
     private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)3);
+    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)4);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
-      schemes.put(StandardScheme.class, new doesUserHaveSSHAccount_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new doesUserHaveSSHAccount_argsTupleSchemeFactory());
+      schemes.put(StandardScheme.class, new setupUserComputeResourcePreferencesForSSH_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new setupUserComputeResourcePreferencesForSSH_argsTupleSchemeFactory());
     }
 
     public org.apache.airavata.model.security.AuthzToken authzToken; // required
     public String computeResourceId; // required
     public String username; // required
+    public String airavataCredStoreToken; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
       AUTHZ_TOKEN((short)1, "authzToken"),
       COMPUTE_RESOURCE_ID((short)2, "computeResourceId"),
-      USERNAME((short)3, "username");
+      USERNAME((short)3, "username"),
+      AIRAVATA_CRED_STORE_TOKEN((short)4, "airavataCredStoreToken");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -217387,6 +217284,8 @@ public class Airavata {
             return COMPUTE_RESOURCE_ID;
           case 3: // USERNAME
             return USERNAME;
+          case 4: // AIRAVATA_CRED_STORE_TOKEN
+            return AIRAVATA_CRED_STORE_TOKEN;
           default:
             return null;
         }
@@ -217436,28 +217335,32 @@ public class Airavata {
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.REQUIRED, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      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)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(doesUserHaveSSHAccount_args.class, metaDataMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setupUserComputeResourcePreferencesForSSH_args.class, metaDataMap);
     }
 
-    public doesUserHaveSSHAccount_args() {
+    public setupUserComputeResourcePreferencesForSSH_args() {
     }
 
-    public doesUserHaveSSHAccount_args(
+    public setupUserComputeResourcePreferencesForSSH_args(
       org.apache.airavata.model.security.AuthzToken authzToken,
       String computeResourceId,
-      String username)
+      String username,
+      String airavataCredStoreToken)
     {
       this();
       this.authzToken = authzToken;
       this.computeResourceId = computeResourceId;
       this.username = username;
+      this.airavataCredStoreToken = airavataCredStoreToken;
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
-    public doesUserHaveSSHAccount_args(doesUserHaveSSHAccount_args other) {
+    public setupUserComputeResourcePreferencesForSSH_args(setupUserComputeResourcePreferencesForSSH_args other) {
       if (other.isSetAuthzToken()) {
         this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
       }
@@ -217467,10 +217370,13 @@ public class Airavata {
       if (other.isSetUsername()) {
         this.username = other.username;
       }
+      if (other.isSetAiravataCredStoreToken()) {
+        this.airavataCredStoreToken = other.airavataCredStoreToken;
+      }
     }
 
-    public doesUserHaveSSHAccount_args deepCopy() {
-      return new doesUserHaveSSHAccount_args(this);
+    public setupUserComputeResourcePreferencesForSSH_args deepCopy() {
+      return new setupUserComputeResourcePreferencesForSSH_args(this);
     }
 
     @Override
@@ -217478,13 +217384,14 @@ public class Airavata {
       this.authzToken = null;
       this.computeResourceId = null;
       this.username = null;
+      this.airavataCredStoreToken = null;
     }
 
     public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
       return this.authzToken;
     }
 
-    public doesUserHaveSSHAccount_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
+    public setupUserComputeResourcePreferencesForSSH_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
       this.authzToken = authzToken;
       return this;
     }
@@ -217508,7 +217415,7 @@ public class Airavata {
       return this.computeResourceId;
     }
 
-    public doesUserHaveSSHAccount_args setComputeResourceId(String computeResourceId) {
+    public setupUserComputeResourcePreferencesForSSH_args setComputeResourceId(String computeResourceId) {
       this.computeResourceId = computeResourceId;
       return this;
     }
@@ -217532,7 +217439,7 @@ public class Airavata {
       return this.username;
     }
 
-    public doesUserHaveSSHAccount_args setUsername(String username) {
+    public setupUserComputeResourcePreferencesForSSH_args setUsername(String username) {
       this.username = username;
       return this;
     }
@@ -217552,6 +217459,30 @@ public class Airavata {
       }
     }
 
+    public String getAiravataCredStoreToken() {
+      return this.airavataCredStoreToken;
+    }
+
+    public setupUserComputeResourcePreferencesForSSH_args setAiravataCredStoreToken(String airavataCredStoreToken) {
+      this.airavataCredStoreToken = airavataCredStoreToken;
+      return this;
+    }
+
+    public void unsetAiravataCredStoreToken() {
+      this.airavataCredStoreToken = null;
+    }
+
+    /** Returns true if field airavataCredStoreToken is set (has been assigned a value) and false otherwise */
+    public boolean isSetAiravataCredStoreToken() {
+      return this.airavataCredStoreToken != null;
+    }
+
+    public void setAiravataCredStoreTokenIsSet(boolean value) {
+      if (!value) {
+        this.airavataCredStoreToken = null;
+      }
+    }
+
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
       case AUTHZ_TOKEN:
@@ -217578,6 +217509,14 @@ public class Airavata {
         }
         break;
 
+      case AIRAVATA_CRED_STORE_TOKEN:
+        if (value == null) {
+          unsetAiravataCredStoreToken();
+        } else {
+          setAiravataCredStoreToken((String)value);
+        }
+        break;
+
       }
     }
 
@@ -217592,6 +217531,9 @@ public class Airavata {
       case USERNAME:
         return getUsername();
 
+      case AIRAVATA_CRED_STORE_TOKEN:
+        return getAiravataCredStoreToken();
+
       }
       throw new IllegalStateException();
     }
@@ -217609,6 +217551,8 @@ public class Airavata {
         return isSetComputeResourceId();
       case USERNAME:
         return isSetUsername();
+      case AIRAVATA_CRED_STORE_TOKEN:
+        return isSetAiravataCredStoreToken();
       }
       throw new IllegalStateException();
     }
@@ -217617,12 +217561,12 @@ public class Airavata {
     public boolean equals(Object that) {
       if (that == null)
         return false;
-      if (that instanceof doesUserHaveSSHAccount_args)
-        return this.equals((doesUserHaveSSHAccount_args)that);
+      if (that instanceof setupUserComputeResourcePreferencesForSSH_args)
+        return this.equals((setupUserComputeResourcePreferencesForSSH_args)that);
       return false;
     }
 
-    public boolean equals(doesUserHaveSSHAccount_args that) {
+    public boolean equals(setupUserComputeResourcePreferencesForSSH_args that) {
       if (that == null)
         return false;
 
@@ -217653,6 +217597,15 @@ public class Airavata {
           return false;
       }
 
+      boolean this_present_airavataCredStoreToken = true && this.isSetAiravataCredStoreToken();
+      boolean that_present_airavataCredStoreToken = true && that.isSetAiravataCredStoreToken();
+      if (this_present_airavataCredStoreToken || that_present_airavataCredStoreToken) {
+        if (!(this_present_airavataCredStoreToken && that_present_airavataCredStoreToken))
+          return false;
+        if (!this.airavataCredStoreToken.equals(that.airavataCredStoreToken))
+          return false;
+      }
+
       return true;
     }
 
@@ -217675,11 +217628,16 @@ public class Airavata {
       if (present_username)
         list.add(username);
 
+      boolean present_airavataCredStoreToken = true && (isSetAiravataCredStoreToken());
+      list.add(present_airavataCredStoreToken);
+      if (present_airavataCredStoreToken)
+        list.add(airavataCredStoreToken);
+
       return list.hashCode();
     }
 
     @Override
-    public int compareTo(doesUserHaveSSHAccount_args other) {
+    public int compareTo(setupUserComputeResourcePreferencesForSSH_args other) {
       if (!getClass().equals(other.getClass())) {
         return getClass().getName().compareTo(other.getClass().getName());
       }
@@ -217716,6 +217674,16 @@ public class Airavata {
           return lastComparison;
         }
       }
+      lastComparison = Boolean.valueOf(isSetAiravataCredStoreToken()).compareTo(other.isSetAiravataCredStoreToken());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetAiravataCredStoreToken()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airavataCredStoreToken, other.airavataCredStoreToken);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
       return 0;
     }
 
@@ -217733,7 +217701,7 @@ public class Airavata {
 
     @Override
     public String toString() {
-      StringBuilder sb = new StringBuilder("doesUserHaveSSHAccount_args(");
+      StringBuilder sb = new StringBuilder("setupUserComputeResourcePreferencesForSSH_args(");
       boolean first = true;
 
       sb.append("authzToken:");
@@ -217759,6 +217727,14 @@ public class Airavata {
         sb.append(this.username);
       }
       first = false;
+      if (!first) sb.append(", ");
+      sb.append("airavataCredStoreToken:");
+      if (this.airavataCredStoreToken == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.airavataCredStoreToken);
+      }
+      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -217774,6 +217750,9 @@ public class Airavata {
       if (username == null) {
         throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' was not present! Struct: " + toString());
       }
+      if (airavataCredStoreToken == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataCredStoreToken' was not present! Struct: " + toString());
+      }
       // check for sub-struct validity
       if (authzToken != null) {
         authzToken.validate();
@@ -217796,15 +217775,15 @@ public class Airavata {
       }
     }
 
-    private static class doesUserHaveSSHAccount_argsStandardSchemeFactory implements SchemeFactory {
-      public doesUserHaveSSHAccount_argsStandardScheme getScheme() {
-        return new doesUserHaveSSHAccount_argsStandardScheme();
+    private static class setupUserComputeResourcePreferencesForSSH_argsStandardSchemeFactory implements SchemeFactory {
+      public setupUserComputeResourcePreferencesForSSH_argsStandardScheme getScheme() {
+        return new setupUserComputeResourcePreferencesForSSH_argsStandardScheme();
       }
     }
 
-    private static class doesUserHaveSSHAccount_argsStandardScheme extends StandardScheme<doesUserHaveSSHAccount_args> {
+    private static class setupUserComputeResourcePreferencesForSSH_argsStandardScheme extends StandardScheme<setupUserComputeResourcePreferencesForSSH_args> {
 
-      public void read(org.apache.thrift.protocol.TProtocol iprot, doesUserHaveSSHAccount_args struct) throws org.apache.thrift.TException {
+      public void read(org.apache.thrift.protocol.TProtocol iprot, setupUserComputeResourcePreferencesForSSH_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
         iprot.readStructBegin();
         while (true)
@@ -217839,6 +217818,14 @@ public class Airavata {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
+            case 4: // AIRAVATA_CRED_STORE_TOKEN
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.airavataCredStoreToken = iprot.readString();
+                struct.setAiravataCredStoreTokenIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
             default:
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
           }
@@ -217850,7 +217837,7 @@ public class Airavata {
         struct.validate();
       }
 
-      public void write(org.apache.thrift.protocol.TProtocol oprot, doesUserHaveSSHAccount_args struct) throws org.apache.thrift.TException {
+      public void write(org.apache.thrift.protocol.TProtocol oprot, setupUserComputeResourcePreferencesForSSH_args struct) throws org.apache.thrift.TException {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
@@ -217869,30 +217856,36 @@ public class Airavata {
           oprot.writeString(struct.username);
           oprot.writeFieldEnd();
         }
+        if (struct.airavataCredStoreToken != null) {
+          oprot.writeFieldBegin(AIRAVATA_CRED_STORE_TOKEN_FIELD_DESC);
+          oprot.writeString(struct.airavataCredStoreToken);
+          oprot.writeFieldEnd();
+        }
         oprot.writeFieldStop();
         oprot.writeStructEnd();
     

<TRUNCATED>

[20/40] airavata git commit: AIRAVATA-2500 Partial Implementation

Posted by ma...@apache.org.
AIRAVATA-2500 Partial Implementation


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

Branch: refs/heads/develop
Commit: 1c2ab2724fdb0e6d104130d0c4a8fc4c6df96312
Parents: fab1900
Author: spamidig <pa...@iu.edu>
Authored: Fri Sep 15 09:56:05 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Tue Sep 19 15:08:05 2017 -0400

----------------------------------------------------------------------
 modules/compute-account-provisioning/pom.xml    |   6 +
 .../IULdapSSHAccountProvisioner.java            | 120 ++++++++++++++++++-
 .../SSHAccountProvisionerFactoryTest.java       |  10 +-
 .../TestSSHAccountProvisionerProvider.java      |   8 +-
 4 files changed, 136 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/1c2ab272/modules/compute-account-provisioning/pom.xml
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/pom.xml b/modules/compute-account-provisioning/pom.xml
index ee89d33..de963df 100644
--- a/modules/compute-account-provisioning/pom.xml
+++ b/modules/compute-account-provisioning/pom.xml
@@ -52,6 +52,12 @@
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
         </dependency>
+        <!-- apache directory ldap api! -->
+        <dependency>
+            <groupId>org.apache.directory.api</groupId>
+            <artifactId>api-all</artifactId>
+            <version>1.0.0</version>
+        </dependency>
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>

http://git-wip-us.apache.org/repos/asf/airavata/blob/1c2ab272/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
index 03fa803..331c01c 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
@@ -22,20 +22,92 @@ package org.apache.airavata.accountprovisioning.provisioner;
 
 import org.apache.airavata.accountprovisioning.ConfigParam;
 import org.apache.airavata.accountprovisioning.SSHAccountProvisioner;
-
+import org.apache.directory.api.ldap.model.cursor.CursorException;
+import org.apache.directory.ldap.client.api.*;
+import org.apache.directory.api.ldap.model.cursor.EntryCursor;
+import org.apache.directory.api.ldap.model.entry.Attribute;
+import org.apache.directory.api.ldap.model.entry.Entry;
+import org.apache.directory.api.ldap.model.entry.Modification;
+import org.apache.directory.api.ldap.model.entry.DefaultEntry;
+import org.apache.directory.api.ldap.model.exception.LdapException;
+import org.apache.directory.api.ldap.model.message.SearchScope;
+import org.apache.directory.api.ldap.model.message.DeleteResponse;
+import org.apache.directory.api.ldap.model.message.ResultCodeEnum;
+import org.junit.Assert;
 import java.util.Map;
+import java.util.List;
 
-public class IULdapSSHAccountProvisioner implements SSHAccountProvisioner {
+public class IULdapSSHAccountProvisioner implements SSHAccountProvisioner  {
 
+    String ldaphost, adminDN, ldap_username, ldap_password, adminPass, ldapBaseDN;
+    int ldapport, ldapPortId;
+    LdapConnection connection;
     @Override
     public void init(Map<ConfigParam, String> config) {
 
         // TODO: implement
+        ldapServerName =  config.get(new ConfigParam("ldaphost"));//"bazooka.hps.iu.edu"
+        ldapPortId = config.get(new ConfigParam("ldapport"));//"636"
+        ldap_username = config.get(new ConfigParam("ldap_username"));//"cn=sgrcusr"
+        ldap_password = config.get(new ConfigParam("ldap_password"));//"lore footwork engorge"
+        ldapBaseDN = config.get(new ConfigParam( "ldapBaseDN" ));//"dc=rt,dc=iu,dc=edu"
+        try {
+            connection = new LdapNetworkConnection(ldaphost, ldapport, true);
+
+
+            System.out.println( "binding connection:" );
+            String AuthDN=ldap_username+","+ldapBaseDN;
+            connection.bind(AuthDN,ldap_password);
+            //check that we're auth'ed and connected
+            System.out.println("asserting bound:");
+            Assert.assertTrue( connection.isAuthenticated() );
+            Assert.assertTrue( connection.isConnected() );
+            }  catch (Exception e) {
+            System.out.println("Exception caught!");
+            System.out.println(e.getClass().getCanonicalName());
+            System.out.println(e.getMessage());
+            System.out.println(e.getCause());
+
+            }
+            //catch (LdapException le) {
+            //System.out.println("Ldap Exception caught!", le);
+            //}
+
     }
 
     @Override
     public boolean hasAccount(String username) {
         // TODO: implement
+        // To verify if the user has a login on a remote host
+        // if not advice the user to get an account (if possible) before returning.
+        // a search at the ldap is used to set the value
+        System.out.println("attempting search:");
+        String uidName="uid="+username;
+        List<String>  userClusters = new ArrayList();
+        try {
+            EntryCursor cursor = connection.search( ldapBaseDN, uidName, SearchScope.SUBTREE, "*" );
+            System.out.println( "Printing LDAP-wide results for " + username + ":" );
+            while (cursor.next()) {
+                Entry entry = cursor.get();
+                String DNName = entry.getDn().getName();
+                String[] words=DNName.split(",");
+                String cluster = words[1].replace("ou=");
+                userClusters.add(cluster);
+                //System.out.println( entry.getDn().getName() );
+                //System.out.println( entry.getAttributes() );
+                return true;
+            }
+            cursor.close();
+        }catch (Exception e) {
+            System.out.println( "Exception caught!" );
+            System.out.println( e.getClass().getCanonicalName() );
+            System.out.println( e.getMessage() );
+            System.out.println( e.getCause() );
+        } catch (CursorException ce) {
+            System.out.println( "Cursor Exception caught!" );
+        }catch (LdapException le) {
+            System.out.println( "Ldap Exception caught!" );
+        }
         return false;
     }
 
@@ -48,11 +120,53 @@ public class IULdapSSHAccountProvisioner implements SSHAccountProvisioner {
     @Override
     public void installSSHKey(String username, String sshPublicKey) {
         // TODO: implement
+        // use Eric Coulter's LdapBazookaSearchAndAdd to accomplsih this
+        String GatewaySSHPublicKey = sshPublicKey;
+        String IULocalUserName = username;
+
+
+        /*
+        LdapConnectionConfig lcconfig = new LdapConnectionConfig();
+        lcconfig.setLdapHost(ldapservername);// LdapServerName = ldapserverName;//from ConfigParam should be like bazooka.hpc.iu.edu
+        lcconfig.setLdapPort(ldapPortId);// LdapPortID = ldapPortId;//from ConfigParam 636
+        lcconfig.setName(adminDN);// = adminName;//from ConfigParam sgrcusr
+        lcconfig.setCredentials(AdminPass);//from ConfigParam "lore footwork engorge"
+
+        DefaultLdapConnectionFactory lcfactory = new DefaultLdapConnectionFactory( lcconfig );
+        lcfactory.setTimeOut( connectionTimeout );
+        */
+
+            Modification addSSHPublicKeyAdd = new DefaultModification(ModificationOperation.ADD_ATTRIBUTE,"add","sshPublicKey");
+            Modification SSHPublicKey = new DefaultModification(ModificationOperation.ADD_ATTRIBUTE, "sshPublicKey",GatewaySSHPublicKey);
+            /*
+            Entry modentry = New DefaultEntry(
+                    "cn=sgrcusr,dc=rt,dc=iu,dc=edu",
+                    "ObjectClass: person",
+                    "ObjectClass: ldapPublicKey",
+                    "cn", username,
+                    "dn", "uid=",username, "ou=bigred2-sgrc,dc=rt,dc=iu,dc=edu",
+                    "add: sshPublicKey",
+                    "sshPublicKey", GatewaySSHPublicKey );
+                    */
+            try {
+                connection.modify(ldapBaseDN, addSSHPublicKeyAdd );//ldapmodify
+                connection.modify(ldapBaseDN, SSHPublicKey );
+            } catch (Exception e) {
+                System.out.println("Exception caught!", e);
+                System.out.println( e.getClass().getCanonicalName() );
+                System.out.println( e.getMessage() );
+                System.out.println( e.getCause() );
+            }
+
     }
 
     @Override
     public String getScratchLocation(String username) {
         // TODO: implement
-        return null;
+        //if scratch location is available get it or else set a new scratch location for the user
+        String canonicalScratch =  config.get(new ConfigParam("canonicalScratch"));//"/N/cd2/_USER_/scratch"
+        String scratchLocation = canonicalScratch.replace("_USER_",username);
+        return scratchLocation;
+        //return null;
     }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/1c2ab272/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactoryTest.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactoryTest.java b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactoryTest.java
index 89e9ff7..54d5f1c 100644
--- a/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactoryTest.java
+++ b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactoryTest.java
@@ -43,7 +43,7 @@ public class SSHAccountProvisionerFactoryTest {
     public void testGetSSHAccountProvisionerConfigParams() {
 
         List<ConfigParam> configParams = SSHAccountProvisionerFactory.getSSHAccountProvisionerConfigParams("TestSSHAccountProvisioner");
-        Assert.assertEquals(4, configParams.size());
+        Assert.assertEquals(5, configParams.size());
         ConfigParam ldaphost = configParams.get(0);
         Assert.assertEquals("ldaphost", ldaphost.getName());
         Assert.assertEquals(ConfigParam.ConfigParamType.STRING, ldaphost.getType());
@@ -51,11 +51,15 @@ public class SSHAccountProvisionerFactoryTest {
         Assert.assertEquals("ldapport", ldapport.getName());
         Assert.assertEquals(ConfigParam.ConfigParamType.STRING, ldapport.getType());
         ConfigParam ldapUsername = configParams.get(2);
-        Assert.assertEquals("ldap-username", ldapUsername.getName());
+        Assert.assertEquals("ldap_username", ldapUsername.getName());
         Assert.assertEquals(ConfigParam.ConfigParamType.STRING, ldapUsername.getType());
         ConfigParam ldapPassword = configParams.get(3);
-        Assert.assertEquals("ldap-password", ldapPassword.getName());
+        Assert.assertEquals("ldap_password", ldapPassword.getName());
         Assert.assertEquals(ConfigParam.ConfigParamType.CRED_STORE_PASSWORD_TOKEN, ldapPassword.getType());
+        ConfigParam ldapBaseDN = configParams.get(4);
+        Assert.assertArrayEquals("ldapBaseDN", ldapBaseDN.getName()  );
+        Assert.assertArrayEquals( ConfigParam.ConfigParamType.STRING,ldapBaseDN.getType() );
+
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/airavata/blob/1c2ab272/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisionerProvider.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisionerProvider.java b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisionerProvider.java
index a8d2cb5..7eb4250 100644
--- a/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisionerProvider.java
+++ b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisionerProvider.java
@@ -46,14 +46,18 @@ public class TestSSHAccountProvisionerProvider implements SSHAccountProvisionerP
                 .setDescription("Port of LDAP server")
                 .setOptional(false)
                 .setType(ConfigParam.ConfigParamType.STRING));
-        configParams.add(new ConfigParam("ldap-username")
+        configParams.add(new ConfigParam("ldap_username")
                 .setDescription("Username for LDAP server")
                 .setOptional(false)
                 .setType(ConfigParam.ConfigParamType.STRING));
-        configParams.add(new ConfigParam("ldap-password")
+        configParams.add(new ConfigParam("ldap_password")
                 .setDescription("Password for LDAP server")
                 .setOptional(false)
                 .setType(ConfigParam.ConfigParamType.CRED_STORE_PASSWORD_TOKEN));
+        configParams.add(new ConfigParam("ldapBaseDN")
+                .setDescription( "Base DN for the ldap entry" )
+                .setOptional( false )
+                .setType( ConfigParam.ConfigParamType.STRING );
         return configParams;
     }
 


[39/40] airavata git commit: Merge branch 'AIRAVATA-2500' into develop

Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/ebdf8977/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
----------------------------------------------------------------------
diff --cc airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
index 88b5f90,48fdbd8..36ab707
--- 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
@@@ -2592,8 -2619,33 +2592,33 @@@ public class Airavata 
       * @param gatewayID
       * @param storageId
       */
 -    public boolean deleteGatewayStoragePreference(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayID, String storageId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
 +    public boolean deleteGatewayStoragePreference(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayID, java.lang.String storageId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
  
 -    public List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner> getSSHAccountProvisioners(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
++    public java.util.List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner> getSSHAccountProvisioners(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+ 
+     /**
+      * Check if user has an SSH account on the given compute resource. This
+      * method will only work if the compute resource has an SSHAccountProvisioner configured for it.
+      * 
+      * @param authzToken
+      * @param computeResourceId
+      * @param userId
+      */
 -    public boolean doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String userId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
++    public boolean doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String computeResourceId, java.lang.String userId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+ 
+     /**
+      * Setup and return a UserComputeResourcePreference object for this user to SSH into the given compute resource with
+      * the given SSH credential. This method will only work if the compute resource has an SSHAccountProvisioner
+      * configured for it. The returned UserComputeResourcePreference object is not saved; it is up to the client to
+      * call addUserComputeResourcePreference to persist it.
+      * 
+      * @param authzToken
+      * @param computeResourceId
+      * @param userId
+      * @param airavataCredStoreToken
+      */
 -    public org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String userId, String airavataCredStoreToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
++    public org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String computeResourceId, java.lang.String userId, java.lang.String airavataCredStoreToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+ 
      /**
       * Register User Resource Profile.
       * 
@@@ -2998,343 -3050,349 +3023,349 @@@
  
    public interface AsyncIface {
  
 -    public void getAPIVersion(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getAPIVersion(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void isUserExists(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, String userName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void isUserExists(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, java.lang.String userName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void addGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.workspace.Gateway gateway, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void addGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.workspace.Gateway gateway, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getAllUsersInGateway(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getAllUsersInGateway(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateGateway(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.airavata.model.workspace.Gateway updatedGateway, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateGateway(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, org.apache.airavata.model.workspace.Gateway updatedGateway, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getGateway(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getGateway(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.Gateway> resultHandler) throws org.apache.thrift.TException;
  
 -    public void deleteGateway(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void deleteGateway(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getAllGateways(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getAllGateways(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.workspace.Gateway>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void isGatewayExist(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void isGatewayExist(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void createNotification(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.workspace.Notification notification, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void createNotification(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.workspace.Notification notification, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateNotification(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.workspace.Notification notification, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateNotification(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.workspace.Notification notification, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void deleteNotification(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, String notificationId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void deleteNotification(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, java.lang.String notificationId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getNotification(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, String notificationId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getNotification(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, java.lang.String notificationId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.Notification> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getAllNotifications(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getAllNotifications(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.workspace.Notification>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void generateAndRegisterSSHKeys(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, String userName, String description, org.apache.airavata.model.credential.store.CredentialOwnerType credentialOwnerType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void generateAndRegisterSSHKeys(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, java.lang.String userName, java.lang.String description, org.apache.airavata.model.credential.store.CredentialOwnerType credentialOwnerType, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void registerPwdCredential(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, String portalUserName, String loginUserName, String password, String description, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void registerPwdCredential(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, java.lang.String portalUserName, java.lang.String loginUserName, java.lang.String password, java.lang.String description, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getSSHPubKey(org.apache.airavata.model.security.AuthzToken authzToken, String airavataCredStoreToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getSSHPubKey(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String airavataCredStoreToken, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getAllGatewaySSHPubKeys(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getAllGatewaySSHPubKeys(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getAllCredentialSummaryForGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getAllCredentialSummaryForGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.credential.store.SummaryType type, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getAllCredentialSummaryForUsersInGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getAllCredentialSummaryForUsersInGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.credential.store.SummaryType type, java.lang.String gatewayId, java.lang.String userId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getAllGatewayPWDCredentials(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getAllGatewayPWDCredentials(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void deleteSSHPubKey(org.apache.airavata.model.security.AuthzToken authzToken, String airavataCredStoreToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void deleteSSHPubKey(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String airavataCredStoreToken, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void deletePWDCredential(org.apache.airavata.model.security.AuthzToken authzToken, String airavataCredStoreToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void deletePWDCredential(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String airavataCredStoreToken, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void createProject(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.airavata.model.workspace.Project project, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void createProject(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, org.apache.airavata.model.workspace.Project project, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateProject(org.apache.airavata.model.security.AuthzToken authzToken, String projectId, org.apache.airavata.model.workspace.Project updatedProject, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateProject(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String projectId, org.apache.airavata.model.workspace.Project updatedProject, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getProject(org.apache.airavata.model.security.AuthzToken authzToken, String projectId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getProject(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String projectId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.Project> resultHandler) throws org.apache.thrift.TException;
  
 -    public void deleteProject(org.apache.airavata.model.security.AuthzToken authzToken, String projectId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void deleteProject(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String projectId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getUserProjects(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, String userName, int limit, int offset, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getUserProjects(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, java.lang.String userName, int limit, int offset, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.workspace.Project>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void searchProjects(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, String userName, Map<org.apache.airavata.model.experiment.ProjectSearchFields,String> filters, int limit, int offset, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void searchProjects(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, java.lang.String userName, java.util.Map<org.apache.airavata.model.experiment.ProjectSearchFields,java.lang.String> filters, int limit, int offset, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.workspace.Project>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void searchExperiments(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, String userName, Map<org.apache.airavata.model.experiment.ExperimentSearchFields,String> filters, int limit, int offset, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void searchExperiments(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, java.lang.String userName, java.util.Map<org.apache.airavata.model.experiment.ExperimentSearchFields,java.lang.String> filters, int limit, int offset, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.experiment.ExperimentSummaryModel>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getExperimentStatistics(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, long fromTime, long toTime, String userName, String applicationName, String resourceHostName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getExperimentStatistics(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, long fromTime, long toTime, java.lang.String userName, java.lang.String applicationName, java.lang.String resourceHostName, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentStatistics> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getExperimentsInProject(org.apache.airavata.model.security.AuthzToken authzToken, String projectId, int limit, int offset, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getExperimentsInProject(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String projectId, int limit, int offset, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.experiment.ExperimentModel>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getUserExperiments(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, String userName, int limit, int offset, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getUserExperiments(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, java.lang.String userName, int limit, int offset, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.experiment.ExperimentModel>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void createExperiment(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.airavata.model.experiment.ExperimentModel experiment, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void createExperiment(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, org.apache.airavata.model.experiment.ExperimentModel experiment, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void deleteExperiment(org.apache.airavata.model.security.AuthzToken authzToken, String experimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void deleteExperiment(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String experimentId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getExperiment(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getExperiment(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getExperimentByAdmin(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getExperimentByAdmin(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getDetailedExperimentTree(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getDetailedExperimentTree(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.experiment.ExperimentModel> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateExperiment(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, org.apache.airavata.model.experiment.ExperimentModel experiment, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateExperiment(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String airavataExperimentId, org.apache.airavata.model.experiment.ExperimentModel experiment, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateExperimentConfiguration(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, org.apache.airavata.model.experiment.UserConfigurationDataModel userConfiguration, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateExperimentConfiguration(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String airavataExperimentId, org.apache.airavata.model.experiment.UserConfigurationDataModel userConfiguration, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateResourceScheduleing(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, org.apache.airavata.model.scheduling.ComputationalResourceSchedulingModel resourceScheduling, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateResourceScheduleing(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String airavataExperimentId, org.apache.airavata.model.scheduling.ComputationalResourceSchedulingModel resourceScheduling, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
  
 -    public void validateExperiment(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void validateExperiment(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void launchExperiment(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void launchExperiment(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String airavataExperimentId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getExperimentStatus(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getExperimentStatus(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.status.ExperimentStatus> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getExperimentOutputs(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getExperimentOutputs(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.application.io.OutputDataObjectType>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getIntermediateOutputs(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getIntermediateOutputs(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.application.io.OutputDataObjectType>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getJobStatuses(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getJobStatuses(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,org.apache.airavata.model.status.JobStatus>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getJobDetails(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getJobDetails(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String airavataExperimentId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.job.JobModel>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void cloneExperiment(org.apache.airavata.model.security.AuthzToken authzToken, String existingExperimentID, String newExperimentName, String newExperimentProjectId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void cloneExperiment(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String existingExperimentID, java.lang.String newExperimentName, java.lang.String newExperimentProjectId, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void cloneExperimentByAdmin(org.apache.airavata.model.security.AuthzToken authzToken, String existingExperimentID, String newExperimentName, String newExperimentProjectId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void cloneExperimentByAdmin(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String existingExperimentID, java.lang.String newExperimentName, java.lang.String newExperimentProjectId, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void terminateExperiment(org.apache.airavata.model.security.AuthzToken authzToken, String airavataExperimentId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void terminateExperiment(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String airavataExperimentId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
  
 -    public void registerApplicationModule(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule applicationModule, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void registerApplicationModule(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule applicationModule, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getApplicationModule(org.apache.airavata.model.security.AuthzToken authzToken, String appModuleId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getApplicationModule(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String appModuleId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateApplicationModule(org.apache.airavata.model.security.AuthzToken authzToken, String appModuleId, org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule applicationModule, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateApplicationModule(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String appModuleId, org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule applicationModule, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getAllAppModules(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getAllAppModules(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void deleteApplicationModule(org.apache.airavata.model.security.AuthzToken authzToken, String appModuleId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void deleteApplicationModule(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String appModuleId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void registerApplicationDeployment(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription applicationDeployment, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void registerApplicationDeployment(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription applicationDeployment, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getApplicationDeployment(org.apache.airavata.model.security.AuthzToken authzToken, String appDeploymentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getApplicationDeployment(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String appDeploymentId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateApplicationDeployment(org.apache.airavata.model.security.AuthzToken authzToken, String appDeploymentId, org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription applicationDeployment, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateApplicationDeployment(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String appDeploymentId, org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription applicationDeployment, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void deleteApplicationDeployment(org.apache.airavata.model.security.AuthzToken authzToken, String appDeploymentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void deleteApplicationDeployment(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String appDeploymentId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getAllApplicationDeployments(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getAllApplicationDeployments(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getAppModuleDeployedResources(org.apache.airavata.model.security.AuthzToken authzToken, String appModuleId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getAppModuleDeployedResources(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String appModuleId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void registerApplicationInterface(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription applicationInterface, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void registerApplicationInterface(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription applicationInterface, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void cloneApplicationInterface(org.apache.airavata.model.security.AuthzToken authzToken, String existingAppInterfaceID, String newApplicationName, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void cloneApplicationInterface(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String existingAppInterfaceID, java.lang.String newApplicationName, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getApplicationInterface(org.apache.airavata.model.security.AuthzToken authzToken, String appInterfaceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getApplicationInterface(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String appInterfaceId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateApplicationInterface(org.apache.airavata.model.security.AuthzToken authzToken, String appInterfaceId, org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription applicationInterface, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateApplicationInterface(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String appInterfaceId, org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription applicationInterface, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void deleteApplicationInterface(org.apache.airavata.model.security.AuthzToken authzToken, String appInterfaceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void deleteApplicationInterface(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String appInterfaceId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getAllApplicationInterfaceNames(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getAllApplicationInterfaceNames(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getAllApplicationInterfaces(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getAllApplicationInterfaces(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getApplicationInputs(org.apache.airavata.model.security.AuthzToken authzToken, String appInterfaceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getApplicationInputs(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String appInterfaceId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.application.io.InputDataObjectType>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getApplicationOutputs(org.apache.airavata.model.security.AuthzToken authzToken, String appInterfaceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getApplicationOutputs(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String appInterfaceId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.application.io.OutputDataObjectType>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getAvailableAppInterfaceComputeResources(org.apache.airavata.model.security.AuthzToken authzToken, String appInterfaceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getAvailableAppInterfaceComputeResources(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String appInterfaceId, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void registerComputeResource(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription computeResourceDescription, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void registerComputeResource(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription computeResourceDescription, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getComputeResource(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getComputeResource(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String computeResourceId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getAllComputeResourceNames(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getAllComputeResourceNames(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateComputeResource(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription computeResourceDescription, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateComputeResource(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String computeResourceId, org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription computeResourceDescription, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void deleteComputeResource(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void deleteComputeResource(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String computeResourceId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void registerStorageResource(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.appcatalog.storageresource.StorageResourceDescription storageResourceDescription, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void registerStorageResource(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.appcatalog.storageresource.StorageResourceDescription storageResourceDescription, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getStorageResource(org.apache.airavata.model.security.AuthzToken authzToken, String storageResourceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getStorageResource(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String storageResourceId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.storageresource.StorageResourceDescription> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getAllStorageResourceNames(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getAllStorageResourceNames(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateStorageResource(org.apache.airavata.model.security.AuthzToken authzToken, String storageResourceId, org.apache.airavata.model.appcatalog.storageresource.StorageResourceDescription storageResourceDescription, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateStorageResource(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String storageResourceId, org.apache.airavata.model.appcatalog.storageresource.StorageResourceDescription storageResourceDescription, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void deleteStorageResource(org.apache.airavata.model.security.AuthzToken authzToken, String storageResourceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void deleteStorageResource(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String storageResourceId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void addLocalSubmissionDetails(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, int priorityOrder, org.apache.airavata.model.appcatalog.computeresource.LOCALSubmission localSubmission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void addLocalSubmissionDetails(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String computeResourceId, int priorityOrder, org.apache.airavata.model.appcatalog.computeresource.LOCALSubmission localSubmission, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateLocalSubmissionDetails(org.apache.airavata.model.security.AuthzToken authzToken, String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.LOCALSubmission localSubmission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateLocalSubmissionDetails(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.LOCALSubmission localSubmission, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getLocalJobSubmission(org.apache.airavata.model.security.AuthzToken authzToken, String jobSubmissionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getLocalJobSubmission(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String jobSubmissionId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.computeresource.LOCALSubmission> resultHandler) throws org.apache.thrift.TException;
  
 -    public void addSSHJobSubmissionDetails(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, int priorityOrder, org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission sshJobSubmission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void addSSHJobSubmissionDetails(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String computeResourceId, int priorityOrder, org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission sshJobSubmission, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void addSSHForkJobSubmissionDetails(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, int priorityOrder, org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission sshJobSubmission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void addSSHForkJobSubmissionDetails(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String computeResourceId, int priorityOrder, org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission sshJobSubmission, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getSSHJobSubmission(org.apache.airavata.model.security.AuthzToken authzToken, String jobSubmissionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getSSHJobSubmission(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String jobSubmissionId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission> resultHandler) throws org.apache.thrift.TException;
  
 -    public void addUNICOREJobSubmissionDetails(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, int priorityOrder, org.apache.airavata.model.appcatalog.computeresource.UnicoreJobSubmission unicoreJobSubmission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void addUNICOREJobSubmissionDetails(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String computeResourceId, int priorityOrder, org.apache.airavata.model.appcatalog.computeresource.UnicoreJobSubmission unicoreJobSubmission, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getUnicoreJobSubmission(org.apache.airavata.model.security.AuthzToken authzToken, String jobSubmissionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getUnicoreJobSubmission(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String jobSubmissionId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.computeresource.UnicoreJobSubmission> resultHandler) throws org.apache.thrift.TException;
  
 -    public void addCloudJobSubmissionDetails(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, int priorityOrder, org.apache.airavata.model.appcatalog.computeresource.CloudJobSubmission cloudSubmission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void addCloudJobSubmissionDetails(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String computeResourceId, int priorityOrder, org.apache.airavata.model.appcatalog.computeresource.CloudJobSubmission cloudSubmission, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getCloudJobSubmission(org.apache.airavata.model.security.AuthzToken authzToken, String jobSubmissionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getCloudJobSubmission(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String jobSubmissionId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.computeresource.CloudJobSubmission> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateSSHJobSubmissionDetails(org.apache.airavata.model.security.AuthzToken authzToken, String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission sshJobSubmission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateSSHJobSubmissionDetails(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission sshJobSubmission, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateCloudJobSubmissionDetails(org.apache.airavata.model.security.AuthzToken authzToken, String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.CloudJobSubmission sshJobSubmission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateCloudJobSubmissionDetails(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.CloudJobSubmission sshJobSubmission, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateUnicoreJobSubmissionDetails(org.apache.airavata.model.security.AuthzToken authzToken, String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.UnicoreJobSubmission unicoreJobSubmission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateUnicoreJobSubmissionDetails(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String jobSubmissionInterfaceId, org.apache.airavata.model.appcatalog.computeresource.UnicoreJobSubmission unicoreJobSubmission, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void addLocalDataMovementDetails(org.apache.airavata.model.security.AuthzToken authzToken, String productUri, org.apache.airavata.model.data.movement.DMType dataMoveType, int priorityOrder, org.apache.airavata.model.data.movement.LOCALDataMovement localDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void addLocalDataMovementDetails(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String productUri, org.apache.airavata.model.data.movement.DMType dataMoveType, int priorityOrder, org.apache.airavata.model.data.movement.LOCALDataMovement localDataMovement, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateLocalDataMovementDetails(org.apache.airavata.model.security.AuthzToken authzToken, String dataMovementInterfaceId, org.apache.airavata.model.data.movement.LOCALDataMovement localDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateLocalDataMovementDetails(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String dataMovementInterfaceId, org.apache.airavata.model.data.movement.LOCALDataMovement localDataMovement, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getLocalDataMovement(org.apache.airavata.model.security.AuthzToken authzToken, String dataMovementId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getLocalDataMovement(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String dataMovementId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.data.movement.LOCALDataMovement> resultHandler) throws org.apache.thrift.TException;
  
 -    public void addSCPDataMovementDetails(org.apache.airavata.model.security.AuthzToken authzToken, String productUri, org.apache.airavata.model.data.movement.DMType dataMoveType, int priorityOrder, org.apache.airavata.model.data.movement.SCPDataMovement scpDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void addSCPDataMovementDetails(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String productUri, org.apache.airavata.model.data.movement.DMType dataMoveType, int priorityOrder, org.apache.airavata.model.data.movement.SCPDataMovement scpDataMovement, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateSCPDataMovementDetails(org.apache.airavata.model.security.AuthzToken authzToken, String dataMovementInterfaceId, org.apache.airavata.model.data.movement.SCPDataMovement scpDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateSCPDataMovementDetails(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String dataMovementInterfaceId, org.apache.airavata.model.data.movement.SCPDataMovement scpDataMovement, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getSCPDataMovement(org.apache.airavata.model.security.AuthzToken authzToken, String dataMovementId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getSCPDataMovement(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String dataMovementId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.data.movement.SCPDataMovement> resultHandler) throws org.apache.thrift.TException;
  
 -    public void addUnicoreDataMovementDetails(org.apache.airavata.model.security.AuthzToken authzToken, String productUri, org.apache.airavata.model.data.movement.DMType dataMoveType, int priorityOrder, org.apache.airavata.model.data.movement.UnicoreDataMovement unicoreDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void addUnicoreDataMovementDetails(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String productUri, org.apache.airavata.model.data.movement.DMType dataMoveType, int priorityOrder, org.apache.airavata.model.data.movement.UnicoreDataMovement unicoreDataMovement, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateUnicoreDataMovementDetails(org.apache.airavata.model.security.AuthzToken authzToken, String dataMovementInterfaceId, org.apache.airavata.model.data.movement.UnicoreDataMovement unicoreDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateUnicoreDataMovementDetails(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String dataMovementInterfaceId, org.apache.airavata.model.data.movement.UnicoreDataMovement unicoreDataMovement, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getUnicoreDataMovement(org.apache.airavata.model.security.AuthzToken authzToken, String dataMovementId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getUnicoreDataMovement(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String dataMovementId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.data.movement.UnicoreDataMovement> resultHandler) throws org.apache.thrift.TException;
  
 -    public void addGridFTPDataMovementDetails(org.apache.airavata.model.security.AuthzToken authzToken, String productUri, org.apache.airavata.model.data.movement.DMType dataMoveType, int priorityOrder, org.apache.airavata.model.data.movement.GridFTPDataMovement gridFTPDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void addGridFTPDataMovementDetails(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String productUri, org.apache.airavata.model.data.movement.DMType dataMoveType, int priorityOrder, org.apache.airavata.model.data.movement.GridFTPDataMovement gridFTPDataMovement, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateGridFTPDataMovementDetails(org.apache.airavata.model.security.AuthzToken authzToken, String dataMovementInterfaceId, org.apache.airavata.model.data.movement.GridFTPDataMovement gridFTPDataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateGridFTPDataMovementDetails(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String dataMovementInterfaceId, org.apache.airavata.model.data.movement.GridFTPDataMovement gridFTPDataMovement, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getGridFTPDataMovement(org.apache.airavata.model.security.AuthzToken authzToken, String dataMovementId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getGridFTPDataMovement(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String dataMovementId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.data.movement.GridFTPDataMovement> resultHandler) throws org.apache.thrift.TException;
  
 -    public void changeJobSubmissionPriority(org.apache.airavata.model.security.AuthzToken authzToken, String jobSubmissionInterfaceId, int newPriorityOrder, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void changeJobSubmissionPriority(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String jobSubmissionInterfaceId, int newPriorityOrder, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void changeDataMovementPriority(org.apache.airavata.model.security.AuthzToken authzToken, String dataMovementInterfaceId, int newPriorityOrder, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void changeDataMovementPriority(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String dataMovementInterfaceId, int newPriorityOrder, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void changeJobSubmissionPriorities(org.apache.airavata.model.security.AuthzToken authzToken, Map<String,Integer> jobSubmissionPriorityMap, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void changeJobSubmissionPriorities(org.apache.airavata.model.security.AuthzToken authzToken, java.util.Map<java.lang.String,java.lang.Integer> jobSubmissionPriorityMap, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void changeDataMovementPriorities(org.apache.airavata.model.security.AuthzToken authzToken, Map<String,Integer> dataMovementPriorityMap, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void changeDataMovementPriorities(org.apache.airavata.model.security.AuthzToken authzToken, java.util.Map<java.lang.String,java.lang.Integer> dataMovementPriorityMap, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void deleteJobSubmissionInterface(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String jobSubmissionInterfaceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void deleteJobSubmissionInterface(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String computeResourceId, java.lang.String jobSubmissionInterfaceId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void deleteDataMovementInterface(org.apache.airavata.model.security.AuthzToken authzToken, String productUri, String dataMovementInterfaceId, org.apache.airavata.model.data.movement.DMType dataMoveType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void deleteDataMovementInterface(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String productUri, java.lang.String dataMovementInterfaceId, org.apache.airavata.model.data.movement.DMType dataMoveType, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void registerResourceJobManager(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager resourceJobManager, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void registerResourceJobManager(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager resourceJobManager, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateResourceJobManager(org.apache.airavata.model.security.AuthzToken authzToken, String resourceJobManagerId, org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager updatedResourceJobManager, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateResourceJobManager(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String resourceJobManagerId, org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager updatedResourceJobManager, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getResourceJobManager(org.apache.airavata.model.security.AuthzToken authzToken, String resourceJobManagerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getResourceJobManager(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String resourceJobManagerId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager> resultHandler) throws org.apache.thrift.TException;
  
 -    public void deleteResourceJobManager(org.apache.airavata.model.security.AuthzToken authzToken, String resourceJobManagerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void deleteResourceJobManager(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String resourceJobManagerId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void deleteBatchQueue(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String queueName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void deleteBatchQueue(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String computeResourceId, java.lang.String queueName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void registerGatewayResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile gatewayResourceProfile, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void registerGatewayResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile gatewayResourceProfile, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getGatewayResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getGatewayResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayID, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateGatewayResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayID, org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile gatewayResourceProfile, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateGatewayResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayID, org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile gatewayResourceProfile, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void deleteGatewayResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void deleteGatewayResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayID, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void addGatewayComputeResourcePreference(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayID, String computeResourceId, org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference computeResourcePreference, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void addGatewayComputeResourcePreference(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayID, java.lang.String computeResourceId, org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference computeResourcePreference, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void addGatewayStoragePreference(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayID, String storageResourceId, org.apache.airavata.model.appcatalog.gatewayprofile.StoragePreference storagePreference, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void addGatewayStoragePreference(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayID, java.lang.String storageResourceId, org.apache.airavata.model.appcatalog.gatewayprofile.StoragePreference storagePreference, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getGatewayComputeResourcePreference(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayID, String computeResourceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getGatewayComputeResourcePreference(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayID, java.lang.String computeResourceId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getGatewayStoragePreference(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayID, String storageResourceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getGatewayStoragePreference(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayID, java.lang.String storageResourceId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.gatewayprofile.StoragePreference> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getAllGatewayComputeResourcePreferences(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getAllGatewayComputeResourcePreferences(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayID, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getAllGatewayStoragePreferences(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getAllGatewayStoragePreferences(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayID, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.appcatalog.gatewayprofile.StoragePreference>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getAllGatewayResourceProfiles(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getAllGatewayResourceProfiles(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateGatewayComputeResourcePreference(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayID, String computeResourceId, org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference computeResourcePreference, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateGatewayComputeResourcePreference(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayID, java.lang.String computeResourceId, org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference computeResourcePreference, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateGatewayStoragePreference(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayID, String storageId, org.apache.airavata.model.appcatalog.gatewayprofile.StoragePreference storagePreference, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateGatewayStoragePreference(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayID, java.lang.String storageId, org.apache.airavata.model.appcatalog.gatewayprofile.StoragePreference storagePreference, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void deleteGatewayComputeResourcePreference(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayID, String computeResourceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void deleteGatewayComputeResourcePreference(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayID, java.lang.String computeResourceId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void deleteGatewayStoragePreference(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayID, String storageId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void deleteGatewayStoragePreference(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayID, java.lang.String storageId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getSSHAccountProvisioners(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
++    public void getSSHAccountProvisioners(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner>> resultHandler) throws org.apache.thrift.TException;
+ 
 -    public void doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
++    public void doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String computeResourceId, java.lang.String userId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
+ 
 -    public void setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String userId, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
++    public void setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String computeResourceId, java.lang.String userId, java.lang.String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> resultHandler) throws org.apache.thrift.TException;
+ 
 -    public void registerUserResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile userResourceProfile, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void registerUserResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile userResourceProfile, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getUserResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, String userId, String gatewayID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getUserResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayID, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> resultHandler) throws org.apache.thrift.TException;
  
 -    public void updateUserResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, String userId, String gatewayID, org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile userResourceProfile, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void updateUserResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayID, org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile userResourceProfile, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void deleteUserResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, String userId, String gatewayID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void deleteUserResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayID, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void addUserComputeResourcePreference(org.apache.airavata.model.security.AuthzToken authzToken, String userId, String gatewayID, String userComputeResourceId, org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference userComputeResourcePreference, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void addUserComputeResourcePreference(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayID, java.lang.String userComputeResourceId, org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference userComputeResourcePreference, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void addUserStoragePreference(org.apache.airavata.model.security.AuthzToken authzToken, String userId, String gatewayID, String userStorageResourceId, org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference userStoragePreference, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void addUserStoragePreference(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayID, java.lang.String userStorageResourceId, org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference userStoragePreference, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getUserComputeResourcePreference(org.apache.airavata.model.security.AuthzToken authzToken, String userId, String gatewayID, String userComputeResourceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getUserComputeResourcePreference(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayID, java.lang.String userComputeResourceId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getUserStoragePreference(org.apache.airavata.model.security.AuthzToken authzToken, String userId, String gatewayID, String userStorageResourceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getUserStoragePreference(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayID, java.lang.String userStorageResourceId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> resultHandler) throws org.apache.thrift.TException;
  
 -    public void getAllUserComputeResourcePreferences(org.apache.airavata.model.security.AuthzToken authzToken, String userId, String gatewayID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 +    public void getAllUserComputeResourcePreferences(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String userId, java.lang.String gatewayID, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>> resultHandler) throws org.apache.thrift.TException;
  
 -    public void get

<TRUNCATED>
http://git-wip-us.apache.org/repos/asf/airavata/blob/ebdf8977/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/airavata/blob/ebdf8977/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php
----------------------------------------------------------------------


[09/40] airavata git commit: AIRAVATA-2500: generated Thrift stub code

Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/722aabd4/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisioner.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisioner.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisioner.java
new file mode 100644
index 0000000..fb0a965
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisioner.java
@@ -0,0 +1,600 @@
+/**
+ * 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.
+ */
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.model.appcatalog.accountprovisioning;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+public class SSHAccountProvisioner implements org.apache.thrift.TBase<SSHAccountProvisioner, SSHAccountProvisioner._Fields>, java.io.Serializable, Cloneable, Comparable<SSHAccountProvisioner> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SSHAccountProvisioner");
+
+  private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField CAN_CREATE_ACCOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("canCreateAccount", org.apache.thrift.protocol.TType.BOOL, (short)2);
+  private static final org.apache.thrift.protocol.TField CAN_INSTALL_SSHKEY_FIELD_DESC = new org.apache.thrift.protocol.TField("canInstallSSHKey", org.apache.thrift.protocol.TType.BOOL, (short)3);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new SSHAccountProvisionerStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new SSHAccountProvisionerTupleSchemeFactory());
+  }
+
+  private String name; // required
+  private boolean canCreateAccount; // required
+  private boolean canInstallSSHKey; // required
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+    NAME((short)1, "name"),
+    CAN_CREATE_ACCOUNT((short)2, "canCreateAccount"),
+    CAN_INSTALL_SSHKEY((short)3, "canInstallSSHKey");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // NAME
+          return NAME;
+        case 2: // CAN_CREATE_ACCOUNT
+          return CAN_CREATE_ACCOUNT;
+        case 3: // CAN_INSTALL_SSHKEY
+          return CAN_INSTALL_SSHKEY;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  private static final int __CANCREATEACCOUNT_ISSET_ID = 0;
+  private static final int __CANINSTALLSSHKEY_ISSET_ID = 1;
+  private byte __isset_bitfield = 0;
+  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.CAN_CREATE_ACCOUNT, new org.apache.thrift.meta_data.FieldMetaData("canCreateAccount", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+    tmpMap.put(_Fields.CAN_INSTALL_SSHKEY, new org.apache.thrift.meta_data.FieldMetaData("canInstallSSHKey", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SSHAccountProvisioner.class, metaDataMap);
+  }
+
+  public SSHAccountProvisioner() {
+  }
+
+  public SSHAccountProvisioner(
+    String name,
+    boolean canCreateAccount,
+    boolean canInstallSSHKey)
+  {
+    this();
+    this.name = name;
+    this.canCreateAccount = canCreateAccount;
+    setCanCreateAccountIsSet(true);
+    this.canInstallSSHKey = canInstallSSHKey;
+    setCanInstallSSHKeyIsSet(true);
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public SSHAccountProvisioner(SSHAccountProvisioner other) {
+    __isset_bitfield = other.__isset_bitfield;
+    if (other.isSetName()) {
+      this.name = other.name;
+    }
+    this.canCreateAccount = other.canCreateAccount;
+    this.canInstallSSHKey = other.canInstallSSHKey;
+  }
+
+  public SSHAccountProvisioner deepCopy() {
+    return new SSHAccountProvisioner(this);
+  }
+
+  @Override
+  public void clear() {
+    this.name = null;
+    setCanCreateAccountIsSet(false);
+    this.canCreateAccount = false;
+    setCanInstallSSHKeyIsSet(false);
+    this.canInstallSSHKey = false;
+  }
+
+  public String getName() {
+    return this.name;
+  }
+
+  public void setName(String name) {
+    this.name = name;
+  }
+
+  public void unsetName() {
+    this.name = null;
+  }
+
+  /** Returns true if field name is set (has been assigned a value) and false otherwise */
+  public boolean isSetName() {
+    return this.name != null;
+  }
+
+  public void setNameIsSet(boolean value) {
+    if (!value) {
+      this.name = null;
+    }
+  }
+
+  public boolean isCanCreateAccount() {
+    return this.canCreateAccount;
+  }
+
+  public void setCanCreateAccount(boolean canCreateAccount) {
+    this.canCreateAccount = canCreateAccount;
+    setCanCreateAccountIsSet(true);
+  }
+
+  public void unsetCanCreateAccount() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CANCREATEACCOUNT_ISSET_ID);
+  }
+
+  /** Returns true if field canCreateAccount is set (has been assigned a value) and false otherwise */
+  public boolean isSetCanCreateAccount() {
+    return EncodingUtils.testBit(__isset_bitfield, __CANCREATEACCOUNT_ISSET_ID);
+  }
+
+  public void setCanCreateAccountIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CANCREATEACCOUNT_ISSET_ID, value);
+  }
+
+  public boolean isCanInstallSSHKey() {
+    return this.canInstallSSHKey;
+  }
+
+  public void setCanInstallSSHKey(boolean canInstallSSHKey) {
+    this.canInstallSSHKey = canInstallSSHKey;
+    setCanInstallSSHKeyIsSet(true);
+  }
+
+  public void unsetCanInstallSSHKey() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CANINSTALLSSHKEY_ISSET_ID);
+  }
+
+  /** Returns true if field canInstallSSHKey is set (has been assigned a value) and false otherwise */
+  public boolean isSetCanInstallSSHKey() {
+    return EncodingUtils.testBit(__isset_bitfield, __CANINSTALLSSHKEY_ISSET_ID);
+  }
+
+  public void setCanInstallSSHKeyIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CANINSTALLSSHKEY_ISSET_ID, value);
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case NAME:
+      if (value == null) {
+        unsetName();
+      } else {
+        setName((String)value);
+      }
+      break;
+
+    case CAN_CREATE_ACCOUNT:
+      if (value == null) {
+        unsetCanCreateAccount();
+      } else {
+        setCanCreateAccount((Boolean)value);
+      }
+      break;
+
+    case CAN_INSTALL_SSHKEY:
+      if (value == null) {
+        unsetCanInstallSSHKey();
+      } else {
+        setCanInstallSSHKey((Boolean)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case NAME:
+      return getName();
+
+    case CAN_CREATE_ACCOUNT:
+      return isCanCreateAccount();
+
+    case CAN_INSTALL_SSHKEY:
+      return isCanInstallSSHKey();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case NAME:
+      return isSetName();
+    case CAN_CREATE_ACCOUNT:
+      return isSetCanCreateAccount();
+    case CAN_INSTALL_SSHKEY:
+      return isSetCanInstallSSHKey();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof SSHAccountProvisioner)
+      return this.equals((SSHAccountProvisioner)that);
+    return false;
+  }
+
+  public boolean equals(SSHAccountProvisioner that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_name = true && this.isSetName();
+    boolean that_present_name = true && that.isSetName();
+    if (this_present_name || that_present_name) {
+      if (!(this_present_name && that_present_name))
+        return false;
+      if (!this.name.equals(that.name))
+        return false;
+    }
+
+    boolean this_present_canCreateAccount = true;
+    boolean that_present_canCreateAccount = true;
+    if (this_present_canCreateAccount || that_present_canCreateAccount) {
+      if (!(this_present_canCreateAccount && that_present_canCreateAccount))
+        return false;
+      if (this.canCreateAccount != that.canCreateAccount)
+        return false;
+    }
+
+    boolean this_present_canInstallSSHKey = true;
+    boolean that_present_canInstallSSHKey = true;
+    if (this_present_canInstallSSHKey || that_present_canInstallSSHKey) {
+      if (!(this_present_canInstallSSHKey && that_present_canInstallSSHKey))
+        return false;
+      if (this.canInstallSSHKey != that.canInstallSSHKey)
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_name = true && (isSetName());
+    list.add(present_name);
+    if (present_name)
+      list.add(name);
+
+    boolean present_canCreateAccount = true;
+    list.add(present_canCreateAccount);
+    if (present_canCreateAccount)
+      list.add(canCreateAccount);
+
+    boolean present_canInstallSSHKey = true;
+    list.add(present_canInstallSSHKey);
+    if (present_canInstallSSHKey)
+      list.add(canInstallSSHKey);
+
+    return list.hashCode();
+  }
+
+  @Override
+  public int compareTo(SSHAccountProvisioner other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetCanCreateAccount()).compareTo(other.isSetCanCreateAccount());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetCanCreateAccount()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.canCreateAccount, other.canCreateAccount);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetCanInstallSSHKey()).compareTo(other.isSetCanInstallSSHKey());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetCanInstallSSHKey()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.canInstallSSHKey, other.canInstallSSHKey);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("SSHAccountProvisioner(");
+    boolean first = true;
+
+    sb.append("name:");
+    if (this.name == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.name);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("canCreateAccount:");
+    sb.append(this.canCreateAccount);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("canInstallSSHKey:");
+    sb.append(this.canInstallSSHKey);
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    if (!isSetName()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' is unset! Struct:" + toString());
+    }
+
+    if (!isSetCanCreateAccount()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'canCreateAccount' is unset! Struct:" + toString());
+    }
+
+    if (!isSetCanInstallSSHKey()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'canInstallSSHKey' is unset! Struct:" + toString());
+    }
+
+    // check for sub-struct validity
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+      __isset_bitfield = 0;
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private static class SSHAccountProvisionerStandardSchemeFactory implements SchemeFactory {
+    public SSHAccountProvisionerStandardScheme getScheme() {
+      return new SSHAccountProvisionerStandardScheme();
+    }
+  }
+
+  private static class SSHAccountProvisionerStandardScheme extends StandardScheme<SSHAccountProvisioner> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, SSHAccountProvisioner struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.name = iprot.readString();
+              struct.setNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // CAN_CREATE_ACCOUNT
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.canCreateAccount = iprot.readBool();
+              struct.setCanCreateAccountIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // CAN_INSTALL_SSHKEY
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.canInstallSSHKey = iprot.readBool();
+              struct.setCanInstallSSHKeyIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, SSHAccountProvisioner struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.name != null) {
+        oprot.writeFieldBegin(NAME_FIELD_DESC);
+        oprot.writeString(struct.name);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(CAN_CREATE_ACCOUNT_FIELD_DESC);
+      oprot.writeBool(struct.canCreateAccount);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(CAN_INSTALL_SSHKEY_FIELD_DESC);
+      oprot.writeBool(struct.canInstallSSHKey);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class SSHAccountProvisionerTupleSchemeFactory implements SchemeFactory {
+    public SSHAccountProvisionerTupleScheme getScheme() {
+      return new SSHAccountProvisionerTupleScheme();
+    }
+  }
+
+  private static class SSHAccountProvisionerTupleScheme extends TupleScheme<SSHAccountProvisioner> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, SSHAccountProvisioner struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      oprot.writeString(struct.name);
+      oprot.writeBool(struct.canCreateAccount);
+      oprot.writeBool(struct.canInstallSSHKey);
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, SSHAccountProvisioner struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      struct.name = iprot.readString();
+      struct.setNameIsSet(true);
+      struct.canCreateAccount = iprot.readBool();
+      struct.setCanCreateAccountIsSet(true);
+      struct.canInstallSSHKey = iprot.readBool();
+      struct.setCanInstallSSHKeyIsSet(true);
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/722aabd4/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisionerConfigParam.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisionerConfigParam.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisionerConfigParam.java
new file mode 100644
index 0000000..11b6613
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisionerConfigParam.java
@@ -0,0 +1,733 @@
+/**
+ * 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.
+ */
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.model.appcatalog.accountprovisioning;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+public class SSHAccountProvisionerConfigParam implements org.apache.thrift.TBase<SSHAccountProvisionerConfigParam, SSHAccountProvisionerConfigParam._Fields>, java.io.Serializable, Cloneable, Comparable<SSHAccountProvisionerConfigParam> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SSHAccountProvisionerConfigParam");
+
+  private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)2);
+  private static final org.apache.thrift.protocol.TField IS_OPTIONAL_FIELD_DESC = new org.apache.thrift.protocol.TField("isOptional", org.apache.thrift.protocol.TType.BOOL, (short)3);
+  private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)4);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new SSHAccountProvisionerConfigParamStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new SSHAccountProvisionerConfigParamTupleSchemeFactory());
+  }
+
+  private String name; // required
+  private SSHAccountProvisionerConfigParamType type; // required
+  private boolean isOptional; // required
+  private String description; // optional
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+    NAME((short)1, "name"),
+    /**
+     * 
+     * @see SSHAccountProvisionerConfigParamType
+     */
+    TYPE((short)2, "type"),
+    IS_OPTIONAL((short)3, "isOptional"),
+    DESCRIPTION((short)4, "description");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // NAME
+          return NAME;
+        case 2: // TYPE
+          return TYPE;
+        case 3: // IS_OPTIONAL
+          return IS_OPTIONAL;
+        case 4: // DESCRIPTION
+          return DESCRIPTION;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  private static final int __ISOPTIONAL_ISSET_ID = 0;
+  private byte __isset_bitfield = 0;
+  private static final _Fields optionals[] = {_Fields.DESCRIPTION};
+  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SSHAccountProvisionerConfigParamType.class)));
+    tmpMap.put(_Fields.IS_OPTIONAL, new org.apache.thrift.meta_data.FieldMetaData("isOptional", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+    tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SSHAccountProvisionerConfigParam.class, metaDataMap);
+  }
+
+  public SSHAccountProvisionerConfigParam() {
+    this.type = org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParamType.STRING;
+
+    this.isOptional = false;
+
+  }
+
+  public SSHAccountProvisionerConfigParam(
+    String name,
+    SSHAccountProvisionerConfigParamType type,
+    boolean isOptional)
+  {
+    this();
+    this.name = name;
+    this.type = type;
+    this.isOptional = isOptional;
+    setIsOptionalIsSet(true);
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public SSHAccountProvisionerConfigParam(SSHAccountProvisionerConfigParam other) {
+    __isset_bitfield = other.__isset_bitfield;
+    if (other.isSetName()) {
+      this.name = other.name;
+    }
+    if (other.isSetType()) {
+      this.type = other.type;
+    }
+    this.isOptional = other.isOptional;
+    if (other.isSetDescription()) {
+      this.description = other.description;
+    }
+  }
+
+  public SSHAccountProvisionerConfigParam deepCopy() {
+    return new SSHAccountProvisionerConfigParam(this);
+  }
+
+  @Override
+  public void clear() {
+    this.name = null;
+    this.type = org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParamType.STRING;
+
+    this.isOptional = false;
+
+    this.description = null;
+  }
+
+  public String getName() {
+    return this.name;
+  }
+
+  public void setName(String name) {
+    this.name = name;
+  }
+
+  public void unsetName() {
+    this.name = null;
+  }
+
+  /** Returns true if field name is set (has been assigned a value) and false otherwise */
+  public boolean isSetName() {
+    return this.name != null;
+  }
+
+  public void setNameIsSet(boolean value) {
+    if (!value) {
+      this.name = null;
+    }
+  }
+
+  /**
+   * 
+   * @see SSHAccountProvisionerConfigParamType
+   */
+  public SSHAccountProvisionerConfigParamType getType() {
+    return this.type;
+  }
+
+  /**
+   * 
+   * @see SSHAccountProvisionerConfigParamType
+   */
+  public void setType(SSHAccountProvisionerConfigParamType type) {
+    this.type = type;
+  }
+
+  public void unsetType() {
+    this.type = null;
+  }
+
+  /** Returns true if field type is set (has been assigned a value) and false otherwise */
+  public boolean isSetType() {
+    return this.type != null;
+  }
+
+  public void setTypeIsSet(boolean value) {
+    if (!value) {
+      this.type = null;
+    }
+  }
+
+  public boolean isIsOptional() {
+    return this.isOptional;
+  }
+
+  public void setIsOptional(boolean isOptional) {
+    this.isOptional = isOptional;
+    setIsOptionalIsSet(true);
+  }
+
+  public void unsetIsOptional() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISOPTIONAL_ISSET_ID);
+  }
+
+  /** Returns true if field isOptional is set (has been assigned a value) and false otherwise */
+  public boolean isSetIsOptional() {
+    return EncodingUtils.testBit(__isset_bitfield, __ISOPTIONAL_ISSET_ID);
+  }
+
+  public void setIsOptionalIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISOPTIONAL_ISSET_ID, value);
+  }
+
+  public String getDescription() {
+    return this.description;
+  }
+
+  public void setDescription(String description) {
+    this.description = description;
+  }
+
+  public void unsetDescription() {
+    this.description = null;
+  }
+
+  /** Returns true if field description is set (has been assigned a value) and false otherwise */
+  public boolean isSetDescription() {
+    return this.description != null;
+  }
+
+  public void setDescriptionIsSet(boolean value) {
+    if (!value) {
+      this.description = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case NAME:
+      if (value == null) {
+        unsetName();
+      } else {
+        setName((String)value);
+      }
+      break;
+
+    case TYPE:
+      if (value == null) {
+        unsetType();
+      } else {
+        setType((SSHAccountProvisionerConfigParamType)value);
+      }
+      break;
+
+    case IS_OPTIONAL:
+      if (value == null) {
+        unsetIsOptional();
+      } else {
+        setIsOptional((Boolean)value);
+      }
+      break;
+
+    case DESCRIPTION:
+      if (value == null) {
+        unsetDescription();
+      } else {
+        setDescription((String)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case NAME:
+      return getName();
+
+    case TYPE:
+      return getType();
+
+    case IS_OPTIONAL:
+      return isIsOptional();
+
+    case DESCRIPTION:
+      return getDescription();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case NAME:
+      return isSetName();
+    case TYPE:
+      return isSetType();
+    case IS_OPTIONAL:
+      return isSetIsOptional();
+    case DESCRIPTION:
+      return isSetDescription();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof SSHAccountProvisionerConfigParam)
+      return this.equals((SSHAccountProvisionerConfigParam)that);
+    return false;
+  }
+
+  public boolean equals(SSHAccountProvisionerConfigParam that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_name = true && this.isSetName();
+    boolean that_present_name = true && that.isSetName();
+    if (this_present_name || that_present_name) {
+      if (!(this_present_name && that_present_name))
+        return false;
+      if (!this.name.equals(that.name))
+        return false;
+    }
+
+    boolean this_present_type = true && this.isSetType();
+    boolean that_present_type = true && that.isSetType();
+    if (this_present_type || that_present_type) {
+      if (!(this_present_type && that_present_type))
+        return false;
+      if (!this.type.equals(that.type))
+        return false;
+    }
+
+    boolean this_present_isOptional = true;
+    boolean that_present_isOptional = true;
+    if (this_present_isOptional || that_present_isOptional) {
+      if (!(this_present_isOptional && that_present_isOptional))
+        return false;
+      if (this.isOptional != that.isOptional)
+        return false;
+    }
+
+    boolean this_present_description = true && this.isSetDescription();
+    boolean that_present_description = true && that.isSetDescription();
+    if (this_present_description || that_present_description) {
+      if (!(this_present_description && that_present_description))
+        return false;
+      if (!this.description.equals(that.description))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_name = true && (isSetName());
+    list.add(present_name);
+    if (present_name)
+      list.add(name);
+
+    boolean present_type = true && (isSetType());
+    list.add(present_type);
+    if (present_type)
+      list.add(type.getValue());
+
+    boolean present_isOptional = true;
+    list.add(present_isOptional);
+    if (present_isOptional)
+      list.add(isOptional);
+
+    boolean present_description = true && (isSetDescription());
+    list.add(present_description);
+    if (present_description)
+      list.add(description);
+
+    return list.hashCode();
+  }
+
+  @Override
+  public int compareTo(SSHAccountProvisionerConfigParam other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetType()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetIsOptional()).compareTo(other.isSetIsOptional());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetIsOptional()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isOptional, other.isOptional);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetDescription()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("SSHAccountProvisionerConfigParam(");
+    boolean first = true;
+
+    sb.append("name:");
+    if (this.name == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.name);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("type:");
+    if (this.type == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.type);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("isOptional:");
+    sb.append(this.isOptional);
+    first = false;
+    if (isSetDescription()) {
+      if (!first) sb.append(", ");
+      sb.append("description:");
+      if (this.description == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.description);
+      }
+      first = false;
+    }
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    if (!isSetName()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' is unset! Struct:" + toString());
+    }
+
+    if (!isSetType()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' is unset! Struct:" + toString());
+    }
+
+    if (!isSetIsOptional()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'isOptional' is unset! Struct:" + toString());
+    }
+
+    // check for sub-struct validity
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+      __isset_bitfield = 0;
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private static class SSHAccountProvisionerConfigParamStandardSchemeFactory implements SchemeFactory {
+    public SSHAccountProvisionerConfigParamStandardScheme getScheme() {
+      return new SSHAccountProvisionerConfigParamStandardScheme();
+    }
+  }
+
+  private static class SSHAccountProvisionerConfigParamStandardScheme extends StandardScheme<SSHAccountProvisionerConfigParam> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, SSHAccountProvisionerConfigParam struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.name = iprot.readString();
+              struct.setNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // TYPE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.type = org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParamType.findByValue(iprot.readI32());
+              struct.setTypeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // IS_OPTIONAL
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.isOptional = iprot.readBool();
+              struct.setIsOptionalIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // DESCRIPTION
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.description = iprot.readString();
+              struct.setDescriptionIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, SSHAccountProvisionerConfigParam struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.name != null) {
+        oprot.writeFieldBegin(NAME_FIELD_DESC);
+        oprot.writeString(struct.name);
+        oprot.writeFieldEnd();
+      }
+      if (struct.type != null) {
+        oprot.writeFieldBegin(TYPE_FIELD_DESC);
+        oprot.writeI32(struct.type.getValue());
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(IS_OPTIONAL_FIELD_DESC);
+      oprot.writeBool(struct.isOptional);
+      oprot.writeFieldEnd();
+      if (struct.description != null) {
+        if (struct.isSetDescription()) {
+          oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+          oprot.writeString(struct.description);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class SSHAccountProvisionerConfigParamTupleSchemeFactory implements SchemeFactory {
+    public SSHAccountProvisionerConfigParamTupleScheme getScheme() {
+      return new SSHAccountProvisionerConfigParamTupleScheme();
+    }
+  }
+
+  private static class SSHAccountProvisionerConfigParamTupleScheme extends TupleScheme<SSHAccountProvisionerConfigParam> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, SSHAccountProvisionerConfigParam struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      oprot.writeString(struct.name);
+      oprot.writeI32(struct.type.getValue());
+      oprot.writeBool(struct.isOptional);
+      BitSet optionals = new BitSet();
+      if (struct.isSetDescription()) {
+        optionals.set(0);
+      }
+      oprot.writeBitSet(optionals, 1);
+      if (struct.isSetDescription()) {
+        oprot.writeString(struct.description);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, SSHAccountProvisionerConfigParam struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      struct.name = iprot.readString();
+      struct.setNameIsSet(true);
+      struct.type = org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParamType.findByValue(iprot.readI32());
+      struct.setTypeIsSet(true);
+      struct.isOptional = iprot.readBool();
+      struct.setIsOptionalIsSet(true);
+      BitSet incoming = iprot.readBitSet(1);
+      if (incoming.get(0)) {
+        struct.description = iprot.readString();
+        struct.setDescriptionIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/722aabd4/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisionerConfigParamType.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisionerConfigParamType.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisionerConfigParamType.java
new file mode 100644
index 0000000..a6bde9a
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisionerConfigParamType.java
@@ -0,0 +1,62 @@
+/**
+ * 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.
+ */
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.model.appcatalog.accountprovisioning;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+public enum SSHAccountProvisionerConfigParamType implements org.apache.thrift.TEnum {
+  STRING(0),
+  CRED_STORE_PASSWORD_TOKEN(1);
+
+  private final int value;
+
+  private SSHAccountProvisionerConfigParamType(int value) {
+    this.value = value;
+  }
+
+  /**
+   * Get the integer value of this enum value, as defined in the Thrift IDL.
+   */
+  public int getValue() {
+    return value;
+  }
+
+  /**
+   * Find a the enum type by its integer value, as defined in the Thrift IDL.
+   * @return null if the value is not found.
+   */
+  public static SSHAccountProvisionerConfigParamType findByValue(int value) { 
+    switch (value) {
+      case 0:
+        return STRING;
+      case 1:
+        return CRED_STORE_PASSWORD_TOKEN;
+      default:
+        return null;
+    }
+  }
+}


[13/40] airavata git commit: AIRAVATA-2500 Finish implementing SSHAccountManager

Posted by ma...@apache.org.
AIRAVATA-2500 Finish implementing SSHAccountManager


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

Branch: refs/heads/develop
Commit: 0d1e90f612831337588867f2589819eefcadde0a
Parents: 8c748c6
Author: Marcus Christie <ma...@apache.org>
Authored: Thu Aug 24 14:23:10 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Tue Sep 19 15:07:56 2017 -0400

----------------------------------------------------------------------
 .../accountprovisioning/SSHAccountManager.java  | 41 ++++++++++++++------
 1 file changed, 30 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/0d1e90f6/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
index a56a632..ec7cfc1 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
@@ -27,7 +27,11 @@ import org.apache.airavata.credential.store.cpi.CredentialStoreService;
 import org.apache.airavata.credential.store.exception.CredentialStoreException;
 import org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam;
 import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
+import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
+import org.apache.airavata.model.appcatalog.computeresource.SSHJobSubmission;
 import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
+import org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference;
 import org.apache.airavata.model.credential.store.PasswordCredential;
 import org.apache.airavata.model.credential.store.SSHCredential;
 import org.apache.airavata.registry.api.RegistryService;
@@ -47,24 +51,37 @@ public class SSHAccountManager {
 
     private final static Logger logger = LoggerFactory.getLogger(SSHAccountManager.class);
 
-    // TODO: change return type to one that returns some details of the SSH account setup, for example the scratch location
-    public static void setupSSHAccount(String gatewayId, String computeResourceId, String username, SSHCredential sshCredential) {
+    public static UserComputeResourcePreference setupSSHAccount(String gatewayId, String computeResourceId, String username, SSHCredential sshCredential) {
 
         // get compute resource preferences for the gateway and hostname
-        // TODO: close the registry service client transport when done with it
         RegistryService.Client registryServiceClient = getRegistryServiceClient();
         ComputeResourcePreference computeResourcePreference = null;
         ComputeResourceDescription computeResourceDescription = null;
+        SSHJobSubmission sshJobSubmission = null;
         try {
             computeResourcePreference = registryServiceClient.getGatewayComputeResourcePreference(gatewayId, computeResourceId);
             computeResourceDescription = registryServiceClient.getComputeResource(computeResourceId);
+            // Find the SSHJobSubmission
+            for (JobSubmissionInterface jobSubmissionInterface : computeResourceDescription.getJobSubmissionInterfaces()) {
+                if (jobSubmissionInterface.getJobSubmissionProtocol() == JobSubmissionProtocol.SSH) {
+                    sshJobSubmission = registryServiceClient.getSSHJobSubmission(jobSubmissionInterface.getJobSubmissionInterfaceId());
+                    break;
+                }
+            }
         } catch(TException e) {
             throw new RuntimeException(e);
+        } finally {
+            if (registryServiceClient.getInputProtocol().getTransport().isOpen()) {
+                registryServiceClient.getInputProtocol().getTransport().close();
+            }
+        }
+
+        if (sshJobSubmission == null) {
+            throw new RuntimeException("Compute resource [" + computeResourceId + "] does not have an SSH Job Submission interface.");
         }
 
         // get the account provisioner and config values for the preferences
         if (!computeResourcePreference.isSetSshAccountProvisioner()) {
-            // TODO: provide better exception?
             throw new RuntimeException("Compute resource [" + computeResourceId + "] does not have an SSH Account Provisioner configured for it.");
         }
         String provisionerName = computeResourcePreference.getSshAccountProvisioner();
@@ -79,18 +96,16 @@ public class SSHAccountManager {
         boolean hasAccount = sshAccountProvisioner.hasAccount(username);
 
         if (!hasAccount && !sshAccountProvisioner.canCreateAccount()) {
-            // TODO: provide better exception
             throw new RuntimeException("User [" + username + "] doesn't have account and [" + provisionerName + "] doesn't support creating account.");
         }
 
-        // TODO: first check if SSH key is already installed, or do we care?
-
         // Install SSH key
         sshAccountProvisioner.installSSHKey(username, sshCredential.getPublicKey());
 
-        // TODO: replace hard coded port 22 with port from SSHJobSubmission interface
         // Verify can authenticate to host
-        boolean validated = SSHUtil.validate(computeResourceDescription.getHostName(), 22, username, sshCredential);
+        String sshHostname = sshJobSubmission.getAlternativeSSHHostName() != null ? sshJobSubmission.getAlternativeSSHHostName() : computeResourceDescription.getHostName();
+        int sshPort = sshJobSubmission.getSshPort();
+        boolean validated = SSHUtil.validate(sshHostname, sshPort, username, sshCredential);
         if (!validated) {
             throw new RuntimeException("Failed to validate installation of key for [" + username
                     + "] on [" + computeResourceDescription.getHostName() + "] using SSH Account Provisioner ["
@@ -99,9 +114,13 @@ public class SSHAccountManager {
 
         // create the scratch location on the host
         String scratchLocation = sshAccountProvisioner.getScratchLocation(username);
-        SSHUtil.execute(computeResourceDescription.getHostName(), 22, username, sshCredential, "mkdir -p " + scratchLocation);
+        SSHUtil.execute(sshHostname, sshPort, username, sshCredential, "mkdir -p " + scratchLocation);
 
-        // TODO: return information about provisioned account
+        UserComputeResourcePreference userComputeResourcePreference = new UserComputeResourcePreference();
+        userComputeResourcePreference.setComputeResourceId(computeResourceId);
+        userComputeResourcePreference.setLoginUserName(username);
+        userComputeResourcePreference.setScratchLocation(scratchLocation);
+        return userComputeResourcePreference;
     }
 
     private static Map<ConfigParam, String> resolveProvisionerConfig(String gatewayId, String provisionerName, Map<ConfigParam, String> provisionerConfig) {


[34/40] airavata git commit: AIRAVATA-2500 fixing order of arguments

Posted by ma...@apache.org.
AIRAVATA-2500 fixing order of arguments


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

Branch: refs/heads/develop
Commit: 29fedaf52435c5ab97b524298bfa52a476fd80ce
Parents: e5dcade
Author: Marcus Christie <ma...@apache.org>
Authored: Mon Sep 25 10:33:24 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Mon Sep 25 10:33:24 2017 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/airavata/accountprovisioning/SSHUtil.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/29fedaf5/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHUtil.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHUtil.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHUtil.java
index 4ac60bf..f823648 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHUtil.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHUtil.java
@@ -148,7 +148,7 @@ public class SSHUtil {
         } catch (IOException e) {
             throw new RuntimeException(e);
         }
-        boolean result = validate(username, hostname, 22, sshCredential);
+        boolean result = validate(hostname, 22, username, sshCredential);
         System.out.println(result);
     }
 }


[38/40] airavata git commit: Merge branch 'AIRAVATA-2500' into develop

Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/ebdf8977/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/UserResourceProfile/Types.php
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/airavata/blob/ebdf8977/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisioner.java
----------------------------------------------------------------------
diff --cc airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisioner.java
index 0000000,0dcadc4..0a4d046
mode 000000,100644..100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisioner.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisioner.java
@@@ -1,0 -1,755 +1,722 @@@
+ /**
+  * 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.
+  */
+ 
+ /**
 - * Autogenerated by Thrift Compiler (0.9.3)
++ * Autogenerated by Thrift Compiler (0.10.0)
+  *
+  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+  *  @generated
+  */
+ package org.apache.airavata.model.appcatalog.accountprovisioning;
+ 
 -import org.apache.thrift.scheme.IScheme;
 -import org.apache.thrift.scheme.SchemeFactory;
 -import org.apache.thrift.scheme.StandardScheme;
 -
 -import org.apache.thrift.scheme.TupleScheme;
 -import org.apache.thrift.protocol.TTupleProtocol;
 -import org.apache.thrift.protocol.TProtocolException;
 -import org.apache.thrift.EncodingUtils;
 -import org.apache.thrift.TException;
 -import org.apache.thrift.async.AsyncMethodCallback;
 -import org.apache.thrift.server.AbstractNonblockingServer.*;
 -import java.util.List;
 -import java.util.ArrayList;
 -import java.util.Map;
 -import java.util.HashMap;
 -import java.util.EnumMap;
 -import java.util.Set;
 -import java.util.HashSet;
 -import java.util.EnumSet;
 -import java.util.Collections;
 -import java.util.BitSet;
 -import java.nio.ByteBuffer;
 -import java.util.Arrays;
 -import javax.annotation.Generated;
 -import org.slf4j.Logger;
 -import org.slf4j.LoggerFactory;
 -
 -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
++@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
++@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+ public class SSHAccountProvisioner implements org.apache.thrift.TBase<SSHAccountProvisioner, SSHAccountProvisioner._Fields>, java.io.Serializable, Cloneable, Comparable<SSHAccountProvisioner> {
+   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SSHAccountProvisioner");
+ 
+   private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
+   private static final org.apache.thrift.protocol.TField CAN_CREATE_ACCOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("canCreateAccount", org.apache.thrift.protocol.TType.BOOL, (short)2);
+   private static final org.apache.thrift.protocol.TField CAN_INSTALL_SSHKEY_FIELD_DESC = new org.apache.thrift.protocol.TField("canInstallSSHKey", org.apache.thrift.protocol.TType.BOOL, (short)3);
+   private static final org.apache.thrift.protocol.TField CONFIG_PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("configParams", org.apache.thrift.protocol.TType.LIST, (short)4);
+ 
 -  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
 -  static {
 -    schemes.put(StandardScheme.class, new SSHAccountProvisionerStandardSchemeFactory());
 -    schemes.put(TupleScheme.class, new SSHAccountProvisionerTupleSchemeFactory());
 -  }
++  private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SSHAccountProvisionerStandardSchemeFactory();
++  private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SSHAccountProvisionerTupleSchemeFactory();
+ 
 -  private String name; // required
++  private java.lang.String name; // required
+   private boolean canCreateAccount; // required
+   private boolean canInstallSSHKey; // required
 -  private List<SSHAccountProvisionerConfigParam> configParams; // required
++  private java.util.List<SSHAccountProvisionerConfigParam> configParams; // required
+ 
+   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+     NAME((short)1, "name"),
+     CAN_CREATE_ACCOUNT((short)2, "canCreateAccount"),
+     CAN_INSTALL_SSHKEY((short)3, "canInstallSSHKey"),
+     CONFIG_PARAMS((short)4, "configParams");
+ 
 -    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
++    private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+ 
+     static {
 -      for (_Fields field : EnumSet.allOf(_Fields.class)) {
++      for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
+         byName.put(field.getFieldName(), field);
+       }
+     }
+ 
+     /**
+      * Find the _Fields constant that matches fieldId, or null if its not found.
+      */
+     public static _Fields findByThriftId(int fieldId) {
+       switch(fieldId) {
+         case 1: // NAME
+           return NAME;
+         case 2: // CAN_CREATE_ACCOUNT
+           return CAN_CREATE_ACCOUNT;
+         case 3: // CAN_INSTALL_SSHKEY
+           return CAN_INSTALL_SSHKEY;
+         case 4: // CONFIG_PARAMS
+           return CONFIG_PARAMS;
+         default:
+           return null;
+       }
+     }
+ 
+     /**
+      * Find the _Fields constant that matches fieldId, throwing an exception
+      * if it is not found.
+      */
+     public static _Fields findByThriftIdOrThrow(int fieldId) {
+       _Fields fields = findByThriftId(fieldId);
 -      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
++      if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+       return fields;
+     }
+ 
+     /**
+      * Find the _Fields constant that matches name, or null if its not found.
+      */
 -    public static _Fields findByName(String name) {
++    public static _Fields findByName(java.lang.String name) {
+       return byName.get(name);
+     }
+ 
+     private final short _thriftId;
 -    private final String _fieldName;
++    private final java.lang.String _fieldName;
+ 
 -    _Fields(short thriftId, String fieldName) {
++    _Fields(short thriftId, java.lang.String fieldName) {
+       _thriftId = thriftId;
+       _fieldName = fieldName;
+     }
+ 
+     public short getThriftFieldId() {
+       return _thriftId;
+     }
+ 
 -    public String getFieldName() {
++    public java.lang.String getFieldName() {
+       return _fieldName;
+     }
+   }
+ 
+   // isset id assignments
+   private static final int __CANCREATEACCOUNT_ISSET_ID = 0;
+   private static final int __CANINSTALLSSHKEY_ISSET_ID = 1;
+   private byte __isset_bitfield = 0;
 -  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
++  public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+   static {
 -    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
++    java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+     tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+     tmpMap.put(_Fields.CAN_CREATE_ACCOUNT, new org.apache.thrift.meta_data.FieldMetaData("canCreateAccount", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+     tmpMap.put(_Fields.CAN_INSTALL_SSHKEY, new org.apache.thrift.meta_data.FieldMetaData("canInstallSSHKey", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+     tmpMap.put(_Fields.CONFIG_PARAMS, new org.apache.thrift.meta_data.FieldMetaData("configParams", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+         new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+             new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SSHAccountProvisionerConfigParam.class))));
 -    metaDataMap = Collections.unmodifiableMap(tmpMap);
++    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
+     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SSHAccountProvisioner.class, metaDataMap);
+   }
+ 
+   public SSHAccountProvisioner() {
+   }
+ 
+   public SSHAccountProvisioner(
 -    String name,
++    java.lang.String name,
+     boolean canCreateAccount,
+     boolean canInstallSSHKey,
 -    List<SSHAccountProvisionerConfigParam> configParams)
++    java.util.List<SSHAccountProvisionerConfigParam> configParams)
+   {
+     this();
+     this.name = name;
+     this.canCreateAccount = canCreateAccount;
+     setCanCreateAccountIsSet(true);
+     this.canInstallSSHKey = canInstallSSHKey;
+     setCanInstallSSHKeyIsSet(true);
+     this.configParams = configParams;
+   }
+ 
+   /**
+    * Performs a deep copy on <i>other</i>.
+    */
+   public SSHAccountProvisioner(SSHAccountProvisioner other) {
+     __isset_bitfield = other.__isset_bitfield;
+     if (other.isSetName()) {
+       this.name = other.name;
+     }
+     this.canCreateAccount = other.canCreateAccount;
+     this.canInstallSSHKey = other.canInstallSSHKey;
+     if (other.isSetConfigParams()) {
 -      List<SSHAccountProvisionerConfigParam> __this__configParams = new ArrayList<SSHAccountProvisionerConfigParam>(other.configParams.size());
++      java.util.List<SSHAccountProvisionerConfigParam> __this__configParams = new java.util.ArrayList<SSHAccountProvisionerConfigParam>(other.configParams.size());
+       for (SSHAccountProvisionerConfigParam other_element : other.configParams) {
+         __this__configParams.add(new SSHAccountProvisionerConfigParam(other_element));
+       }
+       this.configParams = __this__configParams;
+     }
+   }
+ 
+   public SSHAccountProvisioner deepCopy() {
+     return new SSHAccountProvisioner(this);
+   }
+ 
+   @Override
+   public void clear() {
+     this.name = null;
+     setCanCreateAccountIsSet(false);
+     this.canCreateAccount = false;
+     setCanInstallSSHKeyIsSet(false);
+     this.canInstallSSHKey = false;
+     this.configParams = null;
+   }
+ 
 -  public String getName() {
++  public java.lang.String getName() {
+     return this.name;
+   }
+ 
 -  public void setName(String name) {
++  public void setName(java.lang.String name) {
+     this.name = name;
+   }
+ 
+   public void unsetName() {
+     this.name = null;
+   }
+ 
+   /** Returns true if field name is set (has been assigned a value) and false otherwise */
+   public boolean isSetName() {
+     return this.name != null;
+   }
+ 
+   public void setNameIsSet(boolean value) {
+     if (!value) {
+       this.name = null;
+     }
+   }
+ 
+   public boolean isCanCreateAccount() {
+     return this.canCreateAccount;
+   }
+ 
+   public void setCanCreateAccount(boolean canCreateAccount) {
+     this.canCreateAccount = canCreateAccount;
+     setCanCreateAccountIsSet(true);
+   }
+ 
+   public void unsetCanCreateAccount() {
 -    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CANCREATEACCOUNT_ISSET_ID);
++    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CANCREATEACCOUNT_ISSET_ID);
+   }
+ 
+   /** Returns true if field canCreateAccount is set (has been assigned a value) and false otherwise */
+   public boolean isSetCanCreateAccount() {
 -    return EncodingUtils.testBit(__isset_bitfield, __CANCREATEACCOUNT_ISSET_ID);
++    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CANCREATEACCOUNT_ISSET_ID);
+   }
+ 
+   public void setCanCreateAccountIsSet(boolean value) {
 -    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CANCREATEACCOUNT_ISSET_ID, value);
++    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CANCREATEACCOUNT_ISSET_ID, value);
+   }
+ 
+   public boolean isCanInstallSSHKey() {
+     return this.canInstallSSHKey;
+   }
+ 
+   public void setCanInstallSSHKey(boolean canInstallSSHKey) {
+     this.canInstallSSHKey = canInstallSSHKey;
+     setCanInstallSSHKeyIsSet(true);
+   }
+ 
+   public void unsetCanInstallSSHKey() {
 -    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CANINSTALLSSHKEY_ISSET_ID);
++    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CANINSTALLSSHKEY_ISSET_ID);
+   }
+ 
+   /** Returns true if field canInstallSSHKey is set (has been assigned a value) and false otherwise */
+   public boolean isSetCanInstallSSHKey() {
 -    return EncodingUtils.testBit(__isset_bitfield, __CANINSTALLSSHKEY_ISSET_ID);
++    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CANINSTALLSSHKEY_ISSET_ID);
+   }
+ 
+   public void setCanInstallSSHKeyIsSet(boolean value) {
 -    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CANINSTALLSSHKEY_ISSET_ID, value);
++    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CANINSTALLSSHKEY_ISSET_ID, value);
+   }
+ 
+   public int getConfigParamsSize() {
+     return (this.configParams == null) ? 0 : this.configParams.size();
+   }
+ 
+   public java.util.Iterator<SSHAccountProvisionerConfigParam> getConfigParamsIterator() {
+     return (this.configParams == null) ? null : this.configParams.iterator();
+   }
+ 
+   public void addToConfigParams(SSHAccountProvisionerConfigParam elem) {
+     if (this.configParams == null) {
 -      this.configParams = new ArrayList<SSHAccountProvisionerConfigParam>();
++      this.configParams = new java.util.ArrayList<SSHAccountProvisionerConfigParam>();
+     }
+     this.configParams.add(elem);
+   }
+ 
 -  public List<SSHAccountProvisionerConfigParam> getConfigParams() {
++  public java.util.List<SSHAccountProvisionerConfigParam> getConfigParams() {
+     return this.configParams;
+   }
+ 
 -  public void setConfigParams(List<SSHAccountProvisionerConfigParam> configParams) {
++  public void setConfigParams(java.util.List<SSHAccountProvisionerConfigParam> configParams) {
+     this.configParams = configParams;
+   }
+ 
+   public void unsetConfigParams() {
+     this.configParams = null;
+   }
+ 
+   /** Returns true if field configParams is set (has been assigned a value) and false otherwise */
+   public boolean isSetConfigParams() {
+     return this.configParams != null;
+   }
+ 
+   public void setConfigParamsIsSet(boolean value) {
+     if (!value) {
+       this.configParams = null;
+     }
+   }
+ 
 -  public void setFieldValue(_Fields field, Object value) {
++  public void setFieldValue(_Fields field, java.lang.Object value) {
+     switch (field) {
+     case NAME:
+       if (value == null) {
+         unsetName();
+       } else {
 -        setName((String)value);
++        setName((java.lang.String)value);
+       }
+       break;
+ 
+     case CAN_CREATE_ACCOUNT:
+       if (value == null) {
+         unsetCanCreateAccount();
+       } else {
 -        setCanCreateAccount((Boolean)value);
++        setCanCreateAccount((java.lang.Boolean)value);
+       }
+       break;
+ 
+     case CAN_INSTALL_SSHKEY:
+       if (value == null) {
+         unsetCanInstallSSHKey();
+       } else {
 -        setCanInstallSSHKey((Boolean)value);
++        setCanInstallSSHKey((java.lang.Boolean)value);
+       }
+       break;
+ 
+     case CONFIG_PARAMS:
+       if (value == null) {
+         unsetConfigParams();
+       } else {
 -        setConfigParams((List<SSHAccountProvisionerConfigParam>)value);
++        setConfigParams((java.util.List<SSHAccountProvisionerConfigParam>)value);
+       }
+       break;
+ 
+     }
+   }
+ 
 -  public Object getFieldValue(_Fields field) {
++  public java.lang.Object getFieldValue(_Fields field) {
+     switch (field) {
+     case NAME:
+       return getName();
+ 
+     case CAN_CREATE_ACCOUNT:
+       return isCanCreateAccount();
+ 
+     case CAN_INSTALL_SSHKEY:
+       return isCanInstallSSHKey();
+ 
+     case CONFIG_PARAMS:
+       return getConfigParams();
+ 
+     }
 -    throw new IllegalStateException();
++    throw new java.lang.IllegalStateException();
+   }
+ 
+   /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+   public boolean isSet(_Fields field) {
+     if (field == null) {
 -      throw new IllegalArgumentException();
++      throw new java.lang.IllegalArgumentException();
+     }
+ 
+     switch (field) {
+     case NAME:
+       return isSetName();
+     case CAN_CREATE_ACCOUNT:
+       return isSetCanCreateAccount();
+     case CAN_INSTALL_SSHKEY:
+       return isSetCanInstallSSHKey();
+     case CONFIG_PARAMS:
+       return isSetConfigParams();
+     }
 -    throw new IllegalStateException();
++    throw new java.lang.IllegalStateException();
+   }
+ 
+   @Override
 -  public boolean equals(Object that) {
++  public boolean equals(java.lang.Object that) {
+     if (that == null)
+       return false;
+     if (that instanceof SSHAccountProvisioner)
+       return this.equals((SSHAccountProvisioner)that);
+     return false;
+   }
+ 
+   public boolean equals(SSHAccountProvisioner that) {
+     if (that == null)
+       return false;
++    if (this == that)
++      return true;
+ 
+     boolean this_present_name = true && this.isSetName();
+     boolean that_present_name = true && that.isSetName();
+     if (this_present_name || that_present_name) {
+       if (!(this_present_name && that_present_name))
+         return false;
+       if (!this.name.equals(that.name))
+         return false;
+     }
+ 
+     boolean this_present_canCreateAccount = true;
+     boolean that_present_canCreateAccount = true;
+     if (this_present_canCreateAccount || that_present_canCreateAccount) {
+       if (!(this_present_canCreateAccount && that_present_canCreateAccount))
+         return false;
+       if (this.canCreateAccount != that.canCreateAccount)
+         return false;
+     }
+ 
+     boolean this_present_canInstallSSHKey = true;
+     boolean that_present_canInstallSSHKey = true;
+     if (this_present_canInstallSSHKey || that_present_canInstallSSHKey) {
+       if (!(this_present_canInstallSSHKey && that_present_canInstallSSHKey))
+         return false;
+       if (this.canInstallSSHKey != that.canInstallSSHKey)
+         return false;
+     }
+ 
+     boolean this_present_configParams = true && this.isSetConfigParams();
+     boolean that_present_configParams = true && that.isSetConfigParams();
+     if (this_present_configParams || that_present_configParams) {
+       if (!(this_present_configParams && that_present_configParams))
+         return false;
+       if (!this.configParams.equals(that.configParams))
+         return false;
+     }
+ 
+     return true;
+   }
+ 
+   @Override
+   public int hashCode() {
 -    List<Object> list = new ArrayList<Object>();
++    int hashCode = 1;
+ 
 -    boolean present_name = true && (isSetName());
 -    list.add(present_name);
 -    if (present_name)
 -      list.add(name);
++    hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
++    if (isSetName())
++      hashCode = hashCode * 8191 + name.hashCode();
+ 
 -    boolean present_canCreateAccount = true;
 -    list.add(present_canCreateAccount);
 -    if (present_canCreateAccount)
 -      list.add(canCreateAccount);
++    hashCode = hashCode * 8191 + ((canCreateAccount) ? 131071 : 524287);
+ 
 -    boolean present_canInstallSSHKey = true;
 -    list.add(present_canInstallSSHKey);
 -    if (present_canInstallSSHKey)
 -      list.add(canInstallSSHKey);
++    hashCode = hashCode * 8191 + ((canInstallSSHKey) ? 131071 : 524287);
+ 
 -    boolean present_configParams = true && (isSetConfigParams());
 -    list.add(present_configParams);
 -    if (present_configParams)
 -      list.add(configParams);
++    hashCode = hashCode * 8191 + ((isSetConfigParams()) ? 131071 : 524287);
++    if (isSetConfigParams())
++      hashCode = hashCode * 8191 + configParams.hashCode();
+ 
 -    return list.hashCode();
++    return hashCode;
+   }
+ 
+   @Override
+   public int compareTo(SSHAccountProvisioner other) {
+     if (!getClass().equals(other.getClass())) {
+       return getClass().getName().compareTo(other.getClass().getName());
+     }
+ 
+     int lastComparison = 0;
+ 
 -    lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
++    lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+     if (lastComparison != 0) {
+       return lastComparison;
+     }
+     if (isSetName()) {
+       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+       if (lastComparison != 0) {
+         return lastComparison;
+       }
+     }
 -    lastComparison = Boolean.valueOf(isSetCanCreateAccount()).compareTo(other.isSetCanCreateAccount());
++    lastComparison = java.lang.Boolean.valueOf(isSetCanCreateAccount()).compareTo(other.isSetCanCreateAccount());
+     if (lastComparison != 0) {
+       return lastComparison;
+     }
+     if (isSetCanCreateAccount()) {
+       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.canCreateAccount, other.canCreateAccount);
+       if (lastComparison != 0) {
+         return lastComparison;
+       }
+     }
 -    lastComparison = Boolean.valueOf(isSetCanInstallSSHKey()).compareTo(other.isSetCanInstallSSHKey());
++    lastComparison = java.lang.Boolean.valueOf(isSetCanInstallSSHKey()).compareTo(other.isSetCanInstallSSHKey());
+     if (lastComparison != 0) {
+       return lastComparison;
+     }
+     if (isSetCanInstallSSHKey()) {
+       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.canInstallSSHKey, other.canInstallSSHKey);
+       if (lastComparison != 0) {
+         return lastComparison;
+       }
+     }
 -    lastComparison = Boolean.valueOf(isSetConfigParams()).compareTo(other.isSetConfigParams());
++    lastComparison = java.lang.Boolean.valueOf(isSetConfigParams()).compareTo(other.isSetConfigParams());
+     if (lastComparison != 0) {
+       return lastComparison;
+     }
+     if (isSetConfigParams()) {
+       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configParams, other.configParams);
+       if (lastComparison != 0) {
+         return lastComparison;
+       }
+     }
+     return 0;
+   }
+ 
+   public _Fields fieldForId(int fieldId) {
+     return _Fields.findByThriftId(fieldId);
+   }
+ 
+   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
 -    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
++    scheme(iprot).read(iprot, this);
+   }
+ 
+   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
 -    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
++    scheme(oprot).write(oprot, this);
+   }
+ 
+   @Override
 -  public String toString() {
 -    StringBuilder sb = new StringBuilder("SSHAccountProvisioner(");
++  public java.lang.String toString() {
++    java.lang.StringBuilder sb = new java.lang.StringBuilder("SSHAccountProvisioner(");
+     boolean first = true;
+ 
+     sb.append("name:");
+     if (this.name == null) {
+       sb.append("null");
+     } else {
+       sb.append(this.name);
+     }
+     first = false;
+     if (!first) sb.append(", ");
+     sb.append("canCreateAccount:");
+     sb.append(this.canCreateAccount);
+     first = false;
+     if (!first) sb.append(", ");
+     sb.append("canInstallSSHKey:");
+     sb.append(this.canInstallSSHKey);
+     first = false;
+     if (!first) sb.append(", ");
+     sb.append("configParams:");
+     if (this.configParams == null) {
+       sb.append("null");
+     } else {
+       sb.append(this.configParams);
+     }
+     first = false;
+     sb.append(")");
+     return sb.toString();
+   }
+ 
+   public void validate() throws org.apache.thrift.TException {
+     // check for required fields
+     if (!isSetName()) {
+       throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' is unset! Struct:" + toString());
+     }
+ 
+     if (!isSetCanCreateAccount()) {
+       throw new org.apache.thrift.protocol.TProtocolException("Required field 'canCreateAccount' is unset! Struct:" + toString());
+     }
+ 
+     if (!isSetCanInstallSSHKey()) {
+       throw new org.apache.thrift.protocol.TProtocolException("Required field 'canInstallSSHKey' is unset! Struct:" + toString());
+     }
+ 
+     if (!isSetConfigParams()) {
+       throw new org.apache.thrift.protocol.TProtocolException("Required field 'configParams' is unset! Struct:" + toString());
+     }
+ 
+     // check for sub-struct validity
+   }
+ 
+   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+     try {
+       write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+     } catch (org.apache.thrift.TException te) {
+       throw new java.io.IOException(te);
+     }
+   }
+ 
 -  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
++  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
+     try {
+       // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+       __isset_bitfield = 0;
+       read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+     } catch (org.apache.thrift.TException te) {
+       throw new java.io.IOException(te);
+     }
+   }
+ 
 -  private static class SSHAccountProvisionerStandardSchemeFactory implements SchemeFactory {
++  private static class SSHAccountProvisionerStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+     public SSHAccountProvisionerStandardScheme getScheme() {
+       return new SSHAccountProvisionerStandardScheme();
+     }
+   }
+ 
 -  private static class SSHAccountProvisionerStandardScheme extends StandardScheme<SSHAccountProvisioner> {
++  private static class SSHAccountProvisionerStandardScheme extends org.apache.thrift.scheme.StandardScheme<SSHAccountProvisioner> {
+ 
+     public void read(org.apache.thrift.protocol.TProtocol iprot, SSHAccountProvisioner struct) throws org.apache.thrift.TException {
+       org.apache.thrift.protocol.TField schemeField;
+       iprot.readStructBegin();
+       while (true)
+       {
+         schemeField = iprot.readFieldBegin();
+         if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+           break;
+         }
+         switch (schemeField.id) {
+           case 1: // NAME
+             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+               struct.name = iprot.readString();
+               struct.setNameIsSet(true);
+             } else { 
+               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+             }
+             break;
+           case 2: // CAN_CREATE_ACCOUNT
+             if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+               struct.canCreateAccount = iprot.readBool();
+               struct.setCanCreateAccountIsSet(true);
+             } else { 
+               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+             }
+             break;
+           case 3: // CAN_INSTALL_SSHKEY
+             if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+               struct.canInstallSSHKey = iprot.readBool();
+               struct.setCanInstallSSHKeyIsSet(true);
+             } else { 
+               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+             }
+             break;
+           case 4: // CONFIG_PARAMS
+             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+               {
+                 org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
 -                struct.configParams = new ArrayList<SSHAccountProvisionerConfigParam>(_list0.size);
++                struct.configParams = new java.util.ArrayList<SSHAccountProvisionerConfigParam>(_list0.size);
+                 SSHAccountProvisionerConfigParam _elem1;
+                 for (int _i2 = 0; _i2 < _list0.size; ++_i2)
+                 {
+                   _elem1 = new SSHAccountProvisionerConfigParam();
+                   _elem1.read(iprot);
+                   struct.configParams.add(_elem1);
+                 }
+                 iprot.readListEnd();
+               }
+               struct.setConfigParamsIsSet(true);
+             } else { 
+               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+             }
+             break;
+           default:
+             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+         }
+         iprot.readFieldEnd();
+       }
+       iprot.readStructEnd();
+       struct.validate();
+     }
+ 
+     public void write(org.apache.thrift.protocol.TProtocol oprot, SSHAccountProvisioner struct) throws org.apache.thrift.TException {
+       struct.validate();
+ 
+       oprot.writeStructBegin(STRUCT_DESC);
+       if (struct.name != null) {
+         oprot.writeFieldBegin(NAME_FIELD_DESC);
+         oprot.writeString(struct.name);
+         oprot.writeFieldEnd();
+       }
+       oprot.writeFieldBegin(CAN_CREATE_ACCOUNT_FIELD_DESC);
+       oprot.writeBool(struct.canCreateAccount);
+       oprot.writeFieldEnd();
+       oprot.writeFieldBegin(CAN_INSTALL_SSHKEY_FIELD_DESC);
+       oprot.writeBool(struct.canInstallSSHKey);
+       oprot.writeFieldEnd();
+       if (struct.configParams != null) {
+         oprot.writeFieldBegin(CONFIG_PARAMS_FIELD_DESC);
+         {
+           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.configParams.size()));
+           for (SSHAccountProvisionerConfigParam _iter3 : struct.configParams)
+           {
+             _iter3.write(oprot);
+           }
+           oprot.writeListEnd();
+         }
+         oprot.writeFieldEnd();
+       }
+       oprot.writeFieldStop();
+       oprot.writeStructEnd();
+     }
+ 
+   }
+ 
 -  private static class SSHAccountProvisionerTupleSchemeFactory implements SchemeFactory {
++  private static class SSHAccountProvisionerTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+     public SSHAccountProvisionerTupleScheme getScheme() {
+       return new SSHAccountProvisionerTupleScheme();
+     }
+   }
+ 
 -  private static class SSHAccountProvisionerTupleScheme extends TupleScheme<SSHAccountProvisioner> {
++  private static class SSHAccountProvisionerTupleScheme extends org.apache.thrift.scheme.TupleScheme<SSHAccountProvisioner> {
+ 
+     @Override
+     public void write(org.apache.thrift.protocol.TProtocol prot, SSHAccountProvisioner struct) throws org.apache.thrift.TException {
 -      TTupleProtocol oprot = (TTupleProtocol) prot;
++      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+       oprot.writeString(struct.name);
+       oprot.writeBool(struct.canCreateAccount);
+       oprot.writeBool(struct.canInstallSSHKey);
+       {
+         oprot.writeI32(struct.configParams.size());
+         for (SSHAccountProvisionerConfigParam _iter4 : struct.configParams)
+         {
+           _iter4.write(oprot);
+         }
+       }
+     }
+ 
+     @Override
+     public void read(org.apache.thrift.protocol.TProtocol prot, SSHAccountProvisioner struct) throws org.apache.thrift.TException {
 -      TTupleProtocol iprot = (TTupleProtocol) prot;
++      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+       struct.name = iprot.readString();
+       struct.setNameIsSet(true);
+       struct.canCreateAccount = iprot.readBool();
+       struct.setCanCreateAccountIsSet(true);
+       struct.canInstallSSHKey = iprot.readBool();
+       struct.setCanInstallSSHKeyIsSet(true);
+       {
+         org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
 -        struct.configParams = new ArrayList<SSHAccountProvisionerConfigParam>(_list5.size);
++        struct.configParams = new java.util.ArrayList<SSHAccountProvisionerConfigParam>(_list5.size);
+         SSHAccountProvisionerConfigParam _elem6;
+         for (int _i7 = 0; _i7 < _list5.size; ++_i7)
+         {
+           _elem6 = new SSHAccountProvisionerConfigParam();
+           _elem6.read(iprot);
+           struct.configParams.add(_elem6);
+         }
+       }
+       struct.setConfigParamsIsSet(true);
+     }
+   }
+ 
++  private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
++    return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
++  }
+ }
+ 

http://git-wip-us.apache.org/repos/asf/airavata/blob/ebdf8977/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisionerConfigParam.java
----------------------------------------------------------------------
diff --cc airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisionerConfigParam.java
index 0000000,11b6613..5dd5264
mode 000000,100644..100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisionerConfigParam.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisionerConfigParam.java
@@@ -1,0 -1,733 +1,702 @@@
+ /**
+  * 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.
+  */
+ 
+ /**
 - * Autogenerated by Thrift Compiler (0.9.3)
++ * Autogenerated by Thrift Compiler (0.10.0)
+  *
+  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+  *  @generated
+  */
+ package org.apache.airavata.model.appcatalog.accountprovisioning;
+ 
 -import org.apache.thrift.scheme.IScheme;
 -import org.apache.thrift.scheme.SchemeFactory;
 -import org.apache.thrift.scheme.StandardScheme;
 -
 -import org.apache.thrift.scheme.TupleScheme;
 -import org.apache.thrift.protocol.TTupleProtocol;
 -import org.apache.thrift.protocol.TProtocolException;
 -import org.apache.thrift.EncodingUtils;
 -import org.apache.thrift.TException;
 -import org.apache.thrift.async.AsyncMethodCallback;
 -import org.apache.thrift.server.AbstractNonblockingServer.*;
 -import java.util.List;
 -import java.util.ArrayList;
 -import java.util.Map;
 -import java.util.HashMap;
 -import java.util.EnumMap;
 -import java.util.Set;
 -import java.util.HashSet;
 -import java.util.EnumSet;
 -import java.util.Collections;
 -import java.util.BitSet;
 -import java.nio.ByteBuffer;
 -import java.util.Arrays;
 -import javax.annotation.Generated;
 -import org.slf4j.Logger;
 -import org.slf4j.LoggerFactory;
 -
 -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
++@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
++@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+ public class SSHAccountProvisionerConfigParam implements org.apache.thrift.TBase<SSHAccountProvisionerConfigParam, SSHAccountProvisionerConfigParam._Fields>, java.io.Serializable, Cloneable, Comparable<SSHAccountProvisionerConfigParam> {
+   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SSHAccountProvisionerConfigParam");
+ 
+   private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
+   private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)2);
+   private static final org.apache.thrift.protocol.TField IS_OPTIONAL_FIELD_DESC = new org.apache.thrift.protocol.TField("isOptional", org.apache.thrift.protocol.TType.BOOL, (short)3);
+   private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)4);
+ 
 -  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
 -  static {
 -    schemes.put(StandardScheme.class, new SSHAccountProvisionerConfigParamStandardSchemeFactory());
 -    schemes.put(TupleScheme.class, new SSHAccountProvisionerConfigParamTupleSchemeFactory());
 -  }
++  private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SSHAccountProvisionerConfigParamStandardSchemeFactory();
++  private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SSHAccountProvisionerConfigParamTupleSchemeFactory();
+ 
 -  private String name; // required
++  private java.lang.String name; // required
+   private SSHAccountProvisionerConfigParamType type; // required
+   private boolean isOptional; // required
 -  private String description; // optional
++  private java.lang.String description; // optional
+ 
+   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+     NAME((short)1, "name"),
+     /**
+      * 
+      * @see SSHAccountProvisionerConfigParamType
+      */
+     TYPE((short)2, "type"),
+     IS_OPTIONAL((short)3, "isOptional"),
+     DESCRIPTION((short)4, "description");
+ 
 -    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
++    private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+ 
+     static {
 -      for (_Fields field : EnumSet.allOf(_Fields.class)) {
++      for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
+         byName.put(field.getFieldName(), field);
+       }
+     }
+ 
+     /**
+      * Find the _Fields constant that matches fieldId, or null if its not found.
+      */
+     public static _Fields findByThriftId(int fieldId) {
+       switch(fieldId) {
+         case 1: // NAME
+           return NAME;
+         case 2: // TYPE
+           return TYPE;
+         case 3: // IS_OPTIONAL
+           return IS_OPTIONAL;
+         case 4: // DESCRIPTION
+           return DESCRIPTION;
+         default:
+           return null;
+       }
+     }
+ 
+     /**
+      * Find the _Fields constant that matches fieldId, throwing an exception
+      * if it is not found.
+      */
+     public static _Fields findByThriftIdOrThrow(int fieldId) {
+       _Fields fields = findByThriftId(fieldId);
 -      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
++      if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+       return fields;
+     }
+ 
+     /**
+      * Find the _Fields constant that matches name, or null if its not found.
+      */
 -    public static _Fields findByName(String name) {
++    public static _Fields findByName(java.lang.String name) {
+       return byName.get(name);
+     }
+ 
+     private final short _thriftId;
 -    private final String _fieldName;
++    private final java.lang.String _fieldName;
+ 
 -    _Fields(short thriftId, String fieldName) {
++    _Fields(short thriftId, java.lang.String fieldName) {
+       _thriftId = thriftId;
+       _fieldName = fieldName;
+     }
+ 
+     public short getThriftFieldId() {
+       return _thriftId;
+     }
+ 
 -    public String getFieldName() {
++    public java.lang.String getFieldName() {
+       return _fieldName;
+     }
+   }
+ 
+   // isset id assignments
+   private static final int __ISOPTIONAL_ISSET_ID = 0;
+   private byte __isset_bitfield = 0;
+   private static final _Fields optionals[] = {_Fields.DESCRIPTION};
 -  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
++  public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+   static {
 -    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
++    java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+     tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+     tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+         new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SSHAccountProvisionerConfigParamType.class)));
+     tmpMap.put(_Fields.IS_OPTIONAL, new org.apache.thrift.meta_data.FieldMetaData("isOptional", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+     tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
 -    metaDataMap = Collections.unmodifiableMap(tmpMap);
++    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
+     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SSHAccountProvisionerConfigParam.class, metaDataMap);
+   }
+ 
+   public SSHAccountProvisionerConfigParam() {
+     this.type = org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParamType.STRING;
+ 
+     this.isOptional = false;
+ 
+   }
+ 
+   public SSHAccountProvisionerConfigParam(
 -    String name,
++    java.lang.String name,
+     SSHAccountProvisionerConfigParamType type,
+     boolean isOptional)
+   {
+     this();
+     this.name = name;
+     this.type = type;
+     this.isOptional = isOptional;
+     setIsOptionalIsSet(true);
+   }
+ 
+   /**
+    * Performs a deep copy on <i>other</i>.
+    */
+   public SSHAccountProvisionerConfigParam(SSHAccountProvisionerConfigParam other) {
+     __isset_bitfield = other.__isset_bitfield;
+     if (other.isSetName()) {
+       this.name = other.name;
+     }
+     if (other.isSetType()) {
+       this.type = other.type;
+     }
+     this.isOptional = other.isOptional;
+     if (other.isSetDescription()) {
+       this.description = other.description;
+     }
+   }
+ 
+   public SSHAccountProvisionerConfigParam deepCopy() {
+     return new SSHAccountProvisionerConfigParam(this);
+   }
+ 
+   @Override
+   public void clear() {
+     this.name = null;
+     this.type = org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParamType.STRING;
+ 
+     this.isOptional = false;
+ 
+     this.description = null;
+   }
+ 
 -  public String getName() {
++  public java.lang.String getName() {
+     return this.name;
+   }
+ 
 -  public void setName(String name) {
++  public void setName(java.lang.String name) {
+     this.name = name;
+   }
+ 
+   public void unsetName() {
+     this.name = null;
+   }
+ 
+   /** Returns true if field name is set (has been assigned a value) and false otherwise */
+   public boolean isSetName() {
+     return this.name != null;
+   }
+ 
+   public void setNameIsSet(boolean value) {
+     if (!value) {
+       this.name = null;
+     }
+   }
+ 
+   /**
+    * 
+    * @see SSHAccountProvisionerConfigParamType
+    */
+   public SSHAccountProvisionerConfigParamType getType() {
+     return this.type;
+   }
+ 
+   /**
+    * 
+    * @see SSHAccountProvisionerConfigParamType
+    */
+   public void setType(SSHAccountProvisionerConfigParamType type) {
+     this.type = type;
+   }
+ 
+   public void unsetType() {
+     this.type = null;
+   }
+ 
+   /** Returns true if field type is set (has been assigned a value) and false otherwise */
+   public boolean isSetType() {
+     return this.type != null;
+   }
+ 
+   public void setTypeIsSet(boolean value) {
+     if (!value) {
+       this.type = null;
+     }
+   }
+ 
+   public boolean isIsOptional() {
+     return this.isOptional;
+   }
+ 
+   public void setIsOptional(boolean isOptional) {
+     this.isOptional = isOptional;
+     setIsOptionalIsSet(true);
+   }
+ 
+   public void unsetIsOptional() {
 -    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISOPTIONAL_ISSET_ID);
++    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISOPTIONAL_ISSET_ID);
+   }
+ 
+   /** Returns true if field isOptional is set (has been assigned a value) and false otherwise */
+   public boolean isSetIsOptional() {
 -    return EncodingUtils.testBit(__isset_bitfield, __ISOPTIONAL_ISSET_ID);
++    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISOPTIONAL_ISSET_ID);
+   }
+ 
+   public void setIsOptionalIsSet(boolean value) {
 -    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISOPTIONAL_ISSET_ID, value);
++    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISOPTIONAL_ISSET_ID, value);
+   }
+ 
 -  public String getDescription() {
++  public java.lang.String getDescription() {
+     return this.description;
+   }
+ 
 -  public void setDescription(String description) {
++  public void setDescription(java.lang.String description) {
+     this.description = description;
+   }
+ 
+   public void unsetDescription() {
+     this.description = null;
+   }
+ 
+   /** Returns true if field description is set (has been assigned a value) and false otherwise */
+   public boolean isSetDescription() {
+     return this.description != null;
+   }
+ 
+   public void setDescriptionIsSet(boolean value) {
+     if (!value) {
+       this.description = null;
+     }
+   }
+ 
 -  public void setFieldValue(_Fields field, Object value) {
++  public void setFieldValue(_Fields field, java.lang.Object value) {
+     switch (field) {
+     case NAME:
+       if (value == null) {
+         unsetName();
+       } else {
 -        setName((String)value);
++        setName((java.lang.String)value);
+       }
+       break;
+ 
+     case TYPE:
+       if (value == null) {
+         unsetType();
+       } else {
+         setType((SSHAccountProvisionerConfigParamType)value);
+       }
+       break;
+ 
+     case IS_OPTIONAL:
+       if (value == null) {
+         unsetIsOptional();
+       } else {
 -        setIsOptional((Boolean)value);
++        setIsOptional((java.lang.Boolean)value);
+       }
+       break;
+ 
+     case DESCRIPTION:
+       if (value == null) {
+         unsetDescription();
+       } else {
 -        setDescription((String)value);
++        setDescription((java.lang.String)value);
+       }
+       break;
+ 
+     }
+   }
+ 
 -  public Object getFieldValue(_Fields field) {
++  public java.lang.Object getFieldValue(_Fields field) {
+     switch (field) {
+     case NAME:
+       return getName();
+ 
+     case TYPE:
+       return getType();
+ 
+     case IS_OPTIONAL:
+       return isIsOptional();
+ 
+     case DESCRIPTION:
+       return getDescription();
+ 
+     }
 -    throw new IllegalStateException();
++    throw new java.lang.IllegalStateException();
+   }
+ 
+   /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+   public boolean isSet(_Fields field) {
+     if (field == null) {
 -      throw new IllegalArgumentException();
++      throw new java.lang.IllegalArgumentException();
+     }
+ 
+     switch (field) {
+     case NAME:
+       return isSetName();
+     case TYPE:
+       return isSetType();
+     case IS_OPTIONAL:
+       return isSetIsOptional();
+     case DESCRIPTION:
+       return isSetDescription();
+     }
 -    throw new IllegalStateException();
++    throw new java.lang.IllegalStateException();
+   }
+ 
+   @Override
 -  public boolean equals(Object that) {
++  public boolean equals(java.lang.Object that) {
+     if (that == null)
+       return false;
+     if (that instanceof SSHAccountProvisionerConfigParam)
+       return this.equals((SSHAccountProvisionerConfigParam)that);
+     return false;
+   }
+ 
+   public boolean equals(SSHAccountProvisionerConfigParam that) {
+     if (that == null)
+       return false;
++    if (this == that)
++      return true;
+ 
+     boolean this_present_name = true && this.isSetName();
+     boolean that_present_name = true && that.isSetName();
+     if (this_present_name || that_present_name) {
+       if (!(this_present_name && that_present_name))
+         return false;
+       if (!this.name.equals(that.name))
+         return false;
+     }
+ 
+     boolean this_present_type = true && this.isSetType();
+     boolean that_present_type = true && that.isSetType();
+     if (this_present_type || that_present_type) {
+       if (!(this_present_type && that_present_type))
+         return false;
+       if (!this.type.equals(that.type))
+         return false;
+     }
+ 
+     boolean this_present_isOptional = true;
+     boolean that_present_isOptional = true;
+     if (this_present_isOptional || that_present_isOptional) {
+       if (!(this_present_isOptional && that_present_isOptional))
+         return false;
+       if (this.isOptional != that.isOptional)
+         return false;
+     }
+ 
+     boolean this_present_description = true && this.isSetDescription();
+     boolean that_present_description = true && that.isSetDescription();
+     if (this_present_description || that_present_description) {
+       if (!(this_present_description && that_present_description))
+         return false;
+       if (!this.description.equals(that.description))
+         return false;
+     }
+ 
+     return true;
+   }
+ 
+   @Override
+   public int hashCode() {
 -    List<Object> list = new ArrayList<Object>();
++    int hashCode = 1;
+ 
 -    boolean present_name = true && (isSetName());
 -    list.add(present_name);
 -    if (present_name)
 -      list.add(name);
++    hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
++    if (isSetName())
++      hashCode = hashCode * 8191 + name.hashCode();
+ 
 -    boolean present_type = true && (isSetType());
 -    list.add(present_type);
 -    if (present_type)
 -      list.add(type.getValue());
++    hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287);
++    if (isSetType())
++      hashCode = hashCode * 8191 + type.getValue();
+ 
 -    boolean present_isOptional = true;
 -    list.add(present_isOptional);
 -    if (present_isOptional)
 -      list.add(isOptional);
++    hashCode = hashCode * 8191 + ((isOptional) ? 131071 : 524287);
+ 
 -    boolean present_description = true && (isSetDescription());
 -    list.add(present_description);
 -    if (present_description)
 -      list.add(description);
++    hashCode = hashCode * 8191 + ((isSetDescription()) ? 131071 : 524287);
++    if (isSetDescription())
++      hashCode = hashCode * 8191 + description.hashCode();
+ 
 -    return list.hashCode();
++    return hashCode;
+   }
+ 
+   @Override
+   public int compareTo(SSHAccountProvisionerConfigParam other) {
+     if (!getClass().equals(other.getClass())) {
+       return getClass().getName().compareTo(other.getClass().getName());
+     }
+ 
+     int lastComparison = 0;
+ 
 -    lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
++    lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+     if (lastComparison != 0) {
+       return lastComparison;
+     }
+     if (isSetName()) {
+       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+       if (lastComparison != 0) {
+         return lastComparison;
+       }
+     }
 -    lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType());
++    lastComparison = java.lang.Boolean.valueOf(isSetType()).compareTo(other.isSetType());
+     if (lastComparison != 0) {
+       return lastComparison;
+     }
+     if (isSetType()) {
+       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);
+       if (lastComparison != 0) {
+         return lastComparison;
+       }
+     }
 -    lastComparison = Boolean.valueOf(isSetIsOptional()).compareTo(other.isSetIsOptional());
++    lastComparison = java.lang.Boolean.valueOf(isSetIsOptional()).compareTo(other.isSetIsOptional());
+     if (lastComparison != 0) {
+       return lastComparison;
+     }
+     if (isSetIsOptional()) {
+       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isOptional, other.isOptional);
+       if (lastComparison != 0) {
+         return lastComparison;
+       }
+     }
 -    lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
++    lastComparison = java.lang.Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+     if (lastComparison != 0) {
+       return lastComparison;
+     }
+     if (isSetDescription()) {
+       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+       if (lastComparison != 0) {
+         return lastComparison;
+       }
+     }
+     return 0;
+   }
+ 
+   public _Fields fieldForId(int fieldId) {
+     return _Fields.findByThriftId(fieldId);
+   }
+ 
+   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
 -    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
++    scheme(iprot).read(iprot, this);
+   }
+ 
+   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
 -    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
++    scheme(oprot).write(oprot, this);
+   }
+ 
+   @Override
 -  public String toString() {
 -    StringBuilder sb = new StringBuilder("SSHAccountProvisionerConfigParam(");
++  public java.lang.String toString() {
++    java.lang.StringBuilder sb = new java.lang.StringBuilder("SSHAccountProvisionerConfigParam(");
+     boolean first = true;
+ 
+     sb.append("name:");
+     if (this.name == null) {
+       sb.append("null");
+     } else {
+       sb.append(this.name);
+     }
+     first = false;
+     if (!first) sb.append(", ");
+     sb.append("type:");
+     if (this.type == null) {
+       sb.append("null");
+     } else {
+       sb.append(this.type);
+     }
+     first = false;
+     if (!first) sb.append(", ");
+     sb.append("isOptional:");
+     sb.append(this.isOptional);
+     first = false;
+     if (isSetDescription()) {
+       if (!first) sb.append(", ");
+       sb.append("description:");
+       if (this.description == null) {
+         sb.append("null");
+       } else {
+         sb.append(this.description);
+       }
+       first = false;
+     }
+     sb.append(")");
+     return sb.toString();
+   }
+ 
+   public void validate() throws org.apache.thrift.TException {
+     // check for required fields
+     if (!isSetName()) {
+       throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' is unset! Struct:" + toString());
+     }
+ 
+     if (!isSetType()) {
+       throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' is unset! Struct:" + toString());
+     }
+ 
+     if (!isSetIsOptional()) {
+       throw new org.apache.thrift.protocol.TProtocolException("Required field 'isOptional' is unset! Struct:" + toString());
+     }
+ 
+     // check for sub-struct validity
+   }
+ 
+   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+     try {
+       write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+     } catch (org.apache.thrift.TException te) {
+       throw new java.io.IOException(te);
+     }
+   }
+ 
 -  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
++  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
+     try {
+       // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+       __isset_bitfield = 0;
+       read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+     } catch (org.apache.thrift.TException te) {
+       throw new java.io.IOException(te);
+     }
+   }
+ 
 -  private static class SSHAccountProvisionerConfigParamStandardSchemeFactory implements SchemeFactory {
++  private static class SSHAccountProvisionerConfigParamStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+     public SSHAccountProvisionerConfigParamStandardScheme getScheme() {
+       return new SSHAccountProvisionerConfigParamStandardScheme();
+     }
+   }
+ 
 -  private static class SSHAccountProvisionerConfigParamStandardScheme extends StandardScheme<SSHAccountProvisionerConfigParam> {
++  private static class SSHAccountProvisionerConfigParamStandardScheme extends org.apache.thrift.scheme.StandardScheme<SSHAccountProvisionerConfigParam> {
+ 
+     public void read(org.apache.thrift.protocol.TProtocol iprot, SSHAccountProvisionerConfigParam struct) throws org.apache.thrift.TException {
+       org.apache.thrift.protocol.TField schemeField;
+       iprot.readStructBegin();
+       while (true)
+       {
+         schemeField = iprot.readFieldBegin();
+         if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+           break;
+         }
+         switch (schemeField.id) {
+           case 1: // NAME
+             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+               struct.name = iprot.readString();
+               struct.setNameIsSet(true);
+             } else { 
+               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+             }
+             break;
+           case 2: // TYPE
+             if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+               struct.type = org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParamType.findByValue(iprot.readI32());
+               struct.setTypeIsSet(true);
+             } else { 
+               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+             }
+             break;
+           case 3: // IS_OPTIONAL
+             if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+               struct.isOptional = iprot.readBool();
+               struct.setIsOptionalIsSet(true);
+             } else { 
+               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+             }
+             break;
+           case 4: // DESCRIPTION
+             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+               struct.description = iprot.readString();
+               struct.setDescriptionIsSet(true);
+             } else { 
+               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+             }
+             break;
+           default:
+             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+         }
+         iprot.readFieldEnd();
+       }
+       iprot.readStructEnd();
+       struct.validate();
+     }
+ 
+     public void write(org.apache.thrift.protocol.TProtocol oprot, SSHAccountProvisionerConfigParam struct) throws org.apache.thrift.TException {
+       struct.validate();
+ 
+       oprot.writeStructBegin(STRUCT_DESC);
+       if (struct.name != null) {
+         oprot.writeFieldBegin(NAME_FIELD_DESC);
+         oprot.writeString(struct.name);
+         oprot.writeFieldEnd();
+       }
+       if (struct.type != null) {
+         oprot.writeFieldBegin(TYPE_FIELD_DESC);
+         oprot.writeI32(struct.type.getValue());
+         oprot.writeFieldEnd();
+       }
+       oprot.writeFieldBegin(IS_OPTIONAL_FIELD_DESC);
+       oprot.writeBool(struct.isOptional);
+       oprot.writeFieldEnd();
+       if (struct.description != null) {
+         if (struct.isSetDescription()) {
+           oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+           oprot.writeString(struct.description);
+           oprot.writeFieldEnd();
+         }
+       }
+       oprot.writeFieldStop();
+       oprot.writeStructEnd();
+     }
+ 
+   }
+ 
 -  private static class SSHAccountProvisionerConfigParamTupleSchemeFactory implements SchemeFactory {
++  private static class SSHAccountProvisionerConfigParamTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+     public SSHAccountProvisionerConfigParamTupleScheme getScheme() {
+       return new SSHAccountProvisionerConfigParamTupleScheme();
+     }
+   }
+ 
 -  private static class SSHAccountProvisionerConfigParamTupleScheme extends TupleScheme<SSHAccountProvisionerConfigParam> {
++  private static class SSHAccountProvisionerConfigParamTupleScheme extends org.apache.thrift.scheme.TupleScheme<SSHAccountProvisionerConfigParam> {
+ 
+     @Override
+     public void write(org.apache.thrift.protocol.TProtocol prot, SSHAccountProvisionerConfigParam struct) throws org.apache.thrift.TException {
 -      TTupleProtocol oprot = (TTupleProtocol) prot;
++      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+       oprot.writeString(struct.name);
+       oprot.writeI32(struct.type.getValue());
+       oprot.writeBool(struct.isOptional);
 -      BitSet optionals = new BitSet();
++      java.util.BitSet optionals = new java.util.BitSet();
+       if (struct.isSetDescription()) {
+         optionals.set(0);
+       }
+       oprot.writeBitSet(optionals, 1);
+       if (struct.isSetDescription()) {
+         oprot.writeString(struct.description);
+       }
+     }
+ 
+     @Override
+     public void read(org.apache.thrift.protocol.TProtocol prot, SSHAccountProvisionerConfigParam struct) throws org.apache.thrift.TException {
 -      TTupleProtocol iprot = (TTupleProtocol) prot;
++      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+       struct.name = iprot.readString();
+       struct.setNameIsSet(true);
+       struct.type = org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParamType.findByValue(iprot.readI32());
+       struct.setTypeIsSet(true);
+       struct.isOptional = iprot.readBool();
+       struct.setIsOptionalIsSet(true);
 -      BitSet incoming = iprot.readBitSet(1);
++      java.util.BitSet incoming = iprot.readBitSet(1);
+       if (incoming.get(0)) {
+         struct.description = iprot.readString();
+         struct.setDescriptionIsSet(true);
+       }
+     }
+   }
+ 
++  private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
++    return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
++  }
+ }
+ 

http://git-wip-us.apache.org/repos/asf/airavata/blob/ebdf8977/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisionerConfigParamType.java
----------------------------------------------------------------------
diff --cc airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisionerConfigParamType.java
index 0000000,a6bde9a..f1d1e5a
mode 000000,100644..100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisionerConfigParamType.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisionerConfigParamType.java
@@@ -1,0 -1,62 +1,62 @@@
+ /**
+  * 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.
+  */
+ 
+ /**
 - * Autogenerated by Thrift Compiler (0.9.3)
++ * Autogenerated by Thrift Compiler (0.10.0)
+  *
+  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+  *  @generated
+  */
+ package org.apache.airavata.model.appcatalog.accountprovisioning;
+ 
+ 
+ import java.util.Map;
+ import java.util.HashMap;
+ import org.apache.thrift.TEnum;
+ 
+ public enum SSHAccountProvisionerConfigParamType implements org.apache.thrift.TEnum {
+   STRING(0),
+   CRED_STORE_PASSWORD_TOKEN(1);
+ 
+   private final int value;
+ 
+   private SSHAccountProvisionerConfigParamType(int value) {
+     this.value = value;
+   }
+ 
+   /**
+    * Get the integer value of this enum value, as defined in the Thrift IDL.
+    */
+   public int getValue() {
+     return value;
+   }
+ 
+   /**
+    * Find a the enum type by its integer value, as defined in the Thrift IDL.
+    * @return null if the value is not found.
+    */
+   public static SSHAccountProvisionerConfigParamType findByValue(int value) { 
+     switch (value) {
+       case 0:
+         return STRING;
+       case 1:
+         return CRED_STORE_PASSWORD_TOKEN;
+       default:
+         return null;
+     }
+   }
+ }


[17/40] airavata git commit: AIRAVATA-2500 Thrift stub generation

Posted by ma...@apache.org.
AIRAVATA-2500 Thrift stub generation


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

Branch: refs/heads/develop
Commit: 469a7e791db59ca277685f47a422e8805d3c4042
Parents: ac2823a
Author: Marcus Christie <ma...@apache.org>
Authored: Fri Sep 1 17:12:46 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Tue Sep 19 15:07:57 2017 -0400

----------------------------------------------------------------------
 .../java/org/apache/airavata/api/Airavata.java  | 782 +++++++++----------
 .../ComputeResourcePreference.java              |  78 +-
 2 files changed, 415 insertions(+), 445 deletions(-)
----------------------------------------------------------------------



[10/40] airavata git commit: AIRAVATA-2500: generated Thrift stub code

Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/722aabd4/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 851f96e..6214caf 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
@@ -2621,11 +2621,34 @@ public class Airavata {
      */
     public boolean deleteGatewayStoragePreference(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayID, String storageId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
 
-    public List<String> getSSHAccountProvisionerNames(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+    public List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner> getSSHAccountProvisionerNames(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
 
     public List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam> getSSHAccountProvisionerConfigParams(org.apache.airavata.model.security.AuthzToken authzToken, String provisionerName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
 
     /**
+     * Setup and return a UserComputeResourcePreference object for this user to SSH into the given compute resource with
+     * the given SSH credential. This method will only work if the compute resource has an SSHAccountProvisioner
+     * configured for it. The returned UserComputeResourcePreference object is not saved; it is up to the client to
+     * call addUserComputeResourcePreference to persist it.
+     * 
+     * @param authzToken
+     * @param computeResourceId
+     * @param username
+     * @param airavataCredStoreToken
+     */
+    public org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, String airavataCredStoreToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+
+    /**
+     * Check if user has an SSH account on the given compute resource. This
+     * method will only work if the compute resource has an SSHAccountProvisioner configured for it.
+     * 
+     * @param authzToken
+     * @param computeResourceId
+     * @param username
+     */
+    public boolean doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+
+    /**
      * Register User Resource Profile.
      * 
      * @param UserResourceProfile
@@ -3299,6 +3322,10 @@ public class Airavata {
 
     public void getSSHAccountProvisionerConfigParams(org.apache.airavata.model.security.AuthzToken authzToken, String provisionerName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
+    public void setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
     public void registerUserResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile userResourceProfile, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void getUserResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, String userId, String gatewayID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -8283,7 +8310,7 @@ public class Airavata {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteGatewayStoragePreference failed: unknown result");
     }
 
-    public List<String> getSSHAccountProvisionerNames(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner> getSSHAccountProvisionerNames(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
     {
       send_getSSHAccountProvisionerNames(authzToken);
       return recv_getSSHAccountProvisionerNames();
@@ -8296,7 +8323,7 @@ public class Airavata {
       sendBase("getSSHAccountProvisionerNames", args);
     }
 
-    public List<String> recv_getSSHAccountProvisionerNames() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner> recv_getSSHAccountProvisionerNames() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
     {
       getSSHAccountProvisionerNames_result result = new getSSHAccountProvisionerNames_result();
       receiveBase(result, "getSSHAccountProvisionerNames");
@@ -8354,6 +8381,81 @@ public class Airavata {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSSHAccountProvisionerConfigParams failed: unknown result");
     }
 
+    public org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, String airavataCredStoreToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    {
+      send_setupUserComputeResourcePreferencesForSSH(authzToken, computeResourceId, username, airavataCredStoreToken);
+      return recv_setupUserComputeResourcePreferencesForSSH();
+    }
+
+    public void send_setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, String airavataCredStoreToken) throws org.apache.thrift.TException
+    {
+      setupUserComputeResourcePreferencesForSSH_args args = new setupUserComputeResourcePreferencesForSSH_args();
+      args.setAuthzToken(authzToken);
+      args.setComputeResourceId(computeResourceId);
+      args.setUsername(username);
+      args.setAiravataCredStoreToken(airavataCredStoreToken);
+      sendBase("setupUserComputeResourcePreferencesForSSH", args);
+    }
+
+    public org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference recv_setupUserComputeResourcePreferencesForSSH() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    {
+      setupUserComputeResourcePreferencesForSSH_result result = new setupUserComputeResourcePreferencesForSSH_result();
+      receiveBase(result, "setupUserComputeResourcePreferencesForSSH");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      if (result.ae != null) {
+        throw result.ae;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setupUserComputeResourcePreferencesForSSH failed: unknown result");
+    }
+
+    public boolean doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    {
+      send_doesUserHaveSSHAccount(authzToken, computeResourceId, username);
+      return recv_doesUserHaveSSHAccount();
+    }
+
+    public void send_doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username) throws org.apache.thrift.TException
+    {
+      doesUserHaveSSHAccount_args args = new doesUserHaveSSHAccount_args();
+      args.setAuthzToken(authzToken);
+      args.setComputeResourceId(computeResourceId);
+      args.setUsername(username);
+      sendBase("doesUserHaveSSHAccount", args);
+    }
+
+    public boolean recv_doesUserHaveSSHAccount() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    {
+      doesUserHaveSSHAccount_result result = new doesUserHaveSSHAccount_result();
+      receiveBase(result, "doesUserHaveSSHAccount");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      if (result.ae != null) {
+        throw result.ae;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "doesUserHaveSSHAccount failed: unknown result");
+    }
+
     public String registerUserResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile userResourceProfile) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
     {
       send_registerUserResourceProfile(authzToken, userResourceProfile);
@@ -14687,7 +14789,7 @@ public class Airavata {
         prot.writeMessageEnd();
       }
 
-      public List<String> getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
+      public List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner> getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -14732,6 +14834,85 @@ public class Airavata {
       }
     }
 
+    public void setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      setupUserComputeResourcePreferencesForSSH_call method_call = new setupUserComputeResourcePreferencesForSSH_call(authzToken, computeResourceId, username, airavataCredStoreToken, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class setupUserComputeResourcePreferencesForSSH_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private org.apache.airavata.model.security.AuthzToken authzToken;
+      private String computeResourceId;
+      private String username;
+      private String airavataCredStoreToken;
+      public setupUserComputeResourcePreferencesForSSH_call(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, 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 {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.authzToken = authzToken;
+        this.computeResourceId = computeResourceId;
+        this.username = username;
+        this.airavataCredStoreToken = airavataCredStoreToken;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setupUserComputeResourcePreferencesForSSH", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        setupUserComputeResourcePreferencesForSSH_args args = new setupUserComputeResourcePreferencesForSSH_args();
+        args.setAuthzToken(authzToken);
+        args.setComputeResourceId(computeResourceId);
+        args.setUsername(username);
+        args.setAiravataCredStoreToken(airavataCredStoreToken);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_setupUserComputeResourcePreferencesForSSH();
+      }
+    }
+
+    public void doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      doesUserHaveSSHAccount_call method_call = new doesUserHaveSSHAccount_call(authzToken, computeResourceId, username, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class doesUserHaveSSHAccount_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private org.apache.airavata.model.security.AuthzToken authzToken;
+      private String computeResourceId;
+      private String username;
+      public doesUserHaveSSHAccount_call(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, 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.authzToken = authzToken;
+        this.computeResourceId = computeResourceId;
+        this.username = username;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("doesUserHaveSSHAccount", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        doesUserHaveSSHAccount_args args = new doesUserHaveSSHAccount_args();
+        args.setAuthzToken(authzToken);
+        args.setComputeResourceId(computeResourceId);
+        args.setUsername(username);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public boolean getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_doesUserHaveSSHAccount();
+      }
+    }
+
     public void registerUserResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile userResourceProfile, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
       registerUserResourceProfile_call method_call = new registerUserResourceProfile_call(authzToken, userResourceProfile, resultHandler, this, ___protocolFactory, ___transport);
@@ -16239,6 +16420,8 @@ public class Airavata {
       processMap.put("deleteGatewayStoragePreference", new deleteGatewayStoragePreference());
       processMap.put("getSSHAccountProvisionerNames", new getSSHAccountProvisionerNames());
       processMap.put("getSSHAccountProvisionerConfigParams", new getSSHAccountProvisionerConfigParams());
+      processMap.put("setupUserComputeResourcePreferencesForSSH", new setupUserComputeResourcePreferencesForSSH());
+      processMap.put("doesUserHaveSSHAccount", new doesUserHaveSSHAccount());
       processMap.put("registerUserResourceProfile", new registerUserResourceProfile());
       processMap.put("getUserResourceProfile", new getUserResourceProfile());
       processMap.put("updateUserResourceProfile", new updateUserResourceProfile());
@@ -20384,6 +20567,67 @@ public class Airavata {
       }
     }
 
+    public static class setupUserComputeResourcePreferencesForSSH<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setupUserComputeResourcePreferencesForSSH_args> {
+      public setupUserComputeResourcePreferencesForSSH() {
+        super("setupUserComputeResourcePreferencesForSSH");
+      }
+
+      public setupUserComputeResourcePreferencesForSSH_args getEmptyArgsInstance() {
+        return new setupUserComputeResourcePreferencesForSSH_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public setupUserComputeResourcePreferencesForSSH_result getResult(I iface, setupUserComputeResourcePreferencesForSSH_args args) throws org.apache.thrift.TException {
+        setupUserComputeResourcePreferencesForSSH_result result = new setupUserComputeResourcePreferencesForSSH_result();
+        try {
+          result.success = iface.setupUserComputeResourcePreferencesForSSH(args.authzToken, args.computeResourceId, args.username, args.airavataCredStoreToken);
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        } catch (org.apache.airavata.model.error.AuthorizationException ae) {
+          result.ae = ae;
+        }
+        return result;
+      }
+    }
+
+    public static class doesUserHaveSSHAccount<I extends Iface> extends org.apache.thrift.ProcessFunction<I, doesUserHaveSSHAccount_args> {
+      public doesUserHaveSSHAccount() {
+        super("doesUserHaveSSHAccount");
+      }
+
+      public doesUserHaveSSHAccount_args getEmptyArgsInstance() {
+        return new doesUserHaveSSHAccount_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public doesUserHaveSSHAccount_result getResult(I iface, doesUserHaveSSHAccount_args args) throws org.apache.thrift.TException {
+        doesUserHaveSSHAccount_result result = new doesUserHaveSSHAccount_result();
+        try {
+          result.success = iface.doesUserHaveSSHAccount(args.authzToken, args.computeResourceId, args.username);
+          result.setSuccessIsSet(true);
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        } catch (org.apache.airavata.model.error.AuthorizationException ae) {
+          result.ae = ae;
+        }
+        return result;
+      }
+    }
+
     public static class registerUserResourceProfile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, registerUserResourceProfile_args> {
       public registerUserResourceProfile() {
         super("registerUserResourceProfile");
@@ -21625,6 +21869,8 @@ public class Airavata {
       processMap.put("deleteGatewayStoragePreference", new deleteGatewayStoragePreference());
       processMap.put("getSSHAccountProvisionerNames", new getSSHAccountProvisionerNames());
       processMap.put("getSSHAccountProvisionerConfigParams", new getSSHAccountProvisionerConfigParams());
+      processMap.put("setupUserComputeResourcePreferencesForSSH", new setupUserComputeResourcePreferencesForSSH());
+      processMap.put("doesUserHaveSSHAccount", new doesUserHaveSSHAccount());
       processMap.put("registerUserResourceProfile", new registerUserResourceProfile());
       processMap.put("getUserResourceProfile", new getUserResourceProfile());
       processMap.put("updateUserResourceProfile", new updateUserResourceProfile());
@@ -31305,7 +31551,7 @@ public class Airavata {
       }
     }
 
-    public static class getSSHAccountProvisionerNames<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getSSHAccountProvisionerNames_args, List<String>> {
+    public static class getSSHAccountProvisionerNames<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getSSHAccountProvisionerNames_args, List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner>> {
       public getSSHAccountProvisionerNames() {
         super("getSSHAccountProvisionerNames");
       }
@@ -31314,10 +31560,10 @@ public class Airavata {
         return new getSSHAccountProvisionerNames_args();
       }
 
-      public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<List<String>>() { 
-          public void onComplete(List<String> o) {
+        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner>>() { 
+          public void onComplete(List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner> o) {
             getSSHAccountProvisionerNames_result result = new getSSHAccountProvisionerNames_result();
             result.success = o;
             try {
@@ -31372,7 +31618,7 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getSSHAccountProvisionerNames_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException {
+      public void start(I iface, getSSHAccountProvisionerNames_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner>> resultHandler) throws TException {
         iface.getSSHAccountProvisionerNames(args.authzToken,resultHandler);
       }
     }
@@ -31449,92 +31695,20 @@ public class Airavata {
       }
     }
 
-    public static class registerUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerUserResourceProfile_args, String> {
-      public registerUserResourceProfile() {
-        super("registerUserResourceProfile");
+    public static class setupUserComputeResourcePreferencesForSSH<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setupUserComputeResourcePreferencesForSSH_args, org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> {
+      public setupUserComputeResourcePreferencesForSSH() {
+        super("setupUserComputeResourcePreferencesForSSH");
       }
 
-      public registerUserResourceProfile_args getEmptyArgsInstance() {
-        return new registerUserResourceProfile_args();
+      public setupUserComputeResourcePreferencesForSSH_args getEmptyArgsInstance() {
+        return new setupUserComputeResourcePreferencesForSSH_args();
       }
 
-      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
-        final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<String>() { 
-          public void onComplete(String o) {
-            registerUserResourceProfile_result result = new registerUserResourceProfile_result();
-            result.success = o;
-            try {
-              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
-              return;
-            } catch (Exception e) {
-              LOGGER.error("Exception writing to internal frame buffer", e);
-            }
-            fb.close();
-          }
-          public void onError(Exception e) {
-            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
-            org.apache.thrift.TBase msg;
-            registerUserResourceProfile_result result = new registerUserResourceProfile_result();
-            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
-                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
-                        result.setIreIsSet(true);
-                        msg = result;
-            }
-            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
-                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
-                        result.setAceIsSet(true);
-                        msg = result;
-            }
-            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
-                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
-                        result.setAseIsSet(true);
-                        msg = result;
-            }
-            else             if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
-                        result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
-                        result.setAeIsSet(true);
-                        msg = result;
-            }
-             else 
-            {
-              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
-              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
-            }
-            try {
-              fcall.sendResponse(fb,msg,msgType,seqid);
-              return;
-            } catch (Exception ex) {
-              LOGGER.error("Exception writing to internal frame buffer", ex);
-            }
-            fb.close();
-          }
-        };
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public void start(I iface, registerUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
-        iface.registerUserResourceProfile(args.authzToken, args.userResourceProfile,resultHandler);
-      }
-    }
-
-    public static class getUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserResourceProfile_args, org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> {
-      public getUserResourceProfile() {
-        super("getUserResourceProfile");
-      }
-
-      public getUserResourceProfile_args getEmptyArgsInstance() {
-        return new getUserResourceProfile_args();
-      }
-
-      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>() { 
-          public void onComplete(org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile o) {
-            getUserResourceProfile_result result = new getUserResourceProfile_result();
+        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>() { 
+          public void onComplete(org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference o) {
+            setupUserComputeResourcePreferencesForSSH_result result = new setupUserComputeResourcePreferencesForSSH_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -31547,7 +31721,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getUserResourceProfile_result result = new getUserResourceProfile_result();
+            setupUserComputeResourcePreferencesForSSH_result result = new setupUserComputeResourcePreferencesForSSH_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31588,25 +31762,25 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> resultHandler) throws TException {
-        iface.getUserResourceProfile(args.authzToken, args.userId, args.gatewayID,resultHandler);
+      public void start(I iface, setupUserComputeResourcePreferencesForSSH_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> resultHandler) throws TException {
+        iface.setupUserComputeResourcePreferencesForSSH(args.authzToken, args.computeResourceId, args.username, args.airavataCredStoreToken,resultHandler);
       }
     }
 
-    public static class updateUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateUserResourceProfile_args, Boolean> {
-      public updateUserResourceProfile() {
-        super("updateUserResourceProfile");
+    public static class doesUserHaveSSHAccount<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, doesUserHaveSSHAccount_args, Boolean> {
+      public doesUserHaveSSHAccount() {
+        super("doesUserHaveSSHAccount");
       }
 
-      public updateUserResourceProfile_args getEmptyArgsInstance() {
-        return new updateUserResourceProfile_args();
+      public doesUserHaveSSHAccount_args getEmptyArgsInstance() {
+        return new doesUserHaveSSHAccount_args();
       }
 
       public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
         return new AsyncMethodCallback<Boolean>() { 
           public void onComplete(Boolean o) {
-            updateUserResourceProfile_result result = new updateUserResourceProfile_result();
+            doesUserHaveSSHAccount_result result = new doesUserHaveSSHAccount_result();
             result.success = o;
             result.setSuccessIsSet(true);
             try {
@@ -31620,7 +31794,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            updateUserResourceProfile_result result = new updateUserResourceProfile_result();
+            doesUserHaveSSHAccount_result result = new doesUserHaveSSHAccount_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31661,27 +31835,26 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, updateUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.updateUserResourceProfile(args.authzToken, args.userId, args.gatewayID, args.userResourceProfile,resultHandler);
+      public void start(I iface, doesUserHaveSSHAccount_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.doesUserHaveSSHAccount(args.authzToken, args.computeResourceId, args.username,resultHandler);
       }
     }
 
-    public static class deleteUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteUserResourceProfile_args, Boolean> {
-      public deleteUserResourceProfile() {
-        super("deleteUserResourceProfile");
+    public static class registerUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerUserResourceProfile_args, String> {
+      public registerUserResourceProfile() {
+        super("registerUserResourceProfile");
       }
 
-      public deleteUserResourceProfile_args getEmptyArgsInstance() {
-        return new deleteUserResourceProfile_args();
+      public registerUserResourceProfile_args getEmptyArgsInstance() {
+        return new registerUserResourceProfile_args();
       }
 
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            deleteUserResourceProfile_result result = new deleteUserResourceProfile_result();
+        return new AsyncMethodCallback<String>() { 
+          public void onComplete(String o) {
+            registerUserResourceProfile_result result = new registerUserResourceProfile_result();
             result.success = o;
-            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -31693,7 +31866,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            deleteUserResourceProfile_result result = new deleteUserResourceProfile_result();
+            registerUserResourceProfile_result result = new registerUserResourceProfile_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31734,27 +31907,26 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, deleteUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.deleteUserResourceProfile(args.authzToken, args.userId, args.gatewayID,resultHandler);
+      public void start(I iface, registerUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+        iface.registerUserResourceProfile(args.authzToken, args.userResourceProfile,resultHandler);
       }
     }
 
-    public static class addUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addUserComputeResourcePreference_args, Boolean> {
-      public addUserComputeResourcePreference() {
-        super("addUserComputeResourcePreference");
+    public static class getUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserResourceProfile_args, org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> {
+      public getUserResourceProfile() {
+        super("getUserResourceProfile");
       }
 
-      public addUserComputeResourcePreference_args getEmptyArgsInstance() {
-        return new addUserComputeResourcePreference_args();
+      public getUserResourceProfile_args getEmptyArgsInstance() {
+        return new getUserResourceProfile_args();
       }
 
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            addUserComputeResourcePreference_result result = new addUserComputeResourcePreference_result();
+        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>() { 
+          public void onComplete(org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile o) {
+            getUserResourceProfile_result result = new getUserResourceProfile_result();
             result.success = o;
-            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -31766,7 +31938,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            addUserComputeResourcePreference_result result = new addUserComputeResourcePreference_result();
+            getUserResourceProfile_result result = new getUserResourceProfile_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31807,25 +31979,25 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, addUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.addUserComputeResourcePreference(args.authzToken, args.userId, args.gatewayID, args.userComputeResourceId, args.userComputeResourcePreference,resultHandler);
+      public void start(I iface, getUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> resultHandler) throws TException {
+        iface.getUserResourceProfile(args.authzToken, args.userId, args.gatewayID,resultHandler);
       }
     }
 
-    public static class addUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addUserStoragePreference_args, Boolean> {
-      public addUserStoragePreference() {
-        super("addUserStoragePreference");
+    public static class updateUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateUserResourceProfile_args, Boolean> {
+      public updateUserResourceProfile() {
+        super("updateUserResourceProfile");
       }
 
-      public addUserStoragePreference_args getEmptyArgsInstance() {
-        return new addUserStoragePreference_args();
+      public updateUserResourceProfile_args getEmptyArgsInstance() {
+        return new updateUserResourceProfile_args();
       }
 
       public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
         return new AsyncMethodCallback<Boolean>() { 
           public void onComplete(Boolean o) {
-            addUserStoragePreference_result result = new addUserStoragePreference_result();
+            updateUserResourceProfile_result result = new updateUserResourceProfile_result();
             result.success = o;
             result.setSuccessIsSet(true);
             try {
@@ -31839,7 +32011,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            addUserStoragePreference_result result = new addUserStoragePreference_result();
+            updateUserResourceProfile_result result = new updateUserResourceProfile_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31880,26 +32052,27 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, addUserStoragePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.addUserStoragePreference(args.authzToken, args.userId, args.gatewayID, args.userStorageResourceId, args.userStoragePreference,resultHandler);
+      public void start(I iface, updateUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.updateUserResourceProfile(args.authzToken, args.userId, args.gatewayID, args.userResourceProfile,resultHandler);
       }
     }
 
-    public static class getUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserComputeResourcePreference_args, org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> {
-      public getUserComputeResourcePreference() {
-        super("getUserComputeResourcePreference");
+    public static class deleteUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteUserResourceProfile_args, Boolean> {
+      public deleteUserResourceProfile() {
+        super("deleteUserResourceProfile");
       }
 
-      public getUserComputeResourcePreference_args getEmptyArgsInstance() {
-        return new getUserComputeResourcePreference_args();
+      public deleteUserResourceProfile_args getEmptyArgsInstance() {
+        return new deleteUserResourceProfile_args();
       }
 
-      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>() { 
-          public void onComplete(org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference o) {
-            getUserComputeResourcePreference_result result = new getUserComputeResourcePreference_result();
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            deleteUserResourceProfile_result result = new deleteUserResourceProfile_result();
             result.success = o;
+            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -31911,7 +32084,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getUserComputeResourcePreference_result result = new getUserComputeResourcePreference_result();
+            deleteUserResourceProfile_result result = new deleteUserResourceProfile_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31952,26 +32125,27 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> resultHandler) throws TException {
-        iface.getUserComputeResourcePreference(args.authzToken, args.userId, args.gatewayID, args.userComputeResourceId,resultHandler);
+      public void start(I iface, deleteUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.deleteUserResourceProfile(args.authzToken, args.userId, args.gatewayID,resultHandler);
       }
     }
 
-    public static class getUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserStoragePreference_args, org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> {
-      public getUserStoragePreference() {
-        super("getUserStoragePreference");
+    public static class addUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addUserComputeResourcePreference_args, Boolean> {
+      public addUserComputeResourcePreference() {
+        super("addUserComputeResourcePreference");
       }
 
-      public getUserStoragePreference_args getEmptyArgsInstance() {
-        return new getUserStoragePreference_args();
+      public addUserComputeResourcePreference_args getEmptyArgsInstance() {
+        return new addUserComputeResourcePreference_args();
       }
 
-      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>() { 
-          public void onComplete(org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference o) {
-            getUserStoragePreference_result result = new getUserStoragePreference_result();
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            addUserComputeResourcePreference_result result = new addUserComputeResourcePreference_result();
             result.success = o;
+            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -31983,7 +32157,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getUserStoragePreference_result result = new getUserStoragePreference_result();
+            addUserComputeResourcePreference_result result = new addUserComputeResourcePreference_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32024,26 +32198,27 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getUserStoragePreference_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> resultHandler) throws TException {
-        iface.getUserStoragePreference(args.authzToken, args.userId, args.gatewayID, args.userStorageResourceId,resultHandler);
+      public void start(I iface, addUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.addUserComputeResourcePreference(args.authzToken, args.userId, args.gatewayID, args.userComputeResourceId, args.userComputeResourcePreference,resultHandler);
       }
     }
 
-    public static class getAllUserComputeResourcePreferences<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserComputeResourcePreferences_args, List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>> {
-      public getAllUserComputeResourcePreferences() {
-        super("getAllUserComputeResourcePreferences");
+    public static class addUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addUserStoragePreference_args, Boolean> {
+      public addUserStoragePreference() {
+        super("addUserStoragePreference");
       }
 
-      public getAllUserComputeResourcePreferences_args getEmptyArgsInstance() {
-        return new getAllUserComputeResourcePreferences_args();
+      public addUserStoragePreference_args getEmptyArgsInstance() {
+        return new addUserStoragePreference_args();
       }
 
-      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>>() { 
-          public void onComplete(List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> o) {
-            getAllUserComputeResourcePreferences_result result = new getAllUserComputeResourcePreferences_result();
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            addUserStoragePreference_result result = new addUserStoragePreference_result();
             result.success = o;
+            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -32055,7 +32230,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getAllUserComputeResourcePreferences_result result = new getAllUserComputeResourcePreferences_result();
+            addUserStoragePreference_result result = new addUserStoragePreference_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32096,25 +32271,25 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getAllUserComputeResourcePreferences_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>> resultHandler) throws TException {
-        iface.getAllUserComputeResourcePreferences(args.authzToken, args.userId, args.gatewayID,resultHandler);
+      public void start(I iface, addUserStoragePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.addUserStoragePreference(args.authzToken, args.userId, args.gatewayID, args.userStorageResourceId, args.userStoragePreference,resultHandler);
       }
     }
 
-    public static class getAllUserStoragePreferences<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserStoragePreferences_args, List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>> {
-      public getAllUserStoragePreferences() {
-        super("getAllUserStoragePreferences");
+    public static class getUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserComputeResourcePreference_args, org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> {
+      public getUserComputeResourcePreference() {
+        super("getUserComputeResourcePreference");
       }
 
-      public getAllUserStoragePreferences_args getEmptyArgsInstance() {
-        return new getAllUserStoragePreferences_args();
+      public getUserComputeResourcePreference_args getEmptyArgsInstance() {
+        return new getUserComputeResourcePreference_args();
       }
 
-      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>>() { 
-          public void onComplete(List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> o) {
-            getAllUserStoragePreferences_result result = new getAllUserStoragePreferences_result();
+        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>() { 
+          public void onComplete(org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference o) {
+            getUserComputeResourcePreference_result result = new getUserComputeResourcePreference_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -32127,7 +32302,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getAllUserStoragePreferences_result result = new getAllUserStoragePreferences_result();
+            getUserComputeResourcePreference_result result = new getUserComputeResourcePreference_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32168,25 +32343,25 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getAllUserStoragePreferences_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>> resultHandler) throws TException {
-        iface.getAllUserStoragePreferences(args.authzToken, args.userId, args.gatewayID,resultHandler);
+      public void start(I iface, getUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> resultHandler) throws TException {
+        iface.getUserComputeResourcePreference(args.authzToken, args.userId, args.gatewayID, args.userComputeResourceId,resultHandler);
       }
     }
 
-    public static class getAllUserResourceProfiles<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserResourceProfiles_args, List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>> {
-      public getAllUserResourceProfiles() {
-        super("getAllUserResourceProfiles");
+    public static class getUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserStoragePreference_args, org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> {
+      public getUserStoragePreference() {
+        super("getUserStoragePreference");
       }
 
-      public getAllUserResourceProfiles_args getEmptyArgsInstance() {
-        return new getAllUserResourceProfiles_args();
+      public getUserStoragePreference_args getEmptyArgsInstance() {
+        return new getUserStoragePreference_args();
       }
 
-      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>>() { 
-          public void onComplete(List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> o) {
-            getAllUserResourceProfiles_result result = new getAllUserResourceProfiles_result();
+        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>() { 
+          public void onComplete(org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference o) {
+            getUserStoragePreference_result result = new getUserStoragePreference_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -32199,7 +32374,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getAllUserResourceProfiles_result result = new getAllUserResourceProfiles_result();
+            getUserStoragePreference_result result = new getUserStoragePreference_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32240,27 +32415,26 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getAllUserResourceProfiles_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>> resultHandler) throws TException {
-        iface.getAllUserResourceProfiles(args.authzToken,resultHandler);
+      public void start(I iface, getUserStoragePreference_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> resultHandler) throws TException {
+        iface.getUserStoragePreference(args.authzToken, args.userId, args.gatewayID, args.userStorageResourceId,resultHandler);
       }
     }
 
-    public static class updateUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateUserComputeResourcePreference_args, Boolean> {
-      public updateUserComputeResourcePreference() {
-        super("updateUserComputeResourcePreference");
+    public static class getAllUserComputeResourcePreferences<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserComputeResourcePreferences_args, List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>> {
+      public getAllUserComputeResourcePreferences() {
+        super("getAllUserComputeResourcePreferences");
       }
 
-      public updateUserComputeResourcePreference_args getEmptyArgsInstance() {
-        return new updateUserComputeResourcePreference_args();
+      public getAllUserComputeResourcePreferences_args getEmptyArgsInstance() {
+        return new getAllUserComputeResourcePreferences_args();
       }
 
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            updateUserComputeResourcePreference_result result = new updateUserComputeResourcePreference_result();
+        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>>() { 
+          public void onComplete(List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> o) {
+            getAllUserComputeResourcePreferences_result result = new getAllUserComputeResourcePreferences_result();
             result.success = o;
-            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -32272,7 +32446,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            updateUserComputeResourcePreference_result result = new updateUserComputeResourcePreference_result();
+            getAllUserComputeResourcePreferences_result result = new getAllUserComputeResourcePreferences_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32313,27 +32487,26 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, updateUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.updateUserComputeResourcePreference(args.authzToken, args.userId, args.gatewayID, args.userComputeResourceId, args.userComputeResourcePreference,resultHandler);
+      public void start(I iface, getAllUserComputeResourcePreferences_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>> resultHandler) throws TException {
+        iface.getAllUserComputeResourcePreferences(args.authzToken, args.userId, args.gatewayID,resultHandler);
       }
     }
 
-    public static class updateUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateUserStoragePreference_args, Boolean> {
-      public updateUserStoragePreference() {
-        super("updateUserStoragePreference");
+    public static class getAllUserStoragePreferences<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserStoragePreferences_args, List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>> {
+      public getAllUserStoragePreferences() {
+        super("getAllUserStoragePreferences");
       }
 
-      public updateUserStoragePreference_args getEmptyArgsInstance() {
-        return new updateUserStoragePreference_args();
+      public getAllUserStoragePreferences_args getEmptyArgsInstance() {
+        return new getAllUserStoragePreferences_args();
       }
 
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            updateUserStoragePreference_result result = new updateUserStoragePreference_result();
+        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>>() { 
+          public void onComplete(List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> o) {
+            getAllUserStoragePreferences_result result = new getAllUserStoragePreferences_result();
             result.success = o;
-            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -32345,7 +32518,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            updateUserStoragePreference_result result = new updateUserStoragePreference_result();
+            getAllUserStoragePreferences_result result = new getAllUserStoragePreferences_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32386,27 +32559,26 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, updateUserStoragePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.updateUserStoragePreference(args.authzToken, args.userId, args.gatewayID, args.userStorageId, args.userStoragePreference,resultHandler);
+      public void start(I iface, getAllUserStoragePreferences_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>> resultHandler) throws TException {
+        iface.getAllUserStoragePreferences(args.authzToken, args.userId, args.gatewayID,resultHandler);
       }
     }
 
-    public static class deleteUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteUserComputeResourcePreference_args, Boolean> {
-      public deleteUserComputeResourcePreference() {
-        super("deleteUserComputeResourcePreference");
+    public static class getAllUserResourceProfiles<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserResourceProfiles_args, List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>> {
+      public getAllUserResourceProfiles() {
+        super("getAllUserResourceProfiles");
       }
 
-      public deleteUserComputeResourcePreference_args getEmptyArgsInstance() {
-        return new deleteUserComputeResourcePreference_args();
+      public getAllUserResourceProfiles_args getEmptyArgsInstance() {
+        return new getAllUserResourceProfiles_args();
       }
 
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            deleteUserComputeResourcePreference_result result = new deleteUserComputeResourcePreference_result();
+        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>>() { 
+          public void onComplete(List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> o) {
+            getAllUserResourceProfiles_result result = new getAllUserResourceProfiles_result();
             result.success = o;
-            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -32418,7 +32590,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            deleteUserComputeResourcePreference_result result = new deleteUserComputeResourcePreference_result();
+            getAllUserResourceProfiles_result result = new getAllUserResourceProfiles_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32459,25 +32631,25 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, deleteUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.deleteUserComputeResourcePreference(args.authzToken, args.userId, args.gatewayID, args.userComputeResourceId,resultHandler);
+      public void start(I iface, getAllUserResourceProfiles_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>> resultHandler) throws TException {
+        iface.getAllUserResourceProfiles(args.authzToken,resultHandler);
       }
     }
 
-    public static class deleteUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteUserStoragePreference_args, Boolean> {
-      public deleteUserStoragePreference() {
-        super("deleteUserStoragePreference");
+    public static class updateUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateUserComputeResourcePreference_args, Boolean> {
+      public updateUserComputeResourcePreference() {
+        super("updateUserComputeResourcePreference");
       }
 
-      public deleteUserStoragePreference_args getEmptyArgsInstance() {
-        return new deleteUserStoragePreference_args();
+      public updateUserComputeResourcePreference_args getEmptyArgsInstance() {
+        return new updateUserComputeResourcePreference_args();
       }
 
       public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
         return new AsyncMethodCallback<Boolean>() { 
           public void onComplete(Boolean o) {
-            deleteUserStoragePreference_result result = new deleteUserStoragePreference_result();
+            updateUserComputeResourcePreference_result result = new updateUserComputeResourcePreference_result();
             result.success = o;
             result.setSuccessIsSet(true);
             try {
@@ -32491,7 +32663,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            deleteUserStoragePreference_result result = new deleteUserStoragePreference_result();
+            updateUserComputeResourcePreference_result result = new updateUserComputeResourcePreference_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32532,26 +32704,27 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, deleteUserStoragePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.deleteUserStoragePreference(args.authzToken, args.userId, args.gatewayID, args.userStorageId,resultHandler);
+      public void start(I iface, updateUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.updateUserComputeResourcePreference(args.authzToken, args.userId, args.gatewayID, args.userComputeResourceId, args.userComputeResourcePreference,resultHandler);
       }
     }
 
-    public static class getAllWorkflows<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllWorkflows_args, List<String>> {
-      public getAllWorkflows() {
-        super("getAllWorkflows");
+    public static class updateUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateUserStoragePreference_args, Boolean> {
+      public updateUserStoragePreference() {
+        super("updateUserStoragePreference");
       }
 
-      public getAllWorkflows_args getEmptyArgsInstance() {
-        return new getAllWorkflows_args();
+      public updateUserStoragePreference_args getEmptyArgsInstance() {
+        return new updateUserStoragePreference_args();
       }
 
-      public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<List<String>>() { 
-          public void onComplete(List<String> o) {
-            getAllWorkflows_result result = new getAllWorkflows_result();
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            updateUserStoragePreference_result result = new updateUserStoragePreference_result();
             result.success = o;
+            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -32563,7 +32736,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getAllWorkflows_result result = new getAllWorkflows_result();
+            updateUserStoragePreference_result result = new updateUserStoragePreference_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32604,26 +32777,27 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getAllWorkflows_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException {
-        iface.getAllWorkflows(args.authzToken, args.gatewayId,resultHandler);
+      public void start(I iface, updateUserStoragePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.updateUserStoragePreference(args.authzToken, args.userId, args.gatewayID, args.userStorageId, args.userStoragePreference,resultHandler);
       }
     }
 
-    public static class getLatestQueueStatuses<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLatestQueueStatuses_args, List<org.apache.airavata.model.status.QueueStatusModel>> {
-      public getLatestQueueStatuses() {
-        super("getLatestQueueStatuses");
+    public static class deleteUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteUserComputeResourcePreference_args, Boolean> {
+      public deleteUserComputeResourcePreference() {
+        super("deleteUserComputeResourcePreference");
       }
 
-      public getLatestQueueStatuses_args getEmptyArgsInstance() {
-        return new getLatestQueueStatuses_args();
+      public deleteUserComputeResourcePreference_args getEmptyArgsInstance() {
+        return new deleteUserComputeResourcePreference_args();
       }
 
-      public AsyncMethodCallback<List<org.apache.airavata.model.status.QueueStatusModel>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<List<org.apache.airavata.model.status.QueueStatusModel>>() { 
-          public void onComplete(List<org.apache.airavata.model.status.QueueStatusModel> o) {
-            getLatestQueueStatuses_result result = new getLatestQueueStatuses_result();
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            deleteUserComputeResourcePreference_result result = new deleteUserComputeResourcePreference_result();
             result.success = o;
+            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -32635,7 +32809,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getLatestQueueStatuses_result result = new getLatestQueueStatuses_result();
+            deleteUserComputeResourcePreference_result result = new deleteUserComputeResourcePreference_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32676,26 +32850,27 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getLatestQueueStatuses_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.status.QueueStatusModel>> resultHandler) throws TException {
-        iface.getLatestQueueStatuses(args.authzToken,resultHandler);
+      public void start(I iface, deleteUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.deleteUserComputeResourcePreference(args.authzToken, args.userId, args.gatewayID, args.userComputeResourceId,resultHandler);
       }
     }
 
-    public static class getWorkflow<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getWorkflow_args, org.apache.airavata.model.WorkflowModel> {
-      public getWorkflow() {
-        super("getWorkflow");
+    public static class deleteUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteUserStoragePreference_args, Boolean> {
+      public deleteUserStoragePreference() {
+        super("deleteUserStoragePreference");
       }
 
-      public getWorkflow_args getEmptyArgsInstance() {
-        return new getWorkflow_args();
+      public deleteUserStoragePreference_args getEmptyArgsInstance() {
+        return new deleteUserStoragePreference_args();
       }
 
-      public AsyncMethodCallback<org.apache.airavata.model.WorkflowModel> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<org.apache.airavata.model.WorkflowModel>() { 
-          public void onComplete(org.apache.airavata.model.WorkflowModel o) {
-            getWorkflow_result result = new getWorkflow_result();
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            deleteUserStoragePreference_result result = new deleteUserStoragePreference_result();
             result.success = o;
+            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -32707,78 +32882,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getWorkflow_result result = new getWorkflow_result();
-            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
-                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
-                        result.setIreIsSet(true);
-                        msg = result;
-            }
-            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
-                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
-                        result.setAceIsSet(true);
-                        msg = result;
-            }
-            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
-                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
-                        result.setAseIsSet(true);
-                        msg = result;
-            }
-            else             if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
-                        result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
-                        result.setAeIsSet(true);
-                        msg = result;
-            }
-             else 
-            {
-              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
-              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
-            }
-            try {
-              fcall.sendResponse(fb,msg,msgType,seqid);
-              return;
-            } catch (Exception ex) {
-              LOGGER.error("Exception writing to internal frame buffer", ex);
-            }
-            fb.close();
-          }
-        };
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public void start(I iface, getWorkflow_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.WorkflowModel> resultHandler) throws TException {
-        iface.getWorkflow(args.authzToken, args.workflowTemplateId,resultHandler);
-      }
-    }
-
-    public static class deleteWorkflow<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteWorkflow_args, Void> {
-      public deleteWorkflow() {
-        super("deleteWorkflow");
-      }
-
-      public deleteWorkflow_args getEmptyArgsInstance() {
-        return new deleteWorkflow_args();
-      }
-
-      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
-        final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Void>() { 
-          public void onComplete(Void o) {
-            deleteWorkflow_result result = new deleteWorkflow_result();
-            try {
-              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
-              return;
-            } catch (Exception e) {
-              LOGGER.error("Exception writing to internal frame buffer", e);
-            }
-            fb.close();
-          }
-          public void onError(Exception e) {
-            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
-            org.apache.thrift.TBase msg;
-            deleteWorkflow_result result = new deleteWorkflow_result();
+            deleteUserStoragePreference_result result = new deleteUserStoragePreference_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.

<TRUNCATED>

[14/40] airavata git commit: AIRAVATA-2500 Implement API method to get provisioner metadata

Posted by ma...@apache.org.
AIRAVATA-2500 Implement API method to get provisioner metadata


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

Branch: refs/heads/develop
Commit: 643d35b3884d1014a47c3a1b50fc6580d0dabeb1
Parents: 469a7e7
Author: Marcus Christie <ma...@apache.org>
Authored: Thu Sep 7 09:41:17 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Tue Sep 19 15:07:57 2017 -0400

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   | 56 ++++++++++++++------
 .../accountprovisioning/SSHAccountManager.java  |  3 +-
 .../SSHAccountProvisioner.java                  | 10 ++--
 .../SSHAccountProvisionerFactory.java           | 14 ++---
 .../SSHAccountProvisionerProvider.java          |  3 +-
 .../IULdapSSHAccountProvisioner.java            | 10 ----
 .../IULdapSSHAccountProvisionerProvider.java    | 31 ++++++++++-
 .../SSHAccountProvisionerFactoryTest.java       |  4 +-
 .../provisioner/TestSSHAccountProvisioner.java  | 10 ----
 .../TestSSHAccountProvisionerProvider.java      | 10 ++++
 .../airavata-apis/airavata_api.thrift           | 12 ++---
 .../account_provisioning_model.thrift           | 12 +++--
 12 files changed, 107 insertions(+), 68 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/643d35b3/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 bb3f2c0..febb703 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
@@ -19,7 +19,10 @@
  */
 package org.apache.airavata.api.server.handler;
 
+import org.apache.airavata.accountprovisioning.ConfigParam;
 import org.apache.airavata.accountprovisioning.SSHAccountManager;
+import org.apache.airavata.accountprovisioning.SSHAccountProvisionerFactory;
+import org.apache.airavata.accountprovisioning.SSHAccountProvisionerProvider;
 import org.apache.airavata.api.Airavata;
 import org.apache.airavata.api.airavata_apiConstants;
 import org.apache.airavata.api.server.util.ThriftClientPool;
@@ -38,6 +41,7 @@ import org.apache.airavata.messaging.core.Type;
 import org.apache.airavata.model.WorkflowModel;
 import org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner;
 import org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam;
+import org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParamType;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule;
 import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
@@ -3969,30 +3973,48 @@ public class AiravataServerHandler implements Airavata.Iface {
 
     @Override
     @SecurityCheck
-    public List<SSHAccountProvisioner> getSSHAccountProvisionerNames(AuthzToken authzToken) throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
+    public List<SSHAccountProvisioner> getSSHAccountProvisioners(AuthzToken authzToken) throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
 
-        // TODO: implement
-        return null;
-    }
-
-    @Override
-    @SecurityCheck
-    public List<SSHAccountProvisionerConfigParam> getSSHAccountProvisionerConfigParams(AuthzToken authzToken, String provisionerName) throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
-
-        // TODO: implement
-        return null;
+        List<SSHAccountProvisioner> sshAccountProvisioners = new ArrayList<>();
+        List<SSHAccountProvisionerProvider> sshAccountProvisionerProviders = SSHAccountProvisionerFactory.getSSHAccountProvisionerProviders();
+        for (SSHAccountProvisionerProvider provider : sshAccountProvisionerProviders) {
+            // TODO: Move this Thrift conversion to utility class
+            SSHAccountProvisioner sshAccountProvisioner = new SSHAccountProvisioner();
+            sshAccountProvisioner.setCanCreateAccount(provider.canCreateAccount());
+            sshAccountProvisioner.setCanInstallSSHKey(provider.canInstallSSHKey());
+            sshAccountProvisioner.setName(provider.getName());
+            List<SSHAccountProvisionerConfigParam> sshAccountProvisionerConfigParams = new ArrayList<>();
+            for (ConfigParam configParam : provider.getConfigParams()) {
+                SSHAccountProvisionerConfigParam sshAccountProvisionerConfigParam = new SSHAccountProvisionerConfigParam();
+                sshAccountProvisionerConfigParam.setName(configParam.getName());
+                sshAccountProvisionerConfigParam.setDescription(configParam.getDescription());
+                sshAccountProvisionerConfigParam.setIsOptional(configParam.isOptional());
+                switch (configParam.getType()){
+                    case STRING:
+                        sshAccountProvisionerConfigParam.setType(SSHAccountProvisionerConfigParamType.STRING);
+                        break;
+                    case CRED_STORE_PASSWORD_TOKEN:
+                        sshAccountProvisionerConfigParam.setType(SSHAccountProvisionerConfigParamType.CRED_STORE_PASSWORD_TOKEN);
+                        break;
+                }
+                sshAccountProvisionerConfigParams.add(sshAccountProvisionerConfigParam);
+            }
+            sshAccountProvisioner.setConfigParams(sshAccountProvisionerConfigParams);
+            sshAccountProvisioners.add(sshAccountProvisioner);
+        }
+        return sshAccountProvisioners;
     }
 
     @Override
     @SecurityCheck
-    public boolean doesUserHaveSSHAccount(AuthzToken authzToken, String computeResourceId, String username) throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
+    public boolean doesUserHaveSSHAccount(AuthzToken authzToken, String computeResourceId, String userId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
         String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
-        return SSHAccountManager.doesUserHaveSSHAccount(gatewayId, computeResourceId, username);
+        return SSHAccountManager.doesUserHaveSSHAccount(gatewayId, computeResourceId, userId);
     }
 
     @Override
     @SecurityCheck
-    public UserComputeResourcePreference setupUserComputeResourcePreferencesForSSH(AuthzToken authzToken, String computeResourceId, String username, String airavataCredStoreToken) throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
+    public UserComputeResourcePreference setupUserComputeResourcePreferencesForSSH(AuthzToken authzToken, String computeResourceId, String userId, String airavataCredStoreToken) throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
         String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
         CredentialStoreService.Client csClient = csClientPool.getResource();
         SSHCredential sshCredential = null;
@@ -4008,13 +4030,13 @@ public class AiravataServerHandler implements Airavata.Iface {
         }
 
         try {
-            UserComputeResourcePreference userComputeResourcePreference = SSHAccountManager.setupSSHAccount(gatewayId, computeResourceId, username, sshCredential);
+            UserComputeResourcePreference userComputeResourcePreference = SSHAccountManager.setupSSHAccount(gatewayId, computeResourceId, userId, sshCredential);
             return userComputeResourcePreference;
         }catch (Exception e){
-            logger.error("Error occurred while automatically setting up SSH account for user [" + username + "]", e);
+            logger.error("Error occurred while automatically setting up SSH account for user [" + userId + "]", e);
             AiravataSystemException exception = new AiravataSystemException();
             exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
-            exception.setMessage("Error occurred while automatically setting up SSH account for user [" + username + "]. More info : " + e.getMessage());
+            exception.setMessage("Error occurred while automatically setting up SSH account for user [" + userId + "]. More info : " + e.getMessage());
             throw exception;
         }
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/643d35b3/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
index 74c0dd2..8493dc1 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
@@ -110,11 +110,12 @@ public class SSHAccountManager {
 
         // instantiate and init the account provisioner
         SSHAccountProvisioner sshAccountProvisioner = createSshAccountProvisioner(gatewayId, computeResourcePreference);
+        boolean canCreateAccount = SSHAccountProvisionerFactory.canCreateAccount(computeResourcePreference.getSshAccountProvisioner());
 
         // First check if username has an account
         boolean hasAccount = sshAccountProvisioner.hasAccount(username);
 
-        if (!hasAccount && !sshAccountProvisioner.canCreateAccount()) {
+        if (!hasAccount && !canCreateAccount) {
             throw new RuntimeException("User [" + username + "] doesn't have account and [" + computeResourceId + "] doesn't have a SSH Account Provisioner that supports creating accounts.");
         }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/643d35b3/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java
index 5303081..b8abf1f 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java
@@ -25,10 +25,8 @@ import java.util.Map;
 public interface SSHAccountProvisioner {
 
     void init(Map<ConfigParam, String> config);
-    boolean hasAccount(String username);
-    boolean canCreateAccount();
-    void createAccount(String username, String sshPublicKey);
-    boolean canInstallSSHKey();
-    void installSSHKey(String username, String sshPublicKey);
-    String getScratchLocation(String username);
+    boolean hasAccount(String userId);
+    void createAccount(String userId, String sshPublicKey);
+    void installSSHKey(String userId, String sshPublicKey);
+    String getScratchLocation(String userId);
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/643d35b3/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactory.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactory.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactory.java
index 7b1f6c6..09bf4c3 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactory.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactory.java
@@ -29,12 +29,10 @@ public class SSHAccountProvisionerFactory {
 
     private static ServiceLoader<SSHAccountProvisionerProvider> sshAccountProvisionerProviders = ServiceLoader.load(SSHAccountProvisionerProvider.class);
 
-    public static List<String> getSSHAccountProvisionerImplementationNames() {
-        List<String> names = new ArrayList<>();
-        for (SSHAccountProvisionerProvider sshAccountProvisionerProvider : sshAccountProvisionerProviders ) {
-            names.add(sshAccountProvisionerProvider.getName());
-        }
-        return names;
+    public static List<SSHAccountProvisionerProvider> getSSHAccountProvisionerProviders() {
+        List<SSHAccountProvisionerProvider> providers = new ArrayList<>();
+        sshAccountProvisionerProviders.forEach(providers::add);
+        return providers;
     }
 
     public static List<ConfigParam> getSSHAccountProvisionerConfigParams(String provisionerName) {
@@ -42,6 +40,10 @@ public class SSHAccountProvisionerFactory {
         return getSSHAccountProvisionerProvider(provisionerName).getConfigParams();
     }
 
+    public static boolean canCreateAccount(String provisionerName) {
+        return getSSHAccountProvisionerProvider(provisionerName).canCreateAccount();
+    }
+
     public static SSHAccountProvisioner createSSHAccountProvisioner(String provisionerName, Map<ConfigParam, String> config) {
 
         SSHAccountProvisionerProvider sshAccountProvisionerProvider = getSSHAccountProvisionerProvider(provisionerName);

http://git-wip-us.apache.org/repos/asf/airavata/blob/643d35b3/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerProvider.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerProvider.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerProvider.java
index a43a022..297c757 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerProvider.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerProvider.java
@@ -34,5 +34,6 @@ public interface SSHAccountProvisionerProvider {
     }
     List<ConfigParam> getConfigParams();
     SSHAccountProvisioner createSSHAccountProvisioner(Map<ConfigParam,String> config);
-    // TODO: should canCreateAccount and canInstallSSHKey move here? All metadata about provisioner could be on this class
+    boolean canCreateAccount();
+    boolean canInstallSSHKey();
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/643d35b3/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
index 0714f49..03fa803 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
@@ -40,22 +40,12 @@ public class IULdapSSHAccountProvisioner implements SSHAccountProvisioner {
     }
 
     @Override
-    public boolean canCreateAccount() {
-        return false;
-    }
-
-    @Override
     public void createAccount(String username, String sshPublicKey) {
 
         throw new UnsupportedOperationException("IULdapSSHAccountProvisioner does not support creating cluster accounts at this time.");
     }
 
     @Override
-    public boolean canInstallSSHKey() {
-        return true;
-    }
-
-    @Override
     public void installSSHKey(String username, String sshPublicKey) {
         // TODO: implement
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/643d35b3/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisionerProvider.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisionerProvider.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisionerProvider.java
index b54fdc4..45dc0a6 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisionerProvider.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisionerProvider.java
@@ -24,6 +24,7 @@ import org.apache.airavata.accountprovisioning.ConfigParam;
 import org.apache.airavata.accountprovisioning.SSHAccountProvisioner;
 import org.apache.airavata.accountprovisioning.SSHAccountProvisionerProvider;
 
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
@@ -31,8 +32,24 @@ public class IULdapSSHAccountProvisionerProvider implements SSHAccountProvisione
 
     @Override
     public List<ConfigParam> getConfigParams() {
-        // TODO: implement
-        return null;
+        List<ConfigParam> configParams = new ArrayList<>();
+        configParams.add(new ConfigParam("ldap-host")
+                .setDescription("Hostname of LDAP server")
+                .setOptional(false)
+                .setType(ConfigParam.ConfigParamType.STRING));
+        configParams.add(new ConfigParam("ldap-port")
+                .setDescription("Port of LDAP server")
+                .setOptional(false)
+                .setType(ConfigParam.ConfigParamType.STRING));
+        configParams.add(new ConfigParam("ldap-username")
+                .setDescription("Username for LDAP server")
+                .setOptional(false)
+                .setType(ConfigParam.ConfigParamType.STRING));
+        configParams.add(new ConfigParam("ldap-password")
+                .setDescription("Password for LDAP server")
+                .setOptional(false)
+                .setType(ConfigParam.ConfigParamType.CRED_STORE_PASSWORD_TOKEN));
+        return configParams;
     }
 
     @Override
@@ -41,4 +58,14 @@ public class IULdapSSHAccountProvisionerProvider implements SSHAccountProvisione
         sshAccountProvisioner.init(config);
         return sshAccountProvisioner;
     }
+
+    @Override
+    public boolean canCreateAccount() {
+        return false;
+    }
+
+    @Override
+    public boolean canInstallSSHKey() {
+        return true;
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/643d35b3/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactoryTest.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactoryTest.java b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactoryTest.java
index 466896e..89e9ff7 100644
--- a/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactoryTest.java
+++ b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactoryTest.java
@@ -27,13 +27,15 @@ import org.junit.Test;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 public class SSHAccountProvisionerFactoryTest {
 
     @Test
     public void testGetSSHAccountProvisionerImplementationNames() {
 
-        List<String> sshAccountProvisionerNames = SSHAccountProvisionerFactory.getSSHAccountProvisionerImplementationNames();
+        List<SSHAccountProvisionerProvider> sshAccountProvisionerProviders = SSHAccountProvisionerFactory.getSSHAccountProvisionerProviders();
+        List<String> sshAccountProvisionerNames = sshAccountProvisionerProviders.stream().map(SSHAccountProvisionerProvider::getName).collect(Collectors.toList());
         Assert.assertTrue("names should contain TestSSHAccountProvisioner", sshAccountProvisionerNames.contains("TestSSHAccountProvisioner"));
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/643d35b3/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisioner.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisioner.java b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisioner.java
index d2ef213..f47552f 100644
--- a/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisioner.java
+++ b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisioner.java
@@ -41,21 +41,11 @@ public class TestSSHAccountProvisioner implements SSHAccountProvisioner {
     }
 
     @Override
-    public boolean canCreateAccount() {
-        return false;
-    }
-
-    @Override
     public void createAccount(String username, String sshPublicKey) {
 
     }
 
     @Override
-    public boolean canInstallSSHKey() {
-        return false;
-    }
-
-    @Override
     public void installSSHKey(String username, String sshPublicKey) {
 
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/643d35b3/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisionerProvider.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisionerProvider.java b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisionerProvider.java
index 65fcfe5..a8d2cb5 100644
--- a/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisionerProvider.java
+++ b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisionerProvider.java
@@ -63,4 +63,14 @@ public class TestSSHAccountProvisionerProvider implements SSHAccountProvisionerP
         sshAccountProvisioner.init(config);
         return sshAccountProvisioner;
     }
+
+    @Override
+    public boolean canCreateAccount() {
+        return false;
+    }
+
+    @Override
+    public boolean canInstallSSHKey() {
+        return true;
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/643d35b3/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/airavata-apis/airavata_api.thrift b/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
index e06c234..1eb7b95 100644
--- a/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
+++ b/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
@@ -2950,13 +2950,7 @@ service Airavata {
               3: airavata_errors.AiravataSystemException ase,
               4: airavata_errors.AuthorizationException ae)
 
-  list<account_provisioning_model.SSHAccountProvisioner> getSSHAccountProvisionerNames(1: required security_model.AuthzToken authzToken)
-    	throws (1: airavata_errors.InvalidRequestException ire,
-              2: airavata_errors.AiravataClientException ace,
-              3: airavata_errors.AiravataSystemException ase,
-              4: airavata_errors.AuthorizationException ae)
-
-  list<account_provisioning_model.SSHAccountProvisionerConfigParam> getSSHAccountProvisionerConfigParams(1: required security_model.AuthzToken authzToken, 2: required string provisionerName)
+  list<account_provisioning_model.SSHAccountProvisioner> getSSHAccountProvisioners(1: required security_model.AuthzToken authzToken)
     	throws (1: airavata_errors.InvalidRequestException ire,
               2: airavata_errors.AiravataClientException ace,
               3: airavata_errors.AiravataSystemException ase,
@@ -2966,7 +2960,7 @@ service Airavata {
    * Check if user has an SSH account on the given compute resource. This
    * method will only work if the compute resource has an SSHAccountProvisioner configured for it.
    */
-  bool doesUserHaveSSHAccount(1: required security_model.AuthzToken authzToken, 2: required string computeResourceId, 3: required string username)
+  bool doesUserHaveSSHAccount(1: required security_model.AuthzToken authzToken, 2: required string computeResourceId, 3: required string userId)
     	throws (1: airavata_errors.InvalidRequestException ire,
               2: airavata_errors.AiravataClientException ace,
               3: airavata_errors.AiravataSystemException ase,
@@ -2979,7 +2973,7 @@ service Airavata {
    * call addUserComputeResourcePreference to persist it.
    */
   user_resource_profile_model.UserComputeResourcePreference setupUserComputeResourcePreferencesForSSH(1: required security_model.AuthzToken authzToken,
-            2: required string computeResourceId, 3: required string username, 4: required string airavataCredStoreToken)
+            2: required string computeResourceId, 3: required string userId, 4: required string airavataCredStoreToken)
     	throws (1: airavata_errors.InvalidRequestException ire,
               2: airavata_errors.AiravataClientException ace,
               3: airavata_errors.AiravataSystemException ase,

http://git-wip-us.apache.org/repos/asf/airavata/blob/643d35b3/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift b/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift
index 245d295..d314f78 100644
--- a/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift
+++ b/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift
@@ -28,11 +28,6 @@ enum SSHAccountProvisionerConfigParamType {
     CRED_STORE_PASSWORD_TOKEN
 }
 
-struct SSHAccountProvisioner {
-    1: required string name;
-    2: required bool canCreateAccount;
-    3: required bool canInstallSSHKey;
-}
 
 struct SSHAccountProvisionerConfigParam {
     1: required string name;
@@ -40,3 +35,10 @@ struct SSHAccountProvisionerConfigParam {
     3: required bool isOptional = false;
     4: optional string description;
 }
+
+struct SSHAccountProvisioner {
+    1: required string name;
+    2: required bool canCreateAccount;
+    3: required bool canInstallSSHKey;
+    4: required list<SSHAccountProvisionerConfigParam> configParams;
+}


[29/40] airavata git commit: AIRAVATA-2500 Disallow overwriting LDAP SSH key

Posted by ma...@apache.org.
AIRAVATA-2500 Disallow overwriting LDAP SSH key


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

Branch: refs/heads/develop
Commit: 42059ecccc02eaf6493cda480a6edbaad0d09961
Parents: 2425187
Author: Marcus Christie <ma...@apache.org>
Authored: Wed Sep 20 16:29:26 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Wed Sep 20 16:29:26 2017 -0400

----------------------------------------------------------------------
 .../provisioner/IULdapSSHAccountProvisioner.java        | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/42059ecc/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
index 4f0ad07..69ed3f6 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
@@ -104,7 +104,17 @@ public class IULdapSSHAccountProvisioner implements SSHAccountProvisioner  {
                     modifyRequest.addModification(new DefaultAttribute(SSH_PUBLIC_KEY_ATTRIBUTE_NAME, sshPublicKey), ModificationOperation.ADD_ATTRIBUTE);
                 } else {
 
-                    modifyRequest.addModification(new DefaultAttribute(SSH_PUBLIC_KEY_ATTRIBUTE_NAME, sshPublicKey), ModificationOperation.REPLACE_ATTRIBUTE);
+                    String oldSshPublicKey = entry.get(SSH_PUBLIC_KEY_ATTRIBUTE_NAME).getString();
+                    if (!oldSshPublicKey.equals(sshPublicKey)) {
+                        // Disallow overwriting the SSH key
+                        throw new RuntimeException("User [" + username + "] already has an SSH public key in LDAP for ["
+                                + ldapBaseDN + "] and overwriting it isn't allowed.");
+                        // modifyRequest.addModification(new DefaultAttribute(SSH_PUBLIC_KEY_ATTRIBUTE_NAME,
+                        //        sshPublicKey), ModificationOperation.REPLACE_ATTRIBUTE);
+                    } else {
+                        // SSH key is already installed so just return
+                        return true;
+                    }
                 }
                 ModifyResponse modifyResponse = ldapConnection.modify(modifyRequest);
                 if (modifyResponse.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS) {


[21/40] airavata git commit: Integrate IULdapSSHAccountProvisioner with fixes

Posted by ma...@apache.org.
Integrate IULdapSSHAccountProvisioner with fixes


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

Branch: refs/heads/develop
Commit: 743711290ee07336005ee7a4d023cdce5325a6f6
Parents: 1c2ab27
Author: Marcus Christie <ma...@apache.org>
Authored: Mon Sep 18 15:12:16 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Tue Sep 19 15:08:05 2017 -0400

----------------------------------------------------------------------
 .../IULdapSSHAccountProvisioner.java            | 242 ++++++++++---------
 .../IULdapSSHAccountProvisionerProvider.java    |  47 ++--
 .../SSHAccountProvisionerFactoryTest.java       |   4 -
 .../TestSSHAccountProvisionerProvider.java      |   2 +-
 4 files changed, 153 insertions(+), 142 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/74371129/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
index 331c01c..d0c204f 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
@@ -21,152 +21,158 @@
 package org.apache.airavata.accountprovisioning.provisioner;
 
 import org.apache.airavata.accountprovisioning.ConfigParam;
+import org.apache.airavata.accountprovisioning.SSHAccountManager;
 import org.apache.airavata.accountprovisioning.SSHAccountProvisioner;
-import org.apache.directory.api.ldap.model.cursor.CursorException;
-import org.apache.directory.ldap.client.api.*;
-import org.apache.directory.api.ldap.model.cursor.EntryCursor;
-import org.apache.directory.api.ldap.model.entry.Attribute;
+import org.apache.directory.api.ldap.model.entry.DefaultAttribute;
 import org.apache.directory.api.ldap.model.entry.Entry;
-import org.apache.directory.api.ldap.model.entry.Modification;
-import org.apache.directory.api.ldap.model.entry.DefaultEntry;
+import org.apache.directory.api.ldap.model.entry.ModificationOperation;
 import org.apache.directory.api.ldap.model.exception.LdapException;
-import org.apache.directory.api.ldap.model.message.SearchScope;
-import org.apache.directory.api.ldap.model.message.DeleteResponse;
+import org.apache.directory.api.ldap.model.message.ModifyRequest;
+import org.apache.directory.api.ldap.model.message.ModifyRequestImpl;
+import org.apache.directory.api.ldap.model.message.ModifyResponse;
 import org.apache.directory.api.ldap.model.message.ResultCodeEnum;
-import org.junit.Assert;
+import org.apache.directory.api.ldap.model.name.Dn;
+import org.apache.directory.ldap.client.api.LdapConnection;
+import org.apache.directory.ldap.client.api.LdapNetworkConnection;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.HashMap;
 import java.util.Map;
-import java.util.List;
+import java.util.function.Function;
 
 public class IULdapSSHAccountProvisioner implements SSHAccountProvisioner  {
 
-    String ldaphost, adminDN, ldap_username, ldap_password, adminPass, ldapBaseDN;
-    int ldapport, ldapPortId;
-    LdapConnection connection;
+    private final static Logger logger = LoggerFactory.getLogger(SSHAccountManager.class);
+    public static final String LDAP_PUBLIC_KEY_OBJECT_CLASS = "ldapPublicKey";
+    public static final String SSH_PUBLIC_KEY_ATTRIBUTE_NAME = "sshPublicKey";
+
+    private String ldapHost, ldapUsername, ldapPassword, ldapBaseDN, canonicalScratchLocation;
+    private int ldapPort;
     @Override
     public void init(Map<ConfigParam, String> config) {
 
-        // TODO: implement
-        ldapServerName =  config.get(new ConfigParam("ldaphost"));//"bazooka.hps.iu.edu"
-        ldapPortId = config.get(new ConfigParam("ldapport"));//"636"
-        ldap_username = config.get(new ConfigParam("ldap_username"));//"cn=sgrcusr"
-        ldap_password = config.get(new ConfigParam("ldap_password"));//"lore footwork engorge"
-        ldapBaseDN = config.get(new ConfigParam( "ldapBaseDN" ));//"dc=rt,dc=iu,dc=edu"
-        try {
-            connection = new LdapNetworkConnection(ldaphost, ldapport, true);
-
-
-            System.out.println( "binding connection:" );
-            String AuthDN=ldap_username+","+ldapBaseDN;
-            connection.bind(AuthDN,ldap_password);
-            //check that we're auth'ed and connected
-            System.out.println("asserting bound:");
-            Assert.assertTrue( connection.isAuthenticated() );
-            Assert.assertTrue( connection.isConnected() );
-            }  catch (Exception e) {
-            System.out.println("Exception caught!");
-            System.out.println(e.getClass().getCanonicalName());
-            System.out.println(e.getMessage());
-            System.out.println(e.getCause());
-
-            }
-            //catch (LdapException le) {
-            //System.out.println("Ldap Exception caught!", le);
-            //}
-
+        ldapHost =  config.get(IULdapSSHAccountProvisionerProvider.LDAP_HOST);//"bazooka.hps.iu.edu"
+        ldapPort = Integer.valueOf(config.get(IULdapSSHAccountProvisionerProvider.LDAP_PORT));//"636"
+        ldapUsername = config.get(IULdapSSHAccountProvisionerProvider.LDAP_USERNAME);//"cn=sgrcusr"
+        ldapPassword = config.get(IULdapSSHAccountProvisionerProvider.LDAP_PASSWORD); //"secret password"
+        ldapBaseDN = config.get(IULdapSSHAccountProvisionerProvider.LDAP_BASE_DN);//"dc=rt,dc=iu,dc=edu"
+        canonicalScratchLocation = config.get(IULdapSSHAccountProvisionerProvider.CANONICAL_SCRATCH_LOCATION); //"/N/dc2/scratch/username/iu-gateway"
     }
 
     @Override
-    public boolean hasAccount(String username) {
-        // TODO: implement
-        // To verify if the user has a login on a remote host
-        // if not advice the user to get an account (if possible) before returning.
-        // a search at the ldap is used to set the value
-        System.out.println("attempting search:");
-        String uidName="uid="+username;
-        List<String>  userClusters = new ArrayList();
-        try {
-            EntryCursor cursor = connection.search( ldapBaseDN, uidName, SearchScope.SUBTREE, "*" );
-            System.out.println( "Printing LDAP-wide results for " + username + ":" );
-            while (cursor.next()) {
-                Entry entry = cursor.get();
-                String DNName = entry.getDn().getName();
-                String[] words=DNName.split(",");
-                String cluster = words[1].replace("ou=");
-                userClusters.add(cluster);
-                //System.out.println( entry.getDn().getName() );
-                //System.out.println( entry.getAttributes() );
-                return true;
+    public boolean hasAccount(String userId) {
+        String username = getUsername(userId);
+        boolean result = withLdapConnection(ldapConnection -> {
+            try {
+                return ldapConnection.exists("uid=" + username + "," + ldapBaseDN);
+            } catch (LdapException e) {
+                throw new RuntimeException(e);
             }
-            cursor.close();
-        }catch (Exception e) {
-            System.out.println( "Exception caught!" );
-            System.out.println( e.getClass().getCanonicalName() );
-            System.out.println( e.getMessage() );
-            System.out.println( e.getCause() );
-        } catch (CursorException ce) {
-            System.out.println( "Cursor Exception caught!" );
-        }catch (LdapException le) {
-            System.out.println( "Ldap Exception caught!" );
-        }
-        return false;
+        });
+        return result;
     }
 
     @Override
-    public void createAccount(String username, String sshPublicKey) {
+    public void createAccount(String userId, String sshPublicKey) {
 
         throw new UnsupportedOperationException("IULdapSSHAccountProvisioner does not support creating cluster accounts at this time.");
     }
 
     @Override
-    public void installSSHKey(String username, String sshPublicKey) {
-        // TODO: implement
-        // use Eric Coulter's LdapBazookaSearchAndAdd to accomplsih this
-        String GatewaySSHPublicKey = sshPublicKey;
-        String IULocalUserName = username;
-
-
-        /*
-        LdapConnectionConfig lcconfig = new LdapConnectionConfig();
-        lcconfig.setLdapHost(ldapservername);// LdapServerName = ldapserverName;//from ConfigParam should be like bazooka.hpc.iu.edu
-        lcconfig.setLdapPort(ldapPortId);// LdapPortID = ldapPortId;//from ConfigParam 636
-        lcconfig.setName(adminDN);// = adminName;//from ConfigParam sgrcusr
-        lcconfig.setCredentials(AdminPass);//from ConfigParam "lore footwork engorge"
-
-        DefaultLdapConnectionFactory lcfactory = new DefaultLdapConnectionFactory( lcconfig );
-        lcfactory.setTimeOut( connectionTimeout );
-        */
-
-            Modification addSSHPublicKeyAdd = new DefaultModification(ModificationOperation.ADD_ATTRIBUTE,"add","sshPublicKey");
-            Modification SSHPublicKey = new DefaultModification(ModificationOperation.ADD_ATTRIBUTE, "sshPublicKey",GatewaySSHPublicKey);
-            /*
-            Entry modentry = New DefaultEntry(
-                    "cn=sgrcusr,dc=rt,dc=iu,dc=edu",
-                    "ObjectClass: person",
-                    "ObjectClass: ldapPublicKey",
-                    "cn", username,
-                    "dn", "uid=",username, "ou=bigred2-sgrc,dc=rt,dc=iu,dc=edu",
-                    "add: sshPublicKey",
-                    "sshPublicKey", GatewaySSHPublicKey );
-                    */
+    public void installSSHKey(String userId, String sshPublicKey) {
+        String username = getUsername(userId);
+        boolean success = withLdapConnection(ldapConnection -> {
             try {
-                connection.modify(ldapBaseDN, addSSHPublicKeyAdd );//ldapmodify
-                connection.modify(ldapBaseDN, SSHPublicKey );
-            } catch (Exception e) {
-                System.out.println("Exception caught!", e);
-                System.out.println( e.getClass().getCanonicalName() );
-                System.out.println( e.getMessage() );
-                System.out.println( e.getCause() );
+                String dn = "uid=" + username + "," + ldapBaseDN;
+
+                Entry entry = ldapConnection.lookup(dn);
+                if (entry == null) {
+                    throw new RuntimeException("User [" + username + "] has no entry for " + dn);
+                }
+                boolean hasLdapPublicKey = entry.hasObjectClass(LDAP_PUBLIC_KEY_OBJECT_CLASS);
+
+                ModifyRequest modifyRequest = new ModifyRequestImpl();
+                modifyRequest.setName(new Dn(dn));
+
+                // Add or Replace, depending on whether there is already an ldapPublicKey on the entry
+                if (!hasLdapPublicKey) {
+
+                    modifyRequest.addModification(new DefaultAttribute("objectclass", LDAP_PUBLIC_KEY_OBJECT_CLASS), ModificationOperation.ADD_ATTRIBUTE);
+                    modifyRequest.addModification(new DefaultAttribute(SSH_PUBLIC_KEY_ATTRIBUTE_NAME, sshPublicKey), ModificationOperation.ADD_ATTRIBUTE);
+                } else {
+
+                    modifyRequest.addModification(new DefaultAttribute(SSH_PUBLIC_KEY_ATTRIBUTE_NAME, sshPublicKey), ModificationOperation.REPLACE_ATTRIBUTE);
+                }
+                ModifyResponse modifyResponse = ldapConnection.modify(modifyRequest);
+                if (modifyResponse.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS) {
+                    logger.warn("installSSHKey ldap operation reported not being successful: " + modifyResponse);
+                } else {
+                    logger.debug("installSSHKey ldap operation was successful: " + modifyResponse);
+                }
+                return true;
+            } catch (LdapException e) {
+                throw new RuntimeException(e);
             }
-
+        });
     }
 
     @Override
-    public String getScratchLocation(String username) {
-        // TODO: implement
-        //if scratch location is available get it or else set a new scratch location for the user
-        String canonicalScratch =  config.get(new ConfigParam("canonicalScratch"));//"/N/cd2/_USER_/scratch"
-        String scratchLocation = canonicalScratch.replace("_USER_",username);
+    public String getScratchLocation(String userId) {
+        String username = getUsername(userId);
+        String scratchLocation = canonicalScratchLocation.replace("${username}",username);
         return scratchLocation;
-        //return null;
+    }
+
+    private <R> R withLdapConnection(Function<LdapConnection,R> function) {
+
+        try (LdapConnection connection = new LdapNetworkConnection(ldapHost, ldapPort, true)) {
+
+            connection.bind(ldapUsername, ldapPassword);
+
+            R result = function.apply(connection);
+
+            connection.unBind();
+
+            return result;
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        } catch (LdapException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
+     * Convert from Airavata userId to cluster username. The assumption here is that a userId will be
+     * an IU email address and the username is just the username portion of the email address.
+     */
+    private String getUsername(String userId) {
+        int atSignIndex = userId.indexOf("@");
+        if (atSignIndex < 0) {
+            throw new RuntimeException("userId is not an email address: " + userId);
+        }
+        return userId.substring(0, atSignIndex);
+    }
+
+    public static void main(String[] args) {
+        String ldapPassword = args[0];
+        IULdapSSHAccountProvisioner sshAccountProvisioner = new IULdapSSHAccountProvisioner();
+        Map<ConfigParam,String> config = new HashMap<>();
+        // Create SSH tunnel to server that has firewall access to bazooka:
+        //   ssh airavata@apidev.scigap.org -L 9000:bazooka.hps.iu.edu:636 -N &
+        // Put entry in /etc/hosts with the following
+        //   127.0.0.1	bazooka.hps.iu.edu
+        config.put(IULdapSSHAccountProvisionerProvider.LDAP_HOST, "bazooka.hps.iu.edu");
+        config.put(IULdapSSHAccountProvisionerProvider.LDAP_PORT, "9000"); // ssh tunnel port
+        config.put(IULdapSSHAccountProvisionerProvider.LDAP_USERNAME, "cn=sgrcusr,dc=rt,dc=iu,dc=edu");
+        config.put(IULdapSSHAccountProvisionerProvider.LDAP_PASSWORD, ldapPassword);
+        config.put(IULdapSSHAccountProvisionerProvider.LDAP_BASE_DN, "ou=bigred2-sgrc,dc=rt,dc=iu,dc=edu");
+        config.put(IULdapSSHAccountProvisionerProvider.CANONICAL_SCRATCH_LOCATION, "/N/dc2/scratch/${username}/iu-gateway");
+        sshAccountProvisioner.init(config);
+        String userId = "machrist@iu.edu";
+        System.out.println("hasAccount=" + sshAccountProvisioner.hasAccount(userId));
+        System.out.println("scratchLocation=" + sshAccountProvisioner.getScratchLocation(userId));
+        sshAccountProvisioner.installSSHKey(userId, "foobar1234");
     }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/74371129/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisionerProvider.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisionerProvider.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisionerProvider.java
index 45dc0a6..9089ac3 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisionerProvider.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisionerProvider.java
@@ -24,32 +24,41 @@ import org.apache.airavata.accountprovisioning.ConfigParam;
 import org.apache.airavata.accountprovisioning.SSHAccountProvisioner;
 import org.apache.airavata.accountprovisioning.SSHAccountProvisionerProvider;
 
-import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 
 public class IULdapSSHAccountProvisionerProvider implements SSHAccountProvisionerProvider {
 
+    public static final ConfigParam LDAP_HOST = new ConfigParam("ldap-host")
+            .setDescription("Hostname of LDAP server")
+            .setOptional(false)
+            .setType(ConfigParam.ConfigParamType.STRING);
+    public static final ConfigParam LDAP_PORT = new ConfigParam("ldap-port")
+            .setDescription("Port of LDAP server")
+            .setOptional(false)
+            .setType(ConfigParam.ConfigParamType.STRING);
+    public static final ConfigParam LDAP_USERNAME = new ConfigParam("ldap-username")
+            .setDescription("Username for LDAP server")
+            .setOptional(false)
+            .setType(ConfigParam.ConfigParamType.STRING);
+    public static final ConfigParam LDAP_PASSWORD = new ConfigParam("ldap-password")
+            .setDescription("Password for LDAP server")
+            .setOptional(false)
+            .setType(ConfigParam.ConfigParamType.CRED_STORE_PASSWORD_TOKEN);
+    public static final ConfigParam LDAP_BASE_DN = new ConfigParam("ldap-base-dn")
+            .setDescription("Base DN for searching, modifying cluster LDAP")
+            .setOptional(false)
+            .setType(ConfigParam.ConfigParamType.STRING);
+    public static final ConfigParam CANONICAL_SCRATCH_LOCATION = new ConfigParam("canonical-scratch-location")
+            .setDescription("Pattern for scratch location. Use ${username} as replacement for username. For example, '/N/dc2/scratch/${username}/iu-gateway'.")
+            .setOptional(false)
+            .setType(ConfigParam.ConfigParamType.STRING);
+    public static final List<ConfigParam> CONFIG_PARAMS = Arrays.asList(LDAP_HOST, LDAP_PORT, LDAP_USERNAME, LDAP_PASSWORD, LDAP_BASE_DN, CANONICAL_SCRATCH_LOCATION);
+
     @Override
     public List<ConfigParam> getConfigParams() {
-        List<ConfigParam> configParams = new ArrayList<>();
-        configParams.add(new ConfigParam("ldap-host")
-                .setDescription("Hostname of LDAP server")
-                .setOptional(false)
-                .setType(ConfigParam.ConfigParamType.STRING));
-        configParams.add(new ConfigParam("ldap-port")
-                .setDescription("Port of LDAP server")
-                .setOptional(false)
-                .setType(ConfigParam.ConfigParamType.STRING));
-        configParams.add(new ConfigParam("ldap-username")
-                .setDescription("Username for LDAP server")
-                .setOptional(false)
-                .setType(ConfigParam.ConfigParamType.STRING));
-        configParams.add(new ConfigParam("ldap-password")
-                .setDescription("Password for LDAP server")
-                .setOptional(false)
-                .setType(ConfigParam.ConfigParamType.CRED_STORE_PASSWORD_TOKEN));
-        return configParams;
+        return CONFIG_PARAMS;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/airavata/blob/74371129/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactoryTest.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactoryTest.java b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactoryTest.java
index 54d5f1c..34171af 100644
--- a/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactoryTest.java
+++ b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactoryTest.java
@@ -56,10 +56,6 @@ public class SSHAccountProvisionerFactoryTest {
         ConfigParam ldapPassword = configParams.get(3);
         Assert.assertEquals("ldap_password", ldapPassword.getName());
         Assert.assertEquals(ConfigParam.ConfigParamType.CRED_STORE_PASSWORD_TOKEN, ldapPassword.getType());
-        ConfigParam ldapBaseDN = configParams.get(4);
-        Assert.assertArrayEquals("ldapBaseDN", ldapBaseDN.getName()  );
-        Assert.assertArrayEquals( ConfigParam.ConfigParamType.STRING,ldapBaseDN.getType() );
-
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/airavata/blob/74371129/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisionerProvider.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisionerProvider.java b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisionerProvider.java
index 7eb4250..3b11a91 100644
--- a/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisionerProvider.java
+++ b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisionerProvider.java
@@ -57,7 +57,7 @@ public class TestSSHAccountProvisionerProvider implements SSHAccountProvisionerP
         configParams.add(new ConfigParam("ldapBaseDN")
                 .setDescription( "Base DN for the ldap entry" )
                 .setOptional( false )
-                .setType( ConfigParam.ConfigParamType.STRING );
+                .setType( ConfigParam.ConfigParamType.STRING ));
         return configParams;
     }
 


[40/40] airavata git commit: Merge branch 'AIRAVATA-2500' into develop

Posted by ma...@apache.org.
Merge branch 'AIRAVATA-2500' into develop

I regenerated thrift stubs to deal with some conflicts


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

Branch: refs/heads/develop
Commit: ebdf8977f90d82572186a8944b9b7cdddac5db6a
Parents: 666bcdf 50d7bb6
Author: Marcus Christie <ma...@apache.org>
Authored: Tue Sep 26 15:08:05 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Tue Sep 26 15:08:05 2017 -0400

----------------------------------------------------------------------
 airavata-api/airavata-api-server/pom.xml        |     5 +
 .../server/handler/AiravataServerHandler.java   |    84 +
 .../java/org/apache/airavata/api/Airavata.java  | 34970 ++++++++++-------
 .../resources/lib/Airavata/API/Airavata.php     |  4066 +-
 .../Model/AppCatalog/GatewayProfile/Types.php   |   143 +-
 .../AppCatalog/UserResourceProfile/Types.php    |    28 +
 .../SSHAccountProvisioner.java                  |   722 +
 .../SSHAccountProvisionerConfigParam.java       |   702 +
 .../SSHAccountProvisionerConfigParamType.java   |    62 +
 .../ComputeResourcePreference.java              |   375 +-
 .../gatewayprofile/GatewayResourceProfile.java  |    72 +-
 .../UserComputeResourcePreference.java          |   113 +-
 modules/compute-account-provisioning/pom.xml    |    73 +
 .../accountprovisioning/ConfigParam.java        |    89 +
 .../InvalidSetupException.java                  |    43 +
 .../InvalidUsernameException.java               |    43 +
 .../accountprovisioning/SSHAccountManager.java  |   296 +
 .../SSHAccountProvisioner.java                  |    77 +
 .../SSHAccountProvisionerFactory.java           |    63 +
 .../SSHAccountProvisionerProvider.java          |    60 +
 .../airavata/accountprovisioning/SSHUtil.java   |   154 +
 .../IULdapSSHAccountProvisioner.java            |   190 +
 .../IULdapSSHAccountProvisionerProvider.java    |    80 +
 ...ntprovisioning.SSHAccountProvisionerProvider |    22 +
 .../SSHAccountProvisionerFactoryTest.java       |    77 +
 .../provisioner/TestSSHAccountProvisioner.java  |    65 +
 .../TestSSHAccountProvisionerProvider.java      |    80 +
 ...ntprovisioning.SSHAccountProvisionerProvider |    21 +
 .../catalog/impl/GwyResourceProfileImpl.java    |    12 +
 .../catalog/impl/UsrResourceProfileImpl.java    |     2 +
 .../model/ComputeResourcePreference.java        |    41 +-
 .../SSHAccountProvisionerConfiguration.java     |    98 +
 .../SSHAccountProvisionerConfigurationPK.java   |    57 +
 .../model/UserComputeResourcePreference.java    |    10 +
 .../ComputeHostPreferenceResource.java          |    62 +-
 .../UserComputeHostPreferenceResource.java      |    11 +
 .../app/catalog/util/AppCatalogJPAUtils.java    |    10 +
 .../util/AppCatalogThriftConversion.java        |    10 +-
 .../src/main/resources/META-INF/persistence.xml |     1 +
 .../src/main/resources/appcatalog-derby.sql     |    50 +-
 .../src/main/resources/appcatalog-mysql.sql     |    52 +-
 .../DeltaScripts/appCatalog_schema_delta.sql    |    36 +
 pom.xml                                         |     1 +
 .../airavata-apis/airavata_api.thrift           |    27 +
 .../account_provisioning_model.thrift           |    44 +
 .../gateway_resource_profile_model.thrift       |     6 +-
 .../user_resource_profile_model.thrift          |     8 +-
 47 files changed, 26586 insertions(+), 16727 deletions(-)
----------------------------------------------------------------------



[03/40] airavata git commit: AIRAVATA-2500 Persist SSH account provisioner and config

Posted by ma...@apache.org.
AIRAVATA-2500 Persist SSH account provisioner and config


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

Branch: refs/heads/develop
Commit: ac2823a604abca6e0db6314dd7658c1325bb94c3
Parents: 722aabd
Author: Marcus Christie <ma...@apache.org>
Authored: Fri Sep 1 12:33:40 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Tue Sep 19 15:07:56 2017 -0400

----------------------------------------------------------------------
 .../accountprovisioning/SSHAccountManager.java  |  5 +-
 .../catalog/impl/GwyResourceProfileImpl.java    | 10 ++
 .../model/ComputeResourcePreference.java        | 31 +++++--
 .../SSHAccountProvisionerConfiguration.java     | 98 ++++++++++++++++++++
 .../SSHAccountProvisionerConfigurationPK.java   | 57 ++++++++++++
 .../ComputeHostPreferenceResource.java          | 50 +++++++---
 .../app/catalog/util/AppCatalogJPAUtils.java    |  8 ++
 .../util/AppCatalogThriftConversion.java        |  8 +-
 .../src/main/resources/META-INF/persistence.xml |  1 +
 .../src/main/resources/appcatalog-derby.sql     | 11 +++
 .../src/main/resources/appcatalog-mysql.sql     | 13 ++-
 .../DeltaScripts/appCatalog_schema_delta.sql    | 31 +++++++
 .../gateway_resource_profile_model.thrift       |  2 +-
 13 files changed, 300 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/ac2823a6/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
index f9ed22a..74c0dd2 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
@@ -25,7 +25,6 @@ import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.credential.store.client.CredentialStoreClientFactory;
 import org.apache.airavata.credential.store.cpi.CredentialStoreService;
 import org.apache.airavata.credential.store.exception.CredentialStoreException;
-import org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam;
 import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
 import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionInterface;
 import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
@@ -181,11 +180,11 @@ public class SSHAccountManager {
         }
     }
 
-    private static Map<ConfigParam, String> convertConfigParams(String provisionerName, Map<SSHAccountProvisionerConfigParam, String> thriftConfigParams) {
+    private static Map<ConfigParam, String> convertConfigParams(String provisionerName, Map<String, String> thriftConfigParams) {
         List<ConfigParam> configParams = SSHAccountProvisionerFactory.getSSHAccountProvisionerConfigParams(provisionerName);
         Map<String, ConfigParam> configParamMap = configParams.stream().collect(Collectors.toMap(ConfigParam::getName, Function.identity()));
 
-        return thriftConfigParams.entrySet().stream().collect(Collectors.toMap(entry -> configParamMap.get(entry.getKey().getName()), entry -> entry.getValue()));
+        return thriftConfigParams.entrySet().stream().collect(Collectors.toMap(entry -> configParamMap.get(entry.getKey()), entry -> entry.getValue()));
     }
 
     private static RegistryService.Client getRegistryServiceClient() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/ac2823a6/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java
index ccfb08a..78a6f0f 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java
@@ -89,6 +89,11 @@ public class GwyResourceProfileImpl implements GwyResourceProfile {
                     if (preference.getReservationEndTime() > 0) {
                         resource.setReservationEndTime(AiravataUtils.getTime(preference.getReservationEndTime()));
                     }
+                    resource.setSshAccountProvisioner(preference.getSshAccountProvisioner());
+                    if (preference.getSshAccountProvisionerConfig() != null && !preference.getSshAccountProvisionerConfig().isEmpty()) {
+                        Map<String,String> sshAccountProvisionerConfigurationsCopy = new HashMap<>(preference.getSshAccountProvisionerConfig());
+                        resource.setSshAccountProvisionerConfigurations(sshAccountProvisionerConfigurationsCopy);
+                    }
                     resource.save();
                 }
             }
@@ -154,6 +159,11 @@ public class GwyResourceProfileImpl implements GwyResourceProfile {
                     if (preference.getReservationEndTime() > 0) {
                         resource.setReservationEndTime(AiravataUtils.getTime(preference.getReservationEndTime()));
                     }
+                    resource.setSshAccountProvisioner(preference.getSshAccountProvisioner());
+                    if (preference.getSshAccountProvisionerConfig() != null && !preference.getSshAccountProvisionerConfig().isEmpty()) {
+                        Map<String,String> sshAccountProvisionerConfigurationsCopy = new HashMap<>(preference.getSshAccountProvisionerConfig());
+                        resource.setSshAccountProvisionerConfigurations(sshAccountProvisionerConfigurationsCopy);
+                    }
                     resource.save();
                 }
             }

http://git-wip-us.apache.org/repos/asf/airavata/blob/ac2823a6/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ComputeResourcePreference.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ComputeResourcePreference.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ComputeResourcePreference.java
index a289526..20f55d4 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ComputeResourcePreference.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ComputeResourcePreference.java
@@ -20,15 +20,9 @@
 package org.apache.airavata.registry.core.app.catalog.model;
 
 
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.IdClass;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
+import javax.persistence.*;
 import java.sql.Timestamp;
+import java.util.Collection;
 
 @Entity
 @Table(name = "COMPUTE_RESOURCE_PREFERENCE")
@@ -66,6 +60,8 @@ public class ComputeResourcePreference {
     private Timestamp reservationStartTime;
     @Column(name = "RESERVATION_END_TIME")
     private Timestamp reservationEndTime;
+    @Column(name = "SSH_ACCOUNT_PROVISIONER")
+    private String sshAccountProvisioner;
 
 
     @ManyToOne(cascade= CascadeType.MERGE)
@@ -76,6 +72,9 @@ public class ComputeResourcePreference {
     @JoinColumn(name = "GATEWAY_ID")
     private GatewayProfile gatewayProfile;
 
+    @OneToMany(mappedBy = "computeResourcePreference", cascade = CascadeType.ALL, orphanRemoval = true)
+    Collection<SSHAccountProvisionerConfiguration> sshAccountProvisionerConfigurations;
+
 
     public String getGatewayId() {
         return gatewayId;
@@ -212,4 +211,20 @@ public class ComputeResourcePreference {
     public void setReservationEndTime(Timestamp reservationEndTime) {
         this.reservationEndTime = reservationEndTime;
     }
+
+    public String getSshAccountProvisioner() {
+        return sshAccountProvisioner;
+    }
+
+    public void setSshAccountProvisioner(String sshAccountProvisioner) {
+        this.sshAccountProvisioner = sshAccountProvisioner;
+    }
+
+    public Collection<SSHAccountProvisionerConfiguration> getSshAccountProvisionerConfigurations() {
+        return sshAccountProvisionerConfigurations;
+    }
+
+    public void setSshAccountProvisionerConfigurations(Collection<SSHAccountProvisionerConfiguration> sshAccountProvisionerConfigurations) {
+        this.sshAccountProvisionerConfigurations = sshAccountProvisionerConfigurations;
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/ac2823a6/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/SSHAccountProvisionerConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/SSHAccountProvisionerConfiguration.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/SSHAccountProvisionerConfiguration.java
new file mode 100644
index 0000000..303835b
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/SSHAccountProvisionerConfiguration.java
@@ -0,0 +1,98 @@
+/*
+ * 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.registry.core.app.catalog.model;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "SSH_ACCOUNT_PROVISIONER_CONFIG")
+@IdClass(SSHAccountProvisionerConfigurationPK.class)
+public class SSHAccountProvisionerConfiguration {
+    @Id
+    @Column(name = "GATEWAY_ID")
+    private String gatewayId;
+    @Id
+    @Column(name = "RESOURCE_ID")
+    private String resourceId;
+    @Id
+    @Column(name = "CONFIG_NAME")
+    private String configName;
+
+    @Column(name = "CONFIG_VALUE")
+    private String configValue;
+
+    @ManyToOne
+    @JoinColumns({
+            @JoinColumn(name = "GATEWAY_ID", referencedColumnName = "GATEWAY_ID", nullable = false),
+            @JoinColumn(name = "RESOURCE_ID", referencedColumnName = "RESOURCE_ID", nullable = false)
+    })
+    private ComputeResourcePreference computeResourcePreference;
+
+    public SSHAccountProvisionerConfiguration() {}
+
+    public SSHAccountProvisionerConfiguration(String configName, String configValue, ComputeResourcePreference computeResourcePreference) {
+        this.gatewayId = computeResourcePreference.getGatewayId();
+        this.resourceId = computeResourcePreference.getResourceId();
+        this.configName = configName;
+        this.configValue = configValue;
+        this.computeResourcePreference = computeResourcePreference;
+    }
+
+    public String getGatewayId() {
+        return gatewayId;
+    }
+
+    public void setGatewayId(String gatewayId) {
+        this.gatewayId = gatewayId;
+    }
+
+    public String getResourceId() {
+        return resourceId;
+    }
+
+    public void setResourceId(String resourceId) {
+        this.resourceId = resourceId;
+    }
+
+    public String getConfigName() {
+        return configName;
+    }
+
+    public void setConfigName(String configName) {
+        this.configName = configName;
+    }
+
+    public String getConfigValue() {
+        return configValue;
+    }
+
+    public void setConfigValue(String configValue) {
+        this.configValue = configValue;
+    }
+
+    public ComputeResourcePreference getComputeResourcePreference() {
+        return computeResourcePreference;
+    }
+
+    public void setComputeResourcePreference(ComputeResourcePreference computeResourcePreference) {
+        this.computeResourcePreference = computeResourcePreference;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/ac2823a6/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/SSHAccountProvisionerConfigurationPK.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/SSHAccountProvisionerConfigurationPK.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/SSHAccountProvisionerConfigurationPK.java
new file mode 100644
index 0000000..94045b0
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/SSHAccountProvisionerConfigurationPK.java
@@ -0,0 +1,57 @@
+/*
+ * 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.registry.core.app.catalog.model;
+
+import java.io.Serializable;
+
+public class SSHAccountProvisionerConfigurationPK implements Serializable {
+    private String gatewayId;
+    private String resourceId;
+    private String configName;
+
+    public SSHAccountProvisionerConfigurationPK(String gatewayId, String resourceId, String configName) {
+        this.gatewayId = gatewayId;
+        this.resourceId = resourceId;
+        this.configName = configName;
+    }
+
+    public SSHAccountProvisionerConfigurationPK() {}
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof SSHAccountProvisionerConfigurationPK)) return false;
+
+        SSHAccountProvisionerConfigurationPK that = (SSHAccountProvisionerConfigurationPK) o;
+
+        if (!gatewayId.equals(that.gatewayId)) return false;
+        if (!resourceId.equals(that.resourceId)) return false;
+        return configName.equals(that.configName);
+    }
+
+    @Override
+    public int hashCode() {
+        int result = gatewayId.hashCode();
+        result = 31 * result + resourceId.hashCode();
+        result = 31 * result + configName.hashCode();
+        return result;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/ac2823a6/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ComputeHostPreferenceResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ComputeHostPreferenceResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ComputeHostPreferenceResource.java
index 29c2d5a..1320025 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ComputeHostPreferenceResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ComputeHostPreferenceResource.java
@@ -20,10 +20,7 @@
 package org.apache.airavata.registry.core.app.catalog.resources;
 
 import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.registry.core.app.catalog.model.ComputeResource;
-import org.apache.airavata.registry.core.app.catalog.model.ComputeResourcePreference;
-import org.apache.airavata.registry.core.app.catalog.model.ComputeResourcePreferencePK;
-import org.apache.airavata.registry.core.app.catalog.model.GatewayProfile;
+import org.apache.airavata.registry.core.app.catalog.model.*;
 import org.apache.airavata.registry.core.app.catalog.util.AppCatalogJPAUtils;
 import org.apache.airavata.registry.core.app.catalog.util.AppCatalogQueryGenerator;
 import org.apache.airavata.registry.core.app.catalog.util.AppCatalogResourceType;
@@ -56,6 +53,8 @@ public class ComputeHostPreferenceResource extends AppCatAbstractResource {
     private String reservation;
     private Timestamp reservationStartTime;
     private Timestamp reservationEndTime;
+    private String sshAccountProvisioner;
+    private Map<String,String> sshAccountProvisionerConfigurations;
 
     private GatewayProfileResource gatewayProfile;
     private ComputeResourceResource computeHostResource;
@@ -200,6 +199,22 @@ public class ComputeHostPreferenceResource extends AppCatAbstractResource {
         this.reservationEndTime = reservationEndTime;
     }
 
+    public String getSshAccountProvisioner() {
+        return sshAccountProvisioner;
+    }
+
+    public void setSshAccountProvisioner(String sshAccountProvisioner) {
+        this.sshAccountProvisioner = sshAccountProvisioner;
+    }
+
+    public Map<String, String> getSshAccountProvisionerConfigurations() {
+        return sshAccountProvisionerConfigurations;
+    }
+
+    public void setSshAccountProvisionerConfigurations(Map<String, String> sshAccountProvisionerConfigurations) {
+        this.sshAccountProvisionerConfigurations = sshAccountProvisionerConfigurations;
+    }
+
     @Override
     public void remove(Object identifier) throws AppCatalogException {
         HashMap<String, String> ids;
@@ -408,14 +423,7 @@ public class ComputeHostPreferenceResource extends AppCatAbstractResource {
         try {
             em = AppCatalogJPAUtils.getEntityManager();
             ComputeResourcePreference existingPreference = em.find(ComputeResourcePreference.class, new ComputeResourcePreferencePK(gatewayId, resourceId));
-            if (em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
 
-            em = AppCatalogJPAUtils.getEntityManager();
             em.getTransaction().begin();
             ComputeResource computeResource = em.find(ComputeResource.class, resourceId);
             GatewayProfile gatewayProf = em.find(GatewayProfile.class, gatewayId);
@@ -437,6 +445,17 @@ public class ComputeHostPreferenceResource extends AppCatAbstractResource {
                 existingPreference.setReservation(reservation);
                 existingPreference.setReservationStartTime(reservationStartTime);
                 existingPreference.setReservationEndTime(reservationEndTime);
+                existingPreference.setSshAccountProvisioner(sshAccountProvisioner);
+                if (sshAccountProvisionerConfigurations != null && !sshAccountProvisionerConfigurations.isEmpty()) {
+                    List<SSHAccountProvisionerConfiguration> configurations = new ArrayList<>();
+                    for (String sshAccountProvisionerConfigName : sshAccountProvisionerConfigurations.keySet()) {
+                        String value = sshAccountProvisionerConfigurations.get(sshAccountProvisionerConfigName);
+                        configurations.add(new SSHAccountProvisionerConfiguration(sshAccountProvisionerConfigName, value, existingPreference));
+                    }
+                    existingPreference.setSshAccountProvisionerConfigurations(configurations);
+                } else {
+                    existingPreference.setSshAccountProvisionerConfigurations(null);
+                }
                 em.merge(existingPreference);
             } else {
                 ComputeResourcePreference resourcePreference = new ComputeResourcePreference();
@@ -457,6 +476,15 @@ public class ComputeHostPreferenceResource extends AppCatAbstractResource {
                 resourcePreference.setReservation(reservation);
                 resourcePreference.setReservationStartTime(reservationStartTime);
                 resourcePreference.setReservationEndTime(reservationEndTime);
+                existingPreference.setSshAccountProvisioner(sshAccountProvisioner);
+                if (sshAccountProvisionerConfigurations != null && !sshAccountProvisionerConfigurations.isEmpty()){
+                    List<SSHAccountProvisionerConfiguration> configurations = new ArrayList<>();
+                    for (String sshAccountProvisionerConfigName : sshAccountProvisionerConfigurations.keySet()) {
+                        String value = sshAccountProvisionerConfigurations.get(sshAccountProvisionerConfigName);
+                        configurations.add(new SSHAccountProvisionerConfiguration(sshAccountProvisionerConfigName, value, existingPreference));
+                    }
+                    existingPreference.setSshAccountProvisionerConfigurations(configurations);
+                }
                 em.persist(resourcePreference);
             }
             em.getTransaction().commit();

http://git-wip-us.apache.org/repos/asf/airavata/blob/ac2823a6/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
index 099c088..f794078 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
@@ -957,6 +957,14 @@ public class AppCatalogJPAUtils {
             resource.setReservation(o.getReservation());
             resource.setReservationStartTime(o.getReservationStartTime());
             resource.setReservationEndTime(o.getReservationEndTime());
+            resource.setSshAccountProvisioner(o.getSshAccountProvisioner());
+            if (o.getSshAccountProvisionerConfigurations() != null && !o.getSshAccountProvisionerConfigurations().isEmpty()) {
+                Map<String,String> sshAccountProvisionerConfigurations = new HashMap<>();
+                for (SSHAccountProvisionerConfiguration config : o.getSshAccountProvisionerConfigurations()){
+                    sshAccountProvisionerConfigurations.put(config.getConfigName(), config.getConfigValue());
+                }
+                resource.setSshAccountProvisionerConfigurations(sshAccountProvisionerConfigurations);
+            }
         }
         return resource;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/ac2823a6/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
index acfc16e..1a85454 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
@@ -30,8 +30,8 @@ import org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfil
 import org.apache.airavata.model.appcatalog.gatewayprofile.StoragePreference;
 import org.apache.airavata.model.appcatalog.storageresource.StorageResourceDescription;
 import org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference;
-import org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference;
 import org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile;
+import org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference;
 import org.apache.airavata.model.application.io.DataType;
 import org.apache.airavata.model.application.io.InputDataObjectType;
 import org.apache.airavata.model.application.io.OutputDataObjectType;
@@ -43,6 +43,7 @@ import org.apache.airavata.registry.cpi.AppCatalogException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 public class AppCatalogThriftConversion {
     public static ComputeResourceResource getComputeHostResource (ComputeResourceDescription description){
@@ -874,6 +875,11 @@ public class AppCatalogThriftConversion {
         if (resource.getReservationEndTime() != null) {
             preference.setReservationEndTime(resource.getReservationEndTime().getTime());
         }
+        preference.setSshAccountProvisioner(resource.getSshAccountProvisioner());
+        if (resource.getSshAccountProvisionerConfigurations() != null && !resource.getSshAccountProvisionerConfigurations().isEmpty()){
+            Map<String, String> sshAccountProvisionerConfigCopy = new HashMap<>(resource.getSshAccountProvisionerConfigurations());
+            preference.setSshAccountProvisionerConfig(sshAccountProvisionerConfigCopy);
+        }
         return preference;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/ac2823a6/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml b/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml
index c3f1a0f..5ac231f 100644
--- a/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml
+++ b/modules/registry/registry-core/src/main/resources/META-INF/persistence.xml
@@ -51,6 +51,7 @@
         <class>org.apache.airavata.registry.core.app.catalog.model.ApplicationIntOutput</class>
         <class>org.apache.airavata.registry.core.app.catalog.model.GatewayProfile</class>
         <class>org.apache.airavata.registry.core.app.catalog.model.ComputeResourcePreference</class>
+        <class>org.apache.airavata.registry.core.app.catalog.model.SSHAccountProvisionerConfiguration</class>
         <class>org.apache.airavata.registry.core.app.catalog.model.UserResourceProfile</class>
         <class>org.apache.airavata.registry.core.app.catalog.model.UserComputeResourcePreference</class>
         <class>org.apache.airavata.registry.core.app.catalog.model.UserStoragePreference</class>

http://git-wip-us.apache.org/repos/asf/airavata/blob/ac2823a6/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql b/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
index 68fd1ff..df4ebb1 100644
--- a/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
+++ b/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
@@ -356,11 +356,22 @@ CREATE TABLE COMPUTE_RESOURCE_PREFERENCE
         RESERVATION VARCHAR (255),
         RESERVATION_START_TIME timestamp,
         RESERVATION_END_TIME timestamp,
+        SSH_ACCOUNT_PROVISIONER VARCHAR(255),
         PRIMARY KEY(GATEWAY_ID,RESOURCE_ID),
         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE,
         FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY_PROFILE(GATEWAY_ID) ON DELETE CASCADE
 );
 
+CREATE TABLE SSH_ACCOUNT_PROVISIONER_CONFIG
+(
+        GATEWAY_ID VARCHAR(255),
+        RESOURCE_ID VARCHAR(255),
+        CONFIG_NAME VARCHAR(255),
+        CONFIG_VALUE VARCHAR(255),
+        PRIMARY KEY (GATEWAY_ID, RESOURCE_ID, CONFIG_NAME),
+        FOREIGN KEY (GATEWAY_ID, RESOURCE_ID) REFERENCES COMPUTE_RESOURCE_PREFERENCE (GATEWAY_ID, RESOURCE_ID) ON DELETE CASCADE
+);
+
 CREATE TABLE BATCH_QUEUE
 (
         COMPUTE_RESOURCE_ID VARCHAR(255) NOT NULL,

http://git-wip-us.apache.org/repos/asf/airavata/blob/ac2823a6/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql b/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
index 997bb2d..54886b1 100644
--- a/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
+++ b/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
@@ -355,10 +355,21 @@ CREATE TABLE COMPUTE_RESOURCE_PREFERENCE
         RESERVATION VARCHAR (255),
         RESERVATION_START_TIME timestamp,
         RESERVATION_END_TIME timestamp,
+        SSH_ACCOUNT_PROVISIONER VARCHAR(255),
         PRIMARY KEY(GATEWAY_ID,RESOURCE_ID),
         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE,
         FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY_PROFILE(GATEWAY_ID) ON DELETE CASCADE
-);
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+CREATE TABLE SSH_ACCOUNT_PROVISIONER_CONFIG
+(
+        GATEWAY_ID VARCHAR(255),
+        RESOURCE_ID VARCHAR(255),
+        CONFIG_NAME VARCHAR(255),
+        CONFIG_VALUE VARCHAR(255),
+        PRIMARY KEY (GATEWAY_ID, RESOURCE_ID, CONFIG_NAME),
+        FOREIGN KEY (GATEWAY_ID, RESOURCE_ID) REFERENCES COMPUTE_RESOURCE_PREFERENCE (GATEWAY_ID, RESOURCE_ID) ON DELETE CASCADE
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
 CREATE TABLE BATCH_QUEUE
 (

http://git-wip-us.apache.org/repos/asf/airavata/blob/ac2823a6/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql
----------------------------------------------------------------------
diff --git a/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql b/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql
new file mode 100644
index 0000000..bf31b6b
--- /dev/null
+++ b/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql
@@ -0,0 +1,31 @@
+--
+--
+-- 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.
+--
+
+alter table COMPUTE_RESOURCE_PREFERENCE add SSH_ACCOUNT_PROVISIONER VARCHAR(255);
+
+CREATE TABLE SSH_ACCOUNT_PROVISIONER_CONFIG
+(
+        GATEWAY_ID VARCHAR(255),
+        RESOURCE_ID VARCHAR(255),
+        CONFIG_NAME VARCHAR(255),
+        CONFIG_VALUE VARCHAR(255),
+        PRIMARY KEY (GATEWAY_ID, RESOURCE_ID, CONFIG_NAME),
+        FOREIGN KEY (GATEWAY_ID, RESOURCE_ID) REFERENCES COMPUTE_RESOURCE_PREFERENCE (GATEWAY_ID, RESOURCE_ID) ON DELETE CASCADE
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;

http://git-wip-us.apache.org/repos/asf/airavata/blob/ac2823a6/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift b/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
index 060442b..87ca433 100644
--- a/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
+++ b/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
@@ -77,7 +77,7 @@ struct ComputeResourcePreference {
     13: optional i64 reservationStartTime,
     14: optional i64 reservationEndTime,
     15: optional string sshAccountProvisioner,
-    16: optional map<account_provisioning_model.SSHAccountProvisionerConfigParam, string> sshAccountProvisionerConfig
+    16: optional map<string, string> sshAccountProvisionerConfig
 }
 
 struct StoragePreference {


[04/40] airavata git commit: AIRAVATA-2500 Add creation of scratch location

Posted by ma...@apache.org.
AIRAVATA-2500 Add creation of scratch location


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

Branch: refs/heads/develop
Commit: 8c748c66b5f4c40847432b6abe5b1ca535188be9
Parents: 3d161b8
Author: Marcus Christie <ma...@apache.org>
Authored: Wed Aug 23 17:19:05 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Tue Sep 19 15:07:56 2017 -0400

----------------------------------------------------------------------
 .../accountprovisioning/SSHAccountManager.java  | 11 ++-
 .../airavata/accountprovisioning/SSHUtil.java   | 79 +++++++++++++++++++-
 2 files changed, 84 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/8c748c66/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
index d565fe9..a56a632 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
@@ -34,6 +34,8 @@ import org.apache.airavata.registry.api.RegistryService;
 import org.apache.airavata.registry.api.client.RegistryServiceClientFactory;
 import org.apache.airavata.registry.api.exception.RegistryServiceException;
 import org.apache.thrift.TException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.util.HashMap;
 import java.util.List;
@@ -43,6 +45,8 @@ import java.util.stream.Collectors;
 
 public class SSHAccountManager {
 
+    private final static Logger logger = LoggerFactory.getLogger(SSHAccountManager.class);
+
     // TODO: change return type to one that returns some details of the SSH account setup, for example the scratch location
     public static void setupSSHAccount(String gatewayId, String computeResourceId, String username, SSHCredential sshCredential) {
 
@@ -84,8 +88,9 @@ public class SSHAccountManager {
         // Install SSH key
         sshAccountProvisioner.installSSHKey(username, sshCredential.getPublicKey());
 
+        // TODO: replace hard coded port 22 with port from SSHJobSubmission interface
         // Verify can authenticate to host
-        boolean validated = SSHUtil.validate(username, computeResourceDescription.getHostName(), 22, sshCredential);
+        boolean validated = SSHUtil.validate(computeResourceDescription.getHostName(), 22, username, sshCredential);
         if (!validated) {
             throw new RuntimeException("Failed to validate installation of key for [" + username
                     + "] on [" + computeResourceDescription.getHostName() + "] using SSH Account Provisioner ["
@@ -93,8 +98,10 @@ public class SSHAccountManager {
         }
 
         // create the scratch location on the host
-        // TODO: create the scratch location
         String scratchLocation = sshAccountProvisioner.getScratchLocation(username);
+        SSHUtil.execute(computeResourceDescription.getHostName(), 22, username, sshCredential, "mkdir -p " + scratchLocation);
+
+        // TODO: return information about provisioned account
     }
 
     private static Map<ConfigParam, String> resolveProvisionerConfig(String gatewayId, String provisionerName, Map<ConfigParam, String> provisionerConfig) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/8c748c66/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHUtil.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHUtil.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHUtil.java
index 4b5452a..2550270 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHUtil.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHUtil.java
@@ -20,12 +20,14 @@
 
 package org.apache.airavata.accountprovisioning;
 
-import com.jcraft.jsch.JSch;
-import com.jcraft.jsch.JSchException;
-import com.jcraft.jsch.Session;
+import com.jcraft.jsch.*;
 import org.apache.airavata.model.credential.store.SSHCredential;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
+import java.io.ByteArrayOutputStream;
 import java.io.IOException;
+import java.io.InputStream;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
@@ -36,7 +38,9 @@ import java.util.UUID;
  */
 public class SSHUtil {
 
-    public static boolean validate(String username, String hostname, int port, SSHCredential sshCredential) {
+    private final static Logger logger = LoggerFactory.getLogger(SSHUtil.class);
+
+    public static boolean validate(String hostname, int port, String username, SSHCredential sshCredential) {
 
         JSch jSch = new JSch();
         Session session = null;
@@ -57,6 +61,73 @@ public class SSHUtil {
         }
     }
 
+    public static String execute(String hostname, int port, String username, SSHCredential sshCredential, String command) {
+        JSch jSch = new JSch();
+        Session session = null;
+        Channel channel = null;
+        try {
+            jSch.addIdentity(UUID.randomUUID().toString(), sshCredential.getPrivateKey().getBytes(), sshCredential.getPublicKey().getBytes(), sshCredential.getPassphrase().getBytes());
+            session = jSch.getSession(username, hostname, port);
+            java.util.Properties config = new java.util.Properties();
+            config.put("StrictHostKeyChecking", "no");
+            session.setConfig(config);
+            session.connect();
+
+            channel = session.openChannel("exec");
+            ((ChannelExec)channel).setCommand(command);
+            ByteArrayOutputStream errOutputStream = new ByteArrayOutputStream();
+            ((ChannelExec) channel).setErrStream(errOutputStream);
+            channel.connect();
+
+            try (InputStream in = channel.getInputStream()) {
+                byte[] tmp = new byte[1024];
+                String result = "";
+                Integer exitStatus;
+
+                while (true) {
+                    while (in.available() > 0) {
+                        int i = in.read(tmp, 0, 1024);
+                        if (i < 0) break;
+                        result += new String(tmp, 0, i);
+                    }
+                    if (channel.isClosed()) {
+                        if (in.available() > 0) continue;
+                        exitStatus = channel.getExitStatus();
+                        break;
+                    }
+                    try {
+                        Thread.sleep(1000);
+                    } catch (Exception e) {
+                    }
+                }
+
+                logger.debug("Output from command: " + result);
+                logger.debug("Exit status: " + exitStatus);
+
+                if (exitStatus == null || exitStatus != 0) {
+                    String stderr = errOutputStream.toString("UTF-8");
+                    if (stderr != null && stderr.length() > 0) {
+                        logger.error("STDERR for command [" + command + "]: " + stderr);
+                    }
+                    throw new RuntimeException("SSH command [" + command + "] exited with exit status: " + exitStatus + ", STDERR=" + stderr);
+                }
+
+                return result;
+            }
+        } catch (JSchException e) {
+            throw new RuntimeException(e);
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        } finally {
+            if (channel != null && channel.isConnected()) {
+                channel.disconnect();
+            }
+            if (session != null && session.isConnected()) {
+                session.disconnect();
+            }
+        }
+    }
+
     public static void main(String[] args) throws JSchException {
 
         // Test the validate method


[23/40] airavata git commit: AIRAVATA-2500 Thrift stub code generation

Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/3184c238/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php
index f0b329d..da3071a 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php
@@ -110,6 +110,14 @@ class ComputeResourcePreference {
    * @var int
    */
   public $reservationEndTime = null;
+  /**
+   * @var string
+   */
+  public $sshAccountProvisioner = null;
+  /**
+   * @var array
+   */
+  public $sshAccountProvisionerConfig = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -170,6 +178,22 @@ class ComputeResourcePreference {
           'var' => 'reservationEndTime',
           'type' => TType::I64,
           ),
+        15 => array(
+          'var' => 'sshAccountProvisioner',
+          'type' => TType::STRING,
+          ),
+        16 => array(
+          'var' => 'sshAccountProvisionerConfig',
+          'type' => TType::MAP,
+          'ktype' => TType::STRING,
+          'vtype' => TType::STRING,
+          'key' => array(
+            'type' => TType::STRING,
+          ),
+          'val' => array(
+            'type' => TType::STRING,
+            ),
+          ),
         );
     }
     if (is_array($vals)) {
@@ -215,6 +239,12 @@ class ComputeResourcePreference {
       if (isset($vals['reservationEndTime'])) {
         $this->reservationEndTime = $vals['reservationEndTime'];
       }
+      if (isset($vals['sshAccountProvisioner'])) {
+        $this->sshAccountProvisioner = $vals['sshAccountProvisioner'];
+      }
+      if (isset($vals['sshAccountProvisionerConfig'])) {
+        $this->sshAccountProvisionerConfig = $vals['sshAccountProvisionerConfig'];
+      }
     }
   }
 
@@ -335,6 +365,33 @@ class ComputeResourcePreference {
             $xfer += $input->skip($ftype);
           }
           break;
+        case 15:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->sshAccountProvisioner);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 16:
+          if ($ftype == TType::MAP) {
+            $this->sshAccountProvisionerConfig = array();
+            $_size0 = 0;
+            $_ktype1 = 0;
+            $_vtype2 = 0;
+            $xfer += $input->readMapBegin($_ktype1, $_vtype2, $_size0);
+            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+            {
+              $key5 = '';
+              $val6 = '';
+              $xfer += $input->readString($key5);
+              $xfer += $input->readString($val6);
+              $this->sshAccountProvisionerConfig[$key5] = $val6;
+            }
+            $xfer += $input->readMapEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -418,6 +475,29 @@ class ComputeResourcePreference {
       $xfer += $output->writeI64($this->reservationEndTime);
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->sshAccountProvisioner !== null) {
+      $xfer += $output->writeFieldBegin('sshAccountProvisioner', TType::STRING, 15);
+      $xfer += $output->writeString($this->sshAccountProvisioner);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->sshAccountProvisionerConfig !== null) {
+      if (!is_array($this->sshAccountProvisionerConfig)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('sshAccountProvisionerConfig', TType::MAP, 16);
+      {
+        $output->writeMapBegin(TType::STRING, TType::STRING, count($this->sshAccountProvisionerConfig));
+        {
+          foreach ($this->sshAccountProvisionerConfig as $kiter7 => $viter8)
+          {
+            $xfer += $output->writeString($kiter7);
+            $xfer += $output->writeString($viter8);
+          }
+        }
+        $output->writeMapEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
@@ -711,15 +791,15 @@ class GatewayResourceProfile {
         case 3:
           if ($ftype == TType::LST) {
             $this->computeResourcePreferences = array();
-            $_size0 = 0;
-            $_etype3 = 0;
-            $xfer += $input->readListBegin($_etype3, $_size0);
-            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+            $_size9 = 0;
+            $_etype12 = 0;
+            $xfer += $input->readListBegin($_etype12, $_size9);
+            for ($_i13 = 0; $_i13 < $_size9; ++$_i13)
             {
-              $elem5 = null;
-              $elem5 = new \Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference();
-              $xfer += $elem5->read($input);
-              $this->computeResourcePreferences []= $elem5;
+              $elem14 = null;
+              $elem14 = new \Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference();
+              $xfer += $elem14->read($input);
+              $this->computeResourcePreferences []= $elem14;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -729,15 +809,15 @@ class GatewayResourceProfile {
         case 4:
           if ($ftype == TType::LST) {
             $this->storagePreferences = array();
-            $_size6 = 0;
-            $_etype9 = 0;
-            $xfer += $input->readListBegin($_etype9, $_size6);
-            for ($_i10 = 0; $_i10 < $_size6; ++$_i10)
+            $_size15 = 0;
+            $_etype18 = 0;
+            $xfer += $input->readListBegin($_etype18, $_size15);
+            for ($_i19 = 0; $_i19 < $_size15; ++$_i19)
             {
-              $elem11 = null;
-              $elem11 = new \Airavata\Model\AppCatalog\GatewayProfile\StoragePreference();
-              $xfer += $elem11->read($input);
-              $this->storagePreferences []= $elem11;
+              $elem20 = null;
+              $elem20 = new \Airavata\Model\AppCatalog\GatewayProfile\StoragePreference();
+              $xfer += $elem20->read($input);
+              $this->storagePreferences []= $elem20;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -789,9 +869,9 @@ class GatewayResourceProfile {
       {
         $output->writeListBegin(TType::STRUCT, count($this->computeResourcePreferences));
         {
-          foreach ($this->computeResourcePreferences as $iter12)
+          foreach ($this->computeResourcePreferences as $iter21)
           {
-            $xfer += $iter12->write($output);
+            $xfer += $iter21->write($output);
           }
         }
         $output->writeListEnd();
@@ -806,9 +886,9 @@ class GatewayResourceProfile {
       {
         $output->writeListBegin(TType::STRUCT, count($this->storagePreferences));
         {
-          foreach ($this->storagePreferences as $iter13)
+          foreach ($this->storagePreferences as $iter22)
           {
-            $xfer += $iter13->write($output);
+            $xfer += $iter22->write($output);
           }
         }
         $output->writeListEnd();

http://git-wip-us.apache.org/repos/asf/airavata/blob/3184c238/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisioner.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisioner.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisioner.java
index fb0a965..0dcadc4 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisioner.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/accountprovisioning/SSHAccountProvisioner.java
@@ -58,6 +58,7 @@ public class SSHAccountProvisioner implements org.apache.thrift.TBase<SSHAccount
   private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
   private static final org.apache.thrift.protocol.TField CAN_CREATE_ACCOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("canCreateAccount", org.apache.thrift.protocol.TType.BOOL, (short)2);
   private static final org.apache.thrift.protocol.TField CAN_INSTALL_SSHKEY_FIELD_DESC = new org.apache.thrift.protocol.TField("canInstallSSHKey", org.apache.thrift.protocol.TType.BOOL, (short)3);
+  private static final org.apache.thrift.protocol.TField CONFIG_PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("configParams", org.apache.thrift.protocol.TType.LIST, (short)4);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -68,12 +69,14 @@ public class SSHAccountProvisioner implements org.apache.thrift.TBase<SSHAccount
   private String name; // required
   private boolean canCreateAccount; // required
   private boolean canInstallSSHKey; // required
+  private List<SSHAccountProvisionerConfigParam> configParams; // required
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
     NAME((short)1, "name"),
     CAN_CREATE_ACCOUNT((short)2, "canCreateAccount"),
-    CAN_INSTALL_SSHKEY((short)3, "canInstallSSHKey");
+    CAN_INSTALL_SSHKEY((short)3, "canInstallSSHKey"),
+    CONFIG_PARAMS((short)4, "configParams");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -94,6 +97,8 @@ public class SSHAccountProvisioner implements org.apache.thrift.TBase<SSHAccount
           return CAN_CREATE_ACCOUNT;
         case 3: // CAN_INSTALL_SSHKEY
           return CAN_INSTALL_SSHKEY;
+        case 4: // CONFIG_PARAMS
+          return CONFIG_PARAMS;
         default:
           return null;
       }
@@ -146,6 +151,9 @@ public class SSHAccountProvisioner implements org.apache.thrift.TBase<SSHAccount
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
     tmpMap.put(_Fields.CAN_INSTALL_SSHKEY, new org.apache.thrift.meta_data.FieldMetaData("canInstallSSHKey", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+    tmpMap.put(_Fields.CONFIG_PARAMS, new org.apache.thrift.meta_data.FieldMetaData("configParams", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SSHAccountProvisionerConfigParam.class))));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SSHAccountProvisioner.class, metaDataMap);
   }
@@ -156,7 +164,8 @@ public class SSHAccountProvisioner implements org.apache.thrift.TBase<SSHAccount
   public SSHAccountProvisioner(
     String name,
     boolean canCreateAccount,
-    boolean canInstallSSHKey)
+    boolean canInstallSSHKey,
+    List<SSHAccountProvisionerConfigParam> configParams)
   {
     this();
     this.name = name;
@@ -164,6 +173,7 @@ public class SSHAccountProvisioner implements org.apache.thrift.TBase<SSHAccount
     setCanCreateAccountIsSet(true);
     this.canInstallSSHKey = canInstallSSHKey;
     setCanInstallSSHKeyIsSet(true);
+    this.configParams = configParams;
   }
 
   /**
@@ -176,6 +186,13 @@ public class SSHAccountProvisioner implements org.apache.thrift.TBase<SSHAccount
     }
     this.canCreateAccount = other.canCreateAccount;
     this.canInstallSSHKey = other.canInstallSSHKey;
+    if (other.isSetConfigParams()) {
+      List<SSHAccountProvisionerConfigParam> __this__configParams = new ArrayList<SSHAccountProvisionerConfigParam>(other.configParams.size());
+      for (SSHAccountProvisionerConfigParam other_element : other.configParams) {
+        __this__configParams.add(new SSHAccountProvisionerConfigParam(other_element));
+      }
+      this.configParams = __this__configParams;
+    }
   }
 
   public SSHAccountProvisioner deepCopy() {
@@ -189,6 +206,7 @@ public class SSHAccountProvisioner implements org.apache.thrift.TBase<SSHAccount
     this.canCreateAccount = false;
     setCanInstallSSHKeyIsSet(false);
     this.canInstallSSHKey = false;
+    this.configParams = null;
   }
 
   public String getName() {
@@ -258,6 +276,44 @@ public class SSHAccountProvisioner implements org.apache.thrift.TBase<SSHAccount
     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CANINSTALLSSHKEY_ISSET_ID, value);
   }
 
+  public int getConfigParamsSize() {
+    return (this.configParams == null) ? 0 : this.configParams.size();
+  }
+
+  public java.util.Iterator<SSHAccountProvisionerConfigParam> getConfigParamsIterator() {
+    return (this.configParams == null) ? null : this.configParams.iterator();
+  }
+
+  public void addToConfigParams(SSHAccountProvisionerConfigParam elem) {
+    if (this.configParams == null) {
+      this.configParams = new ArrayList<SSHAccountProvisionerConfigParam>();
+    }
+    this.configParams.add(elem);
+  }
+
+  public List<SSHAccountProvisionerConfigParam> getConfigParams() {
+    return this.configParams;
+  }
+
+  public void setConfigParams(List<SSHAccountProvisionerConfigParam> configParams) {
+    this.configParams = configParams;
+  }
+
+  public void unsetConfigParams() {
+    this.configParams = null;
+  }
+
+  /** Returns true if field configParams is set (has been assigned a value) and false otherwise */
+  public boolean isSetConfigParams() {
+    return this.configParams != null;
+  }
+
+  public void setConfigParamsIsSet(boolean value) {
+    if (!value) {
+      this.configParams = null;
+    }
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case NAME:
@@ -284,6 +340,14 @@ public class SSHAccountProvisioner implements org.apache.thrift.TBase<SSHAccount
       }
       break;
 
+    case CONFIG_PARAMS:
+      if (value == null) {
+        unsetConfigParams();
+      } else {
+        setConfigParams((List<SSHAccountProvisionerConfigParam>)value);
+      }
+      break;
+
     }
   }
 
@@ -298,6 +362,9 @@ public class SSHAccountProvisioner implements org.apache.thrift.TBase<SSHAccount
     case CAN_INSTALL_SSHKEY:
       return isCanInstallSSHKey();
 
+    case CONFIG_PARAMS:
+      return getConfigParams();
+
     }
     throw new IllegalStateException();
   }
@@ -315,6 +382,8 @@ public class SSHAccountProvisioner implements org.apache.thrift.TBase<SSHAccount
       return isSetCanCreateAccount();
     case CAN_INSTALL_SSHKEY:
       return isSetCanInstallSSHKey();
+    case CONFIG_PARAMS:
+      return isSetConfigParams();
     }
     throw new IllegalStateException();
   }
@@ -359,6 +428,15 @@ public class SSHAccountProvisioner implements org.apache.thrift.TBase<SSHAccount
         return false;
     }
 
+    boolean this_present_configParams = true && this.isSetConfigParams();
+    boolean that_present_configParams = true && that.isSetConfigParams();
+    if (this_present_configParams || that_present_configParams) {
+      if (!(this_present_configParams && that_present_configParams))
+        return false;
+      if (!this.configParams.equals(that.configParams))
+        return false;
+    }
+
     return true;
   }
 
@@ -381,6 +459,11 @@ public class SSHAccountProvisioner implements org.apache.thrift.TBase<SSHAccount
     if (present_canInstallSSHKey)
       list.add(canInstallSSHKey);
 
+    boolean present_configParams = true && (isSetConfigParams());
+    list.add(present_configParams);
+    if (present_configParams)
+      list.add(configParams);
+
     return list.hashCode();
   }
 
@@ -422,6 +505,16 @@ public class SSHAccountProvisioner implements org.apache.thrift.TBase<SSHAccount
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetConfigParams()).compareTo(other.isSetConfigParams());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetConfigParams()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configParams, other.configParams);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -457,6 +550,14 @@ public class SSHAccountProvisioner implements org.apache.thrift.TBase<SSHAccount
     sb.append("canInstallSSHKey:");
     sb.append(this.canInstallSSHKey);
     first = false;
+    if (!first) sb.append(", ");
+    sb.append("configParams:");
+    if (this.configParams == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.configParams);
+    }
+    first = false;
     sb.append(")");
     return sb.toString();
   }
@@ -475,6 +576,10 @@ public class SSHAccountProvisioner implements org.apache.thrift.TBase<SSHAccount
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'canInstallSSHKey' is unset! Struct:" + toString());
     }
 
+    if (!isSetConfigParams()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'configParams' is unset! Struct:" + toString());
+    }
+
     // check for sub-struct validity
   }
 
@@ -538,6 +643,25 @@ public class SSHAccountProvisioner implements org.apache.thrift.TBase<SSHAccount
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
+          case 4: // CONFIG_PARAMS
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
+                struct.configParams = new ArrayList<SSHAccountProvisionerConfigParam>(_list0.size);
+                SSHAccountProvisionerConfigParam _elem1;
+                for (int _i2 = 0; _i2 < _list0.size; ++_i2)
+                {
+                  _elem1 = new SSHAccountProvisionerConfigParam();
+                  _elem1.read(iprot);
+                  struct.configParams.add(_elem1);
+                }
+                iprot.readListEnd();
+              }
+              struct.setConfigParamsIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -562,6 +686,18 @@ public class SSHAccountProvisioner implements org.apache.thrift.TBase<SSHAccount
       oprot.writeFieldBegin(CAN_INSTALL_SSHKEY_FIELD_DESC);
       oprot.writeBool(struct.canInstallSSHKey);
       oprot.writeFieldEnd();
+      if (struct.configParams != null) {
+        oprot.writeFieldBegin(CONFIG_PARAMS_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.configParams.size()));
+          for (SSHAccountProvisionerConfigParam _iter3 : struct.configParams)
+          {
+            _iter3.write(oprot);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -582,6 +718,13 @@ public class SSHAccountProvisioner implements org.apache.thrift.TBase<SSHAccount
       oprot.writeString(struct.name);
       oprot.writeBool(struct.canCreateAccount);
       oprot.writeBool(struct.canInstallSSHKey);
+      {
+        oprot.writeI32(struct.configParams.size());
+        for (SSHAccountProvisionerConfigParam _iter4 : struct.configParams)
+        {
+          _iter4.write(oprot);
+        }
+      }
     }
 
     @Override
@@ -593,6 +736,18 @@ public class SSHAccountProvisioner implements org.apache.thrift.TBase<SSHAccount
       struct.setCanCreateAccountIsSet(true);
       struct.canInstallSSHKey = iprot.readBool();
       struct.setCanInstallSSHKeyIsSet(true);
+      {
+        org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.configParams = new ArrayList<SSHAccountProvisionerConfigParam>(_list5.size);
+        SSHAccountProvisionerConfigParam _elem6;
+        for (int _i7 = 0; _i7 < _list5.size; ++_i7)
+        {
+          _elem6 = new SSHAccountProvisionerConfigParam();
+          _elem6.read(iprot);
+          struct.configParams.add(_elem6);
+        }
+      }
+      struct.setConfigParamsIsSet(true);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/3184c238/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
index 5601424..3edf60c 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
@@ -23,15 +23,32 @@
  */
 package org.apache.airavata.model.appcatalog.gatewayprofile;
 
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
-import org.apache.thrift.scheme.TupleScheme;
 
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
 import javax.annotation.Generated;
-import java.util.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 /**


[26/40] airavata git commit: AIRAVATA-2500 Thrift stub code generation

Posted by ma...@apache.org.
AIRAVATA-2500 Thrift stub code generation


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

Branch: refs/heads/develop
Commit: 3184c23874cf15aef991859bbb87b9d1e0892f9d
Parents: 643d35b
Author: Marcus Christie <ma...@apache.org>
Authored: Thu Sep 7 09:42:32 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Tue Sep 19 15:08:05 2017 -0400

----------------------------------------------------------------------
 .../java/org/apache/airavata/api/Airavata.java  | 36866 ++++++++---------
 .../resources/lib/Airavata/API/Airavata.php     |  8436 ++--
 .../Model/AppCatalog/GatewayProfile/Types.php   |   120 +-
 .../SSHAccountProvisioner.java                  |   159 +-
 .../ComputeResourcePreference.java              |    25 +-
 5 files changed, 22774 insertions(+), 22832 deletions(-)
----------------------------------------------------------------------



[30/40] airavata git commit: AIRAVATA-2500 Adding try/catch around doesUserHaveSSHAccount

Posted by ma...@apache.org.
AIRAVATA-2500 Adding try/catch around doesUserHaveSSHAccount


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

Branch: refs/heads/develop
Commit: 8f68bc1a9fdef0f980c7ae47ef671366fdb4373b
Parents: 42059ec
Author: Marcus Christie <ma...@apache.org>
Authored: Wed Sep 20 16:42:37 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Wed Sep 20 16:42:37 2017 -0400

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java    | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/8f68bc1a/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 febb703..162260e 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
@@ -19,10 +19,7 @@
  */
 package org.apache.airavata.api.server.handler;
 
-import org.apache.airavata.accountprovisioning.ConfigParam;
-import org.apache.airavata.accountprovisioning.SSHAccountManager;
-import org.apache.airavata.accountprovisioning.SSHAccountProvisionerFactory;
-import org.apache.airavata.accountprovisioning.SSHAccountProvisionerProvider;
+import org.apache.airavata.accountprovisioning.*;
 import org.apache.airavata.api.Airavata;
 import org.apache.airavata.api.airavata_apiConstants;
 import org.apache.airavata.api.server.util.ThriftClientPool;
@@ -4008,8 +4005,18 @@ public class AiravataServerHandler implements Airavata.Iface {
     @Override
     @SecurityCheck
     public boolean doesUserHaveSSHAccount(AuthzToken authzToken, String computeResourceId, String userId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
-        String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
-        return SSHAccountManager.doesUserHaveSSHAccount(gatewayId, computeResourceId, userId);
+        try {
+            String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
+            return SSHAccountManager.doesUserHaveSSHAccount(gatewayId, computeResourceId, userId);
+        } catch (Exception e) {
+            String errorMessage = "Error occurred while checking if [" + userId + "] has an SSH Account on [" +
+                    computeResourceId + "].";
+            logger.error(errorMessage, e);
+            AiravataSystemException exception = new AiravataSystemException();
+            exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+            exception.setMessage(errorMessage + " More info : " + e.getMessage());
+            throw exception;
+        }
     }
 
     @Override


[18/40] airavata git commit: AIRAVATA-2500 Added additional info field for SSH Account Provisioners

Posted by ma...@apache.org.
AIRAVATA-2500 Added additional info field for SSH Account Provisioners

This field is meant to contain additional information or instructions to
the user. First use case is to give user information on how to obtain a
cluster account when the SSHAccountProvisioner is not able to
automatically create the account.


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

Branch: refs/heads/develop
Commit: 71d33eafe2fadda66ecd33aeb2a8415f7f67bcb1
Parents: 31f3906
Author: Marcus Christie <ma...@apache.org>
Authored: Thu Sep 7 14:47:06 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Tue Sep 19 15:08:05 2017 -0400

----------------------------------------------------------------------
 .../app/catalog/impl/GwyResourceProfileImpl.java  |  2 ++
 .../catalog/model/ComputeResourcePreference.java  | 10 ++++++++++
 .../resources/ComputeHostPreferenceResource.java  | 18 +++++++++++++++---
 .../core/app/catalog/util/AppCatalogJPAUtils.java |  1 +
 .../catalog/util/AppCatalogThriftConversion.java  |  1 +
 .../src/main/resources/appcatalog-derby.sql       |  1 +
 .../src/main/resources/appcatalog-mysql.sql       |  1 +
 .../DeltaScripts/appCatalog_schema_delta.sql      |  1 +
 .../gateway_resource_profile_model.thrift         |  3 ++-
 9 files changed, 34 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/71d33eaf/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java
index 78a6f0f..aba25c7 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java
@@ -94,6 +94,7 @@ public class GwyResourceProfileImpl implements GwyResourceProfile {
                         Map<String,String> sshAccountProvisionerConfigurationsCopy = new HashMap<>(preference.getSshAccountProvisionerConfig());
                         resource.setSshAccountProvisionerConfigurations(sshAccountProvisionerConfigurationsCopy);
                     }
+                    resource.setSshAccountProvisionerAdditionalInfo(preference.getSshAccountProvisionerAdditionalInfo());
                     resource.save();
                 }
             }
@@ -164,6 +165,7 @@ public class GwyResourceProfileImpl implements GwyResourceProfile {
                         Map<String,String> sshAccountProvisionerConfigurationsCopy = new HashMap<>(preference.getSshAccountProvisionerConfig());
                         resource.setSshAccountProvisionerConfigurations(sshAccountProvisionerConfigurationsCopy);
                     }
+                    resource.setSshAccountProvisionerAdditionalInfo(preference.getSshAccountProvisionerAdditionalInfo());
                     resource.save();
                 }
             }

http://git-wip-us.apache.org/repos/asf/airavata/blob/71d33eaf/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ComputeResourcePreference.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ComputeResourcePreference.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ComputeResourcePreference.java
index 20f55d4..67402f4 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ComputeResourcePreference.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ComputeResourcePreference.java
@@ -62,6 +62,8 @@ public class ComputeResourcePreference {
     private Timestamp reservationEndTime;
     @Column(name = "SSH_ACCOUNT_PROVISIONER")
     private String sshAccountProvisioner;
+    @Column(name = "SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO")
+    private String sshAccountProvisionerAdditionalInfo;
 
 
     @ManyToOne(cascade= CascadeType.MERGE)
@@ -227,4 +229,12 @@ public class ComputeResourcePreference {
     public void setSshAccountProvisionerConfigurations(Collection<SSHAccountProvisionerConfiguration> sshAccountProvisionerConfigurations) {
         this.sshAccountProvisionerConfigurations = sshAccountProvisionerConfigurations;
     }
+
+    public String getSshAccountProvisionerAdditionalInfo() {
+        return sshAccountProvisionerAdditionalInfo;
+    }
+
+    public void setSshAccountProvisionerAdditionalInfo(String sshAccountProvisionerAdditionalInfo) {
+        this.sshAccountProvisionerAdditionalInfo = sshAccountProvisionerAdditionalInfo;
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/71d33eaf/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ComputeHostPreferenceResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ComputeHostPreferenceResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ComputeHostPreferenceResource.java
index 1320025..7203009 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ComputeHostPreferenceResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ComputeHostPreferenceResource.java
@@ -55,6 +55,7 @@ public class ComputeHostPreferenceResource extends AppCatAbstractResource {
     private Timestamp reservationEndTime;
     private String sshAccountProvisioner;
     private Map<String,String> sshAccountProvisionerConfigurations;
+    private String sshAccountProvisionerAdditionalInfo;
 
     private GatewayProfileResource gatewayProfile;
     private ComputeResourceResource computeHostResource;
@@ -215,6 +216,14 @@ public class ComputeHostPreferenceResource extends AppCatAbstractResource {
         this.sshAccountProvisionerConfigurations = sshAccountProvisionerConfigurations;
     }
 
+    public String getSshAccountProvisionerAdditionalInfo() {
+        return sshAccountProvisionerAdditionalInfo;
+    }
+
+    public void setSshAccountProvisionerAdditionalInfo(String sshAccountProvisionerAdditionalInfo) {
+        this.sshAccountProvisionerAdditionalInfo = sshAccountProvisionerAdditionalInfo;
+    }
+
     @Override
     public void remove(Object identifier) throws AppCatalogException {
         HashMap<String, String> ids;
@@ -456,6 +465,7 @@ public class ComputeHostPreferenceResource extends AppCatAbstractResource {
                 } else {
                     existingPreference.setSshAccountProvisionerConfigurations(null);
                 }
+                existingPreference.setSshAccountProvisionerAdditionalInfo(sshAccountProvisionerAdditionalInfo);
                 em.merge(existingPreference);
             } else {
                 ComputeResourcePreference resourcePreference = new ComputeResourcePreference();
@@ -476,15 +486,17 @@ public class ComputeHostPreferenceResource extends AppCatAbstractResource {
                 resourcePreference.setReservation(reservation);
                 resourcePreference.setReservationStartTime(reservationStartTime);
                 resourcePreference.setReservationEndTime(reservationEndTime);
-                existingPreference.setSshAccountProvisioner(sshAccountProvisioner);
+                resourcePreference.setSshAccountProvisioner(sshAccountProvisioner);
                 if (sshAccountProvisionerConfigurations != null && !sshAccountProvisionerConfigurations.isEmpty()){
                     List<SSHAccountProvisionerConfiguration> configurations = new ArrayList<>();
                     for (String sshAccountProvisionerConfigName : sshAccountProvisionerConfigurations.keySet()) {
                         String value = sshAccountProvisionerConfigurations.get(sshAccountProvisionerConfigName);
-                        configurations.add(new SSHAccountProvisionerConfiguration(sshAccountProvisionerConfigName, value, existingPreference));
+                        configurations.add(new SSHAccountProvisionerConfiguration(sshAccountProvisionerConfigName, value, resourcePreference));
                     }
-                    existingPreference.setSshAccountProvisionerConfigurations(configurations);
+                    resourcePreference.setSshAccountProvisionerConfigurations(configurations);
                 }
+                resourcePreference.setSshAccountProvisionerAdditionalInfo(sshAccountProvisionerAdditionalInfo);
+
                 em.persist(resourcePreference);
             }
             em.getTransaction().commit();

http://git-wip-us.apache.org/repos/asf/airavata/blob/71d33eaf/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
index f794078..c41e8a2 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
@@ -965,6 +965,7 @@ public class AppCatalogJPAUtils {
                 }
                 resource.setSshAccountProvisionerConfigurations(sshAccountProvisionerConfigurations);
             }
+            resource.setSshAccountProvisionerAdditionalInfo(o.getSshAccountProvisionerAdditionalInfo());
         }
         return resource;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/71d33eaf/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
index 1a85454..09258a2 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
@@ -880,6 +880,7 @@ public class AppCatalogThriftConversion {
             Map<String, String> sshAccountProvisionerConfigCopy = new HashMap<>(resource.getSshAccountProvisionerConfigurations());
             preference.setSshAccountProvisionerConfig(sshAccountProvisionerConfigCopy);
         }
+        preference.setSshAccountProvisionerAdditionalInfo(resource.getSshAccountProvisionerAdditionalInfo());
         return preference;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/71d33eaf/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql b/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
index df4ebb1..c57549e 100644
--- a/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
+++ b/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
@@ -357,6 +357,7 @@ CREATE TABLE COMPUTE_RESOURCE_PREFERENCE
         RESERVATION_START_TIME timestamp,
         RESERVATION_END_TIME timestamp,
         SSH_ACCOUNT_PROVISIONER VARCHAR(255),
+        SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO VARCHAR(1000),
         PRIMARY KEY(GATEWAY_ID,RESOURCE_ID),
         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE,
         FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY_PROFILE(GATEWAY_ID) ON DELETE CASCADE

http://git-wip-us.apache.org/repos/asf/airavata/blob/71d33eaf/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql b/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
index 54886b1..6c07499 100644
--- a/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
+++ b/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
@@ -356,6 +356,7 @@ CREATE TABLE COMPUTE_RESOURCE_PREFERENCE
         RESERVATION_START_TIME timestamp,
         RESERVATION_END_TIME timestamp,
         SSH_ACCOUNT_PROVISIONER VARCHAR(255),
+        SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO VARCHAR(1000),
         PRIMARY KEY(GATEWAY_ID,RESOURCE_ID),
         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE,
         FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY_PROFILE(GATEWAY_ID) ON DELETE CASCADE

http://git-wip-us.apache.org/repos/asf/airavata/blob/71d33eaf/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql
----------------------------------------------------------------------
diff --git a/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql b/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql
index bf31b6b..36fc66b 100644
--- a/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql
+++ b/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql
@@ -19,6 +19,7 @@
 --
 
 alter table COMPUTE_RESOURCE_PREFERENCE add SSH_ACCOUNT_PROVISIONER VARCHAR(255);
+alter table COMPUTE_RESOURCE_PREFERENCE add SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO VARCHAR(1000);
 
 CREATE TABLE SSH_ACCOUNT_PROVISIONER_CONFIG
 (

http://git-wip-us.apache.org/repos/asf/airavata/blob/71d33eaf/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift b/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
index 87ca433..7280850 100644
--- a/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
+++ b/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
@@ -77,7 +77,8 @@ struct ComputeResourcePreference {
     13: optional i64 reservationStartTime,
     14: optional i64 reservationEndTime,
     15: optional string sshAccountProvisioner,
-    16: optional map<string, string> sshAccountProvisionerConfig
+    16: optional map<string, string> sshAccountProvisionerConfig,
+    17: optional string sshAccountProvisionerAdditionalInfo
 }
 
 struct StoragePreference {


[12/40] airavata git commit: AIRAVATA-2500 Implement doesUserHaveSSHAccount and setup SSH account methods in API

Posted by ma...@apache.org.
AIRAVATA-2500 Implement doesUserHaveSSHAccount and setup SSH account methods in API


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

Branch: refs/heads/develop
Commit: 8f2f135374c96f92ffb7eb1775bdfdecb144fb20
Parents: 0d1e90f
Author: Marcus Christie <ma...@apache.org>
Authored: Thu Aug 31 09:16:03 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Tue Sep 19 15:07:56 2017 -0400

----------------------------------------------------------------------
 airavata-api/airavata-api-server/pom.xml        |  5 ++
 .../server/handler/AiravataServerHandler.java   | 55 ++++++++++++++++++++
 .../accountprovisioning/SSHAccountManager.java  | 42 ++++++++++++---
 .../SSHAccountProvisionerProvider.java          |  1 +
 .../airavata-apis/airavata_api.thrift           | 24 ++++++++-
 .../account_provisioning_model.thrift           |  2 +
 6 files changed, 122 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/8f2f1353/airavata-api/airavata-api-server/pom.xml
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/pom.xml b/airavata-api/airavata-api-server/pom.xml
index ada0b8f..a4d10af 100644
--- a/airavata-api/airavata-api-server/pom.xml
+++ b/airavata-api/airavata-api-server/pom.xml
@@ -93,6 +93,11 @@
             <artifactId>services-security</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>compute-account-provisioning</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <!--<dependency>-->
             <!--<groupId>org.apache.airavata</groupId>-->
             <!--<artifactId>group-manager</artifactId>-->

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f2f1353/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 4ae91ea..bb3f2c0 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
@@ -19,6 +19,7 @@
  */
 package org.apache.airavata.api.server.handler;
 
+import org.apache.airavata.accountprovisioning.SSHAccountManager;
 import org.apache.airavata.api.Airavata;
 import org.apache.airavata.api.airavata_apiConstants;
 import org.apache.airavata.api.server.util.ThriftClientPool;
@@ -35,6 +36,8 @@ import org.apache.airavata.messaging.core.MessagingFactory;
 import org.apache.airavata.messaging.core.Publisher;
 import org.apache.airavata.messaging.core.Type;
 import org.apache.airavata.model.WorkflowModel;
+import org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner;
+import org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule;
 import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
@@ -3964,6 +3967,58 @@ public class AiravataServerHandler implements Airavata.Iface {
         }
     }
 
+    @Override
+    @SecurityCheck
+    public List<SSHAccountProvisioner> getSSHAccountProvisionerNames(AuthzToken authzToken) throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
+
+        // TODO: implement
+        return null;
+    }
+
+    @Override
+    @SecurityCheck
+    public List<SSHAccountProvisionerConfigParam> getSSHAccountProvisionerConfigParams(AuthzToken authzToken, String provisionerName) throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
+
+        // TODO: implement
+        return null;
+    }
+
+    @Override
+    @SecurityCheck
+    public boolean doesUserHaveSSHAccount(AuthzToken authzToken, String computeResourceId, String username) throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
+        String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
+        return SSHAccountManager.doesUserHaveSSHAccount(gatewayId, computeResourceId, username);
+    }
+
+    @Override
+    @SecurityCheck
+    public UserComputeResourcePreference setupUserComputeResourcePreferencesForSSH(AuthzToken authzToken, String computeResourceId, String username, String airavataCredStoreToken) throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
+        String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
+        CredentialStoreService.Client csClient = csClientPool.getResource();
+        SSHCredential sshCredential = null;
+        try {
+            sshCredential = csClient.getSSHCredential(airavataCredStoreToken, gatewayId);
+        }catch (Exception e){
+            logger.error("Error occurred while retrieving SSH Credential", e);
+            AiravataSystemException exception = new AiravataSystemException();
+            exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+            exception.setMessage("Error occurred while retrieving SSH Credential. More info : " + e.getMessage());
+            csClientPool.returnBrokenResource(csClient);
+            throw exception;
+        }
+
+        try {
+            UserComputeResourcePreference userComputeResourcePreference = SSHAccountManager.setupSSHAccount(gatewayId, computeResourceId, username, sshCredential);
+            return userComputeResourcePreference;
+        }catch (Exception e){
+            logger.error("Error occurred while automatically setting up SSH account for user [" + username + "]", e);
+            AiravataSystemException exception = new AiravataSystemException();
+            exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+            exception.setMessage("Error occurred while automatically setting up SSH account for user [" + username + "]. More info : " + e.getMessage());
+            throw exception;
+        }
+    }
+
     /**
      * Register a User Resource Profile.
      *

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f2f1353/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
index ec7cfc1..f9ed22a 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
@@ -51,6 +51,30 @@ public class SSHAccountManager {
 
     private final static Logger logger = LoggerFactory.getLogger(SSHAccountManager.class);
 
+    public static boolean doesUserHaveSSHAccount(String gatewayId, String computeResourceId, String username) {
+
+        // get compute resource preferences for the gateway and hostname
+        RegistryService.Client registryServiceClient = getRegistryServiceClient();
+        ComputeResourcePreference computeResourcePreference = null;
+        try {
+            computeResourcePreference = registryServiceClient.getGatewayComputeResourcePreference(gatewayId, computeResourceId);
+        } catch(TException e) {
+            throw new RuntimeException(e);
+        } finally {
+            if (registryServiceClient.getInputProtocol().getTransport().isOpen()) {
+                registryServiceClient.getInputProtocol().getTransport().close();
+            }
+        }
+
+        // get the account provisioner and config values for the preferences
+        if (!computeResourcePreference.isSetSshAccountProvisioner()) {
+            throw new RuntimeException("Compute resource [" + computeResourceId + "] does not have an SSH Account Provisioner configured for it.");
+        }
+        SSHAccountProvisioner sshAccountProvisioner = createSshAccountProvisioner(gatewayId, computeResourcePreference);
+
+        return sshAccountProvisioner.hasAccount(username);
+    }
+
     public static UserComputeResourcePreference setupSSHAccount(String gatewayId, String computeResourceId, String username, SSHCredential sshCredential) {
 
         // get compute resource preferences for the gateway and hostname
@@ -84,19 +108,15 @@ public class SSHAccountManager {
         if (!computeResourcePreference.isSetSshAccountProvisioner()) {
             throw new RuntimeException("Compute resource [" + computeResourceId + "] does not have an SSH Account Provisioner configured for it.");
         }
-        String provisionerName = computeResourcePreference.getSshAccountProvisioner();
-        Map<ConfigParam,String> provisionerConfig = convertConfigParams(provisionerName, computeResourcePreference.getSshAccountProvisionerConfig());
-
-        Map<ConfigParam, String> resolvedConfig = resolveProvisionerConfig(gatewayId, provisionerName, provisionerConfig);
 
         // instantiate and init the account provisioner
-        SSHAccountProvisioner sshAccountProvisioner = SSHAccountProvisionerFactory.createSSHAccountProvisioner(provisionerName, resolvedConfig);
+        SSHAccountProvisioner sshAccountProvisioner = createSshAccountProvisioner(gatewayId, computeResourcePreference);
 
         // First check if username has an account
         boolean hasAccount = sshAccountProvisioner.hasAccount(username);
 
         if (!hasAccount && !sshAccountProvisioner.canCreateAccount()) {
-            throw new RuntimeException("User [" + username + "] doesn't have account and [" + provisionerName + "] doesn't support creating account.");
+            throw new RuntimeException("User [" + username + "] doesn't have account and [" + computeResourceId + "] doesn't have a SSH Account Provisioner that supports creating accounts.");
         }
 
         // Install SSH key
@@ -123,6 +143,16 @@ public class SSHAccountManager {
         return userComputeResourcePreference;
     }
 
+    private static SSHAccountProvisioner createSshAccountProvisioner(String gatewayId, ComputeResourcePreference computeResourcePreference) {
+        String provisionerName = computeResourcePreference.getSshAccountProvisioner();
+        Map<ConfigParam,String> provisionerConfig = convertConfigParams(provisionerName, computeResourcePreference.getSshAccountProvisionerConfig());
+
+        Map<ConfigParam, String> resolvedConfig = resolveProvisionerConfig(gatewayId, provisionerName, provisionerConfig);
+
+        // instantiate and init the account provisioner
+        return SSHAccountProvisionerFactory.createSSHAccountProvisioner(provisionerName, resolvedConfig);
+    }
+
     private static Map<ConfigParam, String> resolveProvisionerConfig(String gatewayId, String provisionerName, Map<ConfigParam, String> provisionerConfig) {
         CredentialStoreService.Client credentialStoreServiceClient = null;
         try {

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f2f1353/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerProvider.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerProvider.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerProvider.java
index 42f2794..a43a022 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerProvider.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerProvider.java
@@ -34,4 +34,5 @@ public interface SSHAccountProvisionerProvider {
     }
     List<ConfigParam> getConfigParams();
     SSHAccountProvisioner createSSHAccountProvisioner(Map<ConfigParam,String> config);
+    // TODO: should canCreateAccount and canInstallSSHKey move here? All metadata about provisioner could be on this class
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f2f1353/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/airavata-apis/airavata_api.thrift b/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
index 471af41..e06c234 100644
--- a/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
+++ b/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
@@ -2950,7 +2950,7 @@ service Airavata {
               3: airavata_errors.AiravataSystemException ase,
               4: airavata_errors.AuthorizationException ae)
 
-  list<string> getSSHAccountProvisionerNames(1: required security_model.AuthzToken authzToken)
+  list<account_provisioning_model.SSHAccountProvisioner> getSSHAccountProvisionerNames(1: required security_model.AuthzToken authzToken)
     	throws (1: airavata_errors.InvalidRequestException ire,
               2: airavata_errors.AiravataClientException ace,
               3: airavata_errors.AiravataSystemException ase,
@@ -2962,6 +2962,28 @@ service Airavata {
               3: airavata_errors.AiravataSystemException ase,
               4: airavata_errors.AuthorizationException ae)
 
+  /**
+   * Check if user has an SSH account on the given compute resource. This
+   * method will only work if the compute resource has an SSHAccountProvisioner configured for it.
+   */
+  bool doesUserHaveSSHAccount(1: required security_model.AuthzToken authzToken, 2: required string computeResourceId, 3: required string username)
+    	throws (1: airavata_errors.InvalidRequestException ire,
+              2: airavata_errors.AiravataClientException ace,
+              3: airavata_errors.AiravataSystemException ase,
+              4: airavata_errors.AuthorizationException ae)
+
+  /**
+   * Setup and return a UserComputeResourcePreference object for this user to SSH into the given compute resource with
+   * the given SSH credential. This method will only work if the compute resource has an SSHAccountProvisioner
+   * configured for it. The returned UserComputeResourcePreference object is not saved; it is up to the client to
+   * call addUserComputeResourcePreference to persist it.
+   */
+  user_resource_profile_model.UserComputeResourcePreference setupUserComputeResourcePreferencesForSSH(1: required security_model.AuthzToken authzToken,
+            2: required string computeResourceId, 3: required string username, 4: required string airavataCredStoreToken)
+    	throws (1: airavata_errors.InvalidRequestException ire,
+              2: airavata_errors.AiravataClientException ace,
+              3: airavata_errors.AiravataSystemException ase,
+              4: airavata_errors.AuthorizationException ae)
 
   /*
    * User Resource Profile

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f2f1353/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift b/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift
index a6c6ab9..245d295 100644
--- a/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift
+++ b/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift
@@ -30,6 +30,8 @@ enum SSHAccountProvisionerConfigParamType {
 
 struct SSHAccountProvisioner {
     1: required string name;
+    2: required bool canCreateAccount;
+    3: required bool canInstallSSHKey;
 }
 
 struct SSHAccountProvisionerConfigParam {


[06/40] airavata git commit: AIRAVATA-2500 Update thrift API and regenerated

Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/2a901394/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
index b1c092b..0d52abb 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
@@ -103,6 +103,8 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
   private static final org.apache.thrift.protocol.TField RESERVATION_FIELD_DESC = new org.apache.thrift.protocol.TField("reservation", org.apache.thrift.protocol.TType.STRING, (short)12);
   private static final org.apache.thrift.protocol.TField RESERVATION_START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("reservationStartTime", org.apache.thrift.protocol.TType.I64, (short)13);
   private static final org.apache.thrift.protocol.TField RESERVATION_END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("reservationEndTime", org.apache.thrift.protocol.TType.I64, (short)14);
+  private static final org.apache.thrift.protocol.TField SSH_ACCOUNT_PROVISIONER_FIELD_DESC = new org.apache.thrift.protocol.TField("sshAccountProvisioner", org.apache.thrift.protocol.TType.STRING, (short)15);
+  private static final org.apache.thrift.protocol.TField SSH_ACCOUNT_PROVISIONER_CONFIG_FIELD_DESC = new org.apache.thrift.protocol.TField("sshAccountProvisionerConfig", org.apache.thrift.protocol.TType.MAP, (short)16);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -124,6 +126,8 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
   private String reservation; // optional
   private long reservationStartTime; // optional
   private long reservationEndTime; // optional
+  private String sshAccountProvisioner; // optional
+  private Map<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam,String> sshAccountProvisionerConfig; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -148,7 +152,9 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
     QUALITY_OF_SERVICE((short)11, "qualityOfService"),
     RESERVATION((short)12, "reservation"),
     RESERVATION_START_TIME((short)13, "reservationStartTime"),
-    RESERVATION_END_TIME((short)14, "reservationEndTime");
+    RESERVATION_END_TIME((short)14, "reservationEndTime"),
+    SSH_ACCOUNT_PROVISIONER((short)15, "sshAccountProvisioner"),
+    SSH_ACCOUNT_PROVISIONER_CONFIG((short)16, "sshAccountProvisionerConfig");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -191,6 +197,10 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
           return RESERVATION_START_TIME;
         case 14: // RESERVATION_END_TIME
           return RESERVATION_END_TIME;
+        case 15: // SSH_ACCOUNT_PROVISIONER
+          return SSH_ACCOUNT_PROVISIONER;
+        case 16: // SSH_ACCOUNT_PROVISIONER_CONFIG
+          return SSH_ACCOUNT_PROVISIONER_CONFIG;
         default:
           return null;
       }
@@ -235,7 +245,7 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
   private static final int __RESERVATIONSTARTTIME_ISSET_ID = 1;
   private static final int __RESERVATIONENDTIME_ISSET_ID = 2;
   private byte __isset_bitfield = 0;
-  private static final _Fields optionals[] = {_Fields.LOGIN_USER_NAME,_Fields.PREFERRED_JOB_SUBMISSION_PROTOCOL,_Fields.PREFERRED_DATA_MOVEMENT_PROTOCOL,_Fields.PREFERRED_BATCH_QUEUE,_Fields.SCRATCH_LOCATION,_Fields.ALLOCATION_PROJECT_NUMBER,_Fields.RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN,_Fields.USAGE_REPORTING_GATEWAY_ID,_Fields.QUALITY_OF_SERVICE,_Fields.RESERVATION,_Fields.RESERVATION_START_TIME,_Fields.RESERVATION_END_TIME};
+  private static final _Fields optionals[] = {_Fields.LOGIN_USER_NAME,_Fields.PREFERRED_JOB_SUBMISSION_PROTOCOL,_Fields.PREFERRED_DATA_MOVEMENT_PROTOCOL,_Fields.PREFERRED_BATCH_QUEUE,_Fields.SCRATCH_LOCATION,_Fields.ALLOCATION_PROJECT_NUMBER,_Fields.RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN,_Fields.USAGE_REPORTING_GATEWAY_ID,_Fields.QUALITY_OF_SERVICE,_Fields.RESERVATION,_Fields.RESERVATION_START_TIME,_Fields.RESERVATION_END_TIME,_Fields.SSH_ACCOUNT_PROVISIONER,_Fields.SSH_ACCOUNT_PROVISIONER_CONFIG};
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -267,6 +277,12 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
     tmpMap.put(_Fields.RESERVATION_END_TIME, new org.apache.thrift.meta_data.FieldMetaData("reservationEndTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.SSH_ACCOUNT_PROVISIONER, new org.apache.thrift.meta_data.FieldMetaData("sshAccountProvisioner", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.SSH_ACCOUNT_PROVISIONER_CONFIG, new org.apache.thrift.meta_data.FieldMetaData("sshAccountProvisionerConfig", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
+            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam.class), 
+            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ComputeResourcePreference.class, metaDataMap);
   }
@@ -327,6 +343,24 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
     }
     this.reservationStartTime = other.reservationStartTime;
     this.reservationEndTime = other.reservationEndTime;
+    if (other.isSetSshAccountProvisioner()) {
+      this.sshAccountProvisioner = other.sshAccountProvisioner;
+    }
+    if (other.isSetSshAccountProvisionerConfig()) {
+      Map<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam,String> __this__sshAccountProvisionerConfig = new HashMap<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam,String>(other.sshAccountProvisionerConfig.size());
+      for (Map.Entry<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam, String> other_element : other.sshAccountProvisionerConfig.entrySet()) {
+
+        org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam other_element_key = other_element.getKey();
+        String other_element_value = other_element.getValue();
+
+        org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam __this__sshAccountProvisionerConfig_copy_key = new org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam(other_element_key);
+
+        String __this__sshAccountProvisionerConfig_copy_value = other_element_value;
+
+        __this__sshAccountProvisionerConfig.put(__this__sshAccountProvisionerConfig_copy_key, __this__sshAccountProvisionerConfig_copy_value);
+      }
+      this.sshAccountProvisionerConfig = __this__sshAccountProvisionerConfig;
+    }
   }
 
   public ComputeResourcePreference deepCopy() {
@@ -352,6 +386,8 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
     this.reservationStartTime = 0;
     setReservationEndTimeIsSet(false);
     this.reservationEndTime = 0;
+    this.sshAccountProvisioner = null;
+    this.sshAccountProvisionerConfig = null;
   }
 
   public String getComputeResourceId() {
@@ -689,6 +725,63 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESERVATIONENDTIME_ISSET_ID, value);
   }
 
+  public String getSshAccountProvisioner() {
+    return this.sshAccountProvisioner;
+  }
+
+  public void setSshAccountProvisioner(String sshAccountProvisioner) {
+    this.sshAccountProvisioner = sshAccountProvisioner;
+  }
+
+  public void unsetSshAccountProvisioner() {
+    this.sshAccountProvisioner = null;
+  }
+
+  /** Returns true if field sshAccountProvisioner is set (has been assigned a value) and false otherwise */
+  public boolean isSetSshAccountProvisioner() {
+    return this.sshAccountProvisioner != null;
+  }
+
+  public void setSshAccountProvisionerIsSet(boolean value) {
+    if (!value) {
+      this.sshAccountProvisioner = null;
+    }
+  }
+
+  public int getSshAccountProvisionerConfigSize() {
+    return (this.sshAccountProvisionerConfig == null) ? 0 : this.sshAccountProvisionerConfig.size();
+  }
+
+  public void putToSshAccountProvisionerConfig(org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam key, String val) {
+    if (this.sshAccountProvisionerConfig == null) {
+      this.sshAccountProvisionerConfig = new HashMap<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam,String>();
+    }
+    this.sshAccountProvisionerConfig.put(key, val);
+  }
+
+  public Map<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam,String> getSshAccountProvisionerConfig() {
+    return this.sshAccountProvisionerConfig;
+  }
+
+  public void setSshAccountProvisionerConfig(Map<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam,String> sshAccountProvisionerConfig) {
+    this.sshAccountProvisionerConfig = sshAccountProvisionerConfig;
+  }
+
+  public void unsetSshAccountProvisionerConfig() {
+    this.sshAccountProvisionerConfig = null;
+  }
+
+  /** Returns true if field sshAccountProvisionerConfig is set (has been assigned a value) and false otherwise */
+  public boolean isSetSshAccountProvisionerConfig() {
+    return this.sshAccountProvisionerConfig != null;
+  }
+
+  public void setSshAccountProvisionerConfigIsSet(boolean value) {
+    if (!value) {
+      this.sshAccountProvisionerConfig = null;
+    }
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case COMPUTE_RESOURCE_ID:
@@ -803,6 +896,22 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
       }
       break;
 
+    case SSH_ACCOUNT_PROVISIONER:
+      if (value == null) {
+        unsetSshAccountProvisioner();
+      } else {
+        setSshAccountProvisioner((String)value);
+      }
+      break;
+
+    case SSH_ACCOUNT_PROVISIONER_CONFIG:
+      if (value == null) {
+        unsetSshAccountProvisionerConfig();
+      } else {
+        setSshAccountProvisionerConfig((Map<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam,String>)value);
+      }
+      break;
+
     }
   }
 
@@ -850,6 +959,12 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
     case RESERVATION_END_TIME:
       return getReservationEndTime();
 
+    case SSH_ACCOUNT_PROVISIONER:
+      return getSshAccountProvisioner();
+
+    case SSH_ACCOUNT_PROVISIONER_CONFIG:
+      return getSshAccountProvisionerConfig();
+
     }
     throw new IllegalStateException();
   }
@@ -889,6 +1004,10 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
       return isSetReservationStartTime();
     case RESERVATION_END_TIME:
       return isSetReservationEndTime();
+    case SSH_ACCOUNT_PROVISIONER:
+      return isSetSshAccountProvisioner();
+    case SSH_ACCOUNT_PROVISIONER_CONFIG:
+      return isSetSshAccountProvisionerConfig();
     }
     throw new IllegalStateException();
   }
@@ -1032,6 +1151,24 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
         return false;
     }
 
+    boolean this_present_sshAccountProvisioner = true && this.isSetSshAccountProvisioner();
+    boolean that_present_sshAccountProvisioner = true && that.isSetSshAccountProvisioner();
+    if (this_present_sshAccountProvisioner || that_present_sshAccountProvisioner) {
+      if (!(this_present_sshAccountProvisioner && that_present_sshAccountProvisioner))
+        return false;
+      if (!this.sshAccountProvisioner.equals(that.sshAccountProvisioner))
+        return false;
+    }
+
+    boolean this_present_sshAccountProvisionerConfig = true && this.isSetSshAccountProvisionerConfig();
+    boolean that_present_sshAccountProvisionerConfig = true && that.isSetSshAccountProvisionerConfig();
+    if (this_present_sshAccountProvisionerConfig || that_present_sshAccountProvisionerConfig) {
+      if (!(this_present_sshAccountProvisionerConfig && that_present_sshAccountProvisionerConfig))
+        return false;
+      if (!this.sshAccountProvisionerConfig.equals(that.sshAccountProvisionerConfig))
+        return false;
+    }
+
     return true;
   }
 
@@ -1109,6 +1246,16 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
     if (present_reservationEndTime)
       list.add(reservationEndTime);
 
+    boolean present_sshAccountProvisioner = true && (isSetSshAccountProvisioner());
+    list.add(present_sshAccountProvisioner);
+    if (present_sshAccountProvisioner)
+      list.add(sshAccountProvisioner);
+
+    boolean present_sshAccountProvisionerConfig = true && (isSetSshAccountProvisionerConfig());
+    list.add(present_sshAccountProvisionerConfig);
+    if (present_sshAccountProvisionerConfig)
+      list.add(sshAccountProvisionerConfig);
+
     return list.hashCode();
   }
 
@@ -1260,6 +1407,26 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetSshAccountProvisioner()).compareTo(other.isSetSshAccountProvisioner());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetSshAccountProvisioner()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sshAccountProvisioner, other.sshAccountProvisioner);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetSshAccountProvisionerConfig()).compareTo(other.isSetSshAccountProvisionerConfig());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetSshAccountProvisionerConfig()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sshAccountProvisionerConfig, other.sshAccountProvisionerConfig);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -1403,6 +1570,26 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
       sb.append(this.reservationEndTime);
       first = false;
     }
+    if (isSetSshAccountProvisioner()) {
+      if (!first) sb.append(", ");
+      sb.append("sshAccountProvisioner:");
+      if (this.sshAccountProvisioner == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.sshAccountProvisioner);
+      }
+      first = false;
+    }
+    if (isSetSshAccountProvisionerConfig()) {
+      if (!first) sb.append(", ");
+      sb.append("sshAccountProvisionerConfig:");
+      if (this.sshAccountProvisionerConfig == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.sshAccountProvisionerConfig);
+      }
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }
@@ -1568,6 +1755,35 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
+          case 15: // SSH_ACCOUNT_PROVISIONER
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.sshAccountProvisioner = iprot.readString();
+              struct.setSshAccountProvisionerIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 16: // SSH_ACCOUNT_PROVISIONER_CONFIG
+            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+              {
+                org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
+                struct.sshAccountProvisionerConfig = new HashMap<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam,String>(2*_map0.size);
+                org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam _key1;
+                String _val2;
+                for (int _i3 = 0; _i3 < _map0.size; ++_i3)
+                {
+                  _key1 = new org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam();
+                  _key1.read(iprot);
+                  _val2 = iprot.readString();
+                  struct.sshAccountProvisionerConfig.put(_key1, _val2);
+                }
+                iprot.readMapEnd();
+              }
+              struct.setSshAccountProvisionerConfigIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -1669,6 +1885,28 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
         oprot.writeI64(struct.reservationEndTime);
         oprot.writeFieldEnd();
       }
+      if (struct.sshAccountProvisioner != null) {
+        if (struct.isSetSshAccountProvisioner()) {
+          oprot.writeFieldBegin(SSH_ACCOUNT_PROVISIONER_FIELD_DESC);
+          oprot.writeString(struct.sshAccountProvisioner);
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.sshAccountProvisionerConfig != null) {
+        if (struct.isSetSshAccountProvisionerConfig()) {
+          oprot.writeFieldBegin(SSH_ACCOUNT_PROVISIONER_CONFIG_FIELD_DESC);
+          {
+            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.STRING, struct.sshAccountProvisionerConfig.size()));
+            for (Map.Entry<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam, String> _iter4 : struct.sshAccountProvisionerConfig.entrySet())
+            {
+              _iter4.getKey().write(oprot);
+              oprot.writeString(_iter4.getValue());
+            }
+            oprot.writeMapEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -1725,7 +1963,13 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
       if (struct.isSetReservationEndTime()) {
         optionals.set(11);
       }
-      oprot.writeBitSet(optionals, 12);
+      if (struct.isSetSshAccountProvisioner()) {
+        optionals.set(12);
+      }
+      if (struct.isSetSshAccountProvisionerConfig()) {
+        optionals.set(13);
+      }
+      oprot.writeBitSet(optionals, 14);
       if (struct.isSetLoginUserName()) {
         oprot.writeString(struct.loginUserName);
       }
@@ -1762,6 +2006,19 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
       if (struct.isSetReservationEndTime()) {
         oprot.writeI64(struct.reservationEndTime);
       }
+      if (struct.isSetSshAccountProvisioner()) {
+        oprot.writeString(struct.sshAccountProvisioner);
+      }
+      if (struct.isSetSshAccountProvisionerConfig()) {
+        {
+          oprot.writeI32(struct.sshAccountProvisionerConfig.size());
+          for (Map.Entry<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam, String> _iter5 : struct.sshAccountProvisionerConfig.entrySet())
+          {
+            _iter5.getKey().write(oprot);
+            oprot.writeString(_iter5.getValue());
+          }
+        }
+      }
     }
 
     @Override
@@ -1771,7 +2028,7 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
       struct.setComputeResourceIdIsSet(true);
       struct.overridebyAiravata = iprot.readBool();
       struct.setOverridebyAiravataIsSet(true);
-      BitSet incoming = iprot.readBitSet(12);
+      BitSet incoming = iprot.readBitSet(14);
       if (incoming.get(0)) {
         struct.loginUserName = iprot.readString();
         struct.setLoginUserNameIsSet(true);
@@ -1820,6 +2077,26 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
         struct.reservationEndTime = iprot.readI64();
         struct.setReservationEndTimeIsSet(true);
       }
+      if (incoming.get(12)) {
+        struct.sshAccountProvisioner = iprot.readString();
+        struct.setSshAccountProvisionerIsSet(true);
+      }
+      if (incoming.get(13)) {
+        {
+          org.apache.thrift.protocol.TMap _map6 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.sshAccountProvisionerConfig = new HashMap<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam,String>(2*_map6.size);
+          org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam _key7;
+          String _val8;
+          for (int _i9 = 0; _i9 < _map6.size; ++_i9)
+          {
+            _key7 = new org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam();
+            _key7.read(iprot);
+            _val8 = iprot.readString();
+            struct.sshAccountProvisionerConfig.put(_key7, _val8);
+          }
+        }
+        struct.setSshAccountProvisionerConfigIsSet(true);
+      }
     }
   }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/2a901394/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/GatewayResourceProfile.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/GatewayResourceProfile.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/GatewayResourceProfile.java
index 31f33f6..725bf43 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/GatewayResourceProfile.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/GatewayResourceProfile.java
@@ -830,14 +830,14 @@ public class GatewayResourceProfile implements org.apache.thrift.TBase<GatewayRe
           case 3: // COMPUTE_RESOURCE_PREFERENCES
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
-                struct.computeResourcePreferences = new ArrayList<ComputeResourcePreference>(_list0.size);
-                ComputeResourcePreference _elem1;
-                for (int _i2 = 0; _i2 < _list0.size; ++_i2)
+                org.apache.thrift.protocol.TList _list10 = iprot.readListBegin();
+                struct.computeResourcePreferences = new ArrayList<ComputeResourcePreference>(_list10.size);
+                ComputeResourcePreference _elem11;
+                for (int _i12 = 0; _i12 < _list10.size; ++_i12)
                 {
-                  _elem1 = new ComputeResourcePreference();
-                  _elem1.read(iprot);
-                  struct.computeResourcePreferences.add(_elem1);
+                  _elem11 = new ComputeResourcePreference();
+                  _elem11.read(iprot);
+                  struct.computeResourcePreferences.add(_elem11);
                 }
                 iprot.readListEnd();
               }
@@ -849,14 +849,14 @@ public class GatewayResourceProfile implements org.apache.thrift.TBase<GatewayRe
           case 4: // STORAGE_PREFERENCES
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
-                struct.storagePreferences = new ArrayList<StoragePreference>(_list3.size);
-                StoragePreference _elem4;
-                for (int _i5 = 0; _i5 < _list3.size; ++_i5)
+                org.apache.thrift.protocol.TList _list13 = iprot.readListBegin();
+                struct.storagePreferences = new ArrayList<StoragePreference>(_list13.size);
+                StoragePreference _elem14;
+                for (int _i15 = 0; _i15 < _list13.size; ++_i15)
                 {
-                  _elem4 = new StoragePreference();
-                  _elem4.read(iprot);
-                  struct.storagePreferences.add(_elem4);
+                  _elem14 = new StoragePreference();
+                  _elem14.read(iprot);
+                  struct.storagePreferences.add(_elem14);
                 }
                 iprot.readListEnd();
               }
@@ -911,9 +911,9 @@ public class GatewayResourceProfile implements org.apache.thrift.TBase<GatewayRe
           oprot.writeFieldBegin(COMPUTE_RESOURCE_PREFERENCES_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.computeResourcePreferences.size()));
-            for (ComputeResourcePreference _iter6 : struct.computeResourcePreferences)
+            for (ComputeResourcePreference _iter16 : struct.computeResourcePreferences)
             {
-              _iter6.write(oprot);
+              _iter16.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -925,9 +925,9 @@ public class GatewayResourceProfile implements org.apache.thrift.TBase<GatewayRe
           oprot.writeFieldBegin(STORAGE_PREFERENCES_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.storagePreferences.size()));
-            for (StoragePreference _iter7 : struct.storagePreferences)
+            for (StoragePreference _iter17 : struct.storagePreferences)
             {
-              _iter7.write(oprot);
+              _iter17.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -989,18 +989,18 @@ public class GatewayResourceProfile implements org.apache.thrift.TBase<GatewayRe
       if (struct.isSetComputeResourcePreferences()) {
         {
           oprot.writeI32(struct.computeResourcePreferences.size());
-          for (ComputeResourcePreference _iter8 : struct.computeResourcePreferences)
+          for (ComputeResourcePreference _iter18 : struct.computeResourcePreferences)
           {
-            _iter8.write(oprot);
+            _iter18.write(oprot);
           }
         }
       }
       if (struct.isSetStoragePreferences()) {
         {
           oprot.writeI32(struct.storagePreferences.size());
-          for (StoragePreference _iter9 : struct.storagePreferences)
+          for (StoragePreference _iter19 : struct.storagePreferences)
           {
-            _iter9.write(oprot);
+            _iter19.write(oprot);
           }
         }
       }
@@ -1024,28 +1024,28 @@ public class GatewayResourceProfile implements org.apache.thrift.TBase<GatewayRe
       }
       if (incoming.get(1)) {
         {
-          org.apache.thrift.protocol.TList _list10 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.computeResourcePreferences = new ArrayList<ComputeResourcePreference>(_list10.size);
-          ComputeResourcePreference _elem11;
-          for (int _i12 = 0; _i12 < _list10.size; ++_i12)
+          org.apache.thrift.protocol.TList _list20 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.computeResourcePreferences = new ArrayList<ComputeResourcePreference>(_list20.size);
+          ComputeResourcePreference _elem21;
+          for (int _i22 = 0; _i22 < _list20.size; ++_i22)
           {
-            _elem11 = new ComputeResourcePreference();
-            _elem11.read(iprot);
-            struct.computeResourcePreferences.add(_elem11);
+            _elem21 = new ComputeResourcePreference();
+            _elem21.read(iprot);
+            struct.computeResourcePreferences.add(_elem21);
           }
         }
         struct.setComputeResourcePreferencesIsSet(true);
       }
       if (incoming.get(2)) {
         {
-          org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.storagePreferences = new ArrayList<StoragePreference>(_list13.size);
-          StoragePreference _elem14;
-          for (int _i15 = 0; _i15 < _list13.size; ++_i15)
+          org.apache.thrift.protocol.TList _list23 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.storagePreferences = new ArrayList<StoragePreference>(_list23.size);
+          StoragePreference _elem24;
+          for (int _i25 = 0; _i25 < _list23.size; ++_i25)
           {
-            _elem14 = new StoragePreference();
-            _elem14.read(iprot);
-            struct.storagePreferences.add(_elem14);
+            _elem24 = new StoragePreference();
+            _elem24.read(iprot);
+            struct.storagePreferences.add(_elem24);
           }
         }
         struct.setStoragePreferencesIsSet(true);

http://git-wip-us.apache.org/repos/asf/airavata/blob/2a901394/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift b/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift
index 627116e..a6c6ab9 100644
--- a/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift
+++ b/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift
@@ -35,6 +35,6 @@ struct SSHAccountProvisioner {
 struct SSHAccountProvisionerConfigParam {
     1: required string name;
     2: required SSHAccountProvisionerConfigParamType type = SSHAccountProvisionerConfigParamType.STRING;
-    3: required bool optional = false;
+    3: required bool isOptional = false;
     4: optional string description;
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/2a901394/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift b/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
index 6244c28..060442b 100644
--- a/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
+++ b/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
@@ -77,7 +77,7 @@ struct ComputeResourcePreference {
     13: optional i64 reservationStartTime,
     14: optional i64 reservationEndTime,
     15: optional string sshAccountProvisioner,
-    16: optional map<account_provisioning_model.SSHAccountProvisionerConfigParam, String> sshAccountProvisionerConfig
+    16: optional map<account_provisioning_model.SSHAccountProvisionerConfigParam, string> sshAccountProvisionerConfig
 }
 
 struct StoragePreference {


[37/40] airavata git commit: Merge branch 'AIRAVATA-2500' into develop

Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/ebdf8977/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
----------------------------------------------------------------------
diff --cc airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
index 50d368c,d758e9d..3bcd153
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
@@@ -76,24 -103,33 +76,30 @@@ public class ComputeResourcePreference 
    private static final org.apache.thrift.protocol.TField RESERVATION_FIELD_DESC = new org.apache.thrift.protocol.TField("reservation", org.apache.thrift.protocol.TType.STRING, (short)12);
    private static final org.apache.thrift.protocol.TField RESERVATION_START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("reservationStartTime", org.apache.thrift.protocol.TType.I64, (short)13);
    private static final org.apache.thrift.protocol.TField RESERVATION_END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("reservationEndTime", org.apache.thrift.protocol.TType.I64, (short)14);
+   private static final org.apache.thrift.protocol.TField SSH_ACCOUNT_PROVISIONER_FIELD_DESC = new org.apache.thrift.protocol.TField("sshAccountProvisioner", org.apache.thrift.protocol.TType.STRING, (short)15);
+   private static final org.apache.thrift.protocol.TField SSH_ACCOUNT_PROVISIONER_CONFIG_FIELD_DESC = new org.apache.thrift.protocol.TField("sshAccountProvisionerConfig", org.apache.thrift.protocol.TType.MAP, (short)16);
+   private static final org.apache.thrift.protocol.TField SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("sshAccountProvisionerAdditionalInfo", org.apache.thrift.protocol.TType.STRING, (short)17);
  
 -  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
 -  static {
 -    schemes.put(StandardScheme.class, new ComputeResourcePreferenceStandardSchemeFactory());
 -    schemes.put(TupleScheme.class, new ComputeResourcePreferenceTupleSchemeFactory());
 -  }
 +  private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ComputeResourcePreferenceStandardSchemeFactory();
 +  private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ComputeResourcePreferenceTupleSchemeFactory();
  
 -  private String computeResourceId; // required
 +  private java.lang.String computeResourceId; // required
    private boolean overridebyAiravata; // required
 -  private String loginUserName; // optional
 +  private java.lang.String loginUserName; // optional
    private org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol preferredJobSubmissionProtocol; // optional
    private org.apache.airavata.model.data.movement.DataMovementProtocol preferredDataMovementProtocol; // optional
 -  private String preferredBatchQueue; // optional
 -  private String scratchLocation; // optional
 -  private String allocationProjectNumber; // optional
 -  private String resourceSpecificCredentialStoreToken; // optional
 -  private String usageReportingGatewayId; // optional
 -  private String qualityOfService; // optional
 -  private String reservation; // optional
 +  private java.lang.String preferredBatchQueue; // optional
 +  private java.lang.String scratchLocation; // optional
 +  private java.lang.String allocationProjectNumber; // optional
 +  private java.lang.String resourceSpecificCredentialStoreToken; // optional
 +  private java.lang.String usageReportingGatewayId; // optional
 +  private java.lang.String qualityOfService; // optional
 +  private java.lang.String reservation; // optional
    private long reservationStartTime; // optional
    private long reservationEndTime; // optional
 -  private String sshAccountProvisioner; // optional
 -  private Map<String,String> sshAccountProvisionerConfig; // optional
 -  private String sshAccountProvisionerAdditionalInfo; // optional
++  private java.lang.String sshAccountProvisioner; // optional
++  private java.util.Map<java.lang.String,java.lang.String> sshAccountProvisionerConfig; // optional
++  private java.lang.String sshAccountProvisionerAdditionalInfo; // optional
  
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@@ -118,12 -154,15 +124,15 @@@
      QUALITY_OF_SERVICE((short)11, "qualityOfService"),
      RESERVATION((short)12, "reservation"),
      RESERVATION_START_TIME((short)13, "reservationStartTime"),
-     RESERVATION_END_TIME((short)14, "reservationEndTime");
+     RESERVATION_END_TIME((short)14, "reservationEndTime"),
+     SSH_ACCOUNT_PROVISIONER((short)15, "sshAccountProvisioner"),
+     SSH_ACCOUNT_PROVISIONER_CONFIG((short)16, "sshAccountProvisionerConfig"),
+     SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO((short)17, "sshAccountProvisionerAdditionalInfo");
  
 -    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 +    private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
  
      static {
 -      for (_Fields field : EnumSet.allOf(_Fields.class)) {
 +      for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }
@@@ -205,10 -250,10 +220,10 @@@
    private static final int __RESERVATIONSTARTTIME_ISSET_ID = 1;
    private static final int __RESERVATIONENDTIME_ISSET_ID = 2;
    private byte __isset_bitfield = 0;
-   private static final _Fields optionals[] = {_Fields.LOGIN_USER_NAME,_Fields.PREFERRED_JOB_SUBMISSION_PROTOCOL,_Fields.PREFERRED_DATA_MOVEMENT_PROTOCOL,_Fields.PREFERRED_BATCH_QUEUE,_Fields.SCRATCH_LOCATION,_Fields.ALLOCATION_PROJECT_NUMBER,_Fields.RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN,_Fields.USAGE_REPORTING_GATEWAY_ID,_Fields.QUALITY_OF_SERVICE,_Fields.RESERVATION,_Fields.RESERVATION_START_TIME,_Fields.RESERVATION_END_TIME};
+   private static final _Fields optionals[] = {_Fields.LOGIN_USER_NAME,_Fields.PREFERRED_JOB_SUBMISSION_PROTOCOL,_Fields.PREFERRED_DATA_MOVEMENT_PROTOCOL,_Fields.PREFERRED_BATCH_QUEUE,_Fields.SCRATCH_LOCATION,_Fields.ALLOCATION_PROJECT_NUMBER,_Fields.RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN,_Fields.USAGE_REPORTING_GATEWAY_ID,_Fields.QUALITY_OF_SERVICE,_Fields.RESERVATION,_Fields.RESERVATION_START_TIME,_Fields.RESERVATION_END_TIME,_Fields.SSH_ACCOUNT_PROVISIONER,_Fields.SSH_ACCOUNT_PROVISIONER_CONFIG,_Fields.SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO};
 -  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
 +  public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
 -    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
 +    java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.COMPUTE_RESOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("computeResourceId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.OVERRIDEBY_AIRAVATA, new org.apache.thrift.meta_data.FieldMetaData("overridebyAiravata", org.apache.thrift.TFieldRequirementType.REQUIRED, 
@@@ -237,7 -282,15 +252,15 @@@
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.RESERVATION_END_TIME, new org.apache.thrift.meta_data.FieldMetaData("reservationEndTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+     tmpMap.put(_Fields.SSH_ACCOUNT_PROVISIONER, new org.apache.thrift.meta_data.FieldMetaData("sshAccountProvisioner", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+     tmpMap.put(_Fields.SSH_ACCOUNT_PROVISIONER_CONFIG, new org.apache.thrift.meta_data.FieldMetaData("sshAccountProvisionerConfig", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+         new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
+             new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), 
+             new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+     tmpMap.put(_Fields.SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO, new org.apache.thrift.meta_data.FieldMetaData("sshAccountProvisionerAdditionalInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
 -    metaDataMap = Collections.unmodifiableMap(tmpMap);
 +    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ComputeResourcePreference.class, metaDataMap);
    }
  
@@@ -297,6 -350,16 +320,16 @@@
      }
      this.reservationStartTime = other.reservationStartTime;
      this.reservationEndTime = other.reservationEndTime;
+     if (other.isSetSshAccountProvisioner()) {
+       this.sshAccountProvisioner = other.sshAccountProvisioner;
+     }
+     if (other.isSetSshAccountProvisionerConfig()) {
 -      Map<String,String> __this__sshAccountProvisionerConfig = new HashMap<String,String>(other.sshAccountProvisionerConfig);
++      java.util.Map<java.lang.String,java.lang.String> __this__sshAccountProvisionerConfig = new java.util.HashMap<java.lang.String,java.lang.String>(other.sshAccountProvisionerConfig);
+       this.sshAccountProvisionerConfig = __this__sshAccountProvisionerConfig;
+     }
+     if (other.isSetSshAccountProvisionerAdditionalInfo()) {
+       this.sshAccountProvisionerAdditionalInfo = other.sshAccountProvisionerAdditionalInfo;
+     }
    }
  
    public ComputeResourcePreference deepCopy() {
@@@ -322,9 -385,12 +355,12 @@@
      this.reservationStartTime = 0;
      setReservationEndTimeIsSet(false);
      this.reservationEndTime = 0;
+     this.sshAccountProvisioner = null;
+     this.sshAccountProvisionerConfig = null;
+     this.sshAccountProvisionerAdditionalInfo = null;
    }
  
 -  public String getComputeResourceId() {
 +  public java.lang.String getComputeResourceId() {
      return this.computeResourceId;
    }
  
@@@ -656,10 -722,90 +692,90 @@@
    }
  
    public void setReservationEndTimeIsSet(boolean value) {
 -    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESERVATIONENDTIME_ISSET_ID, value);
 +    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RESERVATIONENDTIME_ISSET_ID, value);
    }
  
 -  public String getSshAccountProvisioner() {
++  public java.lang.String getSshAccountProvisioner() {
+     return this.sshAccountProvisioner;
+   }
+ 
 -  public void setSshAccountProvisioner(String sshAccountProvisioner) {
++  public void setSshAccountProvisioner(java.lang.String sshAccountProvisioner) {
+     this.sshAccountProvisioner = sshAccountProvisioner;
+   }
+ 
+   public void unsetSshAccountProvisioner() {
+     this.sshAccountProvisioner = null;
+   }
+ 
+   /** Returns true if field sshAccountProvisioner is set (has been assigned a value) and false otherwise */
+   public boolean isSetSshAccountProvisioner() {
+     return this.sshAccountProvisioner != null;
+   }
+ 
+   public void setSshAccountProvisionerIsSet(boolean value) {
+     if (!value) {
+       this.sshAccountProvisioner = null;
+     }
+   }
+ 
+   public int getSshAccountProvisionerConfigSize() {
+     return (this.sshAccountProvisionerConfig == null) ? 0 : this.sshAccountProvisionerConfig.size();
+   }
+ 
 -  public void putToSshAccountProvisionerConfig(String key, String val) {
++  public void putToSshAccountProvisionerConfig(java.lang.String key, java.lang.String val) {
+     if (this.sshAccountProvisionerConfig == null) {
 -      this.sshAccountProvisionerConfig = new HashMap<String,String>();
++      this.sshAccountProvisionerConfig = new java.util.HashMap<java.lang.String,java.lang.String>();
+     }
+     this.sshAccountProvisionerConfig.put(key, val);
+   }
+ 
 -  public Map<String,String> getSshAccountProvisionerConfig() {
++  public java.util.Map<java.lang.String,java.lang.String> getSshAccountProvisionerConfig() {
+     return this.sshAccountProvisionerConfig;
+   }
+ 
 -  public void setSshAccountProvisionerConfig(Map<String,String> sshAccountProvisionerConfig) {
++  public void setSshAccountProvisionerConfig(java.util.Map<java.lang.String,java.lang.String> sshAccountProvisionerConfig) {
+     this.sshAccountProvisionerConfig = sshAccountProvisionerConfig;
+   }
+ 
+   public void unsetSshAccountProvisionerConfig() {
+     this.sshAccountProvisionerConfig = null;
+   }
+ 
+   /** Returns true if field sshAccountProvisionerConfig is set (has been assigned a value) and false otherwise */
+   public boolean isSetSshAccountProvisionerConfig() {
+     return this.sshAccountProvisionerConfig != null;
+   }
+ 
+   public void setSshAccountProvisionerConfigIsSet(boolean value) {
+     if (!value) {
+       this.sshAccountProvisionerConfig = null;
+     }
+   }
+ 
 -  public String getSshAccountProvisionerAdditionalInfo() {
++  public java.lang.String getSshAccountProvisionerAdditionalInfo() {
+     return this.sshAccountProvisionerAdditionalInfo;
+   }
+ 
 -  public void setSshAccountProvisionerAdditionalInfo(String sshAccountProvisionerAdditionalInfo) {
++  public void setSshAccountProvisionerAdditionalInfo(java.lang.String sshAccountProvisionerAdditionalInfo) {
+     this.sshAccountProvisionerAdditionalInfo = sshAccountProvisionerAdditionalInfo;
+   }
+ 
+   public void unsetSshAccountProvisionerAdditionalInfo() {
+     this.sshAccountProvisionerAdditionalInfo = null;
+   }
+ 
+   /** Returns true if field sshAccountProvisionerAdditionalInfo is set (has been assigned a value) and false otherwise */
+   public boolean isSetSshAccountProvisionerAdditionalInfo() {
+     return this.sshAccountProvisionerAdditionalInfo != null;
+   }
+ 
+   public void setSshAccountProvisionerAdditionalInfoIsSet(boolean value) {
+     if (!value) {
+       this.sshAccountProvisionerAdditionalInfo = null;
+     }
+   }
+ 
 -  public void setFieldValue(_Fields field, Object value) {
 +  public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
      case COMPUTE_RESOURCE_ID:
        if (value == null) {
@@@ -773,6 -919,30 +889,30 @@@
        }
        break;
  
+     case SSH_ACCOUNT_PROVISIONER:
+       if (value == null) {
+         unsetSshAccountProvisioner();
+       } else {
 -        setSshAccountProvisioner((String)value);
++        setSshAccountProvisioner((java.lang.String)value);
+       }
+       break;
+ 
+     case SSH_ACCOUNT_PROVISIONER_CONFIG:
+       if (value == null) {
+         unsetSshAccountProvisionerConfig();
+       } else {
 -        setSshAccountProvisionerConfig((Map<String,String>)value);
++        setSshAccountProvisionerConfig((java.util.Map<java.lang.String,java.lang.String>)value);
+       }
+       break;
+ 
+     case SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO:
+       if (value == null) {
+         unsetSshAccountProvisionerAdditionalInfo();
+       } else {
 -        setSshAccountProvisionerAdditionalInfo((String)value);
++        setSshAccountProvisionerAdditionalInfo((java.lang.String)value);
+       }
+       break;
+ 
      }
    }
  
@@@ -820,8 -990,17 +960,17 @@@
      case RESERVATION_END_TIME:
        return getReservationEndTime();
  
+     case SSH_ACCOUNT_PROVISIONER:
+       return getSshAccountProvisioner();
+ 
+     case SSH_ACCOUNT_PROVISIONER_CONFIG:
+       return getSshAccountProvisionerConfig();
+ 
+     case SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO:
+       return getSshAccountProvisionerAdditionalInfo();
+ 
      }
 -    throw new IllegalStateException();
 +    throw new java.lang.IllegalStateException();
    }
  
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@@@ -859,8 -1038,14 +1008,14 @@@
        return isSetReservationStartTime();
      case RESERVATION_END_TIME:
        return isSetReservationEndTime();
+     case SSH_ACCOUNT_PROVISIONER:
+       return isSetSshAccountProvisioner();
+     case SSH_ACCOUNT_PROVISIONER_CONFIG:
+       return isSetSshAccountProvisionerConfig();
+     case SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO:
+       return isSetSshAccountProvisionerAdditionalInfo();
      }
 -    throw new IllegalStateException();
 +    throw new java.lang.IllegalStateException();
    }
  
    @Override
@@@ -1009,63 -1219,94 +1191,75 @@@
  
    @Override
    public int hashCode() {
 -    List<Object> list = new ArrayList<Object>();
 -
 -    boolean present_computeResourceId = true && (isSetComputeResourceId());
 -    list.add(present_computeResourceId);
 -    if (present_computeResourceId)
 -      list.add(computeResourceId);
 -
 -    boolean present_overridebyAiravata = true;
 -    list.add(present_overridebyAiravata);
 -    if (present_overridebyAiravata)
 -      list.add(overridebyAiravata);
 -
 -    boolean present_loginUserName = true && (isSetLoginUserName());
 -    list.add(present_loginUserName);
 -    if (present_loginUserName)
 -      list.add(loginUserName);
 -
 -    boolean present_preferredJobSubmissionProtocol = true && (isSetPreferredJobSubmissionProtocol());
 -    list.add(present_preferredJobSubmissionProtocol);
 -    if (present_preferredJobSubmissionProtocol)
 -      list.add(preferredJobSubmissionProtocol.getValue());
 -
 -    boolean present_preferredDataMovementProtocol = true && (isSetPreferredDataMovementProtocol());
 -    list.add(present_preferredDataMovementProtocol);
 -    if (present_preferredDataMovementProtocol)
 -      list.add(preferredDataMovementProtocol.getValue());
 -
 -    boolean present_preferredBatchQueue = true && (isSetPreferredBatchQueue());
 -    list.add(present_preferredBatchQueue);
 -    if (present_preferredBatchQueue)
 -      list.add(preferredBatchQueue);
 -
 -    boolean present_scratchLocation = true && (isSetScratchLocation());
 -    list.add(present_scratchLocation);
 -    if (present_scratchLocation)
 -      list.add(scratchLocation);
 -
 -    boolean present_allocationProjectNumber = true && (isSetAllocationProjectNumber());
 -    list.add(present_allocationProjectNumber);
 -    if (present_allocationProjectNumber)
 -      list.add(allocationProjectNumber);
 -
 -    boolean present_resourceSpecificCredentialStoreToken = true && (isSetResourceSpecificCredentialStoreToken());
 -    list.add(present_resourceSpecificCredentialStoreToken);
 -    if (present_resourceSpecificCredentialStoreToken)
 -      list.add(resourceSpecificCredentialStoreToken);
 -
 -    boolean present_usageReportingGatewayId = true && (isSetUsageReportingGatewayId());
 -    list.add(present_usageReportingGatewayId);
 -    if (present_usageReportingGatewayId)
 -      list.add(usageReportingGatewayId);
 -
 -    boolean present_qualityOfService = true && (isSetQualityOfService());
 -    list.add(present_qualityOfService);
 -    if (present_qualityOfService)
 -      list.add(qualityOfService);
 -
 -    boolean present_reservation = true && (isSetReservation());
 -    list.add(present_reservation);
 -    if (present_reservation)
 -      list.add(reservation);
 -
 -    boolean present_reservationStartTime = true && (isSetReservationStartTime());
 -    list.add(present_reservationStartTime);
 -    if (present_reservationStartTime)
 -      list.add(reservationStartTime);
 -
 -    boolean present_reservationEndTime = true && (isSetReservationEndTime());
 -    list.add(present_reservationEndTime);
 -    if (present_reservationEndTime)
 -      list.add(reservationEndTime);
 -
 -    boolean present_sshAccountProvisioner = true && (isSetSshAccountProvisioner());
 -    list.add(present_sshAccountProvisioner);
 -    if (present_sshAccountProvisioner)
 -      list.add(sshAccountProvisioner);
 -
 -    boolean present_sshAccountProvisionerConfig = true && (isSetSshAccountProvisionerConfig());
 -    list.add(present_sshAccountProvisionerConfig);
 -    if (present_sshAccountProvisionerConfig)
 -      list.add(sshAccountProvisionerConfig);
 -
 -    boolean present_sshAccountProvisionerAdditionalInfo = true && (isSetSshAccountProvisionerAdditionalInfo());
 -    list.add(present_sshAccountProvisionerAdditionalInfo);
 -    if (present_sshAccountProvisionerAdditionalInfo)
 -      list.add(sshAccountProvisionerAdditionalInfo);
 -
 -    return list.hashCode();
 +    int hashCode = 1;
 +
 +    hashCode = hashCode * 8191 + ((isSetComputeResourceId()) ? 131071 : 524287);
 +    if (isSetComputeResourceId())
 +      hashCode = hashCode * 8191 + computeResourceId.hashCode();
 +
 +    hashCode = hashCode * 8191 + ((overridebyAiravata) ? 131071 : 524287);
 +
 +    hashCode = hashCode * 8191 + ((isSetLoginUserName()) ? 131071 : 524287);
 +    if (isSetLoginUserName())
 +      hashCode = hashCode * 8191 + loginUserName.hashCode();
 +
 +    hashCode = hashCode * 8191 + ((isSetPreferredJobSubmissionProtocol()) ? 131071 : 524287);
 +    if (isSetPreferredJobSubmissionProtocol())
 +      hashCode = hashCode * 8191 + preferredJobSubmissionProtocol.getValue();
 +
 +    hashCode = hashCode * 8191 + ((isSetPreferredDataMovementProtocol()) ? 131071 : 524287);
 +    if (isSetPreferredDataMovementProtocol())
 +      hashCode = hashCode * 8191 + preferredDataMovementProtocol.getValue();
 +
 +    hashCode = hashCode * 8191 + ((isSetPreferredBatchQueue()) ? 131071 : 524287);
 +    if (isSetPreferredBatchQueue())
 +      hashCode = hashCode * 8191 + preferredBatchQueue.hashCode();
 +
 +    hashCode = hashCode * 8191 + ((isSetScratchLocation()) ? 131071 : 524287);
 +    if (isSetScratchLocation())
 +      hashCode = hashCode * 8191 + scratchLocation.hashCode();
 +
 +    hashCode = hashCode * 8191 + ((isSetAllocationProjectNumber()) ? 131071 : 524287);
 +    if (isSetAllocationProjectNumber())
 +      hashCode = hashCode * 8191 + allocationProjectNumber.hashCode();
 +
 +    hashCode = hashCode * 8191 + ((isSetResourceSpecificCredentialStoreToken()) ? 131071 : 524287);
 +    if (isSetResourceSpecificCredentialStoreToken())
 +      hashCode = hashCode * 8191 + resourceSpecificCredentialStoreToken.hashCode();
 +
 +    hashCode = hashCode * 8191 + ((isSetUsageReportingGatewayId()) ? 131071 : 524287);
 +    if (isSetUsageReportingGatewayId())
 +      hashCode = hashCode * 8191 + usageReportingGatewayId.hashCode();
 +
 +    hashCode = hashCode * 8191 + ((isSetQualityOfService()) ? 131071 : 524287);
 +    if (isSetQualityOfService())
 +      hashCode = hashCode * 8191 + qualityOfService.hashCode();
 +
 +    hashCode = hashCode * 8191 + ((isSetReservation()) ? 131071 : 524287);
 +    if (isSetReservation())
 +      hashCode = hashCode * 8191 + reservation.hashCode();
 +
 +    hashCode = hashCode * 8191 + ((isSetReservationStartTime()) ? 131071 : 524287);
 +    if (isSetReservationStartTime())
 +      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(reservationStartTime);
 +
 +    hashCode = hashCode * 8191 + ((isSetReservationEndTime()) ? 131071 : 524287);
 +    if (isSetReservationEndTime())
 +      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(reservationEndTime);
 +
++    hashCode = hashCode * 8191 + ((isSetSshAccountProvisioner()) ? 131071 : 524287);
++    if (isSetSshAccountProvisioner())
++      hashCode = hashCode * 8191 + sshAccountProvisioner.hashCode();
++
++    hashCode = hashCode * 8191 + ((isSetSshAccountProvisionerConfig()) ? 131071 : 524287);
++    if (isSetSshAccountProvisionerConfig())
++      hashCode = hashCode * 8191 + sshAccountProvisionerConfig.hashCode();
++
++    hashCode = hashCode * 8191 + ((isSetSshAccountProvisionerAdditionalInfo()) ? 131071 : 524287);
++    if (isSetSshAccountProvisionerAdditionalInfo())
++      hashCode = hashCode * 8191 + sshAccountProvisionerAdditionalInfo.hashCode();
++
 +    return hashCode;
    }
  
    @Override
@@@ -1216,6 -1457,36 +1410,36 @@@
          return lastComparison;
        }
      }
 -    lastComparison = Boolean.valueOf(isSetSshAccountProvisioner()).compareTo(other.isSetSshAccountProvisioner());
++    lastComparison = java.lang.Boolean.valueOf(isSetSshAccountProvisioner()).compareTo(other.isSetSshAccountProvisioner());
+     if (lastComparison != 0) {
+       return lastComparison;
+     }
+     if (isSetSshAccountProvisioner()) {
+       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sshAccountProvisioner, other.sshAccountProvisioner);
+       if (lastComparison != 0) {
+         return lastComparison;
+       }
+     }
 -    lastComparison = Boolean.valueOf(isSetSshAccountProvisionerConfig()).compareTo(other.isSetSshAccountProvisionerConfig());
++    lastComparison = java.lang.Boolean.valueOf(isSetSshAccountProvisionerConfig()).compareTo(other.isSetSshAccountProvisionerConfig());
+     if (lastComparison != 0) {
+       return lastComparison;
+     }
+     if (isSetSshAccountProvisionerConfig()) {
+       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sshAccountProvisionerConfig, other.sshAccountProvisionerConfig);
+       if (lastComparison != 0) {
+         return lastComparison;
+       }
+     }
 -    lastComparison = Boolean.valueOf(isSetSshAccountProvisionerAdditionalInfo()).compareTo(other.isSetSshAccountProvisionerAdditionalInfo());
++    lastComparison = java.lang.Boolean.valueOf(isSetSshAccountProvisionerAdditionalInfo()).compareTo(other.isSetSshAccountProvisionerAdditionalInfo());
+     if (lastComparison != 0) {
+       return lastComparison;
+     }
+     if (isSetSshAccountProvisionerAdditionalInfo()) {
+       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sshAccountProvisionerAdditionalInfo, other.sshAccountProvisionerAdditionalInfo);
+       if (lastComparison != 0) {
+         return lastComparison;
+       }
+     }
      return 0;
    }
  
@@@ -1524,6 -1825,42 +1778,42 @@@
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
+           case 15: // SSH_ACCOUNT_PROVISIONER
+             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+               struct.sshAccountProvisioner = iprot.readString();
+               struct.setSshAccountProvisionerIsSet(true);
+             } else { 
+               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+             }
+             break;
+           case 16: // SSH_ACCOUNT_PROVISIONER_CONFIG
+             if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+               {
+                 org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
 -                struct.sshAccountProvisionerConfig = new HashMap<String,String>(2*_map0.size);
 -                String _key1;
 -                String _val2;
++                struct.sshAccountProvisionerConfig = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map0.size);
++                java.lang.String _key1;
++                java.lang.String _val2;
+                 for (int _i3 = 0; _i3 < _map0.size; ++_i3)
+                 {
+                   _key1 = iprot.readString();
+                   _val2 = iprot.readString();
+                   struct.sshAccountProvisionerConfig.put(_key1, _val2);
+                 }
+                 iprot.readMapEnd();
+               }
+               struct.setSshAccountProvisionerConfigIsSet(true);
+             } else { 
+               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+             }
+             break;
+           case 17: // SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO
+             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+               struct.sshAccountProvisionerAdditionalInfo = iprot.readString();
+               struct.setSshAccountProvisionerAdditionalInfoIsSet(true);
+             } else { 
+               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+             }
+             break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
@@@ -1625,6 -1962,35 +1915,35 @@@
          oprot.writeI64(struct.reservationEndTime);
          oprot.writeFieldEnd();
        }
+       if (struct.sshAccountProvisioner != null) {
+         if (struct.isSetSshAccountProvisioner()) {
+           oprot.writeFieldBegin(SSH_ACCOUNT_PROVISIONER_FIELD_DESC);
+           oprot.writeString(struct.sshAccountProvisioner);
+           oprot.writeFieldEnd();
+         }
+       }
+       if (struct.sshAccountProvisionerConfig != null) {
+         if (struct.isSetSshAccountProvisionerConfig()) {
+           oprot.writeFieldBegin(SSH_ACCOUNT_PROVISIONER_CONFIG_FIELD_DESC);
+           {
+             oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.sshAccountProvisionerConfig.size()));
 -            for (Map.Entry<String, String> _iter4 : struct.sshAccountProvisionerConfig.entrySet())
++            for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter4 : struct.sshAccountProvisionerConfig.entrySet())
+             {
+               oprot.writeString(_iter4.getKey());
+               oprot.writeString(_iter4.getValue());
+             }
+             oprot.writeMapEnd();
+           }
+           oprot.writeFieldEnd();
+         }
+       }
+       if (struct.sshAccountProvisionerAdditionalInfo != null) {
+         if (struct.isSetSshAccountProvisionerAdditionalInfo()) {
+           oprot.writeFieldBegin(SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO_FIELD_DESC);
+           oprot.writeString(struct.sshAccountProvisionerAdditionalInfo);
+           oprot.writeFieldEnd();
+         }
+       }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
@@@ -1718,6 -2093,22 +2046,22 @@@
        if (struct.isSetReservationEndTime()) {
          oprot.writeI64(struct.reservationEndTime);
        }
+       if (struct.isSetSshAccountProvisioner()) {
+         oprot.writeString(struct.sshAccountProvisioner);
+       }
+       if (struct.isSetSshAccountProvisionerConfig()) {
+         {
+           oprot.writeI32(struct.sshAccountProvisionerConfig.size());
 -          for (Map.Entry<String, String> _iter5 : struct.sshAccountProvisionerConfig.entrySet())
++          for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter5 : struct.sshAccountProvisionerConfig.entrySet())
+           {
+             oprot.writeString(_iter5.getKey());
+             oprot.writeString(_iter5.getValue());
+           }
+         }
+       }
+       if (struct.isSetSshAccountProvisionerAdditionalInfo()) {
+         oprot.writeString(struct.sshAccountProvisionerAdditionalInfo);
+       }
      }
  
      @Override
@@@ -1727,7 -2118,7 +2071,7 @@@
        struct.setComputeResourceIdIsSet(true);
        struct.overridebyAiravata = iprot.readBool();
        struct.setOverridebyAiravataIsSet(true);
-       java.util.BitSet incoming = iprot.readBitSet(12);
 -      BitSet incoming = iprot.readBitSet(15);
++      java.util.BitSet incoming = iprot.readBitSet(15);
        if (incoming.get(0)) {
          struct.loginUserName = iprot.readString();
          struct.setLoginUserNameIsSet(true);
@@@ -1776,6 -2167,29 +2120,29 @@@
          struct.reservationEndTime = iprot.readI64();
          struct.setReservationEndTimeIsSet(true);
        }
+       if (incoming.get(12)) {
+         struct.sshAccountProvisioner = iprot.readString();
+         struct.setSshAccountProvisionerIsSet(true);
+       }
+       if (incoming.get(13)) {
+         {
+           org.apache.thrift.protocol.TMap _map6 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
 -          struct.sshAccountProvisionerConfig = new HashMap<String,String>(2*_map6.size);
 -          String _key7;
 -          String _val8;
++          struct.sshAccountProvisionerConfig = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map6.size);
++          java.lang.String _key7;
++          java.lang.String _val8;
+           for (int _i9 = 0; _i9 < _map6.size; ++_i9)
+           {
+             _key7 = iprot.readString();
+             _val8 = iprot.readString();
+             struct.sshAccountProvisionerConfig.put(_key7, _val8);
+           }
+         }
+         struct.setSshAccountProvisionerConfigIsSet(true);
+       }
+       if (incoming.get(14)) {
+         struct.sshAccountProvisionerAdditionalInfo = iprot.readString();
+         struct.setSshAccountProvisionerAdditionalInfoIsSet(true);
+       }
      }
    }
  

http://git-wip-us.apache.org/repos/asf/airavata/blob/ebdf8977/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/GatewayResourceProfile.java
----------------------------------------------------------------------
diff --cc airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/GatewayResourceProfile.java
index cb2f0fb,725bf43..7ed1054
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/GatewayResourceProfile.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/GatewayResourceProfile.java
@@@ -796,14 -830,14 +796,14 @@@ public class GatewayResourceProfile imp
            case 3: // COMPUTE_RESOURCE_PREFERENCES
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
-                 org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
-                 struct.computeResourcePreferences = new java.util.ArrayList<ComputeResourcePreference>(_list0.size);
-                 ComputeResourcePreference _elem1;
-                 for (int _i2 = 0; _i2 < _list0.size; ++_i2)
+                 org.apache.thrift.protocol.TList _list10 = iprot.readListBegin();
 -                struct.computeResourcePreferences = new ArrayList<ComputeResourcePreference>(_list10.size);
++                struct.computeResourcePreferences = new java.util.ArrayList<ComputeResourcePreference>(_list10.size);
+                 ComputeResourcePreference _elem11;
+                 for (int _i12 = 0; _i12 < _list10.size; ++_i12)
                  {
-                   _elem1 = new ComputeResourcePreference();
-                   _elem1.read(iprot);
-                   struct.computeResourcePreferences.add(_elem1);
+                   _elem11 = new ComputeResourcePreference();
+                   _elem11.read(iprot);
+                   struct.computeResourcePreferences.add(_elem11);
                  }
                  iprot.readListEnd();
                }
@@@ -815,14 -849,14 +815,14 @@@
            case 4: // STORAGE_PREFERENCES
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
-                 org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
-                 struct.storagePreferences = new java.util.ArrayList<StoragePreference>(_list3.size);
-                 StoragePreference _elem4;
-                 for (int _i5 = 0; _i5 < _list3.size; ++_i5)
+                 org.apache.thrift.protocol.TList _list13 = iprot.readListBegin();
 -                struct.storagePreferences = new ArrayList<StoragePreference>(_list13.size);
++                struct.storagePreferences = new java.util.ArrayList<StoragePreference>(_list13.size);
+                 StoragePreference _elem14;
+                 for (int _i15 = 0; _i15 < _list13.size; ++_i15)
                  {
-                   _elem4 = new StoragePreference();
-                   _elem4.read(iprot);
-                   struct.storagePreferences.add(_elem4);
+                   _elem14 = new StoragePreference();
+                   _elem14.read(iprot);
+                   struct.storagePreferences.add(_elem14);
                  }
                  iprot.readListEnd();
                }
@@@ -990,28 -1024,28 +990,28 @@@
        }
        if (incoming.get(1)) {
          {
-           org.apache.thrift.protocol.TList _list10 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-           struct.computeResourcePreferences = new java.util.ArrayList<ComputeResourcePreference>(_list10.size);
-           ComputeResourcePreference _elem11;
-           for (int _i12 = 0; _i12 < _list10.size; ++_i12)
+           org.apache.thrift.protocol.TList _list20 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
 -          struct.computeResourcePreferences = new ArrayList<ComputeResourcePreference>(_list20.size);
++          struct.computeResourcePreferences = new java.util.ArrayList<ComputeResourcePreference>(_list20.size);
+           ComputeResourcePreference _elem21;
+           for (int _i22 = 0; _i22 < _list20.size; ++_i22)
            {
-             _elem11 = new ComputeResourcePreference();
-             _elem11.read(iprot);
-             struct.computeResourcePreferences.add(_elem11);
+             _elem21 = new ComputeResourcePreference();
+             _elem21.read(iprot);
+             struct.computeResourcePreferences.add(_elem21);
            }
          }
          struct.setComputeResourcePreferencesIsSet(true);
        }
        if (incoming.get(2)) {
          {
-           org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-           struct.storagePreferences = new java.util.ArrayList<StoragePreference>(_list13.size);
-           StoragePreference _elem14;
-           for (int _i15 = 0; _i15 < _list13.size; ++_i15)
+           org.apache.thrift.protocol.TList _list23 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
 -          struct.storagePreferences = new ArrayList<StoragePreference>(_list23.size);
++          struct.storagePreferences = new java.util.ArrayList<StoragePreference>(_list23.size);
+           StoragePreference _elem24;
+           for (int _i25 = 0; _i25 < _list23.size; ++_i25)
            {
-             _elem14 = new StoragePreference();
-             _elem14.read(iprot);
-             struct.storagePreferences.add(_elem14);
+             _elem24 = new StoragePreference();
+             _elem24.read(iprot);
+             struct.storagePreferences.add(_elem24);
            }
          }
          struct.setStoragePreferencesIsSet(true);

http://git-wip-us.apache.org/repos/asf/airavata/blob/ebdf8977/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/userresourceprofile/UserComputeResourcePreference.java
----------------------------------------------------------------------
diff --cc airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/userresourceprofile/UserComputeResourcePreference.java
index c4a179c,674b5c3..1f30554
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/userresourceprofile/UserComputeResourcePreference.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/userresourceprofile/UserComputeResourcePreference.java
@@@ -50,8 -77,13 +50,13 @@@ package org.apache.airavata.model.appca
   *  Resource specific credential store token. If this token is specified, then it is superceeded by the gateway's
   *   default credential store.
   * 
+  * validated:
+  *  If true the the configuration has been validated in the sense that the username and credential can be used to
+  *  login to the remote host and the scratchLocation is a valid location that the user has permission to write to.
+  *  Should be treated as read-only and only mutated by Airavata middleware.
+  * 
   */
 -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
  public class UserComputeResourcePreference implements org.apache.thrift.TBase<UserComputeResourcePreference, UserComputeResourcePreference._Fields>, java.io.Serializable, Cloneable, Comparable<UserComputeResourcePreference> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UserComputeResourcePreference");
  
@@@ -65,20 -97,25 +70,22 @@@
    private static final org.apache.thrift.protocol.TField RESERVATION_FIELD_DESC = new org.apache.thrift.protocol.TField("reservation", org.apache.thrift.protocol.TType.STRING, (short)8);
    private static final org.apache.thrift.protocol.TField RESERVATION_START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("reservationStartTime", org.apache.thrift.protocol.TType.I64, (short)9);
    private static final org.apache.thrift.protocol.TField RESERVATION_END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("reservationEndTime", org.apache.thrift.protocol.TType.I64, (short)10);
+   private static final org.apache.thrift.protocol.TField VALIDATED_FIELD_DESC = new org.apache.thrift.protocol.TField("validated", org.apache.thrift.protocol.TType.BOOL, (short)11);
  
 -  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
 -  static {
 -    schemes.put(StandardScheme.class, new UserComputeResourcePreferenceStandardSchemeFactory());
 -    schemes.put(TupleScheme.class, new UserComputeResourcePreferenceTupleSchemeFactory());
 -  }
 -
 -  private String computeResourceId; // required
 -  private String loginUserName; // optional
 -  private String preferredBatchQueue; // optional
 -  private String scratchLocation; // optional
 -  private String allocationProjectNumber; // optional
 -  private String resourceSpecificCredentialStoreToken; // optional
 -  private String qualityOfService; // optional
 -  private String reservation; // optional
 +  private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new UserComputeResourcePreferenceStandardSchemeFactory();
 +  private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new UserComputeResourcePreferenceTupleSchemeFactory();
 +
 +  private java.lang.String computeResourceId; // required
 +  private java.lang.String loginUserName; // optional
 +  private java.lang.String preferredBatchQueue; // optional
 +  private java.lang.String scratchLocation; // optional
 +  private java.lang.String allocationProjectNumber; // optional
 +  private java.lang.String resourceSpecificCredentialStoreToken; // optional
 +  private java.lang.String qualityOfService; // optional
 +  private java.lang.String reservation; // optional
    private long reservationStartTime; // optional
    private long reservationEndTime; // optional
+   private boolean validated; // optional
  
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@@ -91,12 -128,13 +98,13 @@@
      QUALITY_OF_SERVICE((short)7, "qualityOfService"),
      RESERVATION((short)8, "reservation"),
      RESERVATION_START_TIME((short)9, "reservationStartTime"),
-     RESERVATION_END_TIME((short)10, "reservationEndTime");
+     RESERVATION_END_TIME((short)10, "reservationEndTime"),
+     VALIDATED((short)11, "validated");
  
 -    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 +    private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
  
      static {
 -      for (_Fields field : EnumSet.allOf(_Fields.class)) {
 +      for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }
@@@ -168,11 -208,12 +178,12 @@@
    // isset id assignments
    private static final int __RESERVATIONSTARTTIME_ISSET_ID = 0;
    private static final int __RESERVATIONENDTIME_ISSET_ID = 1;
+   private static final int __VALIDATED_ISSET_ID = 2;
    private byte __isset_bitfield = 0;
-   private static final _Fields optionals[] = {_Fields.LOGIN_USER_NAME,_Fields.PREFERRED_BATCH_QUEUE,_Fields.SCRATCH_LOCATION,_Fields.ALLOCATION_PROJECT_NUMBER,_Fields.RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN,_Fields.QUALITY_OF_SERVICE,_Fields.RESERVATION,_Fields.RESERVATION_START_TIME,_Fields.RESERVATION_END_TIME};
+   private static final _Fields optionals[] = {_Fields.LOGIN_USER_NAME,_Fields.PREFERRED_BATCH_QUEUE,_Fields.SCRATCH_LOCATION,_Fields.ALLOCATION_PROJECT_NUMBER,_Fields.RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN,_Fields.QUALITY_OF_SERVICE,_Fields.RESERVATION,_Fields.RESERVATION_START_TIME,_Fields.RESERVATION_END_TIME,_Fields.VALIDATED};
 -  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
 +  public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
 -    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
 +    java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.COMPUTE_RESOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("computeResourceId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.LOGIN_USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("loginUserName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
@@@ -193,7 -234,9 +204,9 @@@
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.RESERVATION_END_TIME, new org.apache.thrift.meta_data.FieldMetaData("reservationEndTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+     tmpMap.put(_Fields.VALIDATED, new org.apache.thrift.meta_data.FieldMetaData("validated", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
 -    metaDataMap = Collections.unmodifiableMap(tmpMap);
 +    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UserComputeResourcePreference.class, metaDataMap);
    }
  
@@@ -258,9 -304,11 +274,11 @@@
      this.reservationStartTime = 0;
      setReservationEndTimeIsSet(false);
      this.reservationEndTime = 0;
+     this.validated = false;
+ 
    }
  
 -  public String getComputeResourceId() {
 +  public java.lang.String getComputeResourceId() {
      return this.computeResourceId;
    }
  
@@@ -485,10 -533,32 +503,32 @@@
    }
  
    public void setReservationEndTimeIsSet(boolean value) {
 -    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESERVATIONENDTIME_ISSET_ID, value);
 +    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RESERVATIONENDTIME_ISSET_ID, value);
    }
  
+   public boolean isValidated() {
+     return this.validated;
+   }
+ 
+   public void setValidated(boolean validated) {
+     this.validated = validated;
+     setValidatedIsSet(true);
+   }
+ 
+   public void unsetValidated() {
 -    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VALIDATED_ISSET_ID);
++    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __VALIDATED_ISSET_ID);
+   }
+ 
+   /** Returns true if field validated is set (has been assigned a value) and false otherwise */
+   public boolean isSetValidated() {
 -    return EncodingUtils.testBit(__isset_bitfield, __VALIDATED_ISSET_ID);
++    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __VALIDATED_ISSET_ID);
+   }
+ 
+   public void setValidatedIsSet(boolean value) {
 -    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VALIDATED_ISSET_ID, value);
++    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __VALIDATED_ISSET_ID, value);
+   }
+ 
 -  public void setFieldValue(_Fields field, Object value) {
 +  public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
      case COMPUTE_RESOURCE_ID:
        if (value == null) {
@@@ -570,6 -640,14 +610,14 @@@
        }
        break;
  
+     case VALIDATED:
+       if (value == null) {
+         unsetValidated();
+       } else {
 -        setValidated((Boolean)value);
++        setValidated((java.lang.Boolean)value);
+       }
+       break;
+ 
      }
    }
  
@@@ -605,8 -683,11 +653,11 @@@
      case RESERVATION_END_TIME:
        return getReservationEndTime();
  
+     case VALIDATED:
+       return isValidated();
+ 
      }
 -    throw new IllegalStateException();
 +    throw new java.lang.IllegalStateException();
    }
  
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@@@ -636,8 -717,10 +687,10 @@@
        return isSetReservationStartTime();
      case RESERVATION_END_TIME:
        return isSetReservationEndTime();
+     case VALIDATED:
+       return isSetValidated();
      }
 -    throw new IllegalStateException();
 +    throw new java.lang.IllegalStateException();
    }
  
    @Override
@@@ -750,49 -840,64 +812,53 @@@
  
    @Override
    public int hashCode() {
 -    List<Object> list = new ArrayList<Object>();
 -
 -    boolean present_computeResourceId = true && (isSetComputeResourceId());
 -    list.add(present_computeResourceId);
 -    if (present_computeResourceId)
 -      list.add(computeResourceId);
 -
 -    boolean present_loginUserName = true && (isSetLoginUserName());
 -    list.add(present_loginUserName);
 -    if (present_loginUserName)
 -      list.add(loginUserName);
 -
 -    boolean present_preferredBatchQueue = true && (isSetPreferredBatchQueue());
 -    list.add(present_preferredBatchQueue);
 -    if (present_preferredBatchQueue)
 -      list.add(preferredBatchQueue);
 -
 -    boolean present_scratchLocation = true && (isSetScratchLocation());
 -    list.add(present_scratchLocation);
 -    if (present_scratchLocation)
 -      list.add(scratchLocation);
 -
 -    boolean present_allocationProjectNumber = true && (isSetAllocationProjectNumber());
 -    list.add(present_allocationProjectNumber);
 -    if (present_allocationProjectNumber)
 -      list.add(allocationProjectNumber);
 -
 -    boolean present_resourceSpecificCredentialStoreToken = true && (isSetResourceSpecificCredentialStoreToken());
 -    list.add(present_resourceSpecificCredentialStoreToken);
 -    if (present_resourceSpecificCredentialStoreToken)
 -      list.add(resourceSpecificCredentialStoreToken);
 -
 -    boolean present_qualityOfService = true && (isSetQualityOfService());
 -    list.add(present_qualityOfService);
 -    if (present_qualityOfService)
 -      list.add(qualityOfService);
 -
 -    boolean present_reservation = true && (isSetReservation());
 -    list.add(present_reservation);
 -    if (present_reservation)
 -      list.add(reservation);
 -
 -    boolean present_reservationStartTime = true && (isSetReservationStartTime());
 -    list.add(present_reservationStartTime);
 -    if (present_reservationStartTime)
 -      list.add(reservationStartTime);
 -
 -    boolean present_reservationEndTime = true && (isSetReservationEndTime());
 -    list.add(present_reservationEndTime);
 -    if (present_reservationEndTime)
 -      list.add(reservationEndTime);
 -
 -    boolean present_validated = true && (isSetValidated());
 -    list.add(present_validated);
 -    if (present_validated)
 -      list.add(validated);
 -
 -    return list.hashCode();
 +    int hashCode = 1;
 +
 +    hashCode = hashCode * 8191 + ((isSetComputeResourceId()) ? 131071 : 524287);
 +    if (isSetComputeResourceId())
 +      hashCode = hashCode * 8191 + computeResourceId.hashCode();
 +
 +    hashCode = hashCode * 8191 + ((isSetLoginUserName()) ? 131071 : 524287);
 +    if (isSetLoginUserName())
 +      hashCode = hashCode * 8191 + loginUserName.hashCode();
 +
 +    hashCode = hashCode * 8191 + ((isSetPreferredBatchQueue()) ? 131071 : 524287);
 +    if (isSetPreferredBatchQueue())
 +      hashCode = hashCode * 8191 + preferredBatchQueue.hashCode();
 +
 +    hashCode = hashCode * 8191 + ((isSetScratchLocation()) ? 131071 : 524287);
 +    if (isSetScratchLocation())
 +      hashCode = hashCode * 8191 + scratchLocation.hashCode();
 +
 +    hashCode = hashCode * 8191 + ((isSetAllocationProjectNumber()) ? 131071 : 524287);
 +    if (isSetAllocationProjectNumber())
 +      hashCode = hashCode * 8191 + allocationProjectNumber.hashCode();
 +
 +    hashCode = hashCode * 8191 + ((isSetResourceSpecificCredentialStoreToken()) ? 131071 : 524287);
 +    if (isSetResourceSpecificCredentialStoreToken())
 +      hashCode = hashCode * 8191 + resourceSpecificCredentialStoreToken.hashCode();
 +
 +    hashCode = hashCode * 8191 + ((isSetQualityOfService()) ? 131071 : 524287);
 +    if (isSetQualityOfService())
 +      hashCode = hashCode * 8191 + qualityOfService.hashCode();
 +
 +    hashCode = hashCode * 8191 + ((isSetReservation()) ? 131071 : 524287);
 +    if (isSetReservation())
 +      hashCode = hashCode * 8191 + reservation.hashCode();
 +
 +    hashCode = hashCode * 8191 + ((isSetReservationStartTime()) ? 131071 : 524287);
 +    if (isSetReservationStartTime())
 +      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(reservationStartTime);
 +
 +    hashCode = hashCode * 8191 + ((isSetReservationEndTime()) ? 131071 : 524287);
 +    if (isSetReservationEndTime())
 +      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(reservationEndTime);
 +
++    hashCode = hashCode * 8191 + ((isSetValidated()) ? 131071 : 524287);
++    if (isSetValidated())
++      hashCode = hashCode * 8191 + ((validated) ? 131071 : 524287);
++
 +    return hashCode;
    }
  
    @Override
@@@ -903,6 -1008,16 +969,16 @@@
          return lastComparison;
        }
      }
 -    lastComparison = Boolean.valueOf(isSetValidated()).compareTo(other.isSetValidated());
++    lastComparison = java.lang.Boolean.valueOf(isSetValidated()).compareTo(other.isSetValidated());
+     if (lastComparison != 0) {
+       return lastComparison;
+     }
+     if (isSetValidated()) {
+       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validated, other.validated);
+       if (lastComparison != 0) {
+         return lastComparison;
+       }
+     }
      return 0;
    }
  
@@@ -1296,10 -1436,10 +1397,10 @@@
  
      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, UserComputeResourcePreference struct) throws org.apache.thrift.TException {
 -      TTupleProtocol iprot = (TTupleProtocol) prot;
 +      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.computeResourceId = iprot.readString();
        struct.setComputeResourceIdIsSet(true);
-       java.util.BitSet incoming = iprot.readBitSet(9);
 -      BitSet incoming = iprot.readBitSet(10);
++      java.util.BitSet incoming = iprot.readBitSet(10);
        if (incoming.get(0)) {
          struct.loginUserName = iprot.readString();
          struct.setLoginUserNameIsSet(true);

http://git-wip-us.apache.org/repos/asf/airavata/blob/ebdf8977/pom.xml
----------------------------------------------------------------------


[27/40] airavata git commit: AIRAVATA-2500 Improved error handling, error messages

Posted by ma...@apache.org.
AIRAVATA-2500 Improved error handling, error messages


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

Branch: refs/heads/develop
Commit: 66689a8b817f534d80e1ed0f2594509f53190e95
Parents: 7437112
Author: Marcus Christie <ma...@apache.org>
Authored: Wed Sep 20 14:48:49 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Wed Sep 20 15:04:53 2017 -0400

----------------------------------------------------------------------
 .../InvalidSetupException.java                  | 43 ++++++++++
 .../InvalidUsernameException.java               | 43 ++++++++++
 .../accountprovisioning/SSHAccountManager.java  | 89 +++++++++++++++-----
 .../SSHAccountProvisioner.java                  |  8 +-
 .../airavata/accountprovisioning/SSHUtil.java   |  2 +-
 .../IULdapSSHAccountProvisioner.java            | 15 ++--
 .../provisioner/TestSSHAccountProvisioner.java  | 10 ++-
 7 files changed, 175 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/66689a8b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/InvalidSetupException.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/InvalidSetupException.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/InvalidSetupException.java
new file mode 100644
index 0000000..004ec97
--- /dev/null
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/InvalidSetupException.java
@@ -0,0 +1,43 @@
+/*
+ * 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.accountprovisioning;
+
+/**
+ * This exception indicates that some SSHAccountProvisioner setup is missing or incorrect.
+ * Message should indicate what is invalid and potentially how to fix it.
+ */
+public class InvalidSetupException extends Exception {
+
+    public InvalidSetupException() {
+    }
+
+    public InvalidSetupException(String message) {
+        super(message);
+    }
+
+    public InvalidSetupException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public InvalidSetupException(Throwable cause) {
+        super(cause);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/66689a8b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/InvalidUsernameException.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/InvalidUsernameException.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/InvalidUsernameException.java
new file mode 100644
index 0000000..f78d7df
--- /dev/null
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/InvalidUsernameException.java
@@ -0,0 +1,43 @@
+/*
+ * 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.accountprovisioning;
+
+/**
+ * Thrown by {@link SSHAccountProvisioner} when provided userId doesn't map to a local account for any user. For
+ * example, the provided userId maps to a username that doesn't have an account on the cluster but that also doesn't
+ * exist at that institution.
+ */
+public class InvalidUsernameException extends Exception {
+    public InvalidUsernameException() {
+    }
+
+    public InvalidUsernameException(String message) {
+        super(message);
+    }
+
+    public InvalidUsernameException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public InvalidUsernameException(Throwable cause) {
+        super(cause);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/66689a8b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
index 70c144c..61deb49 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
@@ -50,7 +50,7 @@ public class SSHAccountManager {
 
     private final static Logger logger = LoggerFactory.getLogger(SSHAccountManager.class);
 
-    public static boolean doesUserHaveSSHAccount(String gatewayId, String computeResourceId, String username) {
+    public static boolean doesUserHaveSSHAccount(String gatewayId, String computeResourceId, String username) throws InvalidSetupException, InvalidUsernameException {
 
         // get compute resource preferences for the gateway and hostname
         RegistryService.Client registryServiceClient = getRegistryServiceClient();
@@ -58,23 +58,32 @@ public class SSHAccountManager {
         try {
             computeResourcePreference = registryServiceClient.getGatewayComputeResourcePreference(gatewayId, computeResourceId);
         } catch(TException e) {
-            throw new RuntimeException(e);
+            throw new RuntimeException("Failed to get ComputeResourcePreference for [" + gatewayId + "] and [" + computeResourceId + "]: " + e.getMessage(), e);
         } finally {
             if (registryServiceClient.getInputProtocol().getTransport().isOpen()) {
                 registryServiceClient.getInputProtocol().getTransport().close();
             }
+            if (registryServiceClient.getOutputProtocol().getTransport().isOpen()) {
+                registryServiceClient.getOutputProtocol().getTransport().close();
+            }
         }
 
         // get the account provisioner and config values for the preferences
         if (!computeResourcePreference.isSetSshAccountProvisioner()) {
-            throw new RuntimeException("Compute resource [" + computeResourceId + "] does not have an SSH Account Provisioner configured for it.");
+            throw new InvalidSetupException("Compute resource [" + computeResourceId + "] does not have an SSH Account Provisioner configured for it.");
         }
         SSHAccountProvisioner sshAccountProvisioner = createSshAccountProvisioner(gatewayId, computeResourcePreference);
 
-        return sshAccountProvisioner.hasAccount(username);
+        try {
+            return sshAccountProvisioner.hasAccount(username);
+        } catch (InvalidUsernameException e) {
+            throw e;
+        } catch (Exception e) {
+            throw new RuntimeException("hasAccount call failed for username [" + username + "]: " + e.getMessage(), e);
+        }
     }
 
-    public static UserComputeResourcePreference setupSSHAccount(String gatewayId, String computeResourceId, String username, SSHCredential sshCredential) {
+    public static UserComputeResourcePreference setupSSHAccount(String gatewayId, String computeResourceId, String username, SSHCredential sshCredential) throws InvalidSetupException, InvalidUsernameException {
 
         // get compute resource preferences for the gateway and hostname
         RegistryService.Client registryServiceClient = getRegistryServiceClient();
@@ -92,20 +101,26 @@ public class SSHAccountManager {
                 }
             }
         } catch(TException e) {
-            throw new RuntimeException(e);
+            throw new RuntimeException("Failed to retrieve compute resource information for [" + gatewayId + "] and " +
+                    "[" + computeResourceId + "]: " + e.getMessage(), e);
         } finally {
             if (registryServiceClient.getInputProtocol().getTransport().isOpen()) {
                 registryServiceClient.getInputProtocol().getTransport().close();
             }
+            if (registryServiceClient.getOutputProtocol().getTransport().isOpen()) {
+                registryServiceClient.getOutputProtocol().getTransport().close();
+            }
         }
 
         if (sshJobSubmission == null) {
-            throw new RuntimeException("Compute resource [" + computeResourceId + "] does not have an SSH Job Submission interface.");
+            throw new InvalidSetupException("Compute resource [" + computeResourceId + "] does not have an SSH Job Submission " +
+                    "interface.");
         }
 
         // get the account provisioner and config values for the preferences
         if (!computeResourcePreference.isSetSshAccountProvisioner()) {
-            throw new RuntimeException("Compute resource [" + computeResourceId + "] does not have an SSH Account Provisioner configured for it.");
+            throw new InvalidSetupException("Compute resource [" + computeResourceId + "] does not have an SSH Account Provisioner " +
+                    "configured for it.");
         }
 
         // instantiate and init the account provisioner
@@ -113,19 +128,39 @@ public class SSHAccountManager {
         boolean canCreateAccount = SSHAccountProvisionerFactory.canCreateAccount(computeResourcePreference.getSshAccountProvisioner());
 
         // First check if username has an account
-        boolean hasAccount = sshAccountProvisioner.hasAccount(username);
+        boolean hasAccount = false;
+        try {
+            hasAccount = sshAccountProvisioner.hasAccount(username);
+        } catch (InvalidUsernameException e) {
+            throw e;
+        } catch (Exception e) {
+            throw new RuntimeException("hasAccount call failed for username [" + username + "]: " + e.getMessage(), e);
+        }
 
         if (!hasAccount && !canCreateAccount) {
-            throw new RuntimeException("User [" + username + "] doesn't have account and [" + computeResourceId + "] doesn't have a SSH Account Provisioner that supports creating accounts.");
+            throw new InvalidSetupException("User [" + username + "] doesn't have account and [" + computeResourceId + "] doesn't " +
+                    "have a SSH Account Provisioner that supports creating accounts.");
         }
 
         // Install SSH key
-        sshAccountProvisioner.installSSHKey(username, sshCredential.getPublicKey());
+        try {
+            sshAccountProvisioner.installSSHKey(username, sshCredential.getPublicKey());
+        } catch (InvalidUsernameException e) {
+            throw e;
+        } catch (Exception e) {
+            throw new RuntimeException("installSSHKey call failed for username [" + username + "]: " + e.getMessage(), e);
+        }
 
         // Verify can authenticate to host
         String sshHostname = sshJobSubmission.getAlternativeSSHHostName() != null ? sshJobSubmission.getAlternativeSSHHostName() : computeResourceDescription.getHostName();
         int sshPort = sshJobSubmission.getSshPort();
-        boolean validated = SSHUtil.validate(sshHostname, sshPort, username, sshCredential);
+        boolean validated = false;
+        try {
+            validated = SSHUtil.validate(sshHostname, sshPort, username, sshCredential);
+        } catch (Exception e) {
+            throw new RuntimeException("Failed to validate SSH public key installation for account for user [" +
+                    username + "] on host [" + sshHostname + "]: " + e.getMessage(), e);
+        }
         if (!validated) {
             throw new RuntimeException("Failed to validate installation of key for [" + username
                     + "] on [" + computeResourceDescription.getHostName() + "] using SSH Account Provisioner ["
@@ -134,7 +169,12 @@ public class SSHAccountManager {
 
         // create the scratch location on the host
         String scratchLocation = sshAccountProvisioner.getScratchLocation(username);
-        SSHUtil.execute(sshHostname, sshPort, username, sshCredential, "mkdir -p " + scratchLocation);
+        try {
+            SSHUtil.execute(sshHostname, sshPort, username, sshCredential, "mkdir -p " + scratchLocation);
+        } catch (Exception e) {
+            throw new RuntimeException("Failed to create scratch location [" + scratchLocation + "] for user [" +
+                    username + "] on host [" + sshHostname + "]: " + e.getMessage(), e);
+        }
 
         UserComputeResourcePreference userComputeResourcePreference = new UserComputeResourcePreference();
         userComputeResourcePreference.setComputeResourceId(computeResourceId);
@@ -143,7 +183,7 @@ public class SSHAccountManager {
         return userComputeResourcePreference;
     }
 
-    private static SSHAccountProvisioner createSshAccountProvisioner(String gatewayId, ComputeResourcePreference computeResourcePreference) {
+    private static SSHAccountProvisioner createSshAccountProvisioner(String gatewayId, ComputeResourcePreference computeResourcePreference) throws InvalidSetupException {
         String provisionerName = computeResourcePreference.getSshAccountProvisioner();
         Map<ConfigParam,String> provisionerConfig = convertConfigParams(provisionerName, computeResourcePreference.getSshAccountProvisionerConfig());
 
@@ -153,7 +193,7 @@ public class SSHAccountManager {
         return SSHAccountProvisionerFactory.createSSHAccountProvisioner(provisionerName, resolvedConfig);
     }
 
-    private static Map<ConfigParam, String> resolveProvisionerConfig(String gatewayId, String provisionerName, Map<ConfigParam, String> provisionerConfig) {
+    private static Map<ConfigParam, String> resolveProvisionerConfig(String gatewayId, String provisionerName, Map<ConfigParam, String> provisionerConfig) throws InvalidSetupException {
         CredentialStoreService.Client credentialStoreServiceClient = null;
         try {
             credentialStoreServiceClient = getCredentialStoreClient();
@@ -163,6 +203,10 @@ public class SSHAccountManager {
                 if (configEntry.getKey().getType() == ConfigParam.ConfigParamType.CRED_STORE_PASSWORD_TOKEN) {
                     try {
                         PasswordCredential password = credentialStoreServiceClient.getPasswordCredential(configEntry.getValue(), gatewayId);
+                        if (password == null) {
+                            throw new InvalidSetupException("Password credential doesn't exist for config param ["
+                                    + configEntry.getKey().getName() + "] for token [" + configEntry.getValue() + "] for provisioner [" + provisionerName + "].");
+                        }
                         resolvedConfig.put(configEntry.getKey(), password.getPassword());
                     } catch (TException e) {
                         throw new RuntimeException("Failed to get password needed to configure " + provisionerName, e);
@@ -177,17 +221,24 @@ public class SSHAccountManager {
                 if (credentialStoreServiceClient.getInputProtocol().getTransport().isOpen()) {
                     credentialStoreServiceClient.getInputProtocol().getTransport().close();
                 }
+                if (credentialStoreServiceClient.getOutputProtocol().getTransport().isOpen()) {
+                    credentialStoreServiceClient.getOutputProtocol().getTransport().close();
+                }
             }
         }
     }
 
-    private static Map<ConfigParam, String> convertConfigParams(String provisionerName, Map<String, String> thriftConfigParams) {
-        // TODO: also check that all required parameters are present?
-        // TODO: also, this doesn't handle optional entries which should be skipped if missing from thriftConfigParams
+    private static Map<ConfigParam, String> convertConfigParams(String provisionerName, Map<String, String> thriftConfigParams) throws InvalidSetupException {
         List<ConfigParam> configParams = SSHAccountProvisionerFactory.getSSHAccountProvisionerConfigParams(provisionerName);
         Map<String, ConfigParam> configParamMap = configParams.stream().collect(Collectors.toMap(ConfigParam::getName, Function.identity()));
 
-        return thriftConfigParams.entrySet().stream().collect(Collectors.toMap(entry -> configParamMap.get(entry.getKey()), entry -> entry.getValue()));
+        Map<ConfigParam, String> result = thriftConfigParams.entrySet().stream().collect(Collectors.toMap(entry -> configParamMap.get(entry.getKey()), entry -> entry.getValue()));
+        for (ConfigParam configParam : configParams) {
+            if (!configParam.isOptional() && !result.containsKey(configParam)) {
+                throw new InvalidSetupException("Missing required ConfigParam named [" + configParam.getName() + "] for provisioner [" + provisionerName + "].");
+            }
+        }
+        return result;
     }
 
     private static RegistryService.Client getRegistryServiceClient() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/66689a8b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java
index b8abf1f..866ef5c 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java
@@ -25,8 +25,8 @@ import java.util.Map;
 public interface SSHAccountProvisioner {
 
     void init(Map<ConfigParam, String> config);
-    boolean hasAccount(String userId);
-    void createAccount(String userId, String sshPublicKey);
-    void installSSHKey(String userId, String sshPublicKey);
-    String getScratchLocation(String userId);
+    boolean hasAccount(String userId) throws InvalidUsernameException;
+    void createAccount(String userId, String sshPublicKey) throws InvalidUsernameException;
+    void installSSHKey(String userId, String sshPublicKey) throws InvalidUsernameException;
+    String getScratchLocation(String userId) throws InvalidUsernameException;
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/66689a8b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHUtil.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHUtil.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHUtil.java
index 2550270..4ac60bf 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHUtil.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHUtil.java
@@ -53,7 +53,7 @@ public class SSHUtil {
             session.connect();
             return true;
         } catch (JSchException e) {
-            throw new RuntimeException(e.getMessage(), e);
+            throw new RuntimeException(e);
         } finally {
             if (session != null && session.isConnected()) {
                 session.disconnect();

http://git-wip-us.apache.org/repos/asf/airavata/blob/66689a8b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
index d0c204f..4f0ad07 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
@@ -21,6 +21,7 @@
 package org.apache.airavata.accountprovisioning.provisioner;
 
 import org.apache.airavata.accountprovisioning.ConfigParam;
+import org.apache.airavata.accountprovisioning.InvalidUsernameException;
 import org.apache.airavata.accountprovisioning.SSHAccountManager;
 import org.apache.airavata.accountprovisioning.SSHAccountProvisioner;
 import org.apache.directory.api.ldap.model.entry.DefaultAttribute;
@@ -62,7 +63,7 @@ public class IULdapSSHAccountProvisioner implements SSHAccountProvisioner  {
     }
 
     @Override
-    public boolean hasAccount(String userId) {
+    public boolean hasAccount(String userId) throws InvalidUsernameException {
         String username = getUsername(userId);
         boolean result = withLdapConnection(ldapConnection -> {
             try {
@@ -75,13 +76,13 @@ public class IULdapSSHAccountProvisioner implements SSHAccountProvisioner  {
     }
 
     @Override
-    public void createAccount(String userId, String sshPublicKey) {
+    public void createAccount(String userId, String sshPublicKey) throws InvalidUsernameException {
 
         throw new UnsupportedOperationException("IULdapSSHAccountProvisioner does not support creating cluster accounts at this time.");
     }
 
     @Override
-    public void installSSHKey(String userId, String sshPublicKey) {
+    public void installSSHKey(String userId, String sshPublicKey) throws InvalidUsernameException {
         String username = getUsername(userId);
         boolean success = withLdapConnection(ldapConnection -> {
             try {
@@ -119,7 +120,7 @@ public class IULdapSSHAccountProvisioner implements SSHAccountProvisioner  {
     }
 
     @Override
-    public String getScratchLocation(String userId) {
+    public String getScratchLocation(String userId) throws InvalidUsernameException {
         String username = getUsername(userId);
         String scratchLocation = canonicalScratchLocation.replace("${username}",username);
         return scratchLocation;
@@ -147,15 +148,15 @@ public class IULdapSSHAccountProvisioner implements SSHAccountProvisioner  {
      * Convert from Airavata userId to cluster username. The assumption here is that a userId will be
      * an IU email address and the username is just the username portion of the email address.
      */
-    private String getUsername(String userId) {
+    private String getUsername(String userId) throws InvalidUsernameException {
         int atSignIndex = userId.indexOf("@");
         if (atSignIndex < 0) {
-            throw new RuntimeException("userId is not an email address: " + userId);
+            throw new InvalidUsernameException("userId is not an email address: " + userId);
         }
         return userId.substring(0, atSignIndex);
     }
 
-    public static void main(String[] args) {
+    public static void main(String[] args) throws InvalidUsernameException {
         String ldapPassword = args[0];
         IULdapSSHAccountProvisioner sshAccountProvisioner = new IULdapSSHAccountProvisioner();
         Map<ConfigParam,String> config = new HashMap<>();

http://git-wip-us.apache.org/repos/asf/airavata/blob/66689a8b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisioner.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisioner.java b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisioner.java
index f47552f..f4f9958 100644
--- a/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisioner.java
+++ b/modules/compute-account-provisioning/src/test/java/org/apache/airavata/accountprovisioning/provisioner/TestSSHAccountProvisioner.java
@@ -21,6 +21,7 @@
 package org.apache.airavata.accountprovisioning.provisioner;
 
 import org.apache.airavata.accountprovisioning.ConfigParam;
+import org.apache.airavata.accountprovisioning.InvalidUsernameException;
 import org.apache.airavata.accountprovisioning.SSHAccountProvisioner;
 
 import java.util.Map;
@@ -36,25 +37,26 @@ public class TestSSHAccountProvisioner implements SSHAccountProvisioner {
     }
 
     @Override
-    public boolean hasAccount(String username) {
+    public boolean hasAccount(String userId) throws InvalidUsernameException {
         return false;
     }
 
     @Override
-    public void createAccount(String username, String sshPublicKey) {
+    public void createAccount(String userId, String sshPublicKey) throws InvalidUsernameException {
 
     }
 
     @Override
-    public void installSSHKey(String username, String sshPublicKey) {
+    public void installSSHKey(String userId, String sshPublicKey) throws InvalidUsernameException {
 
     }
 
     @Override
-    public String getScratchLocation(String username) {
+    public String getScratchLocation(String userId) throws InvalidUsernameException {
         return null;
     }
 
+    // This is here just to facilitate testing
     public Map<ConfigParam, String> getConfig() {
         return config;
     }


[28/40] airavata git commit: AIRAVATA-2500 Javadoc for SSHAccountProvisioner interfaces

Posted by ma...@apache.org.
AIRAVATA-2500 Javadoc for SSHAccountProvisioner interfaces


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

Branch: refs/heads/develop
Commit: 2425187bb505fbc21580d52dc2192043bb18551a
Parents: 66689a8
Author: Marcus Christie <ma...@apache.org>
Authored: Wed Sep 20 15:05:18 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Wed Sep 20 15:05:18 2017 -0400

----------------------------------------------------------------------
 .../SSHAccountProvisioner.java                  | 43 ++++++++++++++++++++
 .../SSHAccountProvisionerProvider.java          | 21 ++++++++++
 2 files changed, 64 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/2425187b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java
index 866ef5c..395b622 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java
@@ -22,11 +22,54 @@ package org.apache.airavata.accountprovisioning;
 
 import java.util.Map;
 
+/**
+ * An SSHAccountProvisioner is capable of installing an Airavata-managed SSH public key onto a compute host for a user.
+ * SSHAccountProvisioners may also optionally provide the capability to create accounts directly on the compute host
+ * for the user. An SSHAccountProvisioner's {@link SSHAccountProvisionerProvider} provides some methods to define the
+ * configuration params that this SSHAccountProvisioner requires as well as some metadata method to describe the
+ * capabilities of this SSHAccountProvisioner.
+ */
 public interface SSHAccountProvisioner {
 
+    /**
+     * Initialize this SSHAccountProvisioner.
+     * @param config
+     */
     void init(Map<ConfigParam, String> config);
+
+    /**
+     * Return true if this user has an account on the compute host
+     * @param userId the Airavata user id
+     * @return
+     * @throws InvalidUsernameException
+     */
     boolean hasAccount(String userId) throws InvalidUsernameException;
+
+    /**
+     * Create an account for the user if no account exists.  May throw {@link UnsupportedOperationException} if
+     * unimplemented for this SSHAccountProvisioner.
+     * @param userId the Airavata user id
+     * @param sshPublicKey the public key part of an Airavata managed SSH credential
+     * @throws InvalidUsernameException
+     */
     void createAccount(String userId, String sshPublicKey) throws InvalidUsernameException;
+
+    /**
+     * Install an SSH key for the user on the compute host.
+     * @param userId the Airavata user id
+     * @param sshPublicKey the public key part of an Airavata managed SSH credential
+     * @throws InvalidUsernameException
+     */
     void installSSHKey(String userId, String sshPublicKey) throws InvalidUsernameException;
+
+    /**
+     * Get the scratch location that should be created for the user. Note: this method doesn't create the scratch
+     * location on the compute host, it merely determines a path to a good scratch location to be used by a gateway
+     * on behalf of the user.
+     *
+     * @param userId
+     * @return a filesystem path (e.g. "/N/scratch/username/some-gateway")
+     * @throws InvalidUsernameException
+     */
     String getScratchLocation(String userId) throws InvalidUsernameException;
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/2425187b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerProvider.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerProvider.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerProvider.java
index 297c757..c0407d5 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerProvider.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerProvider.java
@@ -32,8 +32,29 @@ public interface SSHAccountProvisionerProvider {
     default String getName() {
         return this.getClass().getName();
     }
+
+    /**
+     * Return the {@link ConfigParam}s for the associated SSHAccountProvisioner.
+     * @return
+     */
     List<ConfigParam> getConfigParams();
+
+    /**
+     * Instantiate and initialize the associated SSHAccountProvisioner.
+     * @param config
+     * @return
+     */
     SSHAccountProvisioner createSSHAccountProvisioner(Map<ConfigParam,String> config);
+
+    /**
+     * Return true if the associated SSHAccountProvisioner can create accounts for a user on a compute host.
+     * @return
+     */
     boolean canCreateAccount();
+
+    /**
+     * Return true if the associated SSHAccountProvisioner can install an SSH public key on a compute host for the user.
+     * @return
+     */
     boolean canInstallSSHKey();
 }


[25/40] airavata git commit: AIRAVATA-2500 Thrift stub code generation

Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/3184c238/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 d92d222..48fdbd8 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
@@ -2621,9 +2621,7 @@ public class Airavata {
      */
     public boolean deleteGatewayStoragePreference(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayID, String storageId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
 
-    public List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner> getSSHAccountProvisionerNames(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
-
-    public List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam> getSSHAccountProvisionerConfigParams(org.apache.airavata.model.security.AuthzToken authzToken, String provisionerName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+    public List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner> getSSHAccountProvisioners(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
 
     /**
      * Check if user has an SSH account on the given compute resource. This
@@ -2631,9 +2629,9 @@ public class Airavata {
      * 
      * @param authzToken
      * @param computeResourceId
-     * @param username
+     * @param userId
      */
-    public boolean doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+    public boolean doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String userId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
 
     /**
      * Setup and return a UserComputeResourcePreference object for this user to SSH into the given compute resource with
@@ -2643,10 +2641,10 @@ public class Airavata {
      * 
      * @param authzToken
      * @param computeResourceId
-     * @param username
+     * @param userId
      * @param airavataCredStoreToken
      */
-    public org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, String airavataCredStoreToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+    public org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String userId, String airavataCredStoreToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
 
     /**
      * Register User Resource Profile.
@@ -3318,13 +3316,11 @@ public class Airavata {
 
     public void deleteGatewayStoragePreference(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayID, String storageId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void getSSHAccountProvisionerNames(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void getSSHAccountProvisioners(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void getSSHAccountProvisionerConfigParams(org.apache.airavata.model.security.AuthzToken authzToken, String provisionerName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
-    public void setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String userId, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void registerUserResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile userResourceProfile, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
@@ -8310,23 +8306,23 @@ public class Airavata {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteGatewayStoragePreference failed: unknown result");
     }
 
-    public List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner> getSSHAccountProvisionerNames(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner> getSSHAccountProvisioners(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
     {
-      send_getSSHAccountProvisionerNames(authzToken);
-      return recv_getSSHAccountProvisionerNames();
+      send_getSSHAccountProvisioners(authzToken);
+      return recv_getSSHAccountProvisioners();
     }
 
-    public void send_getSSHAccountProvisionerNames(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.thrift.TException
+    public void send_getSSHAccountProvisioners(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.thrift.TException
     {
-      getSSHAccountProvisionerNames_args args = new getSSHAccountProvisionerNames_args();
+      getSSHAccountProvisioners_args args = new getSSHAccountProvisioners_args();
       args.setAuthzToken(authzToken);
-      sendBase("getSSHAccountProvisionerNames", args);
+      sendBase("getSSHAccountProvisioners", args);
     }
 
-    public List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner> recv_getSSHAccountProvisionerNames() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner> recv_getSSHAccountProvisioners() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
     {
-      getSSHAccountProvisionerNames_result result = new getSSHAccountProvisionerNames_result();
-      receiveBase(result, "getSSHAccountProvisionerNames");
+      getSSHAccountProvisioners_result result = new getSSHAccountProvisioners_result();
+      receiveBase(result, "getSSHAccountProvisioners");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -8342,57 +8338,21 @@ public class Airavata {
       if (result.ae != null) {
         throw result.ae;
       }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSSHAccountProvisionerNames failed: unknown result");
-    }
-
-    public List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam> getSSHAccountProvisionerConfigParams(org.apache.airavata.model.security.AuthzToken authzToken, String provisionerName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
-    {
-      send_getSSHAccountProvisionerConfigParams(authzToken, provisionerName);
-      return recv_getSSHAccountProvisionerConfigParams();
-    }
-
-    public void send_getSSHAccountProvisionerConfigParams(org.apache.airavata.model.security.AuthzToken authzToken, String provisionerName) throws org.apache.thrift.TException
-    {
-      getSSHAccountProvisionerConfigParams_args args = new getSSHAccountProvisionerConfigParams_args();
-      args.setAuthzToken(authzToken);
-      args.setProvisionerName(provisionerName);
-      sendBase("getSSHAccountProvisionerConfigParams", args);
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSSHAccountProvisioners failed: unknown result");
     }
 
-    public List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam> recv_getSSHAccountProvisionerConfigParams() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public boolean doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String userId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
     {
-      getSSHAccountProvisionerConfigParams_result result = new getSSHAccountProvisionerConfigParams_result();
-      receiveBase(result, "getSSHAccountProvisionerConfigParams");
-      if (result.isSetSuccess()) {
-        return result.success;
-      }
-      if (result.ire != null) {
-        throw result.ire;
-      }
-      if (result.ace != null) {
-        throw result.ace;
-      }
-      if (result.ase != null) {
-        throw result.ase;
-      }
-      if (result.ae != null) {
-        throw result.ae;
-      }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSSHAccountProvisionerConfigParams failed: unknown result");
-    }
-
-    public boolean doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
-    {
-      send_doesUserHaveSSHAccount(authzToken, computeResourceId, username);
+      send_doesUserHaveSSHAccount(authzToken, computeResourceId, userId);
       return recv_doesUserHaveSSHAccount();
     }
 
-    public void send_doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username) throws org.apache.thrift.TException
+    public void send_doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String userId) throws org.apache.thrift.TException
     {
       doesUserHaveSSHAccount_args args = new doesUserHaveSSHAccount_args();
       args.setAuthzToken(authzToken);
       args.setComputeResourceId(computeResourceId);
-      args.setUsername(username);
+      args.setUserId(userId);
       sendBase("doesUserHaveSSHAccount", args);
     }
 
@@ -8418,18 +8378,18 @@ public class Airavata {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "doesUserHaveSSHAccount failed: unknown result");
     }
 
-    public org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, String airavataCredStoreToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String userId, String airavataCredStoreToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
     {
-      send_setupUserComputeResourcePreferencesForSSH(authzToken, computeResourceId, username, airavataCredStoreToken);
+      send_setupUserComputeResourcePreferencesForSSH(authzToken, computeResourceId, userId, airavataCredStoreToken);
       return recv_setupUserComputeResourcePreferencesForSSH();
     }
 
-    public void send_setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, String airavataCredStoreToken) throws org.apache.thrift.TException
+    public void send_setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String userId, String airavataCredStoreToken) throws org.apache.thrift.TException
     {
       setupUserComputeResourcePreferencesForSSH_args args = new setupUserComputeResourcePreferencesForSSH_args();
       args.setAuthzToken(authzToken);
       args.setComputeResourceId(computeResourceId);
-      args.setUsername(username);
+      args.setUserId(userId);
       args.setAiravataCredStoreToken(airavataCredStoreToken);
       sendBase("setupUserComputeResourcePreferencesForSSH", args);
     }
@@ -14767,23 +14727,23 @@ public class Airavata {
       }
     }
 
-    public void getSSHAccountProvisionerNames(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void getSSHAccountProvisioners(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getSSHAccountProvisionerNames_call method_call = new getSSHAccountProvisionerNames_call(authzToken, resultHandler, this, ___protocolFactory, ___transport);
+      getSSHAccountProvisioners_call method_call = new getSSHAccountProvisioners_call(authzToken, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class getSSHAccountProvisionerNames_call extends org.apache.thrift.async.TAsyncMethodCall {
+    public static class getSSHAccountProvisioners_call extends org.apache.thrift.async.TAsyncMethodCall {
       private org.apache.airavata.model.security.AuthzToken authzToken;
-      public getSSHAccountProvisionerNames_call(org.apache.airavata.model.security.AuthzToken authzToken, 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 {
+      public getSSHAccountProvisioners_call(org.apache.airavata.model.security.AuthzToken authzToken, 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.authzToken = authzToken;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSSHAccountProvisionerNames", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        getSSHAccountProvisionerNames_args args = new getSSHAccountProvisionerNames_args();
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSSHAccountProvisioners", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getSSHAccountProvisioners_args args = new getSSHAccountProvisioners_args();
         args.setAuthzToken(authzToken);
         args.write(prot);
         prot.writeMessageEnd();
@@ -14795,48 +14755,13 @@ public class Airavata {
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_getSSHAccountProvisionerNames();
+        return (new Client(prot)).recv_getSSHAccountProvisioners();
       }
     }
 
-    public void getSSHAccountProvisionerConfigParams(org.apache.airavata.model.security.AuthzToken authzToken, String provisionerName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getSSHAccountProvisionerConfigParams_call method_call = new getSSHAccountProvisionerConfigParams_call(authzToken, provisionerName, resultHandler, this, ___protocolFactory, ___transport);
-      this.___currentMethod = method_call;
-      ___manager.call(method_call);
-    }
-
-    public static class getSSHAccountProvisionerConfigParams_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private org.apache.airavata.model.security.AuthzToken authzToken;
-      private String provisionerName;
-      public getSSHAccountProvisionerConfigParams_call(org.apache.airavata.model.security.AuthzToken authzToken, String provisionerName, 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.authzToken = authzToken;
-        this.provisionerName = provisionerName;
-      }
-
-      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSSHAccountProvisionerConfigParams", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        getSSHAccountProvisionerConfigParams_args args = new getSSHAccountProvisionerConfigParams_args();
-        args.setAuthzToken(authzToken);
-        args.setProvisionerName(provisionerName);
-        args.write(prot);
-        prot.writeMessageEnd();
-      }
-
-      public List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam> getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new IllegalStateException("Method call not finished!");
-        }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_getSSHAccountProvisionerConfigParams();
-      }
-    }
-
-    public void doesUserHaveSSHAccount(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
-      checkReady();
-      doesUserHaveSSHAccount_call method_call = new doesUserHaveSSHAccount_call(authzToken, computeResourceId, username, resultHandler, this, ___protocolFactory, ___transport);
+      doesUserHaveSSHAccount_call method_call = new doesUserHaveSSHAccount_call(authzToken, computeResourceId, userId, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -14844,12 +14769,12 @@ public class Airavata {
     public static class doesUserHaveSSHAccount_call extends org.apache.thrift.async.TAsyncMethodCall {
       private org.apache.airavata.model.security.AuthzToken authzToken;
       private String computeResourceId;
-      private String username;
-      public doesUserHaveSSHAccount_call(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, 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 userId;
+      public doesUserHaveSSHAccount_call(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String userId, 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.authzToken = authzToken;
         this.computeResourceId = computeResourceId;
-        this.username = username;
+        this.userId = userId;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
@@ -14857,7 +14782,7 @@ public class Airavata {
         doesUserHaveSSHAccount_args args = new doesUserHaveSSHAccount_args();
         args.setAuthzToken(authzToken);
         args.setComputeResourceId(computeResourceId);
-        args.setUsername(username);
+        args.setUserId(userId);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -14872,9 +14797,9 @@ public class Airavata {
       }
     }
 
-    public void setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void setupUserComputeResourcePreferencesForSSH(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String userId, String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      setupUserComputeResourcePreferencesForSSH_call method_call = new setupUserComputeResourcePreferencesForSSH_call(authzToken, computeResourceId, username, airavataCredStoreToken, resultHandler, this, ___protocolFactory, ___transport);
+      setupUserComputeResourcePreferencesForSSH_call method_call = new setupUserComputeResourcePreferencesForSSH_call(authzToken, computeResourceId, userId, airavataCredStoreToken, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -14882,13 +14807,13 @@ public class Airavata {
     public static class setupUserComputeResourcePreferencesForSSH_call extends org.apache.thrift.async.TAsyncMethodCall {
       private org.apache.airavata.model.security.AuthzToken authzToken;
       private String computeResourceId;
-      private String username;
+      private String userId;
       private String airavataCredStoreToken;
-      public setupUserComputeResourcePreferencesForSSH_call(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String username, 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 {
+      public setupUserComputeResourcePreferencesForSSH_call(org.apache.airavata.model.security.AuthzToken authzToken, String computeResourceId, String userId, 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 {
         super(client, protocolFactory, transport, resultHandler, false);
         this.authzToken = authzToken;
         this.computeResourceId = computeResourceId;
-        this.username = username;
+        this.userId = userId;
         this.airavataCredStoreToken = airavataCredStoreToken;
       }
 
@@ -14897,7 +14822,7 @@ public class Airavata {
         setupUserComputeResourcePreferencesForSSH_args args = new setupUserComputeResourcePreferencesForSSH_args();
         args.setAuthzToken(authzToken);
         args.setComputeResourceId(computeResourceId);
-        args.setUsername(username);
+        args.setUserId(userId);
         args.setAiravataCredStoreToken(airavataCredStoreToken);
         args.write(prot);
         prot.writeMessageEnd();
@@ -16418,8 +16343,7 @@ public class Airavata {
       processMap.put("updateGatewayStoragePreference", new updateGatewayStoragePreference());
       processMap.put("deleteGatewayComputeResourcePreference", new deleteGatewayComputeResourcePreference());
       processMap.put("deleteGatewayStoragePreference", new deleteGatewayStoragePreference());
-      processMap.put("getSSHAccountProvisionerNames", new getSSHAccountProvisionerNames());
-      processMap.put("getSSHAccountProvisionerConfigParams", new getSSHAccountProvisionerConfigParams());
+      processMap.put("getSSHAccountProvisioners", new getSSHAccountProvisioners());
       processMap.put("doesUserHaveSSHAccount", new doesUserHaveSSHAccount());
       processMap.put("setupUserComputeResourcePreferencesForSSH", new setupUserComputeResourcePreferencesForSSH());
       processMap.put("registerUserResourceProfile", new registerUserResourceProfile());
@@ -20507,53 +20431,23 @@ public class Airavata {
       }
     }
 
-    public static class getSSHAccountProvisionerNames<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSSHAccountProvisionerNames_args> {
-      public getSSHAccountProvisionerNames() {
-        super("getSSHAccountProvisionerNames");
-      }
-
-      public getSSHAccountProvisionerNames_args getEmptyArgsInstance() {
-        return new getSSHAccountProvisionerNames_args();
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public getSSHAccountProvisionerNames_result getResult(I iface, getSSHAccountProvisionerNames_args args) throws org.apache.thrift.TException {
-        getSSHAccountProvisionerNames_result result = new getSSHAccountProvisionerNames_result();
-        try {
-          result.success = iface.getSSHAccountProvisionerNames(args.authzToken);
-        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
-          result.ire = ire;
-        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
-          result.ace = ace;
-        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
-          result.ase = ase;
-        } catch (org.apache.airavata.model.error.AuthorizationException ae) {
-          result.ae = ae;
-        }
-        return result;
-      }
-    }
-
-    public static class getSSHAccountProvisionerConfigParams<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSSHAccountProvisionerConfigParams_args> {
-      public getSSHAccountProvisionerConfigParams() {
-        super("getSSHAccountProvisionerConfigParams");
+    public static class getSSHAccountProvisioners<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSSHAccountProvisioners_args> {
+      public getSSHAccountProvisioners() {
+        super("getSSHAccountProvisioners");
       }
 
-      public getSSHAccountProvisionerConfigParams_args getEmptyArgsInstance() {
-        return new getSSHAccountProvisionerConfigParams_args();
+      public getSSHAccountProvisioners_args getEmptyArgsInstance() {
+        return new getSSHAccountProvisioners_args();
       }
 
       protected boolean isOneway() {
         return false;
       }
 
-      public getSSHAccountProvisionerConfigParams_result getResult(I iface, getSSHAccountProvisionerConfigParams_args args) throws org.apache.thrift.TException {
-        getSSHAccountProvisionerConfigParams_result result = new getSSHAccountProvisionerConfigParams_result();
+      public getSSHAccountProvisioners_result getResult(I iface, getSSHAccountProvisioners_args args) throws org.apache.thrift.TException {
+        getSSHAccountProvisioners_result result = new getSSHAccountProvisioners_result();
         try {
-          result.success = iface.getSSHAccountProvisionerConfigParams(args.authzToken, args.provisionerName);
+          result.success = iface.getSSHAccountProvisioners(args.authzToken);
         } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
           result.ire = ire;
         } catch (org.apache.airavata.model.error.AiravataClientException ace) {
@@ -20583,7 +20477,7 @@ public class Airavata {
       public doesUserHaveSSHAccount_result getResult(I iface, doesUserHaveSSHAccount_args args) throws org.apache.thrift.TException {
         doesUserHaveSSHAccount_result result = new doesUserHaveSSHAccount_result();
         try {
-          result.success = iface.doesUserHaveSSHAccount(args.authzToken, args.computeResourceId, args.username);
+          result.success = iface.doesUserHaveSSHAccount(args.authzToken, args.computeResourceId, args.userId);
           result.setSuccessIsSet(true);
         } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
           result.ire = ire;
@@ -20614,7 +20508,7 @@ public class Airavata {
       public setupUserComputeResourcePreferencesForSSH_result getResult(I iface, setupUserComputeResourcePreferencesForSSH_args args) throws org.apache.thrift.TException {
         setupUserComputeResourcePreferencesForSSH_result result = new setupUserComputeResourcePreferencesForSSH_result();
         try {
-          result.success = iface.setupUserComputeResourcePreferencesForSSH(args.authzToken, args.computeResourceId, args.username, args.airavataCredStoreToken);
+          result.success = iface.setupUserComputeResourcePreferencesForSSH(args.authzToken, args.computeResourceId, args.userId, args.airavataCredStoreToken);
         } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
           result.ire = ire;
         } catch (org.apache.airavata.model.error.AiravataClientException ace) {
@@ -21867,8 +21761,7 @@ public class Airavata {
       processMap.put("updateGatewayStoragePreference", new updateGatewayStoragePreference());
       processMap.put("deleteGatewayComputeResourcePreference", new deleteGatewayComputeResourcePreference());
       processMap.put("deleteGatewayStoragePreference", new deleteGatewayStoragePreference());
-      processMap.put("getSSHAccountProvisionerNames", new getSSHAccountProvisionerNames());
-      processMap.put("getSSHAccountProvisionerConfigParams", new getSSHAccountProvisionerConfigParams());
+      processMap.put("getSSHAccountProvisioners", new getSSHAccountProvisioners());
       processMap.put("doesUserHaveSSHAccount", new doesUserHaveSSHAccount());
       processMap.put("setupUserComputeResourcePreferencesForSSH", new setupUserComputeResourcePreferencesForSSH());
       processMap.put("registerUserResourceProfile", new registerUserResourceProfile());
@@ -31551,20 +31444,20 @@ public class Airavata {
       }
     }
 
-    public static class getSSHAccountProvisionerNames<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getSSHAccountProvisionerNames_args, List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner>> {
-      public getSSHAccountProvisionerNames() {
-        super("getSSHAccountProvisionerNames");
+    public static class getSSHAccountProvisioners<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getSSHAccountProvisioners_args, List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner>> {
+      public getSSHAccountProvisioners() {
+        super("getSSHAccountProvisioners");
       }
 
-      public getSSHAccountProvisionerNames_args getEmptyArgsInstance() {
-        return new getSSHAccountProvisionerNames_args();
+      public getSSHAccountProvisioners_args getEmptyArgsInstance() {
+        return new getSSHAccountProvisioners_args();
       }
 
       public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
         return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner>>() { 
           public void onComplete(List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner> o) {
-            getSSHAccountProvisionerNames_result result = new getSSHAccountProvisionerNames_result();
+            getSSHAccountProvisioners_result result = new getSSHAccountProvisioners_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -31577,7 +31470,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getSSHAccountProvisionerNames_result result = new getSSHAccountProvisionerNames_result();
+            getSSHAccountProvisioners_result result = new getSSHAccountProvisioners_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31618,26 +31511,27 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getSSHAccountProvisionerNames_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner>> resultHandler) throws TException {
-        iface.getSSHAccountProvisionerNames(args.authzToken,resultHandler);
+      public void start(I iface, getSSHAccountProvisioners_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisioner>> resultHandler) throws TException {
+        iface.getSSHAccountProvisioners(args.authzToken,resultHandler);
       }
     }
 
-    public static class getSSHAccountProvisionerConfigParams<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getSSHAccountProvisionerConfigParams_args, List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam>> {
-      public getSSHAccountProvisionerConfigParams() {
-        super("getSSHAccountProvisionerConfigParams");
+    public static class doesUserHaveSSHAccount<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, doesUserHaveSSHAccount_args, Boolean> {
+      public doesUserHaveSSHAccount() {
+        super("doesUserHaveSSHAccount");
       }
 
-      public getSSHAccountProvisionerConfigParams_args getEmptyArgsInstance() {
-        return new getSSHAccountProvisionerConfigParams_args();
+      public doesUserHaveSSHAccount_args getEmptyArgsInstance() {
+        return new doesUserHaveSSHAccount_args();
       }
 
-      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam>>() { 
-          public void onComplete(List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam> o) {
-            getSSHAccountProvisionerConfigParams_result result = new getSSHAccountProvisionerConfigParams_result();
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            doesUserHaveSSHAccount_result result = new doesUserHaveSSHAccount_result();
             result.success = o;
+            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -31649,7 +31543,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getSSHAccountProvisionerConfigParams_result result = new getSSHAccountProvisionerConfigParams_result();
+            doesUserHaveSSHAccount_result result = new doesUserHaveSSHAccount_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31690,25 +31584,241 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getSSHAccountProvisionerConfigParams_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam>> resultHandler) throws TException {
-        iface.getSSHAccountProvisionerConfigParams(args.authzToken, args.provisionerName,resultHandler);
+      public void start(I iface, doesUserHaveSSHAccount_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.doesUserHaveSSHAccount(args.authzToken, args.computeResourceId, args.userId,resultHandler);
       }
     }
 
-    public static class doesUserHaveSSHAccount<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, doesUserHaveSSHAccount_args, Boolean> {
-      public doesUserHaveSSHAccount() {
-        super("doesUserHaveSSHAccount");
+    public static class setupUserComputeResourcePreferencesForSSH<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setupUserComputeResourcePreferencesForSSH_args, org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> {
+      public setupUserComputeResourcePreferencesForSSH() {
+        super("setupUserComputeResourcePreferencesForSSH");
       }
 
-      public doesUserHaveSSHAccount_args getEmptyArgsInstance() {
-        return new doesUserHaveSSHAccount_args();
+      public setupUserComputeResourcePreferencesForSSH_args getEmptyArgsInstance() {
+        return new setupUserComputeResourcePreferencesForSSH_args();
+      }
+
+      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>() { 
+          public void onComplete(org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference o) {
+            setupUserComputeResourcePreferencesForSSH_result result = new setupUserComputeResourcePreferencesForSSH_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            setupUserComputeResourcePreferencesForSSH_result result = new setupUserComputeResourcePreferencesForSSH_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
+                        result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
+                        result.setAeIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, setupUserComputeResourcePreferencesForSSH_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> resultHandler) throws TException {
+        iface.setupUserComputeResourcePreferencesForSSH(args.authzToken, args.computeResourceId, args.userId, args.airavataCredStoreToken,resultHandler);
+      }
+    }
+
+    public static class registerUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerUserResourceProfile_args, String> {
+      public registerUserResourceProfile() {
+        super("registerUserResourceProfile");
+      }
+
+      public registerUserResourceProfile_args getEmptyArgsInstance() {
+        return new registerUserResourceProfile_args();
+      }
+
+      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<String>() { 
+          public void onComplete(String o) {
+            registerUserResourceProfile_result result = new registerUserResourceProfile_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            registerUserResourceProfile_result result = new registerUserResourceProfile_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
+                        result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
+                        result.setAeIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, registerUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+        iface.registerUserResourceProfile(args.authzToken, args.userResourceProfile,resultHandler);
+      }
+    }
+
+    public static class getUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserResourceProfile_args, org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> {
+      public getUserResourceProfile() {
+        super("getUserResourceProfile");
+      }
+
+      public getUserResourceProfile_args getEmptyArgsInstance() {
+        return new getUserResourceProfile_args();
+      }
+
+      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>() { 
+          public void onComplete(org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile o) {
+            getUserResourceProfile_result result = new getUserResourceProfile_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            getUserResourceProfile_result result = new getUserResourceProfile_result();
+            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+                        result.setIreIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+                        result.setAceIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+                        result.setAseIsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
+                        result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
+                        result.setAeIsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, getUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> resultHandler) throws TException {
+        iface.getUserResourceProfile(args.authzToken, args.userId, args.gatewayID,resultHandler);
+      }
+    }
+
+    public static class updateUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateUserResourceProfile_args, Boolean> {
+      public updateUserResourceProfile() {
+        super("updateUserResourceProfile");
+      }
+
+      public updateUserResourceProfile_args getEmptyArgsInstance() {
+        return new updateUserResourceProfile_args();
       }
 
       public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
         return new AsyncMethodCallback<Boolean>() { 
           public void onComplete(Boolean o) {
-            doesUserHaveSSHAccount_result result = new doesUserHaveSSHAccount_result();
+            updateUserResourceProfile_result result = new updateUserResourceProfile_result();
             result.success = o;
             result.setSuccessIsSet(true);
             try {
@@ -31722,7 +31832,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            doesUserHaveSSHAccount_result result = new doesUserHaveSSHAccount_result();
+            updateUserResourceProfile_result result = new updateUserResourceProfile_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31763,98 +31873,27 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, doesUserHaveSSHAccount_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.doesUserHaveSSHAccount(args.authzToken, args.computeResourceId, args.username,resultHandler);
-      }
-    }
-
-    public static class setupUserComputeResourcePreferencesForSSH<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setupUserComputeResourcePreferencesForSSH_args, org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> {
-      public setupUserComputeResourcePreferencesForSSH() {
-        super("setupUserComputeResourcePreferencesForSSH");
-      }
-
-      public setupUserComputeResourcePreferencesForSSH_args getEmptyArgsInstance() {
-        return new setupUserComputeResourcePreferencesForSSH_args();
-      }
-
-      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
-        final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>() { 
-          public void onComplete(org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference o) {
-            setupUserComputeResourcePreferencesForSSH_result result = new setupUserComputeResourcePreferencesForSSH_result();
-            result.success = o;
-            try {
-              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
-              return;
-            } catch (Exception e) {
-              LOGGER.error("Exception writing to internal frame buffer", e);
-            }
-            fb.close();
-          }
-          public void onError(Exception e) {
-            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
-            org.apache.thrift.TBase msg;
-            setupUserComputeResourcePreferencesForSSH_result result = new setupUserComputeResourcePreferencesForSSH_result();
-            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
-                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
-                        result.setIreIsSet(true);
-                        msg = result;
-            }
-            else             if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
-                        result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
-                        result.setAceIsSet(true);
-                        msg = result;
-            }
-            else             if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
-                        result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
-                        result.setAseIsSet(true);
-                        msg = result;
-            }
-            else             if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
-                        result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
-                        result.setAeIsSet(true);
-                        msg = result;
-            }
-             else 
-            {
-              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
-              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
-            }
-            try {
-              fcall.sendResponse(fb,msg,msgType,seqid);
-              return;
-            } catch (Exception ex) {
-              LOGGER.error("Exception writing to internal frame buffer", ex);
-            }
-            fb.close();
-          }
-        };
-      }
-
-      protected boolean isOneway() {
-        return false;
-      }
-
-      public void start(I iface, setupUserComputeResourcePreferencesForSSH_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> resultHandler) throws TException {
-        iface.setupUserComputeResourcePreferencesForSSH(args.authzToken, args.computeResourceId, args.username, args.airavataCredStoreToken,resultHandler);
+      public void start(I iface, updateUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.updateUserResourceProfile(args.authzToken, args.userId, args.gatewayID, args.userResourceProfile,resultHandler);
       }
     }
 
-    public static class registerUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerUserResourceProfile_args, String> {
-      public registerUserResourceProfile() {
-        super("registerUserResourceProfile");
+    public static class deleteUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteUserResourceProfile_args, Boolean> {
+      public deleteUserResourceProfile() {
+        super("deleteUserResourceProfile");
       }
 
-      public registerUserResourceProfile_args getEmptyArgsInstance() {
-        return new registerUserResourceProfile_args();
+      public deleteUserResourceProfile_args getEmptyArgsInstance() {
+        return new deleteUserResourceProfile_args();
       }
 
-      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<String>() { 
-          public void onComplete(String o) {
-            registerUserResourceProfile_result result = new registerUserResourceProfile_result();
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            deleteUserResourceProfile_result result = new deleteUserResourceProfile_result();
             result.success = o;
+            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -31866,7 +31905,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            registerUserResourceProfile_result result = new registerUserResourceProfile_result();
+            deleteUserResourceProfile_result result = new deleteUserResourceProfile_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31907,26 +31946,27 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, registerUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
-        iface.registerUserResourceProfile(args.authzToken, args.userResourceProfile,resultHandler);
+      public void start(I iface, deleteUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.deleteUserResourceProfile(args.authzToken, args.userId, args.gatewayID,resultHandler);
       }
     }
 
-    public static class getUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserResourceProfile_args, org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> {
-      public getUserResourceProfile() {
-        super("getUserResourceProfile");
+    public static class addUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addUserComputeResourcePreference_args, Boolean> {
+      public addUserComputeResourcePreference() {
+        super("addUserComputeResourcePreference");
       }
 
-      public getUserResourceProfile_args getEmptyArgsInstance() {
-        return new getUserResourceProfile_args();
+      public addUserComputeResourcePreference_args getEmptyArgsInstance() {
+        return new addUserComputeResourcePreference_args();
       }
 
-      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>() { 
-          public void onComplete(org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile o) {
-            getUserResourceProfile_result result = new getUserResourceProfile_result();
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            addUserComputeResourcePreference_result result = new addUserComputeResourcePreference_result();
             result.success = o;
+            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -31938,7 +31978,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getUserResourceProfile_result result = new getUserResourceProfile_result();
+            addUserComputeResourcePreference_result result = new addUserComputeResourcePreference_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31979,25 +32019,25 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> resultHandler) throws TException {
-        iface.getUserResourceProfile(args.authzToken, args.userId, args.gatewayID,resultHandler);
+      public void start(I iface, addUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.addUserComputeResourcePreference(args.authzToken, args.userId, args.gatewayID, args.userComputeResourceId, args.userComputeResourcePreference,resultHandler);
       }
     }
 
-    public static class updateUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateUserResourceProfile_args, Boolean> {
-      public updateUserResourceProfile() {
-        super("updateUserResourceProfile");
+    public static class addUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addUserStoragePreference_args, Boolean> {
+      public addUserStoragePreference() {
+        super("addUserStoragePreference");
       }
 
-      public updateUserResourceProfile_args getEmptyArgsInstance() {
-        return new updateUserResourceProfile_args();
+      public addUserStoragePreference_args getEmptyArgsInstance() {
+        return new addUserStoragePreference_args();
       }
 
       public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
         return new AsyncMethodCallback<Boolean>() { 
           public void onComplete(Boolean o) {
-            updateUserResourceProfile_result result = new updateUserResourceProfile_result();
+            addUserStoragePreference_result result = new addUserStoragePreference_result();
             result.success = o;
             result.setSuccessIsSet(true);
             try {
@@ -32011,7 +32051,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            updateUserResourceProfile_result result = new updateUserResourceProfile_result();
+            addUserStoragePreference_result result = new addUserStoragePreference_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32052,27 +32092,26 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, updateUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.updateUserResourceProfile(args.authzToken, args.userId, args.gatewayID, args.userResourceProfile,resultHandler);
+      public void start(I iface, addUserStoragePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.addUserStoragePreference(args.authzToken, args.userId, args.gatewayID, args.userStorageResourceId, args.userStoragePreference,resultHandler);
       }
     }
 
-    public static class deleteUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteUserResourceProfile_args, Boolean> {
-      public deleteUserResourceProfile() {
-        super("deleteUserResourceProfile");
+    public static class getUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserComputeResourcePreference_args, org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> {
+      public getUserComputeResourcePreference() {
+        super("getUserComputeResourcePreference");
       }
 
-      public deleteUserResourceProfile_args getEmptyArgsInstance() {
-        return new deleteUserResourceProfile_args();
+      public getUserComputeResourcePreference_args getEmptyArgsInstance() {
+        return new getUserComputeResourcePreference_args();
       }
 
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            deleteUserResourceProfile_result result = new deleteUserResourceProfile_result();
+        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>() { 
+          public void onComplete(org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference o) {
+            getUserComputeResourcePreference_result result = new getUserComputeResourcePreference_result();
             result.success = o;
-            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -32084,7 +32123,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            deleteUserResourceProfile_result result = new deleteUserResourceProfile_result();
+            getUserComputeResourcePreference_result result = new getUserComputeResourcePreference_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32125,27 +32164,26 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, deleteUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.deleteUserResourceProfile(args.authzToken, args.userId, args.gatewayID,resultHandler);
+      public void start(I iface, getUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> resultHandler) throws TException {
+        iface.getUserComputeResourcePreference(args.authzToken, args.userId, args.gatewayID, args.userComputeResourceId,resultHandler);
       }
     }
 
-    public static class addUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addUserComputeResourcePreference_args, Boolean> {
-      public addUserComputeResourcePreference() {
-        super("addUserComputeResourcePreference");
+    public static class getUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserStoragePreference_args, org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> {
+      public getUserStoragePreference() {
+        super("getUserStoragePreference");
       }
 
-      public addUserComputeResourcePreference_args getEmptyArgsInstance() {
-        return new addUserComputeResourcePreference_args();
+      public getUserStoragePreference_args getEmptyArgsInstance() {
+        return new getUserStoragePreference_args();
       }
 
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            addUserComputeResourcePreference_result result = new addUserComputeResourcePreference_result();
+        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>() { 
+          public void onComplete(org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference o) {
+            getUserStoragePreference_result result = new getUserStoragePreference_result();
             result.success = o;
-            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -32157,7 +32195,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            addUserComputeResourcePreference_result result = new addUserComputeResourcePreference_result();
+            getUserStoragePreference_result result = new getUserStoragePreference_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32198,27 +32236,26 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, addUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.addUserComputeResourcePreference(args.authzToken, args.userId, args.gatewayID, args.userComputeResourceId, args.userComputeResourcePreference,resultHandler);
+      public void start(I iface, getUserStoragePreference_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> resultHandler) throws TException {
+        iface.getUserStoragePreference(args.authzToken, args.userId, args.gatewayID, args.userStorageResourceId,resultHandler);
       }
     }
 
-    public static class addUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addUserStoragePreference_args, Boolean> {
-      public addUserStoragePreference() {
-        super("addUserStoragePreference");
+    public static class getAllUserComputeResourcePreferences<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserComputeResourcePreferences_args, List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>> {
+      public getAllUserComputeResourcePreferences() {
+        super("getAllUserComputeResourcePreferences");
       }
 
-      public addUserStoragePreference_args getEmptyArgsInstance() {
-        return new addUserStoragePreference_args();
+      public getAllUserComputeResourcePreferences_args getEmptyArgsInstance() {
+        return new getAllUserComputeResourcePreferences_args();
       }
 
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            addUserStoragePreference_result result = new addUserStoragePreference_result();
+        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>>() { 
+          public void onComplete(List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> o) {
+            getAllUserComputeResourcePreferences_result result = new getAllUserComputeResourcePreferences_result();
             result.success = o;
-            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -32230,7 +32267,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            addUserStoragePreference_result result = new addUserStoragePreference_result();
+            getAllUserComputeResourcePreferences_result result = new getAllUserComputeResourcePreferences_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32271,25 +32308,25 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, addUserStoragePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.addUserStoragePreference(args.authzToken, args.userId, args.gatewayID, args.userStorageResourceId, args.userStoragePreference,resultHandler);
+      public void start(I iface, getAllUserComputeResourcePreferences_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>> resultHandler) throws TException {
+        iface.getAllUserComputeResourcePreferences(args.authzToken, args.userId, args.gatewayID,resultHandler);
       }
     }
 
-    public static class getUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserComputeResourcePreference_args, org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> {
-      public getUserComputeResourcePreference() {
-        super("getUserComputeResourcePreference");
+    public static class getAllUserStoragePreferences<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserStoragePreferences_args, List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>> {
+      public getAllUserStoragePreferences() {
+        super("getAllUserStoragePreferences");
       }
 
-      public getUserComputeResourcePreference_args getEmptyArgsInstance() {
-        return new getUserComputeResourcePreference_args();
+      public getAllUserStoragePreferences_args getEmptyArgsInstance() {
+        return new getAllUserStoragePreferences_args();
       }
 
-      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>() { 
-          public void onComplete(org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference o) {
-            getUserComputeResourcePreference_result result = new getUserComputeResourcePreference_result();
+        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>>() { 
+          public void onComplete(List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> o) {
+            getAllUserStoragePreferences_result result = new getAllUserStoragePreferences_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -32302,7 +32339,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getUserComputeResourcePreference_result result = new getUserComputeResourcePreference_result();
+            getAllUserStoragePreferences_result result = new getAllUserStoragePreferences_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32343,25 +32380,25 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> resultHandler) throws TException {
-        iface.getUserComputeResourcePreference(args.authzToken, args.userId, args.gatewayID, args.userComputeResourceId,resultHandler);
+      public void start(I iface, getAllUserStoragePreferences_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>> resultHandler) throws TException {
+        iface.getAllUserStoragePreferences(args.authzToken, args.userId, args.gatewayID,resultHandler);
       }
     }
 
-    public static class getUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserStoragePreference_args, org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> {
-      public getUserStoragePreference() {
-        super("getUserStoragePreference");
+    public static class getAllUserResourceProfiles<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserResourceProfiles_args, List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>> {
+      public getAllUserResourceProfiles() {
+        super("getAllUserResourceProfiles");
       }
 
-      public getUserStoragePreference_args getEmptyArgsInstance() {
-        return new getUserStoragePreference_args();
+      public getAllUserResourceProfiles_args getEmptyArgsInstance() {
+        return new getAllUserResourceProfiles_args();
       }
 
-      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>() { 
-          public void onComplete(org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference o) {
-            getUserStoragePreference_result result = new getUserStoragePreference_result();
+        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>>() { 
+          public void onComplete(List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> o) {
+            getAllUserResourceProfiles_result result = new getAllUserResourceProfiles_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -32374,7 +32411,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getUserStoragePreference_result result = new getUserStoragePreference_result();
+            getAllUserResourceProfiles_result result = new getAllUserResourceProfiles_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32415,98 +32452,27 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getUserStoragePreference_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> resultHandler) throws TException {
-        iface.getUserStoragePreference(args.authzToken, args.userId, args.gatewayID, args.userStorageResourceId,resultHandler);
-      }
-    }
-
-    public static class getAllUserComputeResourcePreferences<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserComputeResourcePreferences_args, List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>> {
-      public getAllUserComputeResourcePreferences() {
-        super("getAllUserComputeResourcePreferences");
-      }
-
-      public getAllUserComputeResourcePreferences_args getEmptyArgsInstance() {
-        return new getAllUserComputeResourcePreferences_args();
-      }
-
-      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
-        final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>>() { 
-          public void onComplete(List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> o) {
-            getAllUserComputeResourcePreferences_result result = new getAllUserComputeResourcePreferences_result();
-            result.success = o;
-            try {
-              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
-              return;
-            } catch (Exception e) {
-              LOGGER.error("Exception writing to internal frame buffer", e);
-            }
-            fb.close();
-          }
-          public void onError(Exception e) {
-            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
-            org.apache.thrift.TBase msg;
-            getAllUserComputeResourcePreferences_result result = new getAllUserComputeResourcePreferences_result();
-            if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
-                        result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
-   

<TRUNCATED>

[07/40] airavata git commit: AIRAVATA-2500 Update thrift API and regenerated

Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/2a901394/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 6ef1610..851f96e 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
@@ -2621,6 +2621,10 @@ public class Airavata {
      */
     public boolean deleteGatewayStoragePreference(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayID, String storageId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
 
+    public List<String> getSSHAccountProvisionerNames(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+
+    public List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam> getSSHAccountProvisionerConfigParams(org.apache.airavata.model.security.AuthzToken authzToken, String provisionerName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+
     /**
      * Register User Resource Profile.
      * 
@@ -3291,6 +3295,10 @@ public class Airavata {
 
     public void deleteGatewayStoragePreference(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayID, String storageId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
+    public void getSSHAccountProvisionerNames(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getSSHAccountProvisionerConfigParams(org.apache.airavata.model.security.AuthzToken authzToken, String provisionerName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
     public void registerUserResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile userResourceProfile, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void getUserResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, String userId, String gatewayID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -8275,6 +8283,77 @@ public class Airavata {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteGatewayStoragePreference failed: unknown result");
     }
 
+    public List<String> getSSHAccountProvisionerNames(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    {
+      send_getSSHAccountProvisionerNames(authzToken);
+      return recv_getSSHAccountProvisionerNames();
+    }
+
+    public void send_getSSHAccountProvisionerNames(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.thrift.TException
+    {
+      getSSHAccountProvisionerNames_args args = new getSSHAccountProvisionerNames_args();
+      args.setAuthzToken(authzToken);
+      sendBase("getSSHAccountProvisionerNames", args);
+    }
+
+    public List<String> recv_getSSHAccountProvisionerNames() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    {
+      getSSHAccountProvisionerNames_result result = new getSSHAccountProvisionerNames_result();
+      receiveBase(result, "getSSHAccountProvisionerNames");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      if (result.ae != null) {
+        throw result.ae;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSSHAccountProvisionerNames failed: unknown result");
+    }
+
+    public List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam> getSSHAccountProvisionerConfigParams(org.apache.airavata.model.security.AuthzToken authzToken, String provisionerName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    {
+      send_getSSHAccountProvisionerConfigParams(authzToken, provisionerName);
+      return recv_getSSHAccountProvisionerConfigParams();
+    }
+
+    public void send_getSSHAccountProvisionerConfigParams(org.apache.airavata.model.security.AuthzToken authzToken, String provisionerName) throws org.apache.thrift.TException
+    {
+      getSSHAccountProvisionerConfigParams_args args = new getSSHAccountProvisionerConfigParams_args();
+      args.setAuthzToken(authzToken);
+      args.setProvisionerName(provisionerName);
+      sendBase("getSSHAccountProvisionerConfigParams", args);
+    }
+
+    public List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam> recv_getSSHAccountProvisionerConfigParams() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    {
+      getSSHAccountProvisionerConfigParams_result result = new getSSHAccountProvisionerConfigParams_result();
+      receiveBase(result, "getSSHAccountProvisionerConfigParams");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      if (result.ae != null) {
+        throw result.ae;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSSHAccountProvisionerConfigParams failed: unknown result");
+    }
+
     public String registerUserResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile userResourceProfile) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
     {
       send_registerUserResourceProfile(authzToken, userResourceProfile);
@@ -14586,6 +14665,73 @@ public class Airavata {
       }
     }
 
+    public void getSSHAccountProvisionerNames(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      getSSHAccountProvisionerNames_call method_call = new getSSHAccountProvisionerNames_call(authzToken, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getSSHAccountProvisionerNames_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private org.apache.airavata.model.security.AuthzToken authzToken;
+      public getSSHAccountProvisionerNames_call(org.apache.airavata.model.security.AuthzToken authzToken, 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.authzToken = authzToken;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSSHAccountProvisionerNames", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getSSHAccountProvisionerNames_args args = new getSSHAccountProvisionerNames_args();
+        args.setAuthzToken(authzToken);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public List<String> getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_getSSHAccountProvisionerNames();
+      }
+    }
+
+    public void getSSHAccountProvisionerConfigParams(org.apache.airavata.model.security.AuthzToken authzToken, String provisionerName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      getSSHAccountProvisionerConfigParams_call method_call = new getSSHAccountProvisionerConfigParams_call(authzToken, provisionerName, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getSSHAccountProvisionerConfigParams_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private org.apache.airavata.model.security.AuthzToken authzToken;
+      private String provisionerName;
+      public getSSHAccountProvisionerConfigParams_call(org.apache.airavata.model.security.AuthzToken authzToken, String provisionerName, 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.authzToken = authzToken;
+        this.provisionerName = provisionerName;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSSHAccountProvisionerConfigParams", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getSSHAccountProvisionerConfigParams_args args = new getSSHAccountProvisionerConfigParams_args();
+        args.setAuthzToken(authzToken);
+        args.setProvisionerName(provisionerName);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam> getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_getSSHAccountProvisionerConfigParams();
+      }
+    }
+
     public void registerUserResourceProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile userResourceProfile, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
       registerUserResourceProfile_call method_call = new registerUserResourceProfile_call(authzToken, userResourceProfile, resultHandler, this, ___protocolFactory, ___transport);
@@ -16091,6 +16237,8 @@ public class Airavata {
       processMap.put("updateGatewayStoragePreference", new updateGatewayStoragePreference());
       processMap.put("deleteGatewayComputeResourcePreference", new deleteGatewayComputeResourcePreference());
       processMap.put("deleteGatewayStoragePreference", new deleteGatewayStoragePreference());
+      processMap.put("getSSHAccountProvisionerNames", new getSSHAccountProvisionerNames());
+      processMap.put("getSSHAccountProvisionerConfigParams", new getSSHAccountProvisionerConfigParams());
       processMap.put("registerUserResourceProfile", new registerUserResourceProfile());
       processMap.put("getUserResourceProfile", new getUserResourceProfile());
       processMap.put("updateUserResourceProfile", new updateUserResourceProfile());
@@ -20176,6 +20324,66 @@ public class Airavata {
       }
     }
 
+    public static class getSSHAccountProvisionerNames<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSSHAccountProvisionerNames_args> {
+      public getSSHAccountProvisionerNames() {
+        super("getSSHAccountProvisionerNames");
+      }
+
+      public getSSHAccountProvisionerNames_args getEmptyArgsInstance() {
+        return new getSSHAccountProvisionerNames_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getSSHAccountProvisionerNames_result getResult(I iface, getSSHAccountProvisionerNames_args args) throws org.apache.thrift.TException {
+        getSSHAccountProvisionerNames_result result = new getSSHAccountProvisionerNames_result();
+        try {
+          result.success = iface.getSSHAccountProvisionerNames(args.authzToken);
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        } catch (org.apache.airavata.model.error.AuthorizationException ae) {
+          result.ae = ae;
+        }
+        return result;
+      }
+    }
+
+    public static class getSSHAccountProvisionerConfigParams<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSSHAccountProvisionerConfigParams_args> {
+      public getSSHAccountProvisionerConfigParams() {
+        super("getSSHAccountProvisionerConfigParams");
+      }
+
+      public getSSHAccountProvisionerConfigParams_args getEmptyArgsInstance() {
+        return new getSSHAccountProvisionerConfigParams_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getSSHAccountProvisionerConfigParams_result getResult(I iface, getSSHAccountProvisionerConfigParams_args args) throws org.apache.thrift.TException {
+        getSSHAccountProvisionerConfigParams_result result = new getSSHAccountProvisionerConfigParams_result();
+        try {
+          result.success = iface.getSSHAccountProvisionerConfigParams(args.authzToken, args.provisionerName);
+        } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+          result.ire = ire;
+        } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+          result.ace = ace;
+        } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+          result.ase = ase;
+        } catch (org.apache.airavata.model.error.AuthorizationException ae) {
+          result.ae = ae;
+        }
+        return result;
+      }
+    }
+
     public static class registerUserResourceProfile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, registerUserResourceProfile_args> {
       public registerUserResourceProfile() {
         super("registerUserResourceProfile");
@@ -21415,6 +21623,8 @@ public class Airavata {
       processMap.put("updateGatewayStoragePreference", new updateGatewayStoragePreference());
       processMap.put("deleteGatewayComputeResourcePreference", new deleteGatewayComputeResourcePreference());
       processMap.put("deleteGatewayStoragePreference", new deleteGatewayStoragePreference());
+      processMap.put("getSSHAccountProvisionerNames", new getSSHAccountProvisionerNames());
+      processMap.put("getSSHAccountProvisionerConfigParams", new getSSHAccountProvisionerConfigParams());
       processMap.put("registerUserResourceProfile", new registerUserResourceProfile());
       processMap.put("getUserResourceProfile", new getUserResourceProfile());
       processMap.put("updateUserResourceProfile", new updateUserResourceProfile());
@@ -31095,20 +31305,20 @@ public class Airavata {
       }
     }
 
-    public static class registerUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerUserResourceProfile_args, String> {
-      public registerUserResourceProfile() {
-        super("registerUserResourceProfile");
+    public static class getSSHAccountProvisionerNames<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getSSHAccountProvisionerNames_args, List<String>> {
+      public getSSHAccountProvisionerNames() {
+        super("getSSHAccountProvisionerNames");
       }
 
-      public registerUserResourceProfile_args getEmptyArgsInstance() {
-        return new registerUserResourceProfile_args();
+      public getSSHAccountProvisionerNames_args getEmptyArgsInstance() {
+        return new getSSHAccountProvisionerNames_args();
       }
 
-      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<String>() { 
-          public void onComplete(String o) {
-            registerUserResourceProfile_result result = new registerUserResourceProfile_result();
+        return new AsyncMethodCallback<List<String>>() { 
+          public void onComplete(List<String> o) {
+            getSSHAccountProvisionerNames_result result = new getSSHAccountProvisionerNames_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -31121,7 +31331,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            registerUserResourceProfile_result result = new registerUserResourceProfile_result();
+            getSSHAccountProvisionerNames_result result = new getSSHAccountProvisionerNames_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31162,25 +31372,25 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, registerUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
-        iface.registerUserResourceProfile(args.authzToken, args.userResourceProfile,resultHandler);
+      public void start(I iface, getSSHAccountProvisionerNames_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException {
+        iface.getSSHAccountProvisionerNames(args.authzToken,resultHandler);
       }
     }
 
-    public static class getUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserResourceProfile_args, org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> {
-      public getUserResourceProfile() {
-        super("getUserResourceProfile");
+    public static class getSSHAccountProvisionerConfigParams<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getSSHAccountProvisionerConfigParams_args, List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam>> {
+      public getSSHAccountProvisionerConfigParams() {
+        super("getSSHAccountProvisionerConfigParams");
       }
 
-      public getUserResourceProfile_args getEmptyArgsInstance() {
-        return new getUserResourceProfile_args();
+      public getSSHAccountProvisionerConfigParams_args getEmptyArgsInstance() {
+        return new getSSHAccountProvisionerConfigParams_args();
       }
 
-      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>() { 
-          public void onComplete(org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile o) {
-            getUserResourceProfile_result result = new getUserResourceProfile_result();
+        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam>>() { 
+          public void onComplete(List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam> o) {
+            getSSHAccountProvisionerConfigParams_result result = new getSSHAccountProvisionerConfigParams_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -31193,7 +31403,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getUserResourceProfile_result result = new getUserResourceProfile_result();
+            getSSHAccountProvisionerConfigParams_result result = new getSSHAccountProvisionerConfigParams_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31234,27 +31444,26 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> resultHandler) throws TException {
-        iface.getUserResourceProfile(args.authzToken, args.userId, args.gatewayID,resultHandler);
+      public void start(I iface, getSSHAccountProvisionerConfigParams_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.accountprovisioning.SSHAccountProvisionerConfigParam>> resultHandler) throws TException {
+        iface.getSSHAccountProvisionerConfigParams(args.authzToken, args.provisionerName,resultHandler);
       }
     }
 
-    public static class updateUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateUserResourceProfile_args, Boolean> {
-      public updateUserResourceProfile() {
-        super("updateUserResourceProfile");
+    public static class registerUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerUserResourceProfile_args, String> {
+      public registerUserResourceProfile() {
+        super("registerUserResourceProfile");
       }
 
-      public updateUserResourceProfile_args getEmptyArgsInstance() {
-        return new updateUserResourceProfile_args();
+      public registerUserResourceProfile_args getEmptyArgsInstance() {
+        return new registerUserResourceProfile_args();
       }
 
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            updateUserResourceProfile_result result = new updateUserResourceProfile_result();
+        return new AsyncMethodCallback<String>() { 
+          public void onComplete(String o) {
+            registerUserResourceProfile_result result = new registerUserResourceProfile_result();
             result.success = o;
-            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -31266,7 +31475,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            updateUserResourceProfile_result result = new updateUserResourceProfile_result();
+            registerUserResourceProfile_result result = new registerUserResourceProfile_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31307,27 +31516,26 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, updateUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.updateUserResourceProfile(args.authzToken, args.userId, args.gatewayID, args.userResourceProfile,resultHandler);
+      public void start(I iface, registerUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+        iface.registerUserResourceProfile(args.authzToken, args.userResourceProfile,resultHandler);
       }
     }
 
-    public static class deleteUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteUserResourceProfile_args, Boolean> {
-      public deleteUserResourceProfile() {
-        super("deleteUserResourceProfile");
+    public static class getUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserResourceProfile_args, org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> {
+      public getUserResourceProfile() {
+        super("getUserResourceProfile");
       }
 
-      public deleteUserResourceProfile_args getEmptyArgsInstance() {
-        return new deleteUserResourceProfile_args();
+      public getUserResourceProfile_args getEmptyArgsInstance() {
+        return new getUserResourceProfile_args();
       }
 
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            deleteUserResourceProfile_result result = new deleteUserResourceProfile_result();
+        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>() { 
+          public void onComplete(org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile o) {
+            getUserResourceProfile_result result = new getUserResourceProfile_result();
             result.success = o;
-            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -31339,7 +31547,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            deleteUserResourceProfile_result result = new deleteUserResourceProfile_result();
+            getUserResourceProfile_result result = new getUserResourceProfile_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31380,25 +31588,25 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, deleteUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.deleteUserResourceProfile(args.authzToken, args.userId, args.gatewayID,resultHandler);
+      public void start(I iface, getUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> resultHandler) throws TException {
+        iface.getUserResourceProfile(args.authzToken, args.userId, args.gatewayID,resultHandler);
       }
     }
 
-    public static class addUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addUserComputeResourcePreference_args, Boolean> {
-      public addUserComputeResourcePreference() {
-        super("addUserComputeResourcePreference");
+    public static class updateUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateUserResourceProfile_args, Boolean> {
+      public updateUserResourceProfile() {
+        super("updateUserResourceProfile");
       }
 
-      public addUserComputeResourcePreference_args getEmptyArgsInstance() {
-        return new addUserComputeResourcePreference_args();
+      public updateUserResourceProfile_args getEmptyArgsInstance() {
+        return new updateUserResourceProfile_args();
       }
 
       public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
         return new AsyncMethodCallback<Boolean>() { 
           public void onComplete(Boolean o) {
-            addUserComputeResourcePreference_result result = new addUserComputeResourcePreference_result();
+            updateUserResourceProfile_result result = new updateUserResourceProfile_result();
             result.success = o;
             result.setSuccessIsSet(true);
             try {
@@ -31412,7 +31620,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            addUserComputeResourcePreference_result result = new addUserComputeResourcePreference_result();
+            updateUserResourceProfile_result result = new updateUserResourceProfile_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31453,25 +31661,25 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, addUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.addUserComputeResourcePreference(args.authzToken, args.userId, args.gatewayID, args.userComputeResourceId, args.userComputeResourcePreference,resultHandler);
+      public void start(I iface, updateUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.updateUserResourceProfile(args.authzToken, args.userId, args.gatewayID, args.userResourceProfile,resultHandler);
       }
     }
 
-    public static class addUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addUserStoragePreference_args, Boolean> {
-      public addUserStoragePreference() {
-        super("addUserStoragePreference");
+    public static class deleteUserResourceProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteUserResourceProfile_args, Boolean> {
+      public deleteUserResourceProfile() {
+        super("deleteUserResourceProfile");
       }
 
-      public addUserStoragePreference_args getEmptyArgsInstance() {
-        return new addUserStoragePreference_args();
+      public deleteUserResourceProfile_args getEmptyArgsInstance() {
+        return new deleteUserResourceProfile_args();
       }
 
       public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
         return new AsyncMethodCallback<Boolean>() { 
           public void onComplete(Boolean o) {
-            addUserStoragePreference_result result = new addUserStoragePreference_result();
+            deleteUserResourceProfile_result result = new deleteUserResourceProfile_result();
             result.success = o;
             result.setSuccessIsSet(true);
             try {
@@ -31485,7 +31693,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            addUserStoragePreference_result result = new addUserStoragePreference_result();
+            deleteUserResourceProfile_result result = new deleteUserResourceProfile_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31526,26 +31734,27 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, addUserStoragePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.addUserStoragePreference(args.authzToken, args.userId, args.gatewayID, args.userStorageResourceId, args.userStoragePreference,resultHandler);
+      public void start(I iface, deleteUserResourceProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.deleteUserResourceProfile(args.authzToken, args.userId, args.gatewayID,resultHandler);
       }
     }
 
-    public static class getUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserComputeResourcePreference_args, org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> {
-      public getUserComputeResourcePreference() {
-        super("getUserComputeResourcePreference");
+    public static class addUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addUserComputeResourcePreference_args, Boolean> {
+      public addUserComputeResourcePreference() {
+        super("addUserComputeResourcePreference");
       }
 
-      public getUserComputeResourcePreference_args getEmptyArgsInstance() {
-        return new getUserComputeResourcePreference_args();
+      public addUserComputeResourcePreference_args getEmptyArgsInstance() {
+        return new addUserComputeResourcePreference_args();
       }
 
-      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>() { 
-          public void onComplete(org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference o) {
-            getUserComputeResourcePreference_result result = new getUserComputeResourcePreference_result();
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            addUserComputeResourcePreference_result result = new addUserComputeResourcePreference_result();
             result.success = o;
+            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -31557,7 +31766,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getUserComputeResourcePreference_result result = new getUserComputeResourcePreference_result();
+            addUserComputeResourcePreference_result result = new addUserComputeResourcePreference_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31598,26 +31807,27 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> resultHandler) throws TException {
-        iface.getUserComputeResourcePreference(args.authzToken, args.userId, args.gatewayID, args.userComputeResourceId,resultHandler);
+      public void start(I iface, addUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.addUserComputeResourcePreference(args.authzToken, args.userId, args.gatewayID, args.userComputeResourceId, args.userComputeResourcePreference,resultHandler);
       }
     }
 
-    public static class getUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserStoragePreference_args, org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> {
-      public getUserStoragePreference() {
-        super("getUserStoragePreference");
+    public static class addUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addUserStoragePreference_args, Boolean> {
+      public addUserStoragePreference() {
+        super("addUserStoragePreference");
       }
 
-      public getUserStoragePreference_args getEmptyArgsInstance() {
-        return new getUserStoragePreference_args();
+      public addUserStoragePreference_args getEmptyArgsInstance() {
+        return new addUserStoragePreference_args();
       }
 
-      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>() { 
-          public void onComplete(org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference o) {
-            getUserStoragePreference_result result = new getUserStoragePreference_result();
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            addUserStoragePreference_result result = new addUserStoragePreference_result();
             result.success = o;
+            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -31629,7 +31839,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getUserStoragePreference_result result = new getUserStoragePreference_result();
+            addUserStoragePreference_result result = new addUserStoragePreference_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31670,25 +31880,25 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getUserStoragePreference_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> resultHandler) throws TException {
-        iface.getUserStoragePreference(args.authzToken, args.userId, args.gatewayID, args.userStorageResourceId,resultHandler);
+      public void start(I iface, addUserStoragePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.addUserStoragePreference(args.authzToken, args.userId, args.gatewayID, args.userStorageResourceId, args.userStoragePreference,resultHandler);
       }
     }
 
-    public static class getAllUserComputeResourcePreferences<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserComputeResourcePreferences_args, List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>> {
-      public getAllUserComputeResourcePreferences() {
-        super("getAllUserComputeResourcePreferences");
+    public static class getUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserComputeResourcePreference_args, org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> {
+      public getUserComputeResourcePreference() {
+        super("getUserComputeResourcePreference");
       }
 
-      public getAllUserComputeResourcePreferences_args getEmptyArgsInstance() {
-        return new getAllUserComputeResourcePreferences_args();
+      public getUserComputeResourcePreference_args getEmptyArgsInstance() {
+        return new getUserComputeResourcePreference_args();
       }
 
-      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>>() { 
-          public void onComplete(List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> o) {
-            getAllUserComputeResourcePreferences_result result = new getAllUserComputeResourcePreferences_result();
+        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>() { 
+          public void onComplete(org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference o) {
+            getUserComputeResourcePreference_result result = new getUserComputeResourcePreference_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -31701,7 +31911,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getAllUserComputeResourcePreferences_result result = new getAllUserComputeResourcePreferences_result();
+            getUserComputeResourcePreference_result result = new getUserComputeResourcePreference_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31742,25 +31952,25 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getAllUserComputeResourcePreferences_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>> resultHandler) throws TException {
-        iface.getAllUserComputeResourcePreferences(args.authzToken, args.userId, args.gatewayID,resultHandler);
+      public void start(I iface, getUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> resultHandler) throws TException {
+        iface.getUserComputeResourcePreference(args.authzToken, args.userId, args.gatewayID, args.userComputeResourceId,resultHandler);
       }
     }
 
-    public static class getAllUserStoragePreferences<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserStoragePreferences_args, List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>> {
-      public getAllUserStoragePreferences() {
-        super("getAllUserStoragePreferences");
+    public static class getUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserStoragePreference_args, org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> {
+      public getUserStoragePreference() {
+        super("getUserStoragePreference");
       }
 
-      public getAllUserStoragePreferences_args getEmptyArgsInstance() {
-        return new getAllUserStoragePreferences_args();
+      public getUserStoragePreference_args getEmptyArgsInstance() {
+        return new getUserStoragePreference_args();
       }
 
-      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>>() { 
-          public void onComplete(List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> o) {
-            getAllUserStoragePreferences_result result = new getAllUserStoragePreferences_result();
+        return new AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>() { 
+          public void onComplete(org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference o) {
+            getUserStoragePreference_result result = new getUserStoragePreference_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -31773,7 +31983,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getAllUserStoragePreferences_result result = new getAllUserStoragePreferences_result();
+            getUserStoragePreference_result result = new getUserStoragePreference_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31814,25 +32024,25 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getAllUserStoragePreferences_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>> resultHandler) throws TException {
-        iface.getAllUserStoragePreferences(args.authzToken, args.userId, args.gatewayID,resultHandler);
+      public void start(I iface, getUserStoragePreference_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> resultHandler) throws TException {
+        iface.getUserStoragePreference(args.authzToken, args.userId, args.gatewayID, args.userStorageResourceId,resultHandler);
       }
     }
 
-    public static class getAllUserResourceProfiles<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserResourceProfiles_args, List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>> {
-      public getAllUserResourceProfiles() {
-        super("getAllUserResourceProfiles");
+    public static class getAllUserComputeResourcePreferences<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserComputeResourcePreferences_args, List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>> {
+      public getAllUserComputeResourcePreferences() {
+        super("getAllUserComputeResourcePreferences");
       }
 
-      public getAllUserResourceProfiles_args getEmptyArgsInstance() {
-        return new getAllUserResourceProfiles_args();
+      public getAllUserComputeResourcePreferences_args getEmptyArgsInstance() {
+        return new getAllUserComputeResourcePreferences_args();
       }
 
-      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>>() { 
-          public void onComplete(List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> o) {
-            getAllUserResourceProfiles_result result = new getAllUserResourceProfiles_result();
+        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>>() { 
+          public void onComplete(List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference> o) {
+            getAllUserComputeResourcePreferences_result result = new getAllUserComputeResourcePreferences_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -31845,7 +32055,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getAllUserResourceProfiles_result result = new getAllUserResourceProfiles_result();
+            getAllUserComputeResourcePreferences_result result = new getAllUserComputeResourcePreferences_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31886,27 +32096,26 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getAllUserResourceProfiles_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>> resultHandler) throws TException {
-        iface.getAllUserResourceProfiles(args.authzToken,resultHandler);
+      public void start(I iface, getAllUserComputeResourcePreferences_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference>> resultHandler) throws TException {
+        iface.getAllUserComputeResourcePreferences(args.authzToken, args.userId, args.gatewayID,resultHandler);
       }
     }
 
-    public static class updateUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateUserComputeResourcePreference_args, Boolean> {
-      public updateUserComputeResourcePreference() {
-        super("updateUserComputeResourcePreference");
+    public static class getAllUserStoragePreferences<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserStoragePreferences_args, List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>> {
+      public getAllUserStoragePreferences() {
+        super("getAllUserStoragePreferences");
       }
 
-      public updateUserComputeResourcePreference_args getEmptyArgsInstance() {
-        return new updateUserComputeResourcePreference_args();
+      public getAllUserStoragePreferences_args getEmptyArgsInstance() {
+        return new getAllUserStoragePreferences_args();
       }
 
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            updateUserComputeResourcePreference_result result = new updateUserComputeResourcePreference_result();
+        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>>() { 
+          public void onComplete(List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference> o) {
+            getAllUserStoragePreferences_result result = new getAllUserStoragePreferences_result();
             result.success = o;
-            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -31918,7 +32127,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            updateUserComputeResourcePreference_result result = new updateUserComputeResourcePreference_result();
+            getAllUserStoragePreferences_result result = new getAllUserStoragePreferences_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -31959,27 +32168,26 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, updateUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.updateUserComputeResourcePreference(args.authzToken, args.userId, args.gatewayID, args.userComputeResourceId, args.userComputeResourcePreference,resultHandler);
+      public void start(I iface, getAllUserStoragePreferences_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference>> resultHandler) throws TException {
+        iface.getAllUserStoragePreferences(args.authzToken, args.userId, args.gatewayID,resultHandler);
       }
     }
 
-    public static class updateUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateUserStoragePreference_args, Boolean> {
-      public updateUserStoragePreference() {
-        super("updateUserStoragePreference");
+    public static class getAllUserResourceProfiles<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserResourceProfiles_args, List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>> {
+      public getAllUserResourceProfiles() {
+        super("getAllUserResourceProfiles");
       }
 
-      public updateUserStoragePreference_args getEmptyArgsInstance() {
-        return new updateUserStoragePreference_args();
+      public getAllUserResourceProfiles_args getEmptyArgsInstance() {
+        return new getAllUserResourceProfiles_args();
       }
 
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            updateUserStoragePreference_result result = new updateUserStoragePreference_result();
+        return new AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>>() { 
+          public void onComplete(List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile> o) {
+            getAllUserResourceProfiles_result result = new getAllUserResourceProfiles_result();
             result.success = o;
-            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -31991,7 +32199,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            updateUserStoragePreference_result result = new updateUserStoragePreference_result();
+            getAllUserResourceProfiles_result result = new getAllUserResourceProfiles_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32032,25 +32240,25 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, updateUserStoragePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.updateUserStoragePreference(args.authzToken, args.userId, args.gatewayID, args.userStorageId, args.userStoragePreference,resultHandler);
+      public void start(I iface, getAllUserResourceProfiles_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile>> resultHandler) throws TException {
+        iface.getAllUserResourceProfiles(args.authzToken,resultHandler);
       }
     }
 
-    public static class deleteUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteUserComputeResourcePreference_args, Boolean> {
-      public deleteUserComputeResourcePreference() {
-        super("deleteUserComputeResourcePreference");
+    public static class updateUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateUserComputeResourcePreference_args, Boolean> {
+      public updateUserComputeResourcePreference() {
+        super("updateUserComputeResourcePreference");
       }
 
-      public deleteUserComputeResourcePreference_args getEmptyArgsInstance() {
-        return new deleteUserComputeResourcePreference_args();
+      public updateUserComputeResourcePreference_args getEmptyArgsInstance() {
+        return new updateUserComputeResourcePreference_args();
       }
 
       public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
         return new AsyncMethodCallback<Boolean>() { 
           public void onComplete(Boolean o) {
-            deleteUserComputeResourcePreference_result result = new deleteUserComputeResourcePreference_result();
+            updateUserComputeResourcePreference_result result = new updateUserComputeResourcePreference_result();
             result.success = o;
             result.setSuccessIsSet(true);
             try {
@@ -32064,7 +32272,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            deleteUserComputeResourcePreference_result result = new deleteUserComputeResourcePreference_result();
+            updateUserComputeResourcePreference_result result = new updateUserComputeResourcePreference_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32105,25 +32313,25 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, deleteUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.deleteUserComputeResourcePreference(args.authzToken, args.userId, args.gatewayID, args.userComputeResourceId,resultHandler);
+      public void start(I iface, updateUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.updateUserComputeResourcePreference(args.authzToken, args.userId, args.gatewayID, args.userComputeResourceId, args.userComputeResourcePreference,resultHandler);
       }
     }
 
-    public static class deleteUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteUserStoragePreference_args, Boolean> {
-      public deleteUserStoragePreference() {
-        super("deleteUserStoragePreference");
+    public static class updateUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateUserStoragePreference_args, Boolean> {
+      public updateUserStoragePreference() {
+        super("updateUserStoragePreference");
       }
 
-      public deleteUserStoragePreference_args getEmptyArgsInstance() {
-        return new deleteUserStoragePreference_args();
+      public updateUserStoragePreference_args getEmptyArgsInstance() {
+        return new updateUserStoragePreference_args();
       }
 
       public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
         return new AsyncMethodCallback<Boolean>() { 
           public void onComplete(Boolean o) {
-            deleteUserStoragePreference_result result = new deleteUserStoragePreference_result();
+            updateUserStoragePreference_result result = new updateUserStoragePreference_result();
             result.success = o;
             result.setSuccessIsSet(true);
             try {
@@ -32137,7 +32345,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            deleteUserStoragePreference_result result = new deleteUserStoragePreference_result();
+            updateUserStoragePreference_result result = new updateUserStoragePreference_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32178,26 +32386,27 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, deleteUserStoragePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.deleteUserStoragePreference(args.authzToken, args.userId, args.gatewayID, args.userStorageId,resultHandler);
+      public void start(I iface, updateUserStoragePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.updateUserStoragePreference(args.authzToken, args.userId, args.gatewayID, args.userStorageId, args.userStoragePreference,resultHandler);
       }
     }
 
-    public static class getAllWorkflows<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllWorkflows_args, List<String>> {
-      public getAllWorkflows() {
-        super("getAllWorkflows");
+    public static class deleteUserComputeResourcePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteUserComputeResourcePreference_args, Boolean> {
+      public deleteUserComputeResourcePreference() {
+        super("deleteUserComputeResourcePreference");
       }
 
-      public getAllWorkflows_args getEmptyArgsInstance() {
-        return new getAllWorkflows_args();
+      public deleteUserComputeResourcePreference_args getEmptyArgsInstance() {
+        return new deleteUserComputeResourcePreference_args();
       }
 
-      public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<List<String>>() { 
-          public void onComplete(List<String> o) {
-            getAllWorkflows_result result = new getAllWorkflows_result();
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            deleteUserComputeResourcePreference_result result = new deleteUserComputeResourcePreference_result();
             result.success = o;
+            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -32209,7 +32418,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getAllWorkflows_result result = new getAllWorkflows_result();
+            deleteUserComputeResourcePreference_result result = new deleteUserComputeResourcePreference_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32250,26 +32459,27 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getAllWorkflows_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException {
-        iface.getAllWorkflows(args.authzToken, args.gatewayId,resultHandler);
+      public void start(I iface, deleteUserComputeResourcePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.deleteUserComputeResourcePreference(args.authzToken, args.userId, args.gatewayID, args.userComputeResourceId,resultHandler);
       }
     }
 
-    public static class getLatestQueueStatuses<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLatestQueueStatuses_args, List<org.apache.airavata.model.status.QueueStatusModel>> {
-      public getLatestQueueStatuses() {
-        super("getLatestQueueStatuses");
+    public static class deleteUserStoragePreference<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteUserStoragePreference_args, Boolean> {
+      public deleteUserStoragePreference() {
+        super("deleteUserStoragePreference");
       }
 
-      public getLatestQueueStatuses_args getEmptyArgsInstance() {
-        return new getLatestQueueStatuses_args();
+      public deleteUserStoragePreference_args getEmptyArgsInstance() {
+        return new deleteUserStoragePreference_args();
       }
 
-      public AsyncMethodCallback<List<org.apache.airavata.model.status.QueueStatusModel>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<List<org.apache.airavata.model.status.QueueStatusModel>>() { 
-          public void onComplete(List<org.apache.airavata.model.status.QueueStatusModel> o) {
-            getLatestQueueStatuses_result result = new getLatestQueueStatuses_result();
+        return new AsyncMethodCallback<Boolean>() { 
+          public void onComplete(Boolean o) {
+            deleteUserStoragePreference_result result = new deleteUserStoragePreference_result();
             result.success = o;
+            result.setSuccessIsSet(true);
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -32281,7 +32491,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getLatestQueueStatuses_result result = new getLatestQueueStatuses_result();
+            deleteUserStoragePreference_result result = new deleteUserStoragePreference_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32322,25 +32532,25 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getLatestQueueStatuses_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.status.QueueStatusModel>> resultHandler) throws TException {
-        iface.getLatestQueueStatuses(args.authzToken,resultHandler);
+      public void start(I iface, deleteUserStoragePreference_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.deleteUserStoragePreference(args.authzToken, args.userId, args.gatewayID, args.userStorageId,resultHandler);
       }
     }
 
-    public static class getWorkflow<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getWorkflow_args, org.apache.airavata.model.WorkflowModel> {
-      public getWorkflow() {
-        super("getWorkflow");
+    public static class getAllWorkflows<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllWorkflows_args, List<String>> {
+      public getAllWorkflows() {
+        super("getAllWorkflows");
       }
 
-      public getWorkflow_args getEmptyArgsInstance() {
-        return new getWorkflow_args();
+      public getAllWorkflows_args getEmptyArgsInstance() {
+        return new getAllWorkflows_args();
       }
 
-      public AsyncMethodCallback<org.apache.airavata.model.WorkflowModel> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<org.apache.airavata.model.WorkflowModel>() { 
-          public void onComplete(org.apache.airavata.model.WorkflowModel o) {
-            getWorkflow_result result = new getWorkflow_result();
+        return new AsyncMethodCallback<List<String>>() { 
+          public void onComplete(List<String> o) {
+            getAllWorkflows_result result = new getAllWorkflows_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -32353,7 +32563,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getWorkflow_result result = new getWorkflow_result();
+            getAllWorkflows_result result = new getAllWorkflows_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32394,25 +32604,26 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getWorkflow_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.WorkflowModel> resultHandler) throws TException {
-        iface.getWorkflow(args.authzToken, args.workflowTemplateId,resultHandler);
+      public void start(I iface, getAllWorkflows_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException {
+        iface.getAllWorkflows(args.authzToken, args.gatewayId,resultHandler);
       }
     }
 
-    public static class deleteWorkflow<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteWorkflow_args, Void> {
-      public deleteWorkflow() {
-        super("deleteWorkflow");
+    public static class getLatestQueueStatuses<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLatestQueueStatuses_args, List<org.apache.airavata.model.status.QueueStatusModel>> {
+      public getLatestQueueStatuses() {
+        super("getLatestQueueStatuses");
       }
 
-      public deleteWorkflow_args getEmptyArgsInstance() {
-        return new deleteWorkflow_args();
+      public getLatestQueueStatuses_args getEmptyArgsInstance() {
+        return new getLatestQueueStatuses_args();
       }
 
-      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<List<org.apache.airavata.model.status.QueueStatusModel>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Void>() { 
-          public void onComplete(Void o) {
-            deleteWorkflow_result result = new deleteWorkflow_result();
+        return new AsyncMethodCallback<List<org.apache.airavata.model.status.QueueStatusModel>>() { 
+          public void onComplete(List<org.apache.airavata.model.status.QueueStatusModel> o) {
+            getLatestQueueStatuses_result result = new getLatestQueueStatuses_result();
+            result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -32424,7 +32635,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            deleteWorkflow_result result = new deleteWorkflow_result();
+            getLatestQueueStatuses_result result = new getLatestQueueStatuses_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32465,25 +32676,25 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, deleteWorkflow_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
-        iface.deleteWorkflow(args.authzToken, args.workflowTemplateId,resultHandler);
+      public void start(I iface, getLatestQueueStatuses_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.status.QueueStatusModel>> resultHandler) throws TException {
+        iface.getLatestQueueStatuses(args.authzToken,resultHandler);
       }
     }
 
-    public static class registerWorkflow<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerWorkflow_args, String> {
-      public registerWorkflow() {
-        super("registerWorkflow");
+    public static class getWorkflow<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getWorkflow_args, org.apache.airavata.model.WorkflowModel> {
+      public getWorkflow() {
+        super("getWorkflow");
       }
 
-      public registerWorkflow_args getEmptyArgsInstance() {
-        return new registerWorkflow_args();
+      public getWorkflow_args getEmptyArgsInstance() {
+        return new getWorkflow_args();
       }
 
-      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<org.apache.airavata.model.WorkflowModel> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<String>() { 
-          public void onComplete(String o) {
-            registerWorkflow_result result = new registerWorkflow_result();
+        return new AsyncMethodCallback<org.apache.airavata.model.WorkflowModel>() { 
+          public void onComplete(org.apache.airavata.model.WorkflowModel o) {
+            getWorkflow_result result = new getWorkflow_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -32496,7 +32707,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            registerWorkflow_result result = new registerWorkflow_result();
+            getWorkflow_result result = new getWorkflow_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32537,25 +32748,25 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, registerWorkflow_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
-        iface.registerWorkflow(args.authzToken, args.gatewayId, args.workflow,resultHandler);
+      public void start(I iface, getWorkflow_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.WorkflowModel> resultHandler) throws TException {
+        iface.getWorkflow(args.authzToken, args.workflowTemplateId,resultHandler);
       }
     }
 
-    public static class updateWorkflow<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateWorkflow_args, Void> {
-      public updateWorkflow() {
-        super("updateWorkflow");
+    public static class deleteWorkflow<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteWorkflow_args, Void> {
+      public deleteWorkflow() {
+        super("deleteWorkflow");
       }
 
-      public updateWorkflow_args getEmptyArgsInstance() {
-        return new updateWorkflow_args();
+      public deleteWorkflow_args getEmptyArgsInstance() {
+        return new deleteWorkflow_args();
       }
 
       public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
         return new AsyncMethodCallback<Void>() { 
           public void onComplete(Void o) {
-            updateWorkflow_result result = new updateWorkflow_result();
+            deleteWorkflow_result result = new deleteWorkflow_result();
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -32567,7 +32778,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            updateWorkflow_result result = new updateWorkflow_result();
+            deleteWorkflow_result result = new deleteWorkflow_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32608,25 +32819,25 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, updateWorkflow_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
-        iface.updateWorkflow(args.authzToken, args.workflowTemplateId, args.workflow,resultHandler);
+      public void start(I iface, deleteWorkflow_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+        iface.deleteWorkflow(args.authzToken, args.workflowTemplateId,resultHandler);
       }
     }
 
-    public static class getWorkflowTemplateId<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getWorkflowTemplateId_args, String> {
-      public getWorkflowTemplateId() {
-        super("getWorkflowTemplateId");
+    public static class registerWorkflow<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerWorkflow_args, String> {
+      public registerWorkflow() {
+        super("registerWorkflow");
       }
 
-      public getWorkflowTemplateId_args getEmptyArgsInstance() {
-        return new getWorkflowTemplateId_args();
+      public registerWorkflow_args getEmptyArgsInstance() {
+        return new registerWorkflow_args();
       }
 
       public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
         return new AsyncMethodCallback<String>() { 
           public void onComplete(String o) {
-            getWorkflowTemplateId_result result = new getWorkflowTemplateId_result();
+            registerWorkflow_result result = new registerWorkflow_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -32639,7 +32850,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            getWorkflowTemplateId_result result = new getWorkflowTemplateId_result();
+            registerWorkflow_result result = new registerWorkflow_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32680,27 +32891,25 @@ public class Airavata {
         return false;
       }
 
-      public void start(I iface, getWorkflowTemplateId_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
-        iface.getWorkflowTemplateId(args.authzToken, args.workflowName,resultHandler);
+      public void start(I iface, registerWorkflow_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+        iface.registerWorkflow(args.authzToken, args.gatewayId, args.workflow,resultHandler);
       }
     }
 
-    public static class isWorkflowExistWithName<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isWorkflowExistWithName_args, Boolean> {
-      public isWorkflowExistWithName() {
-        super("isWorkflowExistWithName");
+    public static class updateWorkflow<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateWorkflow_args, Void> {
+      public updateWorkflow() {
+        super("updateWorkflow");
       }
 
-      public isWorkflowExistWithName_args getEmptyArgsInstance() {
-        return new isWorkflowExistWithName_args();
+      public updateWorkflow_args getEmptyArgsInstance() {
+        return new updateWorkflow_args();
       }
 
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
-            isWorkflowExistWithName_result result = new isWorkflowExistWithName_result();
-            result.success = o;
-            result.setSuccessIsSet(true);
+        return new AsyncMethodCallback<Void>() { 
+          public void onComplete(Void o) {
+            updateWorkflow_result result = new updateWorkflow_result();
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -32712,7 +32921,7 @@ public class Airavata {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            isWorkflowExistWithName_result result = new isWorkflowExistWithName_result();
+            updateWorkflow_result result = new updateWorkflow_result();
             if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
                         result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
                         result.setIreIsSet(true);
@@ -32753,25 +32962,25 @@ public class Airavata {
         return fal

<TRUNCATED>

[31/40] airavata git commit: AIRAVATA-2500 Fix bug deriving ssh hostname

Posted by ma...@apache.org.
AIRAVATA-2500 Fix bug deriving ssh hostname


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

Branch: refs/heads/develop
Commit: 596eb5ba21bec45cdd5eb92a7b09f0249eddcceb
Parents: 8f68bc1
Author: Marcus Christie <ma...@apache.org>
Authored: Mon Sep 25 09:24:41 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Mon Sep 25 09:42:24 2017 -0400

----------------------------------------------------------------------
 .../airavata/accountprovisioning/SSHAccountManager.java     | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/596eb5ba/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
index 61deb49..e7e9052 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
@@ -183,6 +183,15 @@ public class SSHAccountManager {
         return userComputeResourcePreference;
     }
 
+    private static String getSSHHostname(ComputeResourceDescription computeResourceDescription, SSHJobSubmission sshJobSubmission) {
+        String alternativeSSHHostName = sshJobSubmission.getAlternativeSSHHostName();
+        if (alternativeSSHHostName != null && !"".equals(alternativeSSHHostName.trim())) {
+            return alternativeSSHHostName;
+        } else {
+            return computeResourceDescription.getHostName();
+        }
+    }
+
     private static SSHAccountProvisioner createSshAccountProvisioner(String gatewayId, ComputeResourcePreference computeResourcePreference) throws InvalidSetupException {
         String provisionerName = computeResourcePreference.getSshAccountProvisioner();
         Map<ConfigParam,String> provisionerConfig = convertConfigParams(provisionerName, computeResourcePreference.getSshAccountProvisionerConfig());


[22/40] airavata git commit: AIRAVATA-2500 SSHAccountManager bug fixes

Posted by ma...@apache.org.
AIRAVATA-2500 SSHAccountManager bug fixes


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

Branch: refs/heads/develop
Commit: 31f3906b6123bb1ce57cd9030f05f15d343cd9f9
Parents: 3184c23
Author: Marcus Christie <ma...@apache.org>
Authored: Thu Sep 7 13:11:03 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Tue Sep 19 15:08:05 2017 -0400

----------------------------------------------------------------------
 .../apache/airavata/accountprovisioning/SSHAccountManager.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/31f3906b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
index 8493dc1..70c144c 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
@@ -165,7 +165,7 @@ public class SSHAccountManager {
                         PasswordCredential password = credentialStoreServiceClient.getPasswordCredential(configEntry.getValue(), gatewayId);
                         resolvedConfig.put(configEntry.getKey(), password.getPassword());
                     } catch (TException e) {
-                        throw new RuntimeException("Failed to get password needed to configure " + provisionerName);
+                        throw new RuntimeException("Failed to get password needed to configure " + provisionerName, e);
                     }
                 } else {
                     resolvedConfig.put(configEntry.getKey(), configEntry.getValue());
@@ -182,6 +182,8 @@ public class SSHAccountManager {
     }
 
     private static Map<ConfigParam, String> convertConfigParams(String provisionerName, Map<String, String> thriftConfigParams) {
+        // TODO: also check that all required parameters are present?
+        // TODO: also, this doesn't handle optional entries which should be skipped if missing from thriftConfigParams
         List<ConfigParam> configParams = SSHAccountProvisionerFactory.getSSHAccountProvisionerConfigParams(provisionerName);
         Map<String, ConfigParam> configParamMap = configParams.stream().collect(Collectors.toMap(ConfigParam::getName, Function.identity()));
 
@@ -204,7 +206,7 @@ public class SSHAccountManager {
         try {
             String credServerHost = ServerSettings.getCredentialStoreServerHost();
             int credServerPort = Integer.valueOf(ServerSettings.getCredentialStoreServerPort());
-            return CredentialStoreClientFactory.createAiravataCSClient(null, 0);
+            return CredentialStoreClientFactory.createAiravataCSClient(credServerHost, credServerPort);
         } catch (CredentialStoreException | ApplicationSettingsException e) {
             throw new RuntimeException("Failed to create credential store service client", e);
         }


[11/40] airavata git commit: AIRAVATA-2500: generated Thrift stub code

Posted by ma...@apache.org.
AIRAVATA-2500: generated Thrift stub code


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

Branch: refs/heads/develop
Commit: 722aabd4c4fcde001ace20416ea16027a1299224
Parents: 8f2f135
Author: Marcus Christie <ma...@apache.org>
Authored: Thu Aug 31 09:17:23 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Tue Sep 19 15:07:56 2017 -0400

----------------------------------------------------------------------
 .../java/org/apache/airavata/api/Airavata.java  | 4698 +++++++++++++++---
 .../SSHAccountProvisioner.java                  |  600 +++
 .../SSHAccountProvisionerConfigParam.java       |  733 +++
 .../SSHAccountProvisionerConfigParamType.java   |   62 +
 4 files changed, 5345 insertions(+), 748 deletions(-)
----------------------------------------------------------------------



[08/40] airavata git commit: AIRAVATA-2500 Update thrift API and regenerated

Posted by ma...@apache.org.
AIRAVATA-2500 Update thrift API and regenerated


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

Branch: refs/heads/develop
Commit: 2a90139402c9c82350138adc4dc3bc59d56cee93
Parents: 77baac4
Author: Marcus Christie <ma...@apache.org>
Authored: Mon Aug 14 12:36:19 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Tue Sep 19 15:07:56 2017 -0400

----------------------------------------------------------------------
 .../java/org/apache/airavata/api/Airavata.java  | 35330 +++++++++--------
 .../ComputeResourcePreference.java              |   285 +-
 .../gatewayprofile/GatewayResourceProfile.java  |    72 +-
 .../account_provisioning_model.thrift           |     2 +-
 .../gateway_resource_profile_model.thrift       |     2 +-
 5 files changed, 19411 insertions(+), 16280 deletions(-)
----------------------------------------------------------------------



[32/40] airavata git commit: AIRAVATA-2500 Add 'validated' flag to UserComputeResourcePreference

Posted by ma...@apache.org.
AIRAVATA-2500 Add 'validated' flag to UserComputeResourcePreference


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

Branch: refs/heads/develop
Commit: 20fc3fdbbd7928c63c0ee6abf1382d9970bbef67
Parents: 596eb5b
Author: Marcus Christie <ma...@apache.org>
Authored: Mon Sep 25 09:24:01 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Mon Sep 25 09:57:28 2017 -0400

----------------------------------------------------------------------
 .../accountprovisioning/SSHAccountManager.java  |  1 +
 .../catalog/impl/UsrResourceProfileImpl.java    |  2 ++
 .../model/UserComputeResourcePreference.java    | 10 ++++++
 .../UserComputeHostPreferenceResource.java      | 11 ++++++
 .../app/catalog/util/AppCatalogJPAUtils.java    |  1 +
 .../util/AppCatalogThriftConversion.java        |  1 +
 .../src/main/resources/appcatalog-derby.sql     | 38 +++++++++++++++++++-
 .../src/main/resources/appcatalog-mysql.sql     | 38 ++++++++++++++++++++
 .../DeltaScripts/appCatalog_schema_delta.sql    |  2 ++
 .../user_resource_profile_model.thrift          |  8 ++++-
 10 files changed, 110 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/20fc3fdb/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
index e7e9052..136bbee 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
@@ -180,6 +180,7 @@ public class SSHAccountManager {
         userComputeResourcePreference.setComputeResourceId(computeResourceId);
         userComputeResourcePreference.setLoginUserName(username);
         userComputeResourcePreference.setScratchLocation(scratchLocation);
+        userComputeResourcePreference.setValidated(true);
         return userComputeResourcePreference;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/20fc3fdb/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/UsrResourceProfileImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/UsrResourceProfileImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/UsrResourceProfileImpl.java
index b7a95f8..a7366ca 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/UsrResourceProfileImpl.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/UsrResourceProfileImpl.java
@@ -83,6 +83,7 @@ public class UsrResourceProfileImpl implements UsrResourceProfile {
                     if (preference.getReservationEndTime() > 0) {
                         resource.setReservationEndTime(AiravataUtils.getTime(preference.getReservationEndTime()));
                     }
+                    resource.setValidated(preference.isValidated());
                     resource.save();
                 }
             }
@@ -142,6 +143,7 @@ public class UsrResourceProfileImpl implements UsrResourceProfile {
                     if (preference.getReservationEndTime() > 0) {
                         resource.setReservationEndTime(AiravataUtils.getTime(preference.getReservationEndTime()));
                     }
+                    resource.setValidated(preference.isValidated());
                     resource.save();
                 }
             }

http://git-wip-us.apache.org/repos/asf/airavata/blob/20fc3fdb/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/UserComputeResourcePreference.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/UserComputeResourcePreference.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/UserComputeResourcePreference.java
index e86248f..81ef75a 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/UserComputeResourcePreference.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/UserComputeResourcePreference.java
@@ -54,6 +54,8 @@ public class UserComputeResourcePreference {
     private Timestamp reservationStartTime;
     @Column(name = "RESERVATION_END_TIME")
     private Timestamp reservationEndTime;
+    @Column(name = "VALIDATED")
+    private boolean validated;
 
 
     @ManyToOne(cascade= CascadeType.MERGE)
@@ -184,4 +186,12 @@ public class UserComputeResourcePreference {
     public void setReservationEndTime(Timestamp reservationEndTime) {
         this.reservationEndTime = reservationEndTime;
     }
+
+    public boolean isValidated() {
+        return validated;
+    }
+
+    public void setValidated(boolean validated) {
+        this.validated = validated;
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/20fc3fdb/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/UserComputeHostPreferenceResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/UserComputeHostPreferenceResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/UserComputeHostPreferenceResource.java
index 3f215c2..9c8cbf0 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/UserComputeHostPreferenceResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/UserComputeHostPreferenceResource.java
@@ -49,6 +49,7 @@ public class UserComputeHostPreferenceResource extends AppCatAbstractResource {
     private String reservation;
     private Timestamp reservationStartTime;
     private Timestamp reservationEndTime;
+    private boolean validated = false;
 
     private UserResourceProfileResource userResourceProfileResource;
     private ComputeResourceResource computeHostResource;
@@ -166,6 +167,14 @@ public class UserComputeHostPreferenceResource extends AppCatAbstractResource {
         this.reservationEndTime = reservationEndTime;
     }
 
+    public boolean isValidated() {
+        return validated;
+    }
+
+    public void setValidated(boolean validated) {
+        this.validated = validated;
+    }
+
     @Override
     public void remove(Object identifier) throws AppCatalogException {
         CompositeIdentifier ids;
@@ -378,6 +387,7 @@ public class UserComputeHostPreferenceResource extends AppCatAbstractResource {
                 existingPreference.setReservation(reservation);
                 existingPreference.setReservationStartTime(reservationStartTime);
                 existingPreference.setReservationEndTime(reservationEndTime);
+                existingPreference.setValidated(validated);
                 em.merge(existingPreference);
             } else {
                 UserComputeResourcePreference resourcePreference = new UserComputeResourcePreference();
@@ -394,6 +404,7 @@ public class UserComputeHostPreferenceResource extends AppCatAbstractResource {
                 resourcePreference.setReservation(reservation);
                 resourcePreference.setReservationStartTime(reservationStartTime);
                 resourcePreference.setReservationEndTime(reservationEndTime);
+                resourcePreference.setValidated(validated);
                 em.persist(resourcePreference);
             }
             em.getTransaction().commit();

http://git-wip-us.apache.org/repos/asf/airavata/blob/20fc3fdb/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
index c41e8a2..2efd419 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
@@ -987,6 +987,7 @@ public class AppCatalogJPAUtils {
             resource.setReservation(o.getReservation());
             resource.setReservationStartTime(o.getReservationStartTime());
             resource.setReservationEndTime(o.getReservationEndTime());
+            resource.setValidated(o.isValidated());
         }
         return resource;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/20fc3fdb/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
index 09258a2..944ad77 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
@@ -901,6 +901,7 @@ public class AppCatalogThriftConversion {
         if (resource.getReservationEndTime() != null) {
             preference.setReservationEndTime(resource.getReservationEndTime().getTime());
         }
+        preference.setValidated(resource.isValidated());
         return preference;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/20fc3fdb/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql b/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
index c57549e..db9e261 100644
--- a/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
+++ b/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
@@ -532,7 +532,43 @@ CREATE TABLE WORKFLOW_OUTPUT
          FOREIGN KEY (WF_TEMPLATE_ID) REFERENCES WORKFLOW(WF_TEMPLATE_ID) ON DELETE CASCADE
 );
 
-
+CREATE TABLE USER_RESOURCE_PROFILE (
+  USER_ID varchar(255) NOT NULL,
+  CREATION_TIME TIMESTAMP DEFAULT NULL,
+  CS_TOKEN varchar(255) DEFAULT NULL,
+  GATEWAY_ID varchar(255) DEFAULT NULL,
+  IDENTITY_SERVER_PWD_CRED_TOKEN varchar(255) DEFAULT NULL,
+  IDENTITY_SERVER_TENANT varchar(255) DEFAULT NULL,
+  UPDATE_TIME TIMESTAMP DEFAULT NULL,
+  PRIMARY KEY (USER_ID,GATEWAY_ID)
+);
+
+CREATE TABLE USER_STORAGE_PREFERENCE (
+  STORAGE_RESOURCE_ID varchar(255) NOT NULL,
+  USER_ID varchar(255) NOT NULL,
+  RESOURCE_CS_TOKEN varchar(255) DEFAULT NULL,
+  FS_ROOT_LOCATION varchar(255) DEFAULT NULL,
+  GATEWAY_ID varchar(255) DEFAULT NULL,
+  LOGIN_USERNAME varchar(255) DEFAULT NULL,
+  PRIMARY KEY (STORAGE_RESOURCE_ID,USER_ID,GATEWAY_ID)
+);
+
+CREATE TABLE USER_COMPUTE_RESOURCE_PREFERENCE (
+  RESOURCE_ID varchar(255) NOT NULL,
+  USER_ID varchar(255) NOT NULL,
+  PREFERED_BATCH_QUEUE varchar(255) DEFAULT NULL,
+  RESOURCE_CS_TOKEN varchar(255) DEFAULT NULL,
+  GATEWAY_ID varchar(255) DEFAULT NULL,
+  LOGIN_USERNAME varchar(255) DEFAULT NULL,
+  ALLOCATION_PROJECT_NUMBER varchar(255) DEFAULT NULL,
+  QUALITY_OF_SERVICE varchar(255) DEFAULT NULL,
+  RESERVATION varchar(255) DEFAULT NULL,
+  RESERVATION_END_TIME TIMESTAMP DEFAULT NULL,
+  RESERVATION_START_TIME TIMESTAMP DEFAULT NULL,
+  SCRATCH_LOCATION varchar(255) DEFAULT NULL,
+  VALIDATED SMALLINT NOT NULL DEFAULT 0,
+  PRIMARY KEY (RESOURCE_ID,USER_ID,GATEWAY_ID)
+);
 
 CREATE TABLE CONFIGURATION
 (

http://git-wip-us.apache.org/repos/asf/airavata/blob/20fc3fdb/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql b/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
index 6c07499..3664a63 100644
--- a/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
+++ b/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
@@ -530,6 +530,44 @@ CREATE TABLE WORKFLOW_OUTPUT
          FOREIGN KEY (WF_TEMPLATE_ID) REFERENCES WORKFLOW(WF_TEMPLATE_ID) ON DELETE CASCADE
 );
 
+CREATE TABLE USER_RESOURCE_PROFILE (
+  USER_ID varchar(255) NOT NULL,
+  CREATION_TIME datetime DEFAULT NULL,
+  CS_TOKEN varchar(255) DEFAULT NULL,
+  GATEWAY_ID varchar(255) DEFAULT NULL,
+  IDENTITY_SERVER_PWD_CRED_TOKEN varchar(255) DEFAULT NULL,
+  IDENTITY_SERVER_TENANT varchar(255) DEFAULT NULL,
+  UPDATE_TIME datetime DEFAULT NULL,
+  PRIMARY KEY (USER_ID,GATEWAY_ID)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE USER_STORAGE_PREFERENCE (
+  STORAGE_RESOURCE_ID varchar(255) NOT NULL,
+  USER_ID varchar(255) NOT NULL,
+  RESOURCE_CS_TOKEN varchar(255) DEFAULT NULL,
+  FS_ROOT_LOCATION varchar(255) DEFAULT NULL,
+  GATEWAY_ID varchar(255) DEFAULT NULL,
+  LOGIN_USERNAME varchar(255) DEFAULT NULL,
+  PRIMARY KEY (STORAGE_RESOURCE_ID,USER_ID,GATEWAY_ID)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE USER_COMPUTE_RESOURCE_PREFERENCE (
+  RESOURCE_ID varchar(255) NOT NULL,
+  USER_ID varchar(255) NOT NULL,
+  PREFERED_BATCH_QUEUE varchar(255) DEFAULT NULL,
+  RESOURCE_CS_TOKEN varchar(255) DEFAULT NULL,
+  GATEWAY_ID varchar(255) DEFAULT NULL,
+  LOGIN_USERNAME varchar(255) DEFAULT NULL,
+  ALLOCATION_PROJECT_NUMBER varchar(255) DEFAULT NULL,
+  QUALITY_OF_SERVICE varchar(255) DEFAULT NULL,
+  RESERVATION varchar(255) DEFAULT NULL,
+  RESERVATION_END_TIME datetime DEFAULT NULL,
+  RESERVATION_START_TIME datetime DEFAULT NULL,
+  SCRATCH_LOCATION varchar(255) NOT NULL DEFAULT NULL,
+  VALIDATED TINYINT(1) DEFAULT 0,
+  PRIMARY KEY (RESOURCE_ID,USER_ID,GATEWAY_ID)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
 CREATE TABLE CONFIGURATION
 (
           CONFIG_KEY VARCHAR(255),

http://git-wip-us.apache.org/repos/asf/airavata/blob/20fc3fdb/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql
----------------------------------------------------------------------
diff --git a/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql b/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql
index 36fc66b..04241e2 100644
--- a/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql
+++ b/modules/registry/release-migration-scripts/0.18-0.19/DeltaScripts/appCatalog_schema_delta.sql
@@ -30,3 +30,5 @@ CREATE TABLE SSH_ACCOUNT_PROVISIONER_CONFIG
         PRIMARY KEY (GATEWAY_ID, RESOURCE_ID, CONFIG_NAME),
         FOREIGN KEY (GATEWAY_ID, RESOURCE_ID) REFERENCES COMPUTE_RESOURCE_PREFERENCE (GATEWAY_ID, RESOURCE_ID) ON DELETE CASCADE
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+alter table USER_COMPUTE_RESOURCE_PREFERENCE add VALIDATED tinyint(1) NOT NULL DEFAULT 0;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/20fc3fdb/thrift-interface-descriptions/data-models/resource-catalog-models/user_resource_profile_model.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/resource-catalog-models/user_resource_profile_model.thrift b/thrift-interface-descriptions/data-models/resource-catalog-models/user_resource_profile_model.thrift
index 3dcb53b..6bac85d 100644
--- a/thrift-interface-descriptions/data-models/resource-catalog-models/user_resource_profile_model.thrift
+++ b/thrift-interface-descriptions/data-models/resource-catalog-models/user_resource_profile_model.thrift
@@ -53,6 +53,11 @@ include "../user-tenant-group-models/user_profile_model.thrift"
  *  Resource specific credential store token. If this token is specified, then it is superceeded by the gateway's
  *   default credential store.
  *
+ * validated:
+ *  If true the the configuration has been validated in the sense that the username and credential can be used to
+ *  login to the remote host and the scratchLocation is a valid location that the user has permission to write to.
+ *  Should be treated as read-only and only mutated by Airavata middleware.
+ *
 */
 struct UserComputeResourcePreference {
     1: required string computeResourceId,
@@ -64,7 +69,8 @@ struct UserComputeResourcePreference {
     7: optional string qualityOfService,
     8: optional string reservation,
     9: optional i64 reservationStartTime,
-    10: optional i64 reservationEndTime
+    10: optional i64 reservationEndTime,
+    11: optional bool validated = false
 }
 
 struct UserStoragePreference {


[02/40] airavata git commit: AIRAVATA-2500 Initial interfaces, APIs for account provisioning

Posted by ma...@apache.org.
AIRAVATA-2500 Initial interfaces, APIs for account provisioning


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

Branch: refs/heads/develop
Commit: 1c39e2ea715f736d25d874c36a519ee0ed250162
Parents: 6488090
Author: Marcus Christie <ma...@apache.org>
Authored: Wed Aug 9 15:54:07 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Tue Sep 19 15:07:40 2017 -0400

----------------------------------------------------------------------
 modules/compute-account-provisioning/pom.xml    | 67 +++++++++++++++++
 .../accountprovisioning/ConfigParam.java        | 67 +++++++++++++++++
 .../accountprovisioning/SSHAccountManager.java  | 69 ++++++++++++++++++
 .../SSHAccountProvisioner.java                  | 43 +++++++++++
 .../SSHAccountProvisionerFactory.java           | 49 +++++++++++++
 .../IULdapSSHAccountProvisioner.java            | 75 ++++++++++++++++++++
 ...ta.accountprovisioning.SSHAccountProvisioner | 22 ++++++
 pom.xml                                         |  1 +
 .../airavata-apis/airavata_api.thrift           | 11 +++
 .../account_provisioning_model.thrift           | 40 +++++++++++
 .../gateway_resource_profile_model.thrift       |  5 +-
 11 files changed, 448 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/1c39e2ea/modules/compute-account-provisioning/pom.xml
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/pom.xml b/modules/compute-account-provisioning/pom.xml
new file mode 100644
index 0000000..ee89d33
--- /dev/null
+++ b/modules/compute-account-provisioning/pom.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  ~
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>airavata</artifactId>
+        <groupId>org.apache.airavata</groupId>
+        <version>0.17-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>compute-account-provisioning</artifactId>
+
+    <dependencies>
+        <dependency>
+            <artifactId>airavata-credential-store</artifactId>
+            <groupId>org.apache.airavata</groupId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <artifactId>registry-api-stubs</artifactId>
+            <groupId>org.apache.airavata</groupId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.jcraft</groupId>
+            <artifactId>jsch</artifactId>
+            <version>0.1.50</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+            <version>2.3.1</version>
+        </dependency>
+    </dependencies>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/1c39e2ea/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/ConfigParam.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/ConfigParam.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/ConfigParam.java
new file mode 100644
index 0000000..beb8bbc
--- /dev/null
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/ConfigParam.java
@@ -0,0 +1,67 @@
+/*
+ * 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.accountprovisioning;
+
+public class ConfigParam {
+
+    public enum ConfigParamType {
+        STRING,
+        CRED_TOKEN,
+    }
+
+    private boolean optional = false;
+    private String name;
+    private String description;
+    private ConfigParamType type = ConfigParamType.STRING;
+
+    public boolean isOptional() {
+        return optional;
+    }
+
+    public void setOptional(boolean optional) {
+        this.optional = optional;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public ConfigParamType getType() {
+        return type;
+    }
+
+    public void setType(ConfigParamType type) {
+        this.type = type;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/1c39e2ea/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
new file mode 100644
index 0000000..4e00e4e
--- /dev/null
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
@@ -0,0 +1,69 @@
+/*
+ * 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.accountprovisioning;
+
+import org.apache.airavata.credential.store.client.CredentialStoreClientFactory;
+import org.apache.airavata.credential.store.cpi.CredentialStoreService;
+import org.apache.airavata.credential.store.exception.CredentialStoreException;
+import org.apache.airavata.registry.api.client.RegistryServiceClientFactory;
+import org.apache.airavata.registry.api.exception.RegistryServiceException;
+
+import java.util.Map;
+
+public class SSHAccountManager {
+
+    // TODO: need private key too to verify
+    public static void setupSSHAccount(String gatewayId, String hostname, String username, String sshPublicKey) {
+
+        // TODO: finish implementing
+
+        // get compute resource preferences for the gateway and hostname
+
+        // get the account provisioner and config values for the preferences
+        String provisionerName = null;
+        Map<ConfigParam,String> provisionerConfig = null;
+
+        // instantiate and init the account provisioner
+        SSHAccountProvisioner sshAccountProvisioner = SSHAccountProvisionerFactory.createSSHAccountProvisioner(provisionerName, provisionerConfig);
+
+        // First check if username has an account
+        boolean hasAccount = sshAccountProvisioner.hasAccount(username);
+
+        if (!hasAccount && !sshAccountProvisioner.canCreateAccount()) {
+            // TODO: throw an exception
+        }
+
+        // TODO: first check if SSH key is already installed, or do we care?
+
+        // Install SSH key
+
+        // Verify can authenticate to host
+
+        // create the scratch location on the host
+        String scratchLocation = sshAccountProvisioner.getScratchLocation(username);
+    }
+
+    private RegistryService.Client getRegistryServiceClient() throws RegistryServiceException {
+
+        // TODO: finish implementing
+        return RegistryServiceClientFactory.createRegistryClient(null, 0);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/1c39e2ea/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java
new file mode 100644
index 0000000..d997c3c
--- /dev/null
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisioner.java
@@ -0,0 +1,43 @@
+/*
+ * 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.accountprovisioning;
+
+import java.util.List;
+import java.util.Map;
+
+public interface SSHAccountProvisioner {
+
+    /**
+     * An identifying name for this SSHAccountProvisioner instance.  This name should be unique amongst
+     * all SSHAccountProvisioner implementations.
+     */
+    default String getName() {
+        return this.getClass().getName();
+    }
+    List<ConfigParam> getConfigParams();
+    void init(Map<ConfigParam, String> config);
+    boolean hasAccount(String username);
+    boolean canCreateAccount();
+    void createAccount(String username, String sshPublicKey);
+    boolean canInstallSSHKey();
+    void installSSHKey(String username, String sshPublicKey);
+    String getScratchLocation(String username);
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/1c39e2ea/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactory.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactory.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactory.java
new file mode 100644
index 0000000..f691895
--- /dev/null
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountProvisionerFactory.java
@@ -0,0 +1,49 @@
+/*
+ * 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.accountprovisioning;
+
+import java.util.List;
+import java.util.Map;
+
+public class SSHAccountProvisionerFactory {
+
+    public static List<String> getSSHAccountProvisionerImplementationNames() {
+
+        // TODO: implement
+        return null;
+    }
+
+    public static List<ConfigParam> getSSHAccountProvisionerConfigParams(String provisionerName) {
+
+        // TODO: implement
+        return null;
+    }
+
+    public static SSHAccountProvisioner createSSHAccountProvisioner(String provisionerName, Map<ConfigParam, String> config) {
+
+    }
+
+    private CredentialStoreService.Client getCredentialStoreClient() throws CredentialStoreException {
+
+        // TODO: finish implementing
+        return CredentialStoreClientFactory.createAiravataCSClient(null, 0);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/1c39e2ea/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
new file mode 100644
index 0000000..4ad3512
--- /dev/null
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/provisioner/IULdapSSHAccountProvisioner.java
@@ -0,0 +1,75 @@
+/*
+ * 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.accountprovisioning.provisioner;
+
+import org.apache.airavata.accountprovisioning.ConfigParam;
+import org.apache.airavata.accountprovisioning.SSHAccountProvisioner;
+
+import java.util.List;
+import java.util.Map;
+
+public class IULdapSSHAccountProvisioner implements SSHAccountProvisioner {
+
+    @Override
+    public List<ConfigParam> getConfigParams() {
+        // TODO: implement
+        return null;
+    }
+
+    @Override
+    public void init(Map<ConfigParam, String> config) {
+
+        // TODO: implement
+    }
+
+    @Override
+    public boolean hasAccount(String username) {
+        // TODO: implement
+        return false;
+    }
+
+    @Override
+    public boolean canCreateAccount() {
+        return false;
+    }
+
+    @Override
+    public void createAccount(String username, String sshPublicKey) {
+
+        throw new UnsupportedOperationException("IULdapSSHAccountProvisioner does not support creating cluster accounts at this time.");
+    }
+
+    @Override
+    public boolean canInstallSSHKey() {
+        return true;
+    }
+
+    @Override
+    public void installSSHKey(String username, String sshPublicKey) {
+        // TODO: implement
+    }
+
+    @Override
+    public String getScratchLocation(String username) {
+        // TODO: implement
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/1c39e2ea/modules/compute-account-provisioning/src/main/resources/META-INF/services/org.apache.airavata.accountprovisioning.SSHAccountProvisioner
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/resources/META-INF/services/org.apache.airavata.accountprovisioning.SSHAccountProvisioner b/modules/compute-account-provisioning/src/main/resources/META-INF/services/org.apache.airavata.accountprovisioning.SSHAccountProvisioner
new file mode 100644
index 0000000..50d2859
--- /dev/null
+++ b/modules/compute-account-provisioning/src/main/resources/META-INF/services/org.apache.airavata.accountprovisioning.SSHAccountProvisioner
@@ -0,0 +1,22 @@
+#
+# 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.
+#
+#
+
+
+org.apache.airavata.accountprovisioning.provisioner.IULdapSSHAccountProvisioner
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/1c39e2ea/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 9c78519..73516c7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -695,6 +695,7 @@
                 <!--<module>modules/xbaya-gui</module>-->
                 <module>modules/distribution</module>
                 <!--<module>modules/test-suite</module>-->
+                <module>modules/compute-account-provisioning</module>
             </modules>
         </profile>
         <profile>

http://git-wip-us.apache.org/repos/asf/airavata/blob/1c39e2ea/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/airavata-apis/airavata_api.thrift b/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
index 0a34ac6..471af41 100644
--- a/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
+++ b/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
@@ -36,6 +36,7 @@ include "../data-models/experiment-catalog-models/scheduling_model.thrift"
 include "../data-models/app-catalog-models/application_io_models.thrift"
 include "../data-models/app-catalog-models/application_deployment_model.thrift"
 include "../data-models/app-catalog-models/application_interface_model.thrift"
+include "../data-models/resource-catalog-models/account_provisioning_model.thrift"
 include "../data-models/resource-catalog-models/compute_resource_model.thrift"
 include "../data-models/resource-catalog-models/storage_resource_model.thrift"
 include "../data-models/resource-catalog-models/gateway_resource_profile_model.thrift"
@@ -2949,7 +2950,17 @@ service Airavata {
               3: airavata_errors.AiravataSystemException ase,
               4: airavata_errors.AuthorizationException ae)
 
+  list<string> getSSHAccountProvisionerNames(1: required security_model.AuthzToken authzToken)
+    	throws (1: airavata_errors.InvalidRequestException ire,
+              2: airavata_errors.AiravataClientException ace,
+              3: airavata_errors.AiravataSystemException ase,
+              4: airavata_errors.AuthorizationException ae)
 
+  list<account_provisioning_model.SSHAccountProvisionerConfigParam> getSSHAccountProvisionerConfigParams(1: required security_model.AuthzToken authzToken, 2: required string provisionerName)
+    	throws (1: airavata_errors.InvalidRequestException ire,
+              2: airavata_errors.AiravataClientException ace,
+              3: airavata_errors.AiravataSystemException ase,
+              4: airavata_errors.AuthorizationException ae)
 
 
   /*

http://git-wip-us.apache.org/repos/asf/airavata/blob/1c39e2ea/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift b/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift
new file mode 100644
index 0000000..b13b1c3
--- /dev/null
+++ b/thrift-interface-descriptions/data-models/resource-catalog-models/account_provisioning_model.thrift
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ *
+ */
+
+namespace java org.apache.airavata.model.appcatalog.accountprovisioning
+namespace php Airavata.Model.AppCatalog.AccountProvisioning
+namespace cpp apache.airavata.model.appcatalog.accountprovisioning
+namespace py apache.airavata.model.appcatalog.accountprovisioning
+
+enum SSHAccountProvisionerConfigParamType {
+    STRING,
+    CRED_TOKEN
+}
+
+struct SSHAccountProvisioner {
+    1: required string name;
+}
+
+struct SSHAccountProvisionerConfigParam {
+    1: required string name;
+    2: required SSHAccountProvisionerConfigParamType type = SSHAccountProvisionerConfigParamType.STRING;
+    3: required bool optional = false;
+    4: optional string description;
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/1c39e2ea/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift b/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
index d1b258c..e3686f2 100644
--- a/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
+++ b/thrift-interface-descriptions/data-models/resource-catalog-models/gateway_resource_profile_model.thrift
@@ -25,6 +25,7 @@ namespace py apache.airavata.model.appcatalog.gatewayprofile
 
 include "compute_resource_model.thrift"
 include "data_movement_models.thrift"
+include "account_provisioning_model.thrift"
 
 /**
  * Gateway specific preferences for a Computer Resource
@@ -74,7 +75,9 @@ struct ComputeResourcePreference {
     11: optional string qualityOfService,
     12: optional string reservation,
     13: optional i64 reservationStartTime,
-    14: optional i64 reservationEndTime
+    14: optional i64 reservationEndTime,
+    15: optional string sshAccountProvisioner,
+    16: optional map<SSHAccountProvisionerConfigParam, String> sshAccountProvisionerConfig
 }
 
 struct StoragePreference {


[19/40] airavata git commit: AIRAVATA-2500 Thrift stub code generation

Posted by ma...@apache.org.
AIRAVATA-2500 Thrift stub code generation


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

Branch: refs/heads/develop
Commit: fab19005af44bec99634aa5d9233948803428d16
Parents: 71d33ea
Author: Marcus Christie <ma...@apache.org>
Authored: Thu Sep 7 15:16:43 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Tue Sep 19 15:08:05 2017 -0400

----------------------------------------------------------------------
 .../Model/AppCatalog/GatewayProfile/Types.php   |  23 ++++
 .../ComputeResourcePreference.java              | 114 ++++++++++++++++++-
 2 files changed, 133 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/fab19005/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php
index da3071a..63e39bc 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php
@@ -118,6 +118,10 @@ class ComputeResourcePreference {
    * @var array
    */
   public $sshAccountProvisionerConfig = null;
+  /**
+   * @var string
+   */
+  public $sshAccountProvisionerAdditionalInfo = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -194,6 +198,10 @@ class ComputeResourcePreference {
             'type' => TType::STRING,
             ),
           ),
+        17 => array(
+          'var' => 'sshAccountProvisionerAdditionalInfo',
+          'type' => TType::STRING,
+          ),
         );
     }
     if (is_array($vals)) {
@@ -245,6 +253,9 @@ class ComputeResourcePreference {
       if (isset($vals['sshAccountProvisionerConfig'])) {
         $this->sshAccountProvisionerConfig = $vals['sshAccountProvisionerConfig'];
       }
+      if (isset($vals['sshAccountProvisionerAdditionalInfo'])) {
+        $this->sshAccountProvisionerAdditionalInfo = $vals['sshAccountProvisionerAdditionalInfo'];
+      }
     }
   }
 
@@ -392,6 +403,13 @@ class ComputeResourcePreference {
             $xfer += $input->skip($ftype);
           }
           break;
+        case 17:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->sshAccountProvisionerAdditionalInfo);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -498,6 +516,11 @@ class ComputeResourcePreference {
       }
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->sshAccountProvisionerAdditionalInfo !== null) {
+      $xfer += $output->writeFieldBegin('sshAccountProvisionerAdditionalInfo', TType::STRING, 17);
+      $xfer += $output->writeString($this->sshAccountProvisionerAdditionalInfo);
+      $xfer += $output->writeFieldEnd();
+    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;

http://git-wip-us.apache.org/repos/asf/airavata/blob/fab19005/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
index 3edf60c..d758e9d 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
@@ -105,6 +105,7 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
   private static final org.apache.thrift.protocol.TField RESERVATION_END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("reservationEndTime", org.apache.thrift.protocol.TType.I64, (short)14);
   private static final org.apache.thrift.protocol.TField SSH_ACCOUNT_PROVISIONER_FIELD_DESC = new org.apache.thrift.protocol.TField("sshAccountProvisioner", org.apache.thrift.protocol.TType.STRING, (short)15);
   private static final org.apache.thrift.protocol.TField SSH_ACCOUNT_PROVISIONER_CONFIG_FIELD_DESC = new org.apache.thrift.protocol.TField("sshAccountProvisionerConfig", org.apache.thrift.protocol.TType.MAP, (short)16);
+  private static final org.apache.thrift.protocol.TField SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("sshAccountProvisionerAdditionalInfo", org.apache.thrift.protocol.TType.STRING, (short)17);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -128,6 +129,7 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
   private long reservationEndTime; // optional
   private String sshAccountProvisioner; // optional
   private Map<String,String> sshAccountProvisionerConfig; // optional
+  private String sshAccountProvisionerAdditionalInfo; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -154,7 +156,8 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
     RESERVATION_START_TIME((short)13, "reservationStartTime"),
     RESERVATION_END_TIME((short)14, "reservationEndTime"),
     SSH_ACCOUNT_PROVISIONER((short)15, "sshAccountProvisioner"),
-    SSH_ACCOUNT_PROVISIONER_CONFIG((short)16, "sshAccountProvisionerConfig");
+    SSH_ACCOUNT_PROVISIONER_CONFIG((short)16, "sshAccountProvisionerConfig"),
+    SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO((short)17, "sshAccountProvisionerAdditionalInfo");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -201,6 +204,8 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
           return SSH_ACCOUNT_PROVISIONER;
         case 16: // SSH_ACCOUNT_PROVISIONER_CONFIG
           return SSH_ACCOUNT_PROVISIONER_CONFIG;
+        case 17: // SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO
+          return SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO;
         default:
           return null;
       }
@@ -245,7 +250,7 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
   private static final int __RESERVATIONSTARTTIME_ISSET_ID = 1;
   private static final int __RESERVATIONENDTIME_ISSET_ID = 2;
   private byte __isset_bitfield = 0;
-  private static final _Fields optionals[] = {_Fields.LOGIN_USER_NAME,_Fields.PREFERRED_JOB_SUBMISSION_PROTOCOL,_Fields.PREFERRED_DATA_MOVEMENT_PROTOCOL,_Fields.PREFERRED_BATCH_QUEUE,_Fields.SCRATCH_LOCATION,_Fields.ALLOCATION_PROJECT_NUMBER,_Fields.RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN,_Fields.USAGE_REPORTING_GATEWAY_ID,_Fields.QUALITY_OF_SERVICE,_Fields.RESERVATION,_Fields.RESERVATION_START_TIME,_Fields.RESERVATION_END_TIME,_Fields.SSH_ACCOUNT_PROVISIONER,_Fields.SSH_ACCOUNT_PROVISIONER_CONFIG};
+  private static final _Fields optionals[] = {_Fields.LOGIN_USER_NAME,_Fields.PREFERRED_JOB_SUBMISSION_PROTOCOL,_Fields.PREFERRED_DATA_MOVEMENT_PROTOCOL,_Fields.PREFERRED_BATCH_QUEUE,_Fields.SCRATCH_LOCATION,_Fields.ALLOCATION_PROJECT_NUMBER,_Fields.RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN,_Fields.USAGE_REPORTING_GATEWAY_ID,_Fields.QUALITY_OF_SERVICE,_Fields.RESERVATION,_Fields.RESERVATION_START_TIME,_Fields.RESERVATION_END_TIME,_Fields.SSH_ACCOUNT_PROVISIONER,_Fields.SSH_ACCOUNT_PROVISIONER_CONFIG,_Fields.SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO};
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -283,6 +288,8 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
         new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
             new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), 
             new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+    tmpMap.put(_Fields.SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO, new org.apache.thrift.meta_data.FieldMetaData("sshAccountProvisionerAdditionalInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ComputeResourcePreference.class, metaDataMap);
   }
@@ -350,6 +357,9 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
       Map<String,String> __this__sshAccountProvisionerConfig = new HashMap<String,String>(other.sshAccountProvisionerConfig);
       this.sshAccountProvisionerConfig = __this__sshAccountProvisionerConfig;
     }
+    if (other.isSetSshAccountProvisionerAdditionalInfo()) {
+      this.sshAccountProvisionerAdditionalInfo = other.sshAccountProvisionerAdditionalInfo;
+    }
   }
 
   public ComputeResourcePreference deepCopy() {
@@ -377,6 +387,7 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
     this.reservationEndTime = 0;
     this.sshAccountProvisioner = null;
     this.sshAccountProvisionerConfig = null;
+    this.sshAccountProvisionerAdditionalInfo = null;
   }
 
   public String getComputeResourceId() {
@@ -771,6 +782,29 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
     }
   }
 
+  public String getSshAccountProvisionerAdditionalInfo() {
+    return this.sshAccountProvisionerAdditionalInfo;
+  }
+
+  public void setSshAccountProvisionerAdditionalInfo(String sshAccountProvisionerAdditionalInfo) {
+    this.sshAccountProvisionerAdditionalInfo = sshAccountProvisionerAdditionalInfo;
+  }
+
+  public void unsetSshAccountProvisionerAdditionalInfo() {
+    this.sshAccountProvisionerAdditionalInfo = null;
+  }
+
+  /** Returns true if field sshAccountProvisionerAdditionalInfo is set (has been assigned a value) and false otherwise */
+  public boolean isSetSshAccountProvisionerAdditionalInfo() {
+    return this.sshAccountProvisionerAdditionalInfo != null;
+  }
+
+  public void setSshAccountProvisionerAdditionalInfoIsSet(boolean value) {
+    if (!value) {
+      this.sshAccountProvisionerAdditionalInfo = null;
+    }
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case COMPUTE_RESOURCE_ID:
@@ -901,6 +935,14 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
       }
       break;
 
+    case SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO:
+      if (value == null) {
+        unsetSshAccountProvisionerAdditionalInfo();
+      } else {
+        setSshAccountProvisionerAdditionalInfo((String)value);
+      }
+      break;
+
     }
   }
 
@@ -954,6 +996,9 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
     case SSH_ACCOUNT_PROVISIONER_CONFIG:
       return getSshAccountProvisionerConfig();
 
+    case SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO:
+      return getSshAccountProvisionerAdditionalInfo();
+
     }
     throw new IllegalStateException();
   }
@@ -997,6 +1042,8 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
       return isSetSshAccountProvisioner();
     case SSH_ACCOUNT_PROVISIONER_CONFIG:
       return isSetSshAccountProvisionerConfig();
+    case SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO:
+      return isSetSshAccountProvisionerAdditionalInfo();
     }
     throw new IllegalStateException();
   }
@@ -1158,6 +1205,15 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
         return false;
     }
 
+    boolean this_present_sshAccountProvisionerAdditionalInfo = true && this.isSetSshAccountProvisionerAdditionalInfo();
+    boolean that_present_sshAccountProvisionerAdditionalInfo = true && that.isSetSshAccountProvisionerAdditionalInfo();
+    if (this_present_sshAccountProvisionerAdditionalInfo || that_present_sshAccountProvisionerAdditionalInfo) {
+      if (!(this_present_sshAccountProvisionerAdditionalInfo && that_present_sshAccountProvisionerAdditionalInfo))
+        return false;
+      if (!this.sshAccountProvisionerAdditionalInfo.equals(that.sshAccountProvisionerAdditionalInfo))
+        return false;
+    }
+
     return true;
   }
 
@@ -1245,6 +1301,11 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
     if (present_sshAccountProvisionerConfig)
       list.add(sshAccountProvisionerConfig);
 
+    boolean present_sshAccountProvisionerAdditionalInfo = true && (isSetSshAccountProvisionerAdditionalInfo());
+    list.add(present_sshAccountProvisionerAdditionalInfo);
+    if (present_sshAccountProvisionerAdditionalInfo)
+      list.add(sshAccountProvisionerAdditionalInfo);
+
     return list.hashCode();
   }
 
@@ -1416,6 +1477,16 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetSshAccountProvisionerAdditionalInfo()).compareTo(other.isSetSshAccountProvisionerAdditionalInfo());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetSshAccountProvisionerAdditionalInfo()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sshAccountProvisionerAdditionalInfo, other.sshAccountProvisionerAdditionalInfo);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -1579,6 +1650,16 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
       }
       first = false;
     }
+    if (isSetSshAccountProvisionerAdditionalInfo()) {
+      if (!first) sb.append(", ");
+      sb.append("sshAccountProvisionerAdditionalInfo:");
+      if (this.sshAccountProvisionerAdditionalInfo == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.sshAccountProvisionerAdditionalInfo);
+      }
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }
@@ -1772,6 +1853,14 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
+          case 17: // SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.sshAccountProvisionerAdditionalInfo = iprot.readString();
+              struct.setSshAccountProvisionerAdditionalInfoIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -1895,6 +1984,13 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
           oprot.writeFieldEnd();
         }
       }
+      if (struct.sshAccountProvisionerAdditionalInfo != null) {
+        if (struct.isSetSshAccountProvisionerAdditionalInfo()) {
+          oprot.writeFieldBegin(SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO_FIELD_DESC);
+          oprot.writeString(struct.sshAccountProvisionerAdditionalInfo);
+          oprot.writeFieldEnd();
+        }
+      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -1957,7 +2053,10 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
       if (struct.isSetSshAccountProvisionerConfig()) {
         optionals.set(13);
       }
-      oprot.writeBitSet(optionals, 14);
+      if (struct.isSetSshAccountProvisionerAdditionalInfo()) {
+        optionals.set(14);
+      }
+      oprot.writeBitSet(optionals, 15);
       if (struct.isSetLoginUserName()) {
         oprot.writeString(struct.loginUserName);
       }
@@ -2007,6 +2106,9 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
           }
         }
       }
+      if (struct.isSetSshAccountProvisionerAdditionalInfo()) {
+        oprot.writeString(struct.sshAccountProvisionerAdditionalInfo);
+      }
     }
 
     @Override
@@ -2016,7 +2118,7 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
       struct.setComputeResourceIdIsSet(true);
       struct.overridebyAiravata = iprot.readBool();
       struct.setOverridebyAiravataIsSet(true);
-      BitSet incoming = iprot.readBitSet(14);
+      BitSet incoming = iprot.readBitSet(15);
       if (incoming.get(0)) {
         struct.loginUserName = iprot.readString();
         struct.setLoginUserNameIsSet(true);
@@ -2084,6 +2186,10 @@ public class ComputeResourcePreference implements org.apache.thrift.TBase<Comput
         }
         struct.setSshAccountProvisionerConfigIsSet(true);
       }
+      if (incoming.get(14)) {
+        struct.sshAccountProvisionerAdditionalInfo = iprot.readString();
+        struct.setSshAccountProvisionerAdditionalInfoIsSet(true);
+      }
     }
   }
 


[33/40] airavata git commit: AIRAVATA-2500 Thrift stub code generation

Posted by ma...@apache.org.
AIRAVATA-2500 Thrift stub code generation


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

Branch: refs/heads/develop
Commit: e5dcade08f7a91bf7bd135647358202475f37620
Parents: 20fc3fd
Author: Marcus Christie <ma...@apache.org>
Authored: Mon Sep 25 09:45:47 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Mon Sep 25 09:57:28 2017 -0400

----------------------------------------------------------------------
 .../resources/lib/Airavata/API/Airavata.php     |  10 ++
 .../AppCatalog/UserResourceProfile/Types.php    |  28 +++++
 .../UserComputeResourcePreference.java          | 114 ++++++++++++++++++-
 3 files changed, 148 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/e5dcade0/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 c8976ba..a22ef84 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
@@ -3485,6 +3485,11 @@ interface AiravataIf {
    *  Resource specific credential store token. If this token is specified, then it is superceeded by the gateway's
    *   default credential store.
    * 
+   * validated:
+   *  If true the the configuration has been validated in the sense that the username and credential can be used to
+   *  login to the remote host and the scratchLocation is a valid location that the user has permission to write to.
+   *  Should be treated as read-only and only mutated by Airavata middleware.
+   * 
    * 
    * @throws \Airavata\API\Error\InvalidRequestException
    * @throws \Airavata\API\Error\AiravataClientException
@@ -3717,6 +3722,11 @@ interface AiravataIf {
    *  Resource specific credential store token. If this token is specified, then it is superceeded by the gateway's
    *   default credential store.
    * 
+   * validated:
+   *  If true the the configuration has been validated in the sense that the username and credential can be used to
+   *  login to the remote host and the scratchLocation is a valid location that the user has permission to write to.
+   *  Should be treated as read-only and only mutated by Airavata middleware.
+   * 
    * 
    * @throws \Airavata\API\Error\InvalidRequestException
    * @throws \Airavata\API\Error\AiravataClientException

http://git-wip-us.apache.org/repos/asf/airavata/blob/e5dcade0/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/UserResourceProfile/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/UserResourceProfile/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/UserResourceProfile/Types.php
index 8ab78a0..c4a0a9c 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/UserResourceProfile/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/UserResourceProfile/Types.php
@@ -43,6 +43,11 @@ use Thrift\Exception\TApplicationException;
  *  Resource specific credential store token. If this token is specified, then it is superceeded by the gateway's
  *   default credential store.
  * 
+ * validated:
+ *  If true the the configuration has been validated in the sense that the username and credential can be used to
+ *  login to the remote host and the scratchLocation is a valid location that the user has permission to write to.
+ *  Should be treated as read-only and only mutated by Airavata middleware.
+ * 
  */
 class UserComputeResourcePreference {
   static $_TSPEC;
@@ -87,6 +92,10 @@ class UserComputeResourcePreference {
    * @var int
    */
   public $reservationEndTime = null;
+  /**
+   * @var bool
+   */
+  public $validated = false;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -131,6 +140,10 @@ class UserComputeResourcePreference {
           'var' => 'reservationEndTime',
           'type' => TType::I64,
           ),
+        11 => array(
+          'var' => 'validated',
+          'type' => TType::BOOL,
+          ),
         );
     }
     if (is_array($vals)) {
@@ -164,6 +177,9 @@ class UserComputeResourcePreference {
       if (isset($vals['reservationEndTime'])) {
         $this->reservationEndTime = $vals['reservationEndTime'];
       }
+      if (isset($vals['validated'])) {
+        $this->validated = $vals['validated'];
+      }
     }
   }
 
@@ -256,6 +272,13 @@ class UserComputeResourcePreference {
             $xfer += $input->skip($ftype);
           }
           break;
+        case 11:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->validated);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -319,6 +342,11 @@ class UserComputeResourcePreference {
       $xfer += $output->writeI64($this->reservationEndTime);
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->validated !== null) {
+      $xfer += $output->writeFieldBegin('validated', TType::BOOL, 11);
+      $xfer += $output->writeBool($this->validated);
+      $xfer += $output->writeFieldEnd();
+    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;

http://git-wip-us.apache.org/repos/asf/airavata/blob/e5dcade0/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/userresourceprofile/UserComputeResourcePreference.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/userresourceprofile/UserComputeResourcePreference.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/userresourceprofile/UserComputeResourcePreference.java
index 276b7ca..674b5c3 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/userresourceprofile/UserComputeResourcePreference.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/userresourceprofile/UserComputeResourcePreference.java
@@ -77,6 +77,11 @@ import org.slf4j.LoggerFactory;
  *  Resource specific credential store token. If this token is specified, then it is superceeded by the gateway's
  *   default credential store.
  * 
+ * validated:
+ *  If true the the configuration has been validated in the sense that the username and credential can be used to
+ *  login to the remote host and the scratchLocation is a valid location that the user has permission to write to.
+ *  Should be treated as read-only and only mutated by Airavata middleware.
+ * 
  */
 @Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
 public class UserComputeResourcePreference implements org.apache.thrift.TBase<UserComputeResourcePreference, UserComputeResourcePreference._Fields>, java.io.Serializable, Cloneable, Comparable<UserComputeResourcePreference> {
@@ -92,6 +97,7 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase<Us
   private static final org.apache.thrift.protocol.TField RESERVATION_FIELD_DESC = new org.apache.thrift.protocol.TField("reservation", org.apache.thrift.protocol.TType.STRING, (short)8);
   private static final org.apache.thrift.protocol.TField RESERVATION_START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("reservationStartTime", org.apache.thrift.protocol.TType.I64, (short)9);
   private static final org.apache.thrift.protocol.TField RESERVATION_END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("reservationEndTime", org.apache.thrift.protocol.TType.I64, (short)10);
+  private static final org.apache.thrift.protocol.TField VALIDATED_FIELD_DESC = new org.apache.thrift.protocol.TField("validated", org.apache.thrift.protocol.TType.BOOL, (short)11);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -109,6 +115,7 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase<Us
   private String reservation; // optional
   private long reservationStartTime; // optional
   private long reservationEndTime; // optional
+  private boolean validated; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -121,7 +128,8 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase<Us
     QUALITY_OF_SERVICE((short)7, "qualityOfService"),
     RESERVATION((short)8, "reservation"),
     RESERVATION_START_TIME((short)9, "reservationStartTime"),
-    RESERVATION_END_TIME((short)10, "reservationEndTime");
+    RESERVATION_END_TIME((short)10, "reservationEndTime"),
+    VALIDATED((short)11, "validated");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -156,6 +164,8 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase<Us
           return RESERVATION_START_TIME;
         case 10: // RESERVATION_END_TIME
           return RESERVATION_END_TIME;
+        case 11: // VALIDATED
+          return VALIDATED;
         default:
           return null;
       }
@@ -198,8 +208,9 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase<Us
   // isset id assignments
   private static final int __RESERVATIONSTARTTIME_ISSET_ID = 0;
   private static final int __RESERVATIONENDTIME_ISSET_ID = 1;
+  private static final int __VALIDATED_ISSET_ID = 2;
   private byte __isset_bitfield = 0;
-  private static final _Fields optionals[] = {_Fields.LOGIN_USER_NAME,_Fields.PREFERRED_BATCH_QUEUE,_Fields.SCRATCH_LOCATION,_Fields.ALLOCATION_PROJECT_NUMBER,_Fields.RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN,_Fields.QUALITY_OF_SERVICE,_Fields.RESERVATION,_Fields.RESERVATION_START_TIME,_Fields.RESERVATION_END_TIME};
+  private static final _Fields optionals[] = {_Fields.LOGIN_USER_NAME,_Fields.PREFERRED_BATCH_QUEUE,_Fields.SCRATCH_LOCATION,_Fields.ALLOCATION_PROJECT_NUMBER,_Fields.RESOURCE_SPECIFIC_CREDENTIAL_STORE_TOKEN,_Fields.QUALITY_OF_SERVICE,_Fields.RESERVATION,_Fields.RESERVATION_START_TIME,_Fields.RESERVATION_END_TIME,_Fields.VALIDATED};
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -223,11 +234,15 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase<Us
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
     tmpMap.put(_Fields.RESERVATION_END_TIME, new org.apache.thrift.meta_data.FieldMetaData("reservationEndTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.VALIDATED, new org.apache.thrift.meta_data.FieldMetaData("validated", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UserComputeResourcePreference.class, metaDataMap);
   }
 
   public UserComputeResourcePreference() {
+    this.validated = false;
+
   }
 
   public UserComputeResourcePreference(
@@ -268,6 +283,7 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase<Us
     }
     this.reservationStartTime = other.reservationStartTime;
     this.reservationEndTime = other.reservationEndTime;
+    this.validated = other.validated;
   }
 
   public UserComputeResourcePreference deepCopy() {
@@ -288,6 +304,8 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase<Us
     this.reservationStartTime = 0;
     setReservationEndTimeIsSet(false);
     this.reservationEndTime = 0;
+    this.validated = false;
+
   }
 
   public String getComputeResourceId() {
@@ -518,6 +536,28 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase<Us
     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESERVATIONENDTIME_ISSET_ID, value);
   }
 
+  public boolean isValidated() {
+    return this.validated;
+  }
+
+  public void setValidated(boolean validated) {
+    this.validated = validated;
+    setValidatedIsSet(true);
+  }
+
+  public void unsetValidated() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VALIDATED_ISSET_ID);
+  }
+
+  /** Returns true if field validated is set (has been assigned a value) and false otherwise */
+  public boolean isSetValidated() {
+    return EncodingUtils.testBit(__isset_bitfield, __VALIDATED_ISSET_ID);
+  }
+
+  public void setValidatedIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VALIDATED_ISSET_ID, value);
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case COMPUTE_RESOURCE_ID:
@@ -600,6 +640,14 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase<Us
       }
       break;
 
+    case VALIDATED:
+      if (value == null) {
+        unsetValidated();
+      } else {
+        setValidated((Boolean)value);
+      }
+      break;
+
     }
   }
 
@@ -635,6 +683,9 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase<Us
     case RESERVATION_END_TIME:
       return getReservationEndTime();
 
+    case VALIDATED:
+      return isValidated();
+
     }
     throw new IllegalStateException();
   }
@@ -666,6 +717,8 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase<Us
       return isSetReservationStartTime();
     case RESERVATION_END_TIME:
       return isSetReservationEndTime();
+    case VALIDATED:
+      return isSetValidated();
     }
     throw new IllegalStateException();
   }
@@ -773,6 +826,15 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase<Us
         return false;
     }
 
+    boolean this_present_validated = true && this.isSetValidated();
+    boolean that_present_validated = true && that.isSetValidated();
+    if (this_present_validated || that_present_validated) {
+      if (!(this_present_validated && that_present_validated))
+        return false;
+      if (this.validated != that.validated)
+        return false;
+    }
+
     return true;
   }
 
@@ -830,6 +892,11 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase<Us
     if (present_reservationEndTime)
       list.add(reservationEndTime);
 
+    boolean present_validated = true && (isSetValidated());
+    list.add(present_validated);
+    if (present_validated)
+      list.add(validated);
+
     return list.hashCode();
   }
 
@@ -941,6 +1008,16 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase<Us
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetValidated()).compareTo(other.isSetValidated());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetValidated()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validated, other.validated);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -1050,6 +1127,12 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase<Us
       sb.append(this.reservationEndTime);
       first = false;
     }
+    if (isSetValidated()) {
+      if (!first) sb.append(", ");
+      sb.append("validated:");
+      sb.append(this.validated);
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }
@@ -1179,6 +1262,14 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase<Us
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
+          case 11: // VALIDATED
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.validated = iprot.readBool();
+              struct.setValidatedIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -1256,6 +1347,11 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase<Us
         oprot.writeI64(struct.reservationEndTime);
         oprot.writeFieldEnd();
       }
+      if (struct.isSetValidated()) {
+        oprot.writeFieldBegin(VALIDATED_FIELD_DESC);
+        oprot.writeBool(struct.validated);
+        oprot.writeFieldEnd();
+      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -1302,7 +1398,10 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase<Us
       if (struct.isSetReservationEndTime()) {
         optionals.set(8);
       }
-      oprot.writeBitSet(optionals, 9);
+      if (struct.isSetValidated()) {
+        optionals.set(9);
+      }
+      oprot.writeBitSet(optionals, 10);
       if (struct.isSetLoginUserName()) {
         oprot.writeString(struct.loginUserName);
       }
@@ -1330,6 +1429,9 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase<Us
       if (struct.isSetReservationEndTime()) {
         oprot.writeI64(struct.reservationEndTime);
       }
+      if (struct.isSetValidated()) {
+        oprot.writeBool(struct.validated);
+      }
     }
 
     @Override
@@ -1337,7 +1439,7 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase<Us
       TTupleProtocol iprot = (TTupleProtocol) prot;
       struct.computeResourceId = iprot.readString();
       struct.setComputeResourceIdIsSet(true);
-      BitSet incoming = iprot.readBitSet(9);
+      BitSet incoming = iprot.readBitSet(10);
       if (incoming.get(0)) {
         struct.loginUserName = iprot.readString();
         struct.setLoginUserNameIsSet(true);
@@ -1374,6 +1476,10 @@ public class UserComputeResourcePreference implements org.apache.thrift.TBase<Us
         struct.reservationEndTime = iprot.readI64();
         struct.setReservationEndTimeIsSet(true);
       }
+      if (incoming.get(9)) {
+        struct.validated = iprot.readBool();
+        struct.setValidatedIsSet(true);
+      }
     }
   }