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/01 21:13:17 UTC
[1/4] airavata git commit: AIRAVATA-2500 Persist SSH account
provisioner and config
Repository: airavata
Updated Branches:
refs/heads/AIRAVATA-2500 83253df71 -> 316656c35
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/d66b4bfa
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/d66b4bfa
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/d66b4bfa
Branch: refs/heads/AIRAVATA-2500
Commit: d66b4bfac83c1ec5b68f9f28bd464f95f1a8413a
Parents: 83253df
Author: Marcus Christie <ma...@apache.org>
Authored: Fri Sep 1 12:33:40 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Fri Sep 1 12:33:40 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/d66b4bfa/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/d66b4bfa/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/d66b4bfa/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/d66b4bfa/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/d66b4bfa/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/d66b4bfa/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/d66b4bfa/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/d66b4bfa/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/d66b4bfa/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/d66b4bfa/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/d66b4bfa/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/d66b4bfa/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/d66b4bfa/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 {
[3/4] airavata git commit: AIRAVATA-2500 Thrift stub generation
Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/316656c3/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>
[2/4] airavata git commit: AIRAVATA-2500 Thrift stub generation
Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/316656c3/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);
}
[4/4] 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/316656c3
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/316656c3
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/316656c3
Branch: refs/heads/AIRAVATA-2500
Commit: 316656c350d5f1613b2ff2bb3f6a7e319b237298
Parents: d66b4bf
Author: Marcus Christie <ma...@apache.org>
Authored: Fri Sep 1 17:12:46 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Fri Sep 1 17:12:46 2017 -0400
----------------------------------------------------------------------
.../java/org/apache/airavata/api/Airavata.java | 782 +++++++++----------
.../ComputeResourcePreference.java | 78 +-
2 files changed, 415 insertions(+), 445 deletions(-)
----------------------------------------------------------------------