You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sh...@apache.org on 2015/03/19 20:11:19 UTC
[01/50] [abbrv] airavata git commit: Reorganizing duplicate generated
classed and instead using the stubs artifact - AIRAVATA-1621
Repository: airavata
Updated Branches:
refs/heads/new-workflow-design 41ea94678 -> 0db33d2e5
http://git-wip-us.apache.org/repos/asf/airavata/blob/b25e0a5d/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredential.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredential.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredential.java
deleted file mode 100644
index 9fc373a..0000000
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredential.java
+++ /dev/null
@@ -1,998 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.credential.store.datamodel;
-
-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 org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class SSHCredential implements org.apache.thrift.TBase<SSHCredential, SSHCredential._Fields>, java.io.Serializable, Cloneable, Comparable<SSHCredential> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SSHCredential");
-
- private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)1);
- 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)2);
- private static final org.apache.thrift.protocol.TField PASSPHRASE_FIELD_DESC = new org.apache.thrift.protocol.TField("passphrase", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField PUBLIC_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("publicKey", org.apache.thrift.protocol.TType.STRING, (short)4);
- private static final org.apache.thrift.protocol.TField PRIVATE_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("privateKey", org.apache.thrift.protocol.TType.STRING, (short)5);
- private static final org.apache.thrift.protocol.TField PERSISTED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("persistedTime", org.apache.thrift.protocol.TType.I64, (short)6);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)7);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new SSHCredentialStandardSchemeFactory());
- schemes.put(TupleScheme.class, new SSHCredentialTupleSchemeFactory());
- }
-
- public String gatewayId; // required
- public String username; // required
- public String passphrase; // required
- public String publicKey; // optional
- public String privateKey; // optional
- public long persistedTime; // optional
- public String token; // optional
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- GATEWAY_ID((short)1, "gatewayId"),
- USERNAME((short)2, "username"),
- PASSPHRASE((short)3, "passphrase"),
- PUBLIC_KEY((short)4, "publicKey"),
- PRIVATE_KEY((short)5, "privateKey"),
- PERSISTED_TIME((short)6, "persistedTime"),
- TOKEN((short)7, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // GATEWAY_ID
- return GATEWAY_ID;
- case 2: // USERNAME
- return USERNAME;
- case 3: // PASSPHRASE
- return PASSPHRASE;
- case 4: // PUBLIC_KEY
- return PUBLIC_KEY;
- case 5: // PRIVATE_KEY
- return PRIVATE_KEY;
- case 6: // PERSISTED_TIME
- return PERSISTED_TIME;
- case 7: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __PERSISTEDTIME_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- private _Fields optionals[] = {_Fields.PUBLIC_KEY,_Fields.PRIVATE_KEY,_Fields.PERSISTED_TIME,_Fields.TOKEN};
- 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.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- 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.PASSPHRASE, new org.apache.thrift.meta_data.FieldMetaData("passphrase", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.PUBLIC_KEY, new org.apache.thrift.meta_data.FieldMetaData("publicKey", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.PRIVATE_KEY, new org.apache.thrift.meta_data.FieldMetaData("privateKey", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.PERSISTED_TIME, new org.apache.thrift.meta_data.FieldMetaData("persistedTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SSHCredential.class, metaDataMap);
- }
-
- public SSHCredential() {
- }
-
- public SSHCredential(
- String gatewayId,
- String username,
- String passphrase)
- {
- this();
- this.gatewayId = gatewayId;
- this.username = username;
- this.passphrase = passphrase;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public SSHCredential(SSHCredential other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetGatewayId()) {
- this.gatewayId = other.gatewayId;
- }
- if (other.isSetUsername()) {
- this.username = other.username;
- }
- if (other.isSetPassphrase()) {
- this.passphrase = other.passphrase;
- }
- if (other.isSetPublicKey()) {
- this.publicKey = other.publicKey;
- }
- if (other.isSetPrivateKey()) {
- this.privateKey = other.privateKey;
- }
- this.persistedTime = other.persistedTime;
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public SSHCredential deepCopy() {
- return new SSHCredential(this);
- }
-
- @Override
- public void clear() {
- this.gatewayId = null;
- this.username = null;
- this.passphrase = null;
- this.publicKey = null;
- this.privateKey = null;
- setPersistedTimeIsSet(false);
- this.persistedTime = 0;
- this.token = null;
- }
-
- public String getGatewayId() {
- return this.gatewayId;
- }
-
- public SSHCredential setGatewayId(String gatewayId) {
- this.gatewayId = gatewayId;
- return this;
- }
-
- public void unsetGatewayId() {
- this.gatewayId = null;
- }
-
- /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
- public boolean isSetGatewayId() {
- return this.gatewayId != null;
- }
-
- public void setGatewayIdIsSet(boolean value) {
- if (!value) {
- this.gatewayId = null;
- }
- }
-
- public String getUsername() {
- return this.username;
- }
-
- public SSHCredential setUsername(String username) {
- this.username = username;
- return this;
- }
-
- public void unsetUsername() {
- this.username = null;
- }
-
- /** Returns true if field username is set (has been assigned a value) and false otherwise */
- public boolean isSetUsername() {
- return this.username != null;
- }
-
- public void setUsernameIsSet(boolean value) {
- if (!value) {
- this.username = null;
- }
- }
-
- public String getPassphrase() {
- return this.passphrase;
- }
-
- public SSHCredential setPassphrase(String passphrase) {
- this.passphrase = passphrase;
- return this;
- }
-
- public void unsetPassphrase() {
- this.passphrase = null;
- }
-
- /** Returns true if field passphrase is set (has been assigned a value) and false otherwise */
- public boolean isSetPassphrase() {
- return this.passphrase != null;
- }
-
- public void setPassphraseIsSet(boolean value) {
- if (!value) {
- this.passphrase = null;
- }
- }
-
- public String getPublicKey() {
- return this.publicKey;
- }
-
- public SSHCredential setPublicKey(String publicKey) {
- this.publicKey = publicKey;
- return this;
- }
-
- public void unsetPublicKey() {
- this.publicKey = null;
- }
-
- /** Returns true if field publicKey is set (has been assigned a value) and false otherwise */
- public boolean isSetPublicKey() {
- return this.publicKey != null;
- }
-
- public void setPublicKeyIsSet(boolean value) {
- if (!value) {
- this.publicKey = null;
- }
- }
-
- public String getPrivateKey() {
- return this.privateKey;
- }
-
- public SSHCredential setPrivateKey(String privateKey) {
- this.privateKey = privateKey;
- return this;
- }
-
- public void unsetPrivateKey() {
- this.privateKey = null;
- }
-
- /** Returns true if field privateKey is set (has been assigned a value) and false otherwise */
- public boolean isSetPrivateKey() {
- return this.privateKey != null;
- }
-
- public void setPrivateKeyIsSet(boolean value) {
- if (!value) {
- this.privateKey = null;
- }
- }
-
- public long getPersistedTime() {
- return this.persistedTime;
- }
-
- public SSHCredential setPersistedTime(long persistedTime) {
- this.persistedTime = persistedTime;
- setPersistedTimeIsSet(true);
- return this;
- }
-
- public void unsetPersistedTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PERSISTEDTIME_ISSET_ID);
- }
-
- /** Returns true if field persistedTime is set (has been assigned a value) and false otherwise */
- public boolean isSetPersistedTime() {
- return EncodingUtils.testBit(__isset_bitfield, __PERSISTEDTIME_ISSET_ID);
- }
-
- public void setPersistedTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PERSISTEDTIME_ISSET_ID, value);
- }
-
- public String getToken() {
- return this.token;
- }
-
- public SSHCredential setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case GATEWAY_ID:
- if (value == null) {
- unsetGatewayId();
- } else {
- setGatewayId((String)value);
- }
- break;
-
- case USERNAME:
- if (value == null) {
- unsetUsername();
- } else {
- setUsername((String)value);
- }
- break;
-
- case PASSPHRASE:
- if (value == null) {
- unsetPassphrase();
- } else {
- setPassphrase((String)value);
- }
- break;
-
- case PUBLIC_KEY:
- if (value == null) {
- unsetPublicKey();
- } else {
- setPublicKey((String)value);
- }
- break;
-
- case PRIVATE_KEY:
- if (value == null) {
- unsetPrivateKey();
- } else {
- setPrivateKey((String)value);
- }
- break;
-
- case PERSISTED_TIME:
- if (value == null) {
- unsetPersistedTime();
- } else {
- setPersistedTime((Long)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case GATEWAY_ID:
- return getGatewayId();
-
- case USERNAME:
- return getUsername();
-
- case PASSPHRASE:
- return getPassphrase();
-
- case PUBLIC_KEY:
- return getPublicKey();
-
- case PRIVATE_KEY:
- return getPrivateKey();
-
- case PERSISTED_TIME:
- return Long.valueOf(getPersistedTime());
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case GATEWAY_ID:
- return isSetGatewayId();
- case USERNAME:
- return isSetUsername();
- case PASSPHRASE:
- return isSetPassphrase();
- case PUBLIC_KEY:
- return isSetPublicKey();
- case PRIVATE_KEY:
- return isSetPrivateKey();
- case PERSISTED_TIME:
- return isSetPersistedTime();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof SSHCredential)
- return this.equals((SSHCredential)that);
- return false;
- }
-
- public boolean equals(SSHCredential that) {
- if (that == null)
- return false;
-
- boolean this_present_gatewayId = true && this.isSetGatewayId();
- boolean that_present_gatewayId = true && that.isSetGatewayId();
- if (this_present_gatewayId || that_present_gatewayId) {
- if (!(this_present_gatewayId && that_present_gatewayId))
- return false;
- if (!this.gatewayId.equals(that.gatewayId))
- return false;
- }
-
- boolean this_present_username = true && this.isSetUsername();
- boolean that_present_username = true && that.isSetUsername();
- if (this_present_username || that_present_username) {
- if (!(this_present_username && that_present_username))
- return false;
- if (!this.username.equals(that.username))
- return false;
- }
-
- boolean this_present_passphrase = true && this.isSetPassphrase();
- boolean that_present_passphrase = true && that.isSetPassphrase();
- if (this_present_passphrase || that_present_passphrase) {
- if (!(this_present_passphrase && that_present_passphrase))
- return false;
- if (!this.passphrase.equals(that.passphrase))
- return false;
- }
-
- boolean this_present_publicKey = true && this.isSetPublicKey();
- boolean that_present_publicKey = true && that.isSetPublicKey();
- if (this_present_publicKey || that_present_publicKey) {
- if (!(this_present_publicKey && that_present_publicKey))
- return false;
- if (!this.publicKey.equals(that.publicKey))
- return false;
- }
-
- boolean this_present_privateKey = true && this.isSetPrivateKey();
- boolean that_present_privateKey = true && that.isSetPrivateKey();
- if (this_present_privateKey || that_present_privateKey) {
- if (!(this_present_privateKey && that_present_privateKey))
- return false;
- if (!this.privateKey.equals(that.privateKey))
- return false;
- }
-
- boolean this_present_persistedTime = true && this.isSetPersistedTime();
- boolean that_present_persistedTime = true && that.isSetPersistedTime();
- if (this_present_persistedTime || that_present_persistedTime) {
- if (!(this_present_persistedTime && that_present_persistedTime))
- return false;
- if (this.persistedTime != that.persistedTime)
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(SSHCredential other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetGatewayId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUsername()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetPassphrase()).compareTo(other.isSetPassphrase());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPassphrase()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.passphrase, other.passphrase);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetPublicKey()).compareTo(other.isSetPublicKey());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPublicKey()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.publicKey, other.publicKey);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetPrivateKey()).compareTo(other.isSetPrivateKey());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPrivateKey()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privateKey, other.privateKey);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetPersistedTime()).compareTo(other.isSetPersistedTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPersistedTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.persistedTime, other.persistedTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("SSHCredential(");
- boolean first = true;
-
- sb.append("gatewayId:");
- if (this.gatewayId == null) {
- sb.append("null");
- } else {
- sb.append(this.gatewayId);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("username:");
- if (this.username == null) {
- sb.append("null");
- } else {
- sb.append(this.username);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("passphrase:");
- if (this.passphrase == null) {
- sb.append("null");
- } else {
- sb.append(this.passphrase);
- }
- first = false;
- if (isSetPublicKey()) {
- if (!first) sb.append(", ");
- sb.append("publicKey:");
- if (this.publicKey == null) {
- sb.append("null");
- } else {
- sb.append(this.publicKey);
- }
- first = false;
- }
- if (isSetPrivateKey()) {
- if (!first) sb.append(", ");
- sb.append("privateKey:");
- if (this.privateKey == null) {
- sb.append("null");
- } else {
- sb.append(this.privateKey);
- }
- first = false;
- }
- if (isSetPersistedTime()) {
- if (!first) sb.append(", ");
- sb.append("persistedTime:");
- sb.append(this.persistedTime);
- first = false;
- }
- if (isSetToken()) {
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (gatewayId == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString());
- }
- if (username == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' was not present! Struct: " + toString());
- }
- if (passphrase == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'passphrase' was not present! Struct: " + toString());
- }
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bitfield = 0;
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class SSHCredentialStandardSchemeFactory implements SchemeFactory {
- public SSHCredentialStandardScheme getScheme() {
- return new SSHCredentialStandardScheme();
- }
- }
-
- private static class SSHCredentialStandardScheme extends StandardScheme<SSHCredential> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, SSHCredential struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // GATEWAY_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.gatewayId = iprot.readString();
- struct.setGatewayIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // USERNAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.username = iprot.readString();
- struct.setUsernameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // PASSPHRASE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.passphrase = iprot.readString();
- struct.setPassphraseIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // PUBLIC_KEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.publicKey = iprot.readString();
- struct.setPublicKeyIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // PRIVATE_KEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.privateKey = iprot.readString();
- struct.setPrivateKeyIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // PERSISTED_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.persistedTime = iprot.readI64();
- struct.setPersistedTimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, SSHCredential struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.gatewayId != null) {
- oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
- oprot.writeString(struct.gatewayId);
- oprot.writeFieldEnd();
- }
- if (struct.username != null) {
- oprot.writeFieldBegin(USERNAME_FIELD_DESC);
- oprot.writeString(struct.username);
- oprot.writeFieldEnd();
- }
- if (struct.passphrase != null) {
- oprot.writeFieldBegin(PASSPHRASE_FIELD_DESC);
- oprot.writeString(struct.passphrase);
- oprot.writeFieldEnd();
- }
- if (struct.publicKey != null) {
- if (struct.isSetPublicKey()) {
- oprot.writeFieldBegin(PUBLIC_KEY_FIELD_DESC);
- oprot.writeString(struct.publicKey);
- oprot.writeFieldEnd();
- }
- }
- if (struct.privateKey != null) {
- if (struct.isSetPrivateKey()) {
- oprot.writeFieldBegin(PRIVATE_KEY_FIELD_DESC);
- oprot.writeString(struct.privateKey);
- oprot.writeFieldEnd();
- }
- }
- if (struct.isSetPersistedTime()) {
- oprot.writeFieldBegin(PERSISTED_TIME_FIELD_DESC);
- oprot.writeI64(struct.persistedTime);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- if (struct.isSetToken()) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class SSHCredentialTupleSchemeFactory implements SchemeFactory {
- public SSHCredentialTupleScheme getScheme() {
- return new SSHCredentialTupleScheme();
- }
- }
-
- private static class SSHCredentialTupleScheme extends TupleScheme<SSHCredential> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, SSHCredential struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeString(struct.gatewayId);
- oprot.writeString(struct.username);
- oprot.writeString(struct.passphrase);
- BitSet optionals = new BitSet();
- if (struct.isSetPublicKey()) {
- optionals.set(0);
- }
- if (struct.isSetPrivateKey()) {
- optionals.set(1);
- }
- if (struct.isSetPersistedTime()) {
- optionals.set(2);
- }
- if (struct.isSetToken()) {
- optionals.set(3);
- }
- oprot.writeBitSet(optionals, 4);
- if (struct.isSetPublicKey()) {
- oprot.writeString(struct.publicKey);
- }
- if (struct.isSetPrivateKey()) {
- oprot.writeString(struct.privateKey);
- }
- if (struct.isSetPersistedTime()) {
- oprot.writeI64(struct.persistedTime);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, SSHCredential struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.gatewayId = iprot.readString();
- struct.setGatewayIdIsSet(true);
- struct.username = iprot.readString();
- struct.setUsernameIsSet(true);
- struct.passphrase = iprot.readString();
- struct.setPassphraseIsSet(true);
- BitSet incoming = iprot.readBitSet(4);
- if (incoming.get(0)) {
- struct.publicKey = iprot.readString();
- struct.setPublicKeyIsSet(true);
- }
- if (incoming.get(1)) {
- struct.privateKey = iprot.readString();
- struct.setPrivateKeyIsSet(true);
- }
- if (incoming.get(2)) {
- struct.persistedTime = iprot.readI64();
- struct.setPersistedTimeIsSet(true);
- }
- if (incoming.get(3)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/b25e0a5d/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/datamodel/csDataModelConstants.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/datamodel/csDataModelConstants.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/datamodel/csDataModelConstants.java
deleted file mode 100644
index b17513a..0000000
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/datamodel/csDataModelConstants.java
+++ /dev/null
@@ -1,55 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.credential.store.datamodel;
-
-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 org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class csDataModelConstants {
-
- public static final String DEFAULT_ID = "DO_NOT_SET_AT_CLIENTS";
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/b25e0a5d/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/exception/CredentialStoreException.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/exception/CredentialStoreException.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/exception/CredentialStoreException.java
deleted file mode 100644
index 7be01da..0000000
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/exception/CredentialStoreException.java
+++ /dev/null
@@ -1,397 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.credential.store.exception;
-
-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 org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class CredentialStoreException extends TException implements org.apache.thrift.TBase<CredentialStoreException, CredentialStoreException._Fields>, java.io.Serializable, Cloneable, Comparable<CredentialStoreException> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CredentialStoreException");
-
- private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new CredentialStoreExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new CredentialStoreExceptionTupleSchemeFactory());
- }
-
- public String message; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- MESSAGE((short)1, "message");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // MESSAGE
- return MESSAGE;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- 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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", 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(CredentialStoreException.class, metaDataMap);
- }
-
- public CredentialStoreException() {
- }
-
- public CredentialStoreException(
- String message)
- {
- this();
- this.message = message;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public CredentialStoreException(CredentialStoreException other) {
- if (other.isSetMessage()) {
- this.message = other.message;
- }
- }
-
- public CredentialStoreException deepCopy() {
- return new CredentialStoreException(this);
- }
-
- @Override
- public void clear() {
- this.message = null;
- }
-
- public String getMessage() {
- return this.message;
- }
-
- public CredentialStoreException setMessage(String message) {
- this.message = message;
- return this;
- }
-
- public void unsetMessage() {
- this.message = null;
- }
-
- /** Returns true if field message is set (has been assigned a value) and false otherwise */
- public boolean isSetMessage() {
- return this.message != null;
- }
-
- public void setMessageIsSet(boolean value) {
- if (!value) {
- this.message = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case MESSAGE:
- if (value == null) {
- unsetMessage();
- } else {
- setMessage((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case MESSAGE:
- return getMessage();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case MESSAGE:
- return isSetMessage();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof CredentialStoreException)
- return this.equals((CredentialStoreException)that);
- return false;
- }
-
- public boolean equals(CredentialStoreException that) {
- if (that == null)
- return false;
-
- boolean this_present_message = true && this.isSetMessage();
- boolean that_present_message = true && that.isSetMessage();
- if (this_present_message || that_present_message) {
- if (!(this_present_message && that_present_message))
- return false;
- if (!this.message.equals(that.message))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(CredentialStoreException other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetMessage()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("CredentialStoreException(");
- boolean first = true;
-
- sb.append("message:");
- if (this.message == null) {
- sb.append("null");
- } else {
- sb.append(this.message);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (message == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'message' was not present! Struct: " + toString());
- }
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- 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 CredentialStoreExceptionStandardSchemeFactory implements SchemeFactory {
- public CredentialStoreExceptionStandardScheme getScheme() {
- return new CredentialStoreExceptionStandardScheme();
- }
- }
-
- private static class CredentialStoreExceptionStandardScheme extends StandardScheme<CredentialStoreException> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, CredentialStoreException struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // MESSAGE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.message = iprot.readString();
- struct.setMessageIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, CredentialStoreException struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.message != null) {
- oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
- oprot.writeString(struct.message);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class CredentialStoreExceptionTupleSchemeFactory implements SchemeFactory {
- public CredentialStoreExceptionTupleScheme getScheme() {
- return new CredentialStoreExceptionTupleScheme();
- }
- }
-
- private static class CredentialStoreExceptionTupleScheme extends TupleScheme<CredentialStoreException> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, CredentialStoreException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeString(struct.message);
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, CredentialStoreException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.message = iprot.readString();
- struct.setMessageIsSet(true);
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/b25e0a5d/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServer.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServer.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServer.java
index f0e14d5..ebed9a1 100644
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServer.java
+++ b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServer.java
@@ -67,8 +67,8 @@ public class CredentialStoreServer implements IServer {
new TSSLTransportFactory.TSSLTransportParameters();
String keystorePath = ServerSettings.getCredentialStoreThriftServerKeyStorePath();
String keystorePWD = ServerSettings.getCredentialStoreThriftServerKeyStorePassword();
- final int serverPort = Integer.parseInt(ServerSettings.getSetting(Constants.CREDNETIAL_SERVER_PORT, "8960"));
- final String serverHost = ServerSettings.getSetting(Constants.CREDNETIAL_SERVER_HOST, null);
+ final int serverPort = Integer.parseInt(ServerSettings.getSetting(Constants.CREDENTIAL_SERVER_PORT, "8960"));
+ final String serverHost = ServerSettings.getSetting(Constants.CREDENTIAL_SERVER_HOST, null);
params.setKeyStore(keystorePath, keystorePWD);
TServerSocket serverTransport = TSSLTransportFactory.getServerSocket(serverPort, 100, InetAddress.getByName(serverHost), params);
http://git-wip-us.apache.org/repos/asf/airavata/blob/b25e0a5d/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
index b5b1ac0..8205a22 100644
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
+++ b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServerHandler.java
@@ -24,7 +24,7 @@ import org.apache.airavata.common.exception.ApplicationSettingsException;
import org.apache.airavata.common.utils.DBUtil;
import org.apache.airavata.common.utils.ServerSettings;
import org.apache.airavata.credential.store.cpi.CredentialStoreService;
-import org.apache.airavata.credential.store.cpi.cs_cpi_serviceConstants;
+import org.apache.airavata.credential.store.cpi.credentialStoreCPIConstants;
import org.apache.airavata.credential.store.credential.CommunityUser;
import org.apache.airavata.credential.store.credential.Credential;
import org.apache.airavata.credential.store.datamodel.CertificateCredential;
@@ -69,7 +69,7 @@ public class CredentialStoreServerHandler implements CredentialStoreService.Ifac
@Override
public String getCSServiceVersion() throws TException {
- return cs_cpi_serviceConstants.CS_CPI_VERSION;
+ return credentialStoreCPIConstants.CS_CPI_VERSION;
}
@Override
@@ -107,9 +107,9 @@ public class CredentialStoreServerHandler implements CredentialStoreService.Ifac
try {
org.apache.airavata.credential.store.credential.impl.certificate.CertificateCredential credential = new org.apache.airavata.credential.store.credential.impl.certificate.CertificateCredential();
credential.setPortalUserName(certificateCredential.getCommunityUser().getUsername());
- credential.setCommunityUser(new CommunityUser(certificateCredential.getCommunityUser().getGatewayNmae(),
+ credential.setCommunityUser(new CommunityUser(certificateCredential.getCommunityUser().getGatewayName(),
certificateCredential.getCommunityUser().getUsername(), certificateCredential.getCommunityUser().getUserEmail()));
- String token = TokenGenerator.generateToken(certificateCredential.getCommunityUser().getGatewayNmae(), null);
+ String token = TokenGenerator.generateToken(certificateCredential.getCommunityUser().getGatewayName(), null);
credential.setToken(token);
Base64 encoder = new Base64(64);
byte [] decoded = encoder.decode(certificateCredential.getX509Cert().replaceAll(X509Factory.BEGIN_CERT, "").replaceAll(X509Factory.END_CERT, ""));
@@ -168,7 +168,7 @@ public class CredentialStoreServerHandler implements CredentialStoreService.Ifac
org.apache.airavata.credential.store.credential.impl.certificate.CertificateCredential credential1 = (org.apache.airavata.credential.store.credential.impl.certificate.CertificateCredential) credential;
CertificateCredential certificateCredential = new CertificateCredential();
org.apache.airavata.credential.store.datamodel.CommunityUser communityUser = new org.apache.airavata.credential.store.datamodel.CommunityUser();
- communityUser.setGatewayNmae(credential1.getCommunityUser().getGatewayName());
+ communityUser.setGatewayName(credential1.getCommunityUser().getGatewayName());
communityUser.setUsername(credential1.getCommunityUser().getUserName());
communityUser.setUserEmail(credential1.getCommunityUser().getUserEmail());
certificateCredential.setCommunityUser(communityUser);
[12/50] [abbrv] airavata git commit: Merge remote-tracking branch
'origin/master'
Posted by sh...@apache.org.
Merge remote-tracking branch 'origin/master'
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/9d80cf29
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/9d80cf29
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/9d80cf29
Branch: refs/heads/new-workflow-design
Commit: 9d80cf2981915d908dfc1d37dd9b97fe8501d1c5
Parents: 8c84eee 9385c4e
Author: Suresh Marru <sm...@apache.org>
Authored: Fri Mar 6 14:23:18 2015 -0500
Committer: Suresh Marru <sm...@apache.org>
Committed: Fri Mar 6 14:23:18 2015 -0500
----------------------------------------------------------------------
.../org/apache/airavata/common/utils/DatabaseTestCases.java | 2 +-
.../client/src/main/resources/airavata-client.properties | 2 +-
.../server/src/main/resources/airavata-server.properties | 6 +++---
.../credential/store/store/impl/db/SSHCredentialTest.java | 2 +-
.../src/main/resources/airavata-server.properties | 4 ++--
modules/security/src/test/resources/jdbc-authenticator.xml | 2 +-
modules/security/src/test/resources/session-authenticator.xml | 2 +-
tools/registry-tool/README | 2 +-
8 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
[06/50] [abbrv] airavata git commit: adding chassisName for compute
resource scheduling
Posted by sh...@apache.org.
adding chassisName for compute resource scheduling
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/7c103499
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/7c103499
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/7c103499
Branch: refs/heads/new-workflow-design
Commit: 7c10349962bdce8c06f6905f226da488017c4930
Parents: 9d960f7
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Fri Mar 6 10:23:07 2015 -0500
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Fri Mar 6 10:23:07 2015 -0500
----------------------------------------------------------------------
.../lib/airavata/experimentModel_types.cpp | 34 ++++--
.../lib/airavata/experimentModel_types.h | 35 ++++--
.../Model/Workspace/Experiment/Types.php | 20 ++++
.../ComputationalResourceScheduling.java | 109 ++++++++++++++++++-
.../experimentModel.thrift | 3 +-
5 files changed, 174 insertions(+), 27 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/7c103499/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.cpp
index d6e6b07..2f1d21b 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.cpp
@@ -719,8 +719,8 @@ void swap(ApplicationStatus &a, ApplicationStatus &b) {
swap(a.__isset, b.__isset);
}
-const char* ComputationalResourceScheduling::ascii_fingerprint = "32AC7AC41AD3753A7224A32FD6EB4B5D";
-const uint8_t ComputationalResourceScheduling::binary_fingerprint[16] = {0x32,0xAC,0x7A,0xC4,0x1A,0xD3,0x75,0x3A,0x72,0x24,0xA3,0x2F,0xD6,0xEB,0x4B,0x5D};
+const char* ComputationalResourceScheduling::ascii_fingerprint = "F43E914A611D39345BCC729678C1C696";
+const uint8_t ComputationalResourceScheduling::binary_fingerprint[16] = {0xF4,0x3E,0x91,0x4A,0x61,0x1D,0x39,0x34,0x5B,0xCC,0x72,0x96,0x78,0xC1,0xC6,0x96};
uint32_t ComputationalResourceScheduling::read(::apache::thrift::protocol::TProtocol* iprot) {
@@ -814,6 +814,14 @@ uint32_t ComputationalResourceScheduling::read(::apache::thrift::protocol::TProt
xfer += iprot->skip(ftype);
}
break;
+ case 10:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->chassisName);
+ this->__isset.chassisName = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
default:
xfer += iprot->skip(ftype);
break;
@@ -875,6 +883,11 @@ uint32_t ComputationalResourceScheduling::write(::apache::thrift::protocol::TPro
xfer += oprot->writeString(this->computationalProjectAccount);
xfer += oprot->writeFieldEnd();
}
+ if (this->__isset.chassisName) {
+ xfer += oprot->writeFieldBegin("chassisName", ::apache::thrift::protocol::T_STRING, 10);
+ xfer += oprot->writeString(this->chassisName);
+ xfer += oprot->writeFieldEnd();
+ }
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
@@ -891,6 +904,7 @@ void swap(ComputationalResourceScheduling &a, ComputationalResourceScheduling &b
swap(a.jobStartTime, b.jobStartTime);
swap(a.totalPhysicalMemory, b.totalPhysicalMemory);
swap(a.computationalProjectAccount, b.computationalProjectAccount);
+ swap(a.chassisName, b.chassisName);
swap(a.__isset, b.__isset);
}
@@ -1181,8 +1195,8 @@ void swap(QualityOfServiceParams &a, QualityOfServiceParams &b) {
swap(a.__isset, b.__isset);
}
-const char* UserConfigurationData::ascii_fingerprint = "4E5EF84AE34A2F52BCD6617A229780E0";
-const uint8_t UserConfigurationData::binary_fingerprint[16] = {0x4E,0x5E,0xF8,0x4A,0xE3,0x4A,0x2F,0x52,0xBC,0xD6,0x61,0x7A,0x22,0x97,0x80,0xE0};
+const char* UserConfigurationData::ascii_fingerprint = "A39B8E6345C677771D939D170C65720F";
+const uint8_t UserConfigurationData::binary_fingerprint[16] = {0xA3,0x9B,0x8E,0x63,0x45,0xC6,0x77,0x77,0x1D,0x93,0x9D,0x17,0x0C,0x65,0x72,0x0F};
uint32_t UserConfigurationData::read(::apache::thrift::protocol::TProtocol* iprot) {
@@ -1843,8 +1857,8 @@ void swap(DataTransferDetails &a, DataTransferDetails &b) {
swap(a.__isset, b.__isset);
}
-const char* TaskDetails::ascii_fingerprint = "6EAEEB62655ECD5CA7A24BFDE46F678C";
-const uint8_t TaskDetails::binary_fingerprint[16] = {0x6E,0xAE,0xEB,0x62,0x65,0x5E,0xCD,0x5C,0xA7,0xA2,0x4B,0xFD,0xE4,0x6F,0x67,0x8C};
+const char* TaskDetails::ascii_fingerprint = "88276CFCC9B30CA0B93A5931F93CACC4";
+const uint8_t TaskDetails::binary_fingerprint[16] = {0x88,0x27,0x6C,0xFC,0xC9,0xB3,0x0C,0xA0,0xB9,0x3A,0x59,0x31,0xF9,0x3C,0xAC,0xC4};
uint32_t TaskDetails::read(::apache::thrift::protocol::TProtocol* iprot) {
@@ -2238,8 +2252,8 @@ void swap(TaskDetails &a, TaskDetails &b) {
swap(a.__isset, b.__isset);
}
-const char* WorkflowNodeDetails::ascii_fingerprint = "CDDA44A784FD60829B4F4EAA67D71C72";
-const uint8_t WorkflowNodeDetails::binary_fingerprint[16] = {0xCD,0xDA,0x44,0xA7,0x84,0xFD,0x60,0x82,0x9B,0x4F,0x4E,0xAA,0x67,0xD7,0x1C,0x72};
+const char* WorkflowNodeDetails::ascii_fingerprint = "940AB958A2909A83261C2016BD466838";
+const uint8_t WorkflowNodeDetails::binary_fingerprint[16] = {0x94,0x0A,0xB9,0x58,0xA2,0x90,0x9A,0x83,0x26,0x1C,0x20,0x16,0xBD,0x46,0x68,0x38};
uint32_t WorkflowNodeDetails::read(::apache::thrift::protocol::TProtocol* iprot) {
@@ -2694,8 +2708,8 @@ void swap(ValidationResults &a, ValidationResults &b) {
swap(a.validationResultList, b.validationResultList);
}
-const char* Experiment::ascii_fingerprint = "145D3134FA7C46D3D99051850C4984FF";
-const uint8_t Experiment::binary_fingerprint[16] = {0x14,0x5D,0x31,0x34,0xFA,0x7C,0x46,0xD3,0xD9,0x90,0x51,0x85,0x0C,0x49,0x84,0xFF};
+const char* Experiment::ascii_fingerprint = "C610216A34DE0B4389362B3D5236F6F6";
+const uint8_t Experiment::binary_fingerprint[16] = {0xC6,0x10,0x21,0x6A,0x34,0xDE,0x0B,0x43,0x89,0x36,0x2B,0x3D,0x52,0x36,0xF6,0xF6};
uint32_t Experiment::read(::apache::thrift::protocol::TProtocol* iprot) {
http://git-wip-us.apache.org/repos/asf/airavata/blob/7c103499/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.h
index 1b5306e..15c0d4c 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.h
@@ -495,7 +495,7 @@ class ApplicationStatus {
void swap(ApplicationStatus &a, ApplicationStatus &b);
typedef struct _ComputationalResourceScheduling__isset {
- _ComputationalResourceScheduling__isset() : resourceHostId(false), totalCPUCount(false), nodeCount(false), numberOfThreads(false), queueName(false), wallTimeLimit(false), jobStartTime(false), totalPhysicalMemory(false), computationalProjectAccount(false) {}
+ _ComputationalResourceScheduling__isset() : resourceHostId(false), totalCPUCount(false), nodeCount(false), numberOfThreads(false), queueName(false), wallTimeLimit(false), jobStartTime(false), totalPhysicalMemory(false), computationalProjectAccount(false), chassisName(false) {}
bool resourceHostId;
bool totalCPUCount;
bool nodeCount;
@@ -505,15 +505,16 @@ typedef struct _ComputationalResourceScheduling__isset {
bool jobStartTime;
bool totalPhysicalMemory;
bool computationalProjectAccount;
+ bool chassisName;
} _ComputationalResourceScheduling__isset;
class ComputationalResourceScheduling {
public:
- static const char* ascii_fingerprint; // = "32AC7AC41AD3753A7224A32FD6EB4B5D";
- static const uint8_t binary_fingerprint[16]; // = {0x32,0xAC,0x7A,0xC4,0x1A,0xD3,0x75,0x3A,0x72,0x24,0xA3,0x2F,0xD6,0xEB,0x4B,0x5D};
+ static const char* ascii_fingerprint; // = "F43E914A611D39345BCC729678C1C696";
+ static const uint8_t binary_fingerprint[16]; // = {0xF4,0x3E,0x91,0x4A,0x61,0x1D,0x39,0x34,0x5B,0xCC,0x72,0x96,0x78,0xC1,0xC6,0x96};
- ComputationalResourceScheduling() : resourceHostId(), totalCPUCount(0), nodeCount(0), numberOfThreads(0), queueName(), wallTimeLimit(0), jobStartTime(0), totalPhysicalMemory(0), computationalProjectAccount() {
+ ComputationalResourceScheduling() : resourceHostId(), totalCPUCount(0), nodeCount(0), numberOfThreads(0), queueName(), wallTimeLimit(0), jobStartTime(0), totalPhysicalMemory(0), computationalProjectAccount(), chassisName() {
}
virtual ~ComputationalResourceScheduling() throw() {}
@@ -527,6 +528,7 @@ class ComputationalResourceScheduling {
int32_t jobStartTime;
int32_t totalPhysicalMemory;
std::string computationalProjectAccount;
+ std::string chassisName;
_ComputationalResourceScheduling__isset __isset;
@@ -575,6 +577,11 @@ class ComputationalResourceScheduling {
__isset.computationalProjectAccount = true;
}
+ void __set_chassisName(const std::string& val) {
+ chassisName = val;
+ __isset.chassisName = true;
+ }
+
bool operator == (const ComputationalResourceScheduling & rhs) const
{
if (__isset.resourceHostId != rhs.__isset.resourceHostId)
@@ -613,6 +620,10 @@ class ComputationalResourceScheduling {
return false;
else if (__isset.computationalProjectAccount && !(computationalProjectAccount == rhs.computationalProjectAccount))
return false;
+ if (__isset.chassisName != rhs.__isset.chassisName)
+ return false;
+ else if (__isset.chassisName && !(chassisName == rhs.chassisName))
+ return false;
return true;
}
bool operator != (const ComputationalResourceScheduling &rhs) const {
@@ -856,8 +867,8 @@ typedef struct _UserConfigurationData__isset {
class UserConfigurationData {
public:
- static const char* ascii_fingerprint; // = "4E5EF84AE34A2F52BCD6617A229780E0";
- static const uint8_t binary_fingerprint[16]; // = {0x4E,0x5E,0xF8,0x4A,0xE3,0x4A,0x2F,0x52,0xBC,0xD6,0x61,0x7A,0x22,0x97,0x80,0xE0};
+ static const char* ascii_fingerprint; // = "A39B8E6345C677771D939D170C65720F";
+ static const uint8_t binary_fingerprint[16]; // = {0xA3,0x9B,0x8E,0x63,0x45,0xC6,0x77,0x77,0x1D,0x93,0x9D,0x17,0x0C,0x65,0x72,0x0F};
UserConfigurationData() : airavataAutoSchedule(false), overrideManualScheduledParams(false), shareExperimentPublicly(false), throttleResources(false) {
}
@@ -1296,8 +1307,8 @@ typedef struct _TaskDetails__isset {
class TaskDetails {
public:
- static const char* ascii_fingerprint; // = "6EAEEB62655ECD5CA7A24BFDE46F678C";
- static const uint8_t binary_fingerprint[16]; // = {0x6E,0xAE,0xEB,0x62,0x65,0x5E,0xCD,0x5C,0xA7,0xA2,0x4B,0xFD,0xE4,0x6F,0x67,0x8C};
+ static const char* ascii_fingerprint; // = "88276CFCC9B30CA0B93A5931F93CACC4";
+ static const uint8_t binary_fingerprint[16]; // = {0x88,0x27,0x6C,0xFC,0xC9,0xB3,0x0C,0xA0,0xB9,0x3A,0x59,0x31,0xF9,0x3C,0xAC,0xC4};
TaskDetails() : taskID("DO_NOT_SET_AT_CLIENTS"), creationTime(0), applicationId(), applicationVersion(), applicationDeploymentId(), enableEmailNotification(0) {
}
@@ -1495,8 +1506,8 @@ typedef struct _WorkflowNodeDetails__isset {
class WorkflowNodeDetails {
public:
- static const char* ascii_fingerprint; // = "CDDA44A784FD60829B4F4EAA67D71C72";
- static const uint8_t binary_fingerprint[16]; // = {0xCD,0xDA,0x44,0xA7,0x84,0xFD,0x60,0x82,0x9B,0x4F,0x4E,0xAA,0x67,0xD7,0x1C,0x72};
+ static const char* ascii_fingerprint; // = "940AB958A2909A83261C2016BD466838";
+ static const uint8_t binary_fingerprint[16]; // = {0x94,0x0A,0xB9,0x58,0xA2,0x90,0x9A,0x83,0x26,0x1C,0x20,0x16,0xBD,0x46,0x68,0x38};
WorkflowNodeDetails() : nodeInstanceId("DO_NOT_SET_AT_CLIENTS"), creationTime(0), nodeName("SINGLE_APP_NODE"), executionUnit((ExecutionUnit::type)1), executionUnitData() {
executionUnit = (ExecutionUnit::type)1;
@@ -1736,8 +1747,8 @@ typedef struct _Experiment__isset {
class Experiment {
public:
- static const char* ascii_fingerprint; // = "145D3134FA7C46D3D99051850C4984FF";
- static const uint8_t binary_fingerprint[16]; // = {0x14,0x5D,0x31,0x34,0xFA,0x7C,0x46,0xD3,0xD9,0x90,0x51,0x85,0x0C,0x49,0x84,0xFF};
+ static const char* ascii_fingerprint; // = "C610216A34DE0B4389362B3D5236F6F6";
+ static const uint8_t binary_fingerprint[16]; // = {0xC6,0x10,0x21,0x6A,0x34,0xDE,0x0B,0x43,0x89,0x36,0x2B,0x3D,0x52,0x36,0xF6,0xF6};
Experiment() : experimentID("DO_NOT_SET_AT_CLIENTS"), projectID("DEFAULT"), creationTime(0), userName(), name(), description(), applicationId(), applicationVersion(), workflowTemplateId(), workflowTemplateVersion(), enableEmailNotification(0), workflowExecutionInstanceId() {
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/7c103499/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Experiment/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Experiment/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Experiment/Types.php
index 1fbcd0b..ea7aa19 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Experiment/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Experiment/Types.php
@@ -780,6 +780,7 @@ class ComputationalResourceScheduling {
public $jobStartTime = null;
public $totalPhysicalMemory = null;
public $computationalProjectAccount = null;
+ public $chassisName = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
@@ -820,6 +821,10 @@ class ComputationalResourceScheduling {
'var' => 'computationalProjectAccount',
'type' => TType::STRING,
),
+ 10 => array(
+ 'var' => 'chassisName',
+ 'type' => TType::STRING,
+ ),
);
}
if (is_array($vals)) {
@@ -850,6 +855,9 @@ class ComputationalResourceScheduling {
if (isset($vals['computationalProjectAccount'])) {
$this->computationalProjectAccount = $vals['computationalProjectAccount'];
}
+ if (isset($vals['chassisName'])) {
+ $this->chassisName = $vals['chassisName'];
+ }
}
}
@@ -935,6 +943,13 @@ class ComputationalResourceScheduling {
$xfer += $input->skip($ftype);
}
break;
+ case 10:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->chassisName);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
default:
$xfer += $input->skip($ftype);
break;
@@ -993,6 +1008,11 @@ class ComputationalResourceScheduling {
$xfer += $output->writeString($this->computationalProjectAccount);
$xfer += $output->writeFieldEnd();
}
+ if ($this->chassisName !== null) {
+ $xfer += $output->writeFieldBegin('chassisName', TType::STRING, 10);
+ $xfer += $output->writeString($this->chassisName);
+ $xfer += $output->writeFieldEnd();
+ }
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
http://git-wip-us.apache.org/repos/asf/airavata/blob/7c103499/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ComputationalResourceScheduling.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ComputationalResourceScheduling.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ComputationalResourceScheduling.java
index fb6e0f6..51ef625 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ComputationalResourceScheduling.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ComputationalResourceScheduling.java
@@ -65,6 +65,7 @@ import org.slf4j.LoggerFactory;
private static final org.apache.thrift.protocol.TField JOB_START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("jobStartTime", org.apache.thrift.protocol.TType.I32, (short)7);
private static final org.apache.thrift.protocol.TField TOTAL_PHYSICAL_MEMORY_FIELD_DESC = new org.apache.thrift.protocol.TField("totalPhysicalMemory", org.apache.thrift.protocol.TType.I32, (short)8);
private static final org.apache.thrift.protocol.TField COMPUTATIONAL_PROJECT_ACCOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("computationalProjectAccount", org.apache.thrift.protocol.TType.STRING, (short)9);
+ private static final org.apache.thrift.protocol.TField CHASSIS_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("chassisName", org.apache.thrift.protocol.TType.STRING, (short)10);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -81,6 +82,7 @@ import org.slf4j.LoggerFactory;
private int jobStartTime; // optional
private int totalPhysicalMemory; // optional
private String computationalProjectAccount; // optional
+ private String chassisName; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -92,7 +94,8 @@ import org.slf4j.LoggerFactory;
WALL_TIME_LIMIT((short)6, "wallTimeLimit"),
JOB_START_TIME((short)7, "jobStartTime"),
TOTAL_PHYSICAL_MEMORY((short)8, "totalPhysicalMemory"),
- COMPUTATIONAL_PROJECT_ACCOUNT((short)9, "computationalProjectAccount");
+ COMPUTATIONAL_PROJECT_ACCOUNT((short)9, "computationalProjectAccount"),
+ CHASSIS_NAME((short)10, "chassisName");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -125,6 +128,8 @@ import org.slf4j.LoggerFactory;
return TOTAL_PHYSICAL_MEMORY;
case 9: // COMPUTATIONAL_PROJECT_ACCOUNT
return COMPUTATIONAL_PROJECT_ACCOUNT;
+ case 10: // CHASSIS_NAME
+ return CHASSIS_NAME;
default:
return null;
}
@@ -172,7 +177,7 @@ import org.slf4j.LoggerFactory;
private static final int __JOBSTARTTIME_ISSET_ID = 4;
private static final int __TOTALPHYSICALMEMORY_ISSET_ID = 5;
private byte __isset_bitfield = 0;
- private _Fields optionals[] = {_Fields.RESOURCE_HOST_ID,_Fields.TOTAL_CPUCOUNT,_Fields.NODE_COUNT,_Fields.NUMBER_OF_THREADS,_Fields.QUEUE_NAME,_Fields.WALL_TIME_LIMIT,_Fields.JOB_START_TIME,_Fields.TOTAL_PHYSICAL_MEMORY,_Fields.COMPUTATIONAL_PROJECT_ACCOUNT};
+ private _Fields optionals[] = {_Fields.RESOURCE_HOST_ID,_Fields.TOTAL_CPUCOUNT,_Fields.NODE_COUNT,_Fields.NUMBER_OF_THREADS,_Fields.QUEUE_NAME,_Fields.WALL_TIME_LIMIT,_Fields.JOB_START_TIME,_Fields.TOTAL_PHYSICAL_MEMORY,_Fields.COMPUTATIONAL_PROJECT_ACCOUNT,_Fields.CHASSIS_NAME};
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);
@@ -194,6 +199,8 @@ import org.slf4j.LoggerFactory;
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.COMPUTATIONAL_PROJECT_ACCOUNT, new org.apache.thrift.meta_data.FieldMetaData("computationalProjectAccount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CHASSIS_NAME, new org.apache.thrift.meta_data.FieldMetaData("chassisName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ComputationalResourceScheduling.class, metaDataMap);
}
@@ -221,6 +228,9 @@ import org.slf4j.LoggerFactory;
if (other.isSetComputationalProjectAccount()) {
this.computationalProjectAccount = other.computationalProjectAccount;
}
+ if (other.isSetChassisName()) {
+ this.chassisName = other.chassisName;
+ }
}
public ComputationalResourceScheduling deepCopy() {
@@ -244,6 +254,7 @@ import org.slf4j.LoggerFactory;
setTotalPhysicalMemoryIsSet(false);
this.totalPhysicalMemory = 0;
this.computationalProjectAccount = null;
+ this.chassisName = null;
}
public String getResourceHostId() {
@@ -447,6 +458,29 @@ import org.slf4j.LoggerFactory;
}
}
+ public String getChassisName() {
+ return this.chassisName;
+ }
+
+ public void setChassisName(String chassisName) {
+ this.chassisName = chassisName;
+ }
+
+ public void unsetChassisName() {
+ this.chassisName = null;
+ }
+
+ /** Returns true if field chassisName is set (has been assigned a value) and false otherwise */
+ public boolean isSetChassisName() {
+ return this.chassisName != null;
+ }
+
+ public void setChassisNameIsSet(boolean value) {
+ if (!value) {
+ this.chassisName = null;
+ }
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case RESOURCE_HOST_ID:
@@ -521,6 +555,14 @@ import org.slf4j.LoggerFactory;
}
break;
+ case CHASSIS_NAME:
+ if (value == null) {
+ unsetChassisName();
+ } else {
+ setChassisName((String)value);
+ }
+ break;
+
}
}
@@ -553,6 +595,9 @@ import org.slf4j.LoggerFactory;
case COMPUTATIONAL_PROJECT_ACCOUNT:
return getComputationalProjectAccount();
+ case CHASSIS_NAME:
+ return getChassisName();
+
}
throw new IllegalStateException();
}
@@ -582,6 +627,8 @@ import org.slf4j.LoggerFactory;
return isSetTotalPhysicalMemory();
case COMPUTATIONAL_PROJECT_ACCOUNT:
return isSetComputationalProjectAccount();
+ case CHASSIS_NAME:
+ return isSetChassisName();
}
throw new IllegalStateException();
}
@@ -680,6 +727,15 @@ import org.slf4j.LoggerFactory;
return false;
}
+ boolean this_present_chassisName = true && this.isSetChassisName();
+ boolean that_present_chassisName = true && that.isSetChassisName();
+ if (this_present_chassisName || that_present_chassisName) {
+ if (!(this_present_chassisName && that_present_chassisName))
+ return false;
+ if (!this.chassisName.equals(that.chassisName))
+ return false;
+ }
+
return true;
}
@@ -786,6 +842,16 @@ import org.slf4j.LoggerFactory;
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetChassisName()).compareTo(other.isSetChassisName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetChassisName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.chassisName, other.chassisName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -871,6 +937,16 @@ import org.slf4j.LoggerFactory;
}
first = false;
}
+ if (isSetChassisName()) {
+ if (!first) sb.append(", ");
+ sb.append("chassisName:");
+ if (this.chassisName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.chassisName);
+ }
+ first = false;
+ }
sb.append(")");
return sb.toString();
}
@@ -988,6 +1064,14 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 10: // CHASSIS_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.chassisName = iprot.readString();
+ struct.setChassisNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -1052,6 +1136,13 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldEnd();
}
}
+ if (struct.chassisName != null) {
+ if (struct.isSetChassisName()) {
+ oprot.writeFieldBegin(CHASSIS_NAME_FIELD_DESC);
+ oprot.writeString(struct.chassisName);
+ oprot.writeFieldEnd();
+ }
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -1097,7 +1188,10 @@ import org.slf4j.LoggerFactory;
if (struct.isSetComputationalProjectAccount()) {
optionals.set(8);
}
- oprot.writeBitSet(optionals, 9);
+ if (struct.isSetChassisName()) {
+ optionals.set(9);
+ }
+ oprot.writeBitSet(optionals, 10);
if (struct.isSetResourceHostId()) {
oprot.writeString(struct.resourceHostId);
}
@@ -1125,12 +1219,15 @@ import org.slf4j.LoggerFactory;
if (struct.isSetComputationalProjectAccount()) {
oprot.writeString(struct.computationalProjectAccount);
}
+ if (struct.isSetChassisName()) {
+ oprot.writeString(struct.chassisName);
+ }
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ComputationalResourceScheduling struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(9);
+ BitSet incoming = iprot.readBitSet(10);
if (incoming.get(0)) {
struct.resourceHostId = iprot.readString();
struct.setResourceHostIdIsSet(true);
@@ -1167,6 +1264,10 @@ import org.slf4j.LoggerFactory;
struct.computationalProjectAccount = iprot.readString();
struct.setComputationalProjectAccountIsSet(true);
}
+ if (incoming.get(9)) {
+ struct.chassisName = iprot.readString();
+ struct.setChassisNameIsSet(true);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/7c103499/airavata-api/thrift-interface-descriptions/experimentModel.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/experimentModel.thrift b/airavata-api/thrift-interface-descriptions/experimentModel.thrift
index 93a961a..0801695 100644
--- a/airavata-api/thrift-interface-descriptions/experimentModel.thrift
+++ b/airavata-api/thrift-interface-descriptions/experimentModel.thrift
@@ -197,7 +197,8 @@ struct ComputationalResourceScheduling {
6: optional i32 wallTimeLimit,
7: optional i32 jobStartTime,
8: optional i32 totalPhysicalMemory,
- 9: optional string computationalProjectAccount
+ 9: optional string computationalProjectAccount,
+ 10: optional string chassisName
}
/**
[13/50] [abbrv] airavata git commit: Removed sys out from the
WirterTask.
Posted by sh...@apache.org.
Removed sys out from the WirterTask.
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/44d89ee4
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/44d89ee4
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/44d89ee4
Branch: refs/heads/new-workflow-design
Commit: 44d89ee486c0ecafa94ba2254ef226a9de0b7dd0
Parents: 917adad
Author: shamrath <sh...@gmail.com>
Authored: Fri Mar 6 15:14:00 2015 -0500
Committer: shamrath <sh...@gmail.com>
Committed: Fri Mar 6 15:14:00 2015 -0500
----------------------------------------------------------------------
.../java/org/apache/airavata/messaging/core/stats/WriterTask.java | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/44d89ee4/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/stats/WriterTask.java
----------------------------------------------------------------------
diff --git a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/stats/WriterTask.java b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/stats/WriterTask.java
index b154ad7..e1a1b2f 100644
--- a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/stats/WriterTask.java
+++ b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/stats/WriterTask.java
@@ -21,7 +21,6 @@ public class WriterTask extends TimerTask {
@Override
public void run() {
try {
- System.out.println("########### calling Write Task ############");
StatCounter statCounter = StatCounter.getInstance();
List<Long> contPer10S = statCounter.getMessageContPer10S();
fos = new FileOutputStream(file, false);
[31/50] [abbrv] airavata git commit: fixing more issues with LSF
Posted by sh...@apache.org.
fixing more issues with LSF
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/c2bacf2d
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/c2bacf2d
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/c2bacf2d
Branch: refs/heads/new-workflow-design
Commit: c2bacf2d724cc4c0a58c3956f8b1fd3d54577d29
Parents: 34b06cc
Author: Lahiru Gunathilake <gl...@gmail.com>
Authored: Wed Mar 11 16:20:17 2015 -0400
Committer: Lahiru Gunathilake <gl...@gmail.com>
Committed: Wed Mar 11 16:20:17 2015 -0400
----------------------------------------------------------------------
.../client/samples/CreateLaunchExperiment.java | 83 +++++++++++++++-----
.../tools/RegisterSampleApplications.java | 22 +++++-
.../server/src/main/resources/LSFTemplate.xslt | 3 +-
.../gfac/ssh/provider/impl/SSHProvider.java | 1 +
.../gsissh/src/main/resources/LSFTemplate.xslt | 2 +-
5 files changed, 87 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/c2bacf2d/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
index 3d58197..b5a5bcc 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
@@ -58,13 +58,13 @@ public class CreateLaunchExperiment {
private static final String DEFAULT_GATEWAY = "php_reference_gateway";
private static Airavata.Client airavataClient;
- private static String echoAppId = "Echo_8506337e-ab7a-46b6-9b71-4a461b6c5e35";
+ private static String echoAppId = "Echo_61988d1f-7ca9-47ba-9212-a0ac2e973cf1";
private static String mpiAppId = "HelloMPI_720e159f-198f-4daa-96ca-9f5eafee92c9";
private static String wrfAppId = "WRF_7ad5da38-c08b-417c-a9ea-da9298839762";
private static String amberAppId = "Amber_a56d457c-f239-4c0b-ba00-66bda936f7bc";
private static String gromacsAppId = "GROMACS_05622038-9edd-4cb1-824e-0b7cb993364b";
private static String espressoAppId = "ESPRESSO_10cc2820-5d0b-4c63-9546-8a8b595593c1";
- private static String lammpsAppId = "LAMMPS_10893eb5-3840-438c-8446-d26c7ecb001f";
+ private static String lammpsAppId = "LAMMPS_2472685b-8acf-497e-aafe-cc66fe5f4cb6";
private static String nwchemAppId = "NWChem_2c8fee64-acf9-4a89-b6d3-91eb53c7640c";
private static String trinityAppId = "Trinity_e894acf5-9bca-46e8-a1bd-7e2d5155191a";
private static String autodockAppId = "AutoDock_43d9fdd0-c404-49f4-b913-3abf9080a8c9";
@@ -161,7 +161,8 @@ public class CreateLaunchExperiment {
// final String expId = createExperimentNWCHEMStampede(airavataClient);
// final String expId = createExperimentTRINITYStampede(airavataClient);
// final String expId = createExperimentAUTODOCKStampede(airavataClient); // this is not working , we need to register AutoDock app on stampede
- final String expId = createExperimentForLSF(airavataClient);
+// final String expId = createExperimentForLSF(airavataClient);
+ final String expId = createExperimentLAMMPSForLSF(airavataClient);
// final String expId = "Ultrascan_ln_eb029947-391a-4ccf-8ace-9bafebe07cc0";
System.out.println("Experiment ID : " + expId);
// updateExperiment(airavata, expId);
@@ -741,6 +742,8 @@ public class CreateLaunchExperiment {
return null;
}
+
+
public static String createExperimentLAMMPSStampede(Airavata.Client client) throws TException {
try {
List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>();
@@ -1353,23 +1356,7 @@ public class CreateLaunchExperiment {
for (InputDataObjectType inputDataObjectType : exInputs) {
inputDataObjectType.setValue("Hello World");
}
- /*List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>();
- InputDataObjectType input = new InputDataObjectType();
- input.setName("Input_to_Echo");
- input.setType(DataType.STRING);
- input.setValue("Echoed_Output=Hello World");
- input.setRequiredToAddedToCommandLine(true);
- exInputs.add(input);*/
-
List<OutputDataObjectType> exOut = client.getApplicationOutputs(echoAppId);
- /*
- List<OutputDataObjectType> exOut = new ArrayList<OutputDataObjectType>();
- OutputDataObjectType output = new OutputDataObjectType();
- output.setName("output_file");
- output.setType(DataType.URI);
- output.setValue("");
-
- exOut.add(output);*/
Project project = ProjectModelUtil.createProject("default", "lg11w", "test project");
String projectId = client.createProject(DEFAULT_GATEWAY, project);
@@ -1411,6 +1398,64 @@ public class CreateLaunchExperiment {
}
return null;
}
+ public static String createExperimentLAMMPSForLSF(Airavata.Client client) throws TException {
+ try {
+ List<InputDataObjectType> exInputs = client.getApplicationInputs(lammpsAppId);
+
+ for (InputDataObjectType inputDataObjectType : exInputs) {
+ inputDataObjectType.setName("Friction_Simulation_Input");
+ inputDataObjectType.setValue("/Users/lginnali/Downloads/data/in.friction");
+ inputDataObjectType.setType(DataType.URI);
+ }
+ List<OutputDataObjectType> exOut = client.getApplicationOutputs(echoAppId);
+
+ /*OutputDataObjectType outputDataObjectType = exOut.get(0);
+ outputDataObjectType.setName("LAMMPS_Simulation_Log");
+ outputDataObjectType.setType(DataType.URI);
+ outputDataObjectType.setValue("");
+
+ OutputDataObjectType output1 = exOut.get(1);
+ output1.setName("LAMMPS.oJobID");
+ output1.setType(DataType.URI);
+ output1.setValue("");
+
+ exOut.add(outputDataObjectType);
+ exOut.add(output1);*/
+
+ Experiment simpleExperiment =
+ ExperimentModelUtil.createSimpleExperiment("default", "lg11w", "LAMMPSExperiment", "Testing", lammpsAppId, exInputs);
+ simpleExperiment.setExperimentOutputs(exOut);
+
+ Map<String, String> computeResources = airavataClient.getAvailableAppInterfaceComputeResources(lammpsAppId);
+ if (computeResources != null && computeResources.size() != 0) {
+ for (String id : computeResources.keySet()) {
+ String resourceName = computeResources.get(id);
+ if (resourceName.equals(umassrcHostName)) {
+ ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id, 10, 16, 1, "long", 60, 0, 1000, "airavata");
+ UserConfigurationData userConfigurationData = new UserConfigurationData();
+ userConfigurationData.setAiravataAutoSchedule(false);
+ userConfigurationData.setOverrideManualScheduledParams(false);
+ userConfigurationData.setComputationalResourceScheduling(scheduling);
+ simpleExperiment.setUserConfigurationData(userConfigurationData);
+ return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment);
+ }
+ }
+ }
+ } catch (AiravataSystemException e) {
+ logger.error("Error occured while creating the experiment...", e.getMessage());
+ throw new AiravataSystemException(e);
+ } catch (InvalidRequestException e) {
+ logger.error("Error occured while creating the experiment...", e.getMessage());
+ throw new InvalidRequestException(e);
+ } catch (AiravataClientException e) {
+ logger.error("Error occured while creating the experiment...", e.getMessage());
+ throw new AiravataClientException(e);
+ } catch (TException e) {
+ logger.error("Error occured while creating the experiment...", e.getMessage());
+ throw new TException(e);
+ }
+ return null;
+ }
public static String createExperimentForBR2Amber(Airavata.Client client) throws TException {
http://git-wip-us.apache.org/repos/asf/airavata/blob/c2bacf2d/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
index 55dbcf8..990fce7 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
@@ -101,6 +101,7 @@ public class RegisterSampleApplications {
private static String espressoModuleId = "ESPRESSO_54dc94da-5e2b-4add-b054-41ad88891fdc";
private static String gromacsModuleId = "GROMACS_417271fd-7ac1-4f40-b2a5-ed0908a743eb";
private static String lammpsModuleId;
+ private static String lammpsModuleId1;
private static String nwChemModuleId = "NWChem_edbc318d-4c41-46a7-b216-32bad71eabdd";
private static String trinityModuleId = "Trinity_8af45ca0-b628-4614-9087-c7b73f5f2fb6";
private static String wrfModuleId;
@@ -221,7 +222,7 @@ public class RegisterSampleApplications {
//Register LSF resource
lsfResourceId = registerComputeHost("ghpcc06.umassrc.org", "LSF Cluster",
- ResourceJobManagerType.LSF, "push", "source /etc/bashrc;/lsf/9.1/linux2.6-glibc2.3-x86_64/bin", SecurityProtocol.SSH_KEYS, 22, null);
+ ResourceJobManagerType.LSF, "push", "source /etc/bashrc;/lsf/9.1/linux2.6-glibc2.3-x86_64/bin", SecurityProtocol.SSH_KEYS, 22, "mpiexec");
System.out.println("LSF Resource Id is " + lsfResourceId);
} catch (TException e) {
@@ -296,8 +297,15 @@ public class RegisterSampleApplications {
lammpsModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY,
RegisterSampleApplicationsUtils.createApplicationModule(
lammpsName, "20Mar14", lammpsDescription));
+
+ lammpsModuleId1 = airavataClient.registerApplicationModule(DEFAULT_GATEWAY,
+ RegisterSampleApplicationsUtils.createApplicationModule(
+ lammpsName, "28Jun14-base", lammpsDescription));
+
System.out.println("LAMMPS Module Id " + lammpsModuleId);
+ System.out.println("LAMMPS Module Id for LSF " + lammpsModuleId1);
+
//Register NWChem
nwChemModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY,
RegisterSampleApplicationsUtils.createApplicationModule(
@@ -715,6 +723,7 @@ public class RegisterSampleApplications {
List<String> appModules = new ArrayList<String>();
appModules.add(lammpsModuleId);
+ appModules.add(lammpsModuleId1);
InputDataObjectType input1 = RegisterSampleApplicationsUtils.createAppInput("Friction_Simulation_Input", null,
DataType.URI, "<", 1,true, true, false, "Friction Simulation Input - in.friction", null);
@@ -1116,8 +1125,17 @@ public class RegisterSampleApplications {
RegisterSampleApplicationsUtils.createApplicationDeployment(echoModuleId, lsfResourceId,
"/home/lg11w/executables/echo.sh", ApplicationParallelismType.SERIAL,
echoDescription, null, null, null));
- System.out.println("Echo on trestles deployment Id " + echoAppDeployId);
+ List<String> moduleLoadCmd = new ArrayList<String>();
+ moduleLoadCmd.add("module load LAMMPS/28Jun14-base");
+ //Register Echo
+
+ String lammpsDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY,
+ RegisterSampleApplicationsUtils.createApplicationDeployment(lammpsModuleId, lsfResourceId,
+ "lmp_ghpcc", ApplicationParallelismType.MPI,
+ echoDescription, moduleLoadCmd, null, null));
+ System.out.println("Echo on LSF deployment Id " + echoAppDeployId);
+ System.out.println("LAMMPS on LSF deployment Id " + lammpsDeployId);
} catch (TException e) {
e.printStackTrace();
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/c2bacf2d/modules/configuration/server/src/main/resources/LSFTemplate.xslt
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/LSFTemplate.xslt b/modules/configuration/server/src/main/resources/LSFTemplate.xslt
index 7081260..3ed9285 100644
--- a/modules/configuration/server/src/main/resources/LSFTemplate.xslt
+++ b/modules/configuration/server/src/main/resources/LSFTemplate.xslt
@@ -68,14 +68,13 @@
</xsl:choose>
<xsl:text>
</xsl:text>
-
<xsl:text>
</xsl:text>
<xsl:for-each select="ns:moduleLoadCommands/ns:command">
<xsl:text>
</xsl:text>
<xsl:value-of select="."/><xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text>
</xsl:text>
-
+cd <xsl:text> </xsl:text><xsl:value-of select="ns:workingDirectory"/><xsl:text>
</xsl:text>
<xsl:for-each select="ns:preJobCommands/ns:command">
<xsl:value-of select="."/><xsl:text> </xsl:text>
<xsl:text>
</xsl:text>
http://git-wip-us.apache.org/repos/asf/airavata/blob/c2bacf2d/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
index b1000c5..4c3abde 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
@@ -154,6 +154,7 @@ public class SSHProvider extends AbstractProvider {
}
// This installed path is a mandetory field, because this could change based on the computing resource
JobDescriptor jobDescriptor = GFACSSHUtils.createJobDescriptor(jobExecutionContext, cluster);
+
jobDetails.setJobName(jobDescriptor.getJobName());
log.info(jobDescriptor.toXML());
http://git-wip-us.apache.org/repos/asf/airavata/blob/c2bacf2d/tools/gsissh/src/main/resources/LSFTemplate.xslt
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/resources/LSFTemplate.xslt b/tools/gsissh/src/main/resources/LSFTemplate.xslt
index 7081260..c548d8e 100644
--- a/tools/gsissh/src/main/resources/LSFTemplate.xslt
+++ b/tools/gsissh/src/main/resources/LSFTemplate.xslt
@@ -75,7 +75,7 @@
<xsl:value-of select="."/><xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text>
</xsl:text>
-
+cd <xsl:text> </xsl:text><xsl:value-of select="ns:workingDirectory"/><xsl:text>
</xsl:text>
<xsl:for-each select="ns:preJobCommands/ns:command">
<xsl:value-of select="."/><xsl:text> </xsl:text>
<xsl:text>
</xsl:text>
[46/50] [abbrv] airavata git commit: Fixed AIRAVATA-1633.
Posted by sh...@apache.org.
Fixed AIRAVATA-1633.
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/d09957ba
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/d09957ba
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/d09957ba
Branch: refs/heads/new-workflow-design
Commit: d09957ba1b8c4b19c59349defccc9382a483619c
Parents: 5749f12
Author: raminder <ra...@apache.org>
Authored: Tue Mar 17 10:40:46 2015 -0400
Committer: raminder <ra...@apache.org>
Committed: Tue Mar 17 10:40:46 2015 -0400
----------------------------------------------------------------------
.../server/src/main/resources/PBSTemplate.xslt | 25 ++++++++++----------
.../server/src/main/resources/SGETemplate.xslt | 18 +++++++-------
.../src/main/resources/SLURMTemplate.xslt | 22 ++++++++---------
3 files changed, 33 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/d09957ba/modules/configuration/server/src/main/resources/PBSTemplate.xslt
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/PBSTemplate.xslt b/modules/configuration/server/src/main/resources/PBSTemplate.xslt
index 7676883..fe94ef1 100644
--- a/modules/configuration/server/src/main/resources/PBSTemplate.xslt
+++ b/modules/configuration/server/src/main/resources/PBSTemplate.xslt
@@ -12,51 +12,51 @@
#! /bin/sh
# PBS batch job submission script generated by Apache Airavata
# <xsl:choose>
- <xsl:when test="ns:shellName">
-##PBS -S <xsl:value-of select="ns:shellName"/>
+ <xsl:when test="ns:shellName != ''">
+#PBS -S <xsl:value-of select="ns:shellName"/>
</xsl:when></xsl:choose>
<xsl:choose>
- <xsl:when test="ns:queueName">
+ <xsl:when test="ns:queueName != ''">
#PBS -q <xsl:value-of select="ns:queueName"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="ns:jobName">
+ <xsl:when test="ns:jobName != ''">
#PBS -N <xsl:value-of select="ns:jobName"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="ns:mailOptions">
+ <xsl:when test="ns:mailOptions != ''">
#PBS -m <xsl:value-of select="ns:mailOptions"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="ns:mailAddress">
+ <xsl:when test="ns:mailAddress != ''">
#PBS -M <xsl:value-of select="ns:mailAddress"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
-<xsl:when test="ns:acountString">
+<xsl:when test="ns:acountString != ''">
#PBS -A <xsl:value-of select="ns:acountString"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="ns:maxWallTime">
+ <xsl:when test="ns:maxWallTime != ''">
#PBS -l walltime=<xsl:value-of select="ns:maxWallTime"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="ns:standardOutFile">
+ <xsl:when test="ns:standardOutFile != ''">
#PBS -o <xsl:value-of select="ns:standardOutFile"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="ns:standardOutFile">
+ <xsl:when test="ns:standardOutFile != ''">
#PBS -e <xsl:value-of select="ns:standardErrorFile"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="ns:usedMem">
+ <xsl:when test="ns:usedMem != ''">
#PBS -l mem=<xsl:value-of select="ns:usedMem"/>
</xsl:when>
</xsl:choose>
@@ -96,6 +96,7 @@ cd <xsl:text> </xsl:text><xsl:value-of select="ns:workingDirectory"/><xsl:text
<xsl:value-of select="."/><xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text>
</xsl:text>
-R</xsl:template>
+~/rabbitmq-java-client-bin-3.3.5/runjava.sh com.rabbitmq.examples.SimpleProducer amqp://<xsl:value-of select="ns:callBackIp"/><xsl:text> </xsl:text><xsl:value-of select="ns:userName"/>,<xsl:value-of select="ns:jobName"/><xsl:text> </xsl:text><xsl:value-of select="$quote"/><xsl:value-of select="$quote"/><xsl:text> </xsl:text><xsl:value-of select="ns:callBackPort"/>
+</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/d09957ba/modules/configuration/server/src/main/resources/SGETemplate.xslt
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/SGETemplate.xslt b/modules/configuration/server/src/main/resources/SGETemplate.xslt
index 15c6d14..0658b35 100644
--- a/modules/configuration/server/src/main/resources/SGETemplate.xslt
+++ b/modules/configuration/server/src/main/resources/SGETemplate.xslt
@@ -12,47 +12,47 @@
#! /bin/bash
# Grid Engine batch job script built by Apache Airavata
# <xsl:choose>
- <xsl:when test="ns:shellName">
+ <xsl:when test="ns:shellName != ''">
#$ -S <xsl:value-of select="ns:shellName"/>
</xsl:when></xsl:choose>
#$ -V
<xsl:choose>
- <xsl:when test="ns:queueName">
+ <xsl:when test="ns:queueName != ''">
#$ -q <xsl:value-of select="ns:queueName"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="ns:mailOptions">
+ <xsl:when test="ns:mailOptions != ''">
#$ -m <xsl:value-of select="ns:mailOptions"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="ns:mailAddress">
+ <xsl:when test="ns:mailAddress != ''">
#$ -M <xsl:value-of select="ns:mailAddress"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
-<xsl:when test="ns:acountString">
+<xsl:when test="ns:acountString != ''">
#$ -A <xsl:value-of select="ns:acountString"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="ns:maxWallTime">
+ <xsl:when test="ns:maxWallTime != ''">
#$ -l h_rt=<xsl:value-of select="ns:maxWallTime"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="ns:jobName">
+ <xsl:when test="ns:jobName != ''">
#$ -N <xsl:value-of select="ns:jobName"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="ns:standardOutFile">
+ <xsl:when test="ns:standardOutFile != ''">
#$ -o <xsl:value-of select="ns:standardOutFile"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="ns:standardOutFile">
+ <xsl:when test="ns:standardOutFile != ''">
#$ -e <xsl:value-of select="ns:standardErrorFile"/>
</xsl:when>
</xsl:choose>
http://git-wip-us.apache.org/repos/asf/airavata/blob/d09957ba/modules/configuration/server/src/main/resources/SLURMTemplate.xslt
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/SLURMTemplate.xslt b/modules/configuration/server/src/main/resources/SLURMTemplate.xslt
index 1ca12df..ecafbc2 100644
--- a/modules/configuration/server/src/main/resources/SLURMTemplate.xslt
+++ b/modules/configuration/server/src/main/resources/SLURMTemplate.xslt
@@ -10,57 +10,57 @@
<xsl:template match="/ns:JobDescriptor">
<xsl:param name="quote">"</xsl:param>
<xsl:choose>
-<xsl:when test="ns:shellName">
+<xsl:when test="ns:shellName != ''">
#!<xsl:value-of select="ns:shellName"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="ns:queueName">
+ <xsl:when test="ns:queueName != ''">
#SBATCH -p <xsl:value-of select="ns:queueName"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="ns:nodes">
+ <xsl:when test="ns:nodes != ''">
#SBATCH -N <xsl:value-of select="ns:nodes"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="ns:cpuCount">
+ <xsl:when test="ns:cpuCount != ''">
#SBATCH -n <xsl:value-of select="ns:cpuCount"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="ns:mailAddress">
+ <xsl:when test="ns:mailAddress != ''">
#SBATCH -mail-user=<xsl:value-of select="ns:mailAddress"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="ns:mailType">
+ <xsl:when test="ns:mailType != ''">
#SBATCH -mail-type=<xsl:value-of select="ns:mailType"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
-<xsl:when test="ns:acountString">
+<xsl:when test="ns:acountString != ''">
#SBATCH -A <xsl:value-of select="ns:acountString"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="ns:maxWallTime">
+ <xsl:when test="ns:maxWallTime != ''">
#SBATCH -t <xsl:value-of select="ns:maxWallTime"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="ns:jobName">
+ <xsl:when test="ns:jobName != ''">
#SBATCH -J <xsl:value-of select="ns:jobName"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="ns:standardOutFile">
+ <xsl:when test="ns:standardOutFile != ''">
#SBATCH -o <xsl:value-of select="ns:standardOutFile"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="ns:standardOutFile">
+ <xsl:when test="ns:standardOutFile != ''">
#SBATCH -e <xsl:value-of select="ns:standardErrorFile"/>
</xsl:when>
</xsl:choose>
[07/50] [abbrv] airavata git commit: adding chessis number to
database and test issue in CS
Posted by sh...@apache.org.
adding chessis number to database and test issue in CS
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/ac574c94
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/ac574c94
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/ac574c94
Branch: refs/heads/new-workflow-design
Commit: ac574c942c91a76bd0d9fccfc9350dfcd29f9cb0
Parents: 7c10349
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Fri Mar 6 10:43:09 2015 -0500
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Fri Mar 6 10:43:09 2015 -0500
----------------------------------------------------------------------
.../store/store/impl/db/CommunityUserDAOTest.java | 4 ++--
.../jpa/model/Computational_Resource_Scheduling.java | 10 ++++++++++
.../jpa/resources/ComputationSchedulingResource.java | 10 ++++++++++
.../persistance/registry/jpa/resources/Utils.java | 1 +
.../registry/jpa/utils/ThriftDataModelConversion.java | 1 +
.../src/main/resources/registry-derby.sql | 1 +
.../src/main/resources/registry-mysql.sql | 1 +
.../src/test/resources/registry-derby.sql | 1 +
8 files changed, 27 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/ac574c94/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/CommunityUserDAOTest.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/CommunityUserDAOTest.java b/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/CommunityUserDAOTest.java
index 8ed8a6a..787cc54 100644
--- a/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/CommunityUserDAOTest.java
+++ b/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/CommunityUserDAOTest.java
@@ -45,11 +45,11 @@ public class CommunityUserDAOTest extends DatabaseTestCases {
waitTillServerStarts();
String createTable = "CREATE TABLE COMMUNITY_USER\n" + " (\n"
- + " GATEWAY_NAME VARCHAR(256) NOT NULL,\n"
+ + " GATEWAY_ID VARCHAR(256) NOT NULL,\n"
+ " COMMUNITY_USER_NAME VARCHAR(256) NOT NULL,\n"
+ " TOKEN_ID VARCHAR(256) NOT NULL,\n"
+ " COMMUNITY_USER_EMAIL VARCHAR(256) NOT NULL,\n"
- + " PRIMARY KEY (GATEWAY_NAME, COMMUNITY_USER_NAME, TOKEN_ID)\n"
+ + " PRIMARY KEY (GATEWAY_ID, COMMUNITY_USER_NAME, TOKEN_ID)\n"
+ " )";
String dropTable = "drop table COMMUNITY_USER";
http://git-wip-us.apache.org/repos/asf/airavata/blob/ac574c94/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Computational_Resource_Scheduling.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Computational_Resource_Scheduling.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Computational_Resource_Scheduling.java
index 01c0bca..e440510 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Computational_Resource_Scheduling.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Computational_Resource_Scheduling.java
@@ -57,6 +57,8 @@ public class Computational_Resource_Scheduling implements Serializable {
private int totalPhysicalmemory;
@Column(name = "COMPUTATIONAL_PROJECT_ACCOUNT")
private String projectName;
+ @Column(name = "CHESSIS_NAME")
+ private String chessisName;
@ManyToOne(cascade= CascadeType.MERGE)
@JoinColumn(name = "EXPERIMENT_ID")
@@ -66,6 +68,14 @@ public class Computational_Resource_Scheduling implements Serializable {
@JoinColumn(name = "TASK_ID")
private TaskDetail task;
+ public String getChessisName() {
+ return chessisName;
+ }
+
+ public void setChessisName(String chessisName) {
+ this.chessisName = chessisName;
+ }
+
public int getSchedulingId() {
return schedulingId;
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/ac574c94/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ComputationSchedulingResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ComputationSchedulingResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ComputationSchedulingResource.java
index dae5dd3..7c0327f 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ComputationSchedulingResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ComputationSchedulingResource.java
@@ -49,6 +49,15 @@ public class ComputationSchedulingResource extends AbstractResource {
private Timestamp jobStartTime;
private int physicalMemory;
private String projectName;
+ private String chessisName;
+
+ public String getChessisName() {
+ return chessisName;
+ }
+
+ public void setChessisName(String chessisName) {
+ this.chessisName = chessisName;
+ }
public int getSchedulingId() {
return schedulingId;
@@ -200,6 +209,7 @@ public class ComputationSchedulingResource extends AbstractResource {
scheduling.setJobStartTime(jobStartTime);
scheduling.setTotalPhysicalmemory(physicalMemory);
scheduling.setProjectName(projectName);
+ scheduling.setChessisName(chessisName);
em.persist(scheduling);
schedulingId = scheduling.getSchedulingId();
em.getTransaction().commit();
http://git-wip-us.apache.org/repos/asf/airavata/blob/ac574c94/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
index 9add15b..7c4850a 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
@@ -746,6 +746,7 @@ public class Utils {
schedulingResource.setJobStartTime(o.getJobStartTime());
schedulingResource.setPhysicalMemory(o.getTotalPhysicalmemory());
schedulingResource.setProjectName(o.getProjectName());
+ schedulingResource.setChessisName(o.getChessisName());
}
return schedulingResource;
http://git-wip-us.apache.org/repos/asf/airavata/blob/ac574c94/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
index 7aec17e..95c0e29 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
@@ -664,6 +664,7 @@ public class ThriftDataModelConversion {
scheduling.setJobStartTime((int)csr.getJobStartTime().getTime());
scheduling.setTotalPhysicalMemory(csr.getPhysicalMemory());
scheduling.setComputationalProjectAccount(csr.getProjectName());
+ scheduling.setChassisName(csr.getChessisName());
return scheduling;
}
return null;
http://git-wip-us.apache.org/repos/asf/airavata/blob/ac574c94/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql b/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
index b7c8a7d..2fd1283 100644
--- a/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
+++ b/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
@@ -318,6 +318,7 @@ CREATE TABLE COMPUTATIONAL_RESOURCE_SCHEDULING
JOB_START_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
TOTAL_PHYSICAL_MEMORY INTEGER,
COMPUTATIONAL_PROJECT_ACCOUNT VARCHAR(255),
+ CHESSIS_NAME VARCHAR(255),
PRIMARY KEY(RESOURCE_SCHEDULING_ID),
FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
http://git-wip-us.apache.org/repos/asf/airavata/blob/ac574c94/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql b/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
index 442a47b..750067b 100644
--- a/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
+++ b/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
@@ -319,6 +319,7 @@ CREATE TABLE COMPUTATIONAL_RESOURCE_SCHEDULING
JOB_START_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
TOTAL_PHYSICAL_MEMORY INTEGER,
COMPUTATIONAL_PROJECT_ACCOUNT VARCHAR(255),
+ CHESSIS_NAME VARCHAR(255),
PRIMARY KEY(RESOURCE_SCHEDULING_ID),
FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
http://git-wip-us.apache.org/repos/asf/airavata/blob/ac574c94/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql b/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql
index b7c8a7d..2fd1283 100644
--- a/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql
+++ b/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql
@@ -318,6 +318,7 @@ CREATE TABLE COMPUTATIONAL_RESOURCE_SCHEDULING
JOB_START_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
TOTAL_PHYSICAL_MEMORY INTEGER,
COMPUTATIONAL_PROJECT_ACCOUNT VARCHAR(255),
+ CHESSIS_NAME VARCHAR(255),
PRIMARY KEY(RESOURCE_SCHEDULING_ID),
FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
[37/50] [abbrv] airavata git commit: Fixing the sample for Unicore
change.AIRAVATA-1596
Posted by sh...@apache.org.
Fixing the sample for Unicore change.AIRAVATA-1596
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/757e8a3a
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/757e8a3a
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/757e8a3a
Branch: refs/heads/new-workflow-design
Commit: 757e8a3abb66905b62016c0e0b5caa420c7d7bfb
Parents: a2181e4
Author: raminder <ra...@apache.org>
Authored: Fri Mar 13 13:08:13 2015 -0400
Committer: raminder <ra...@apache.org>
Committed: Fri Mar 13 13:08:13 2015 -0400
----------------------------------------------------------------------
.../apache/airavata/client/tools/RegisterSampleApplications.java | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/757e8a3a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
index 02cf0ec..b562eb0 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
@@ -257,6 +257,7 @@ public class RegisterSampleApplications {
UnicoreJobSubmission ucrJobSubmission = new UnicoreJobSubmission();
ucrJobSubmission.setSecurityProtocol(securityProtocol);
ucrJobSubmission.setUnicoreEndPointURL(unicoreEndPointURL);
+ ucrJobSubmission.setAuthenticationMode(AuthenticationMode.MYPROXY_ISSUED);
jobSubmission.setJobSubmissionProtocol(JobSubmissionProtocol.UNICORE);
airavataClient.addUNICOREJobSubmissionDetails(fsdResourceId, 0, ucrJobSubmission);
[16/50] [abbrv] airavata git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/airavata
Posted by sh...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/airavata
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/565b5a3f
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/565b5a3f
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/565b5a3f
Branch: refs/heads/new-workflow-design
Commit: 565b5a3f4ec2a5e34334c2a63ee428a7ca3d0085
Parents: 5ff650f 9d80cf2
Author: Lahiru Gunathilake <gl...@gmail.com>
Authored: Sat Mar 7 00:37:31 2015 -0500
Committer: Lahiru Gunathilake <gl...@gmail.com>
Committed: Sat Mar 7 00:37:31 2015 -0500
----------------------------------------------------------------------
.../common/utils/DatabaseTestCases.java | 2 +-
.../main/resources/airavata-client.properties | 2 +-
.../main/resources/airavata-server.properties | 6 +-
.../credential/store/client/TestSSLClient.java | 140 -------------------
.../store/store/impl/db/SSHCredentialTest.java | 2 +-
.../credential-store-stubs/pom.xml | 5 +
.../credential/store/client/TestSSLClient.java | 140 +++++++++++++++++++
.../main/resources/airavata-server.properties | 4 +-
.../src/test/resources/jdbc-authenticator.xml | 2 +-
.../test/resources/session-authenticator.xml | 2 +-
tools/registry-tool/README | 2 +-
11 files changed, 156 insertions(+), 151 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/565b5a3f/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/565b5a3f/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java
----------------------------------------------------------------------
diff --cc modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java
index 0000000,cc5ebb6..1d9f4d9
mode 000000,100644..100644
--- a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java
+++ b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java
@@@ -1,0 -1,140 +1,140 @@@
+ /*
+ *
+ * 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.credential.store.client;
+
+ import org.apache.airavata.common.exception.ApplicationSettingsException;
+ import org.apache.airavata.common.utils.AiravataUtils;
+ import org.apache.airavata.common.utils.Constants;
+ import org.apache.airavata.common.utils.ServerSettings;
+ import org.apache.airavata.credential.store.cpi.CredentialStoreService;
+ import org.apache.airavata.credential.store.datamodel.CertificateCredential;
+ import org.apache.airavata.credential.store.datamodel.CommunityUser;
+ import org.apache.airavata.credential.store.datamodel.SSHCredential;
+ import org.apache.thrift.TException;
+ import org.apache.thrift.protocol.TBinaryProtocol;
+ import org.apache.thrift.protocol.TProtocol;
+ import org.apache.thrift.transport.TSSLTransportFactory;
+ import org.apache.thrift.transport.TTransport;
+ import org.apache.thrift.transport.TTransportException;
+
+ import java.io.File;
+ import java.io.FileInputStream;
+ import java.io.FileNotFoundException;
+ import java.io.IOException;
+ import java.security.KeyStore;
+ import java.security.KeyStoreException;
+ import java.security.NoSuchAlgorithmException;
+ import java.security.cert.CertificateException;
+ import java.security.cert.X509Certificate;
+ import org.apache.commons.codec.binary.Base64;
+
+ public class TestSSLClient {
+ private void invoke() {
+ TTransport transport;
+ try {
+ AiravataUtils.setExecutionAsServer();
+ TSSLTransportFactory.TSSLTransportParameters params =
+ new TSSLTransportFactory.TSSLTransportParameters();
+ String keystorePath = ServerSettings.getCredentialStoreThriftServerKeyStorePath();
+ String keystorePWD = ServerSettings.getCredentialStoreThriftServerKeyStorePassword();
+ params.setTrustStore(keystorePath, keystorePWD);
+ final int serverPort = Integer.parseInt(ServerSettings.getSetting(Constants.CREDENTIAL_SERVER_PORT, "8960"));
+ final String serverHost = ServerSettings.getSetting(Constants.CREDENTIAL_SERVER_HOST, null);
+
+ transport = TSSLTransportFactory.getClientSocket(serverHost, serverPort, 10000, params);
+ TProtocol protocol = new TBinaryProtocol(transport);
+
+ CredentialStoreService.Client client = new CredentialStoreService.Client(protocol);
-// testSSHCredential(client);
++ testSSHCredential(client);
+ testCertificateCredential(client);
+ transport.close();
+ } catch (TTransportException e) {
+ e.printStackTrace();
+ }catch (ApplicationSettingsException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public static void testSSHCredential (CredentialStoreService.Client client){
+ try {
+ SSHCredential sshCredential = new SSHCredential();
+ sshCredential.setUsername("test");
+ sshCredential.setGatewayId("testGateway");
+ sshCredential.setPassphrase("mypassphrase");
+ String token = client.addSSHCredential(sshCredential);
+ System.out.println("SSH Token :" + token);
+ SSHCredential credential = client.getSSHCredential(token, "testGateway");
+ System.out.println("private key : " + credential.getPrivateKey());
+ System.out.println("public key : " + credential.getPublicKey());
+ }catch (TTransportException e) {
+ e.printStackTrace();
+ } catch (TException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public static void testCertificateCredential (CredentialStoreService.Client client){
+ try {
+ CertificateCredential certificateCredential = new CertificateCredential();
+ CommunityUser communityUser = new CommunityUser("testGateway", "test", "test@ddsd");
+ certificateCredential.setCommunityUser(communityUser);
+ X509Certificate[] x509Certificates = new X509Certificate[1];
+ KeyStore ks = KeyStore.getInstance("JKS");
+ File keyStoreFile = new File("/Users/smarru/code/airavata-master/modules/configuration/server/src/main/resources/airavata.jks");
+ FileInputStream fis = new FileInputStream(keyStoreFile);
+ char[] password = "airavata".toCharArray();
+ ks.load(fis,password);
+ x509Certificates[0] = (X509Certificate) ks.getCertificate("airavata");
+ Base64 encoder = new Base64(64);
+ String cert_begin = "-----BEGIN CERTIFICATE-----\n";
+ String end_cert = "-----END CERTIFICATE-----";
+ byte[] derCert = x509Certificates[0].getEncoded();
+ String pemCertPre = new String(encoder.encode(derCert));
+ String pemCert = cert_begin + pemCertPre + end_cert;
+ certificateCredential.setX509Cert(pemCert);
+ String token = client.addCertificateCredential(certificateCredential);
+ System.out.println("Certificate Token :" + token);
+ CertificateCredential credential = client.getCertificateCredential(token, "testGateway");
+ System.out.println("certificate : " + credential.getX509Cert());
+ System.out.println("gateway name : " + credential.getCommunityUser().getGatewayName());
+ }catch (TTransportException e) {
+ e.printStackTrace();
+ } catch (TException e) {
+ e.printStackTrace();
+ } catch (KeyStoreException e) {
+ e.printStackTrace();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (NoSuchAlgorithmException e) {
+ e.printStackTrace();
+ } catch (CertificateException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public static void main(String[] args) {
+ TestSSLClient c = new TestSSLClient();
+ c.invoke();
+
+ }
+ }
[47/50] [abbrv] airavata git commit: fixing AIRAVATA-1634
Posted by sh...@apache.org.
fixing AIRAVATA-1634
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/f7083044
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/f7083044
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/f7083044
Branch: refs/heads/new-workflow-design
Commit: f708304446dae8aa02244a9baa05cba13242a166
Parents: d09957b
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Tue Mar 17 11:26:42 2015 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Tue Mar 17 11:26:42 2015 -0400
----------------------------------------------------------------------
.../airavata/api/server/handler/AiravataServerHandler.java | 4 ++++
.../apache/airavata/client/tools/RegisterSampleApplications.java | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/f7083044/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index a2bd3c7..fd1dfd7 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -1361,6 +1361,10 @@ public class AiravataServerHandler implements Airavata.Iface {
Experiment existingExperiment = (Experiment)registry.get(RegistryModelType.EXPERIMENT, existingExperimentID);
String gatewayId = (String)registry.getValue(RegistryModelType.EXPERIMENT, existingExperimentID, Constants.FieldConstants.ExperimentConstants.GATEWAY);
existingExperiment.setCreationTime(AiravataUtils.getCurrentTimestamp().getTime());
+ if (existingExperiment.getApplicationId() != null){
+ List<OutputDataObjectType> applicationOutputs = getApplicationOutputs(existingExperiment.getApplicationId());
+ existingExperiment.setExperimentOutputs(applicationOutputs);
+ }
if (validateString(newExperiementName)){
existingExperiment.setName(newExperiementName);
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/f7083044/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
index b562eb0..e10dde2 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
@@ -257,7 +257,7 @@ public class RegisterSampleApplications {
UnicoreJobSubmission ucrJobSubmission = new UnicoreJobSubmission();
ucrJobSubmission.setSecurityProtocol(securityProtocol);
ucrJobSubmission.setUnicoreEndPointURL(unicoreEndPointURL);
- ucrJobSubmission.setAuthenticationMode(AuthenticationMode.MYPROXY_ISSUED);
+// ucrJobSubmission.setAuthenticationMode(AuthenticationMode.MYPROXY_ISSUED);
jobSubmission.setJobSubmissionProtocol(JobSubmissionProtocol.UNICORE);
airavataClient.addUNICOREJobSubmissionDetails(fsdResourceId, 0, ucrJobSubmission);
[41/50] [abbrv] airavata git commit: fixing AIRAVATA-1630
Posted by sh...@apache.org.
fixing AIRAVATA-1630
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/73858d15
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/73858d15
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/73858d15
Branch: refs/heads/new-workflow-design
Commit: 73858d152a23e1e044d6c1ee74f3f9bb056baf06
Parents: 990d72a
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Fri Mar 13 15:12:07 2015 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Fri Mar 13 15:12:07 2015 -0400
----------------------------------------------------------------------
.../airavata/gfac/core/utils/OutHandlerWorker.java | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/73858d15/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutHandlerWorker.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutHandlerWorker.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutHandlerWorker.java
index d279bbe..08fa9a4 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutHandlerWorker.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutHandlerWorker.java
@@ -26,6 +26,8 @@ import org.apache.airavata.gfac.core.cpi.GFac;
import org.apache.airavata.gfac.core.monitor.MonitorID;
import org.apache.airavata.model.messaging.event.TaskIdentifier;
import org.apache.airavata.model.messaging.event.TaskStatusChangeRequestEvent;
+import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
+import org.apache.airavata.model.workspace.experiment.ErrorCategory;
import org.apache.airavata.model.workspace.experiment.TaskState;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -51,9 +53,16 @@ public class OutHandlerWorker implements Runnable {
gfac.invokeOutFlowHandlers(monitorID.getJobExecutionContext());
} catch (GFacException e) {
TaskIdentifier taskIdentifier = new TaskIdentifier(monitorID.getTaskID(), monitorID.getWorkflowNodeID(),monitorID.getExperimentID(), monitorID.getJobExecutionContext().getGatewayID());
- monitorPublisher.publish(new TaskStatusChangeRequestEvent(TaskState.FAILED, taskIdentifier));
//FIXME this is a case where the output retrieving fails even if the job execution was a success. Thus updating the task status
+ monitorPublisher.publish(new TaskStatusChangeRequestEvent(TaskState.FAILED, taskIdentifier));
+ try {
+ GFacUtils.saveErrorDetails(monitorID.getJobExecutionContext(), e.getLocalizedMessage(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+ } catch (GFacException e1) {
+ logger.error("Error while persisting error details", e);
+ }
logger.info(e.getLocalizedMessage(), e);
+ // Save error details to registry
+
}
monitorPublisher.publish(monitorID.getStatus());
}
[05/50] [abbrv] airavata git commit: Change to GATEWAY_ID in
credential store DOA
Posted by sh...@apache.org.
Change to GATEWAY_ID in credential store DOA
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/9d960f76
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/9d960f76
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/9d960f76
Branch: refs/heads/new-workflow-design
Commit: 9d960f76b0f35a2f704d2af04a5af19d9cfd2ed4
Parents: b25e0a5
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Fri Mar 6 10:10:57 2015 -0500
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Fri Mar 6 10:10:57 2015 -0500
----------------------------------------------------------------------
.../airavata/api/airavataAPIConstants.java | 2 +-
.../lib/airavata/airavataAPI_constants.cpp | 2 +-
.../main/resources/lib/Airavata/API/Types.php | 2 +-
.../client/samples/CreateLaunchExperiment.java | 68 +++++++++++++++++---
.../airavataAPI.thrift | 2 +-
.../store/store/impl/db/CommunityUserDAO.java | 10 +--
.../registry/jpa/impl/RegistryImpl.java | 1 +
.../src/main/resources/registry-derby.sql | 2 +-
.../src/main/resources/registry-mysql.sql | 2 +-
.../src/test/resources/registry-derby.sql | 2 +-
10 files changed, 72 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/9d960f76/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/airavataAPIConstants.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/airavataAPIConstants.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/airavataAPIConstants.java
index 3685b9f..0c82e0f 100644
--- a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/airavataAPIConstants.java
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/airavataAPIConstants.java
@@ -65,6 +65,6 @@ import org.slf4j.LoggerFactory;
* in a change to major/minor version numbers.
*
*/
- public static final String AIRAVATA_API_VERSION = "0.14.0";
+ public static final String AIRAVATA_API_VERSION = "0.15.0";
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/9d960f76/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavataAPI_constants.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavataAPI_constants.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavataAPI_constants.cpp
index 0161d32..ddc6179 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavataAPI_constants.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/airavataAPI_constants.cpp
@@ -28,7 +28,7 @@ namespace apache { namespace airavata { namespace api {
const airavataAPIConstants g_airavataAPI_constants;
airavataAPIConstants::airavataAPIConstants() {
- AIRAVATA_API_VERSION = "0.14.0";
+ AIRAVATA_API_VERSION = "0.15.0";
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/9d960f76/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Types.php
index cb100bc..481421f 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Types.php
@@ -17,6 +17,6 @@ use Thrift\Protocol\TBinaryProtocolAccelerated;
use Thrift\Exception\TApplicationException;
-$GLOBALS['airavataAPI_CONSTANTS']['AIRAVATA_API_VERSION'] = "0.14.0";
+$GLOBALS['airavataAPI_CONSTANTS']['AIRAVATA_API_VERSION'] = "0.15.0";
http://git-wip-us.apache.org/repos/asf/airavata/blob/9d960f76/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
index eb1b833..3fc74eb 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
@@ -36,6 +36,7 @@ import org.apache.airavata.model.appcatalog.computeresource.UnicoreJobSubmission
import org.apache.airavata.model.error.*;
import org.apache.airavata.model.util.ExperimentModelUtil;
import org.apache.airavata.model.util.ProjectModelUtil;
+import org.apache.airavata.model.workspace.Gateway;
import org.apache.airavata.model.workspace.Project;
import org.apache.airavata.model.workspace.experiment.*;
import org.apache.thrift.TException;
@@ -60,7 +61,7 @@ public class CreateLaunchExperiment {
private static String echoAppId = "Echo_f828a575-7f17-4149-9d45-abe2aa9c6109";
private static String mpiAppId = "HelloMPI_720e159f-198f-4daa-96ca-9f5eafee92c9";
private static String wrfAppId = "WRF_7ad5da38-c08b-417c-a9ea-da9298839762";
- private static String amberAppId = "Amber_6321b79f-3891-4421-b6c0-e294043a302e";
+ private static String amberAppId = "Amber_a56d457c-f239-4c0b-ba00-66bda936f7bc";
private static String gromacsAppId = "GROMACS_05622038-9edd-4cb1-824e-0b7cb993364b";
private static String espressoAppId = "ESPRESSO_10cc2820-5d0b-4c63-9546-8a8b595593c1";
private static String lammpsAppId = "LAMMPS_10893eb5-3840-438c-8446-d26c7ecb001f";
@@ -74,21 +75,70 @@ public class CreateLaunchExperiment {
private static String unicoreHostName = "fsd-cloud15.zam.kfa-juelich.de";
private static String stampedeHostName = "stampede.tacc.xsede.org";
private static String br2HostName = "bigred2.uits.iu.edu";
+
+ private static String gatewayId;
// unicore service endpoint url
private static final String unicoreEndPointURL = "https://fsd-cloud15.zam.kfa-juelich.de:7000/INTEROP1/services/BESFactory?res=default_bes_factory";
public static void main(String[] args) throws Exception {
- airavataClient = AiravataClientFactory.createAiravataClient(THRIFT_SERVER_HOST, THRIFT_SERVER_PORT);
- System.out.println("API version is " + airavataClient.getAPIVersion());
-// registerApplications(); // run this only the first time
- createAndLaunchExp();
+ airavataClient = AiravataClientFactory.createAiravataClient(THRIFT_SERVER_HOST, THRIFT_SERVER_PORT);
+ System.out.println("API version is " + airavataClient.getAPIVersion());
+// createGateway();
+// getGateway("testGatewayId");
+// registerApplications(); // run this only the first time
+ createAndLaunchExp();
}
private static String fsdResourceId;
+ public static void createGateway(){
+ try {
+ Gateway gateway = new Gateway();
+ gateway.setGatewayId("testGatewayId2");
+ gateway.setGatewayName("testGateway2");
+ gatewayId = airavataClient.addGateway(gateway);
+ System.out.println(gatewayId);
+ } catch (AiravataSystemException e) {
+ e.printStackTrace();
+ } catch (InvalidRequestException e) {
+ e.printStackTrace();
+ } catch (AiravataClientException e) {
+ e.printStackTrace();
+ } catch (TException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ public static void getGateway(String gatewayId){
+ try {
+ Gateway gateway = airavataClient.getGateway(gatewayId);
+ gateway.setDomain("testDomain");
+ airavataClient.updateGateway(gatewayId, gateway);
+ List<Gateway> allGateways = airavataClient.getAllGateways();
+ System.out.println(allGateways.size());
+ if (airavataClient.isGatewayExist(gatewayId)){
+ Gateway gateway1 = airavataClient.getGateway(gatewayId);
+ System.out.println(gateway1.getGatewayName());
+ }
+ boolean b = airavataClient.deleteGateway("testGatewayId2");
+ System.out.println(b);
+ } catch (AiravataSystemException e) {
+ e.printStackTrace();
+ } catch (InvalidRequestException e) {
+ e.printStackTrace();
+ } catch (AiravataClientException e) {
+ e.printStackTrace();
+ } catch (TException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+
public static void createAndLaunchExp() throws TException {
// final String expId = createEchoExperimentForFSD(airavataClient);
try {
@@ -115,7 +165,7 @@ public class CreateLaunchExperiment {
System.out.println("Experiment ID : " + expId);
// updateExperiment(airavata, expId);
-// launchExperiment(airavataClient, expId);
+ launchExperiment(airavataClient, expId);
}
} catch (Exception e) {
logger.error("Error while connecting with server", e.getMessage());
@@ -1437,11 +1487,11 @@ public class CreateLaunchExperiment {
// }
for (InputDataObjectType inputDataObjectType : exInputs) {
if (inputDataObjectType.getName().equalsIgnoreCase("Heat_Restart_File")) {
- inputDataObjectType.setValue("file://root@test-drive.airavata.org:/var/www/experimentData/admin101a290e6330f15a91349159553ae8b6bb1/02_Heat.rst");
+ inputDataObjectType.setValue("/Users/chathuri/dev/airavata/source/php/inputs/AMBER_FILES/02_Heat.rst");
} else if (inputDataObjectType.getName().equalsIgnoreCase("Production_Control_File")) {
- inputDataObjectType.setValue("file://root@test-drive.airavata.org:/var/www/experimentData/admin101a290e6330f15a91349159553ae8b6bb1/03_Prod.in");
+ inputDataObjectType.setValue("/Users/chathuri/dev/airavata/source/php/inputs/AMBER_FILES/03_Prod.in");
} else if (inputDataObjectType.getName().equalsIgnoreCase("Parameter_Topology_File")) {
- inputDataObjectType.setValue("file://root@test-drive.airavata.org:/var/www/experimentData/admin101a290e6330f15a91349159553ae8b6bb1/prmtop");
+ inputDataObjectType.setValue("/Users/chathuri/dev/airavata/source/php/inputs/AMBER_FILES/prmtop");
}
}
List<OutputDataObjectType> exOut = client.getApplicationOutputs(amberAppId);
http://git-wip-us.apache.org/repos/asf/airavata/blob/9d960f76/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
index 6caf264..95a91e6 100644
--- a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
+++ b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
@@ -55,7 +55,7 @@ namespace js ApacheAiravataAPI
* in a change to major/minor version numbers.
*
*/
-const string AIRAVATA_API_VERSION = "0.14.0"
+const string AIRAVATA_API_VERSION = "0.15.0"
service Airavata {
http://git-wip-us.apache.org/repos/asf/airavata/blob/9d960f76/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/db/CommunityUserDAO.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/db/CommunityUserDAO.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/db/CommunityUserDAO.java
index f55cd55..931580a 100644
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/db/CommunityUserDAO.java
+++ b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/store/impl/db/CommunityUserDAO.java
@@ -78,7 +78,7 @@ public class CommunityUserDAO extends ParentDAO {
public void deleteCommunityUser(CommunityUser user, Connection connection) throws CredentialStoreException {
- String sql = "DELETE FROM COMMUNITY_USER WHERE GATEWAY_NAME=? AND COMMUNITY_USER_NAME=?";
+ String sql = "DELETE FROM COMMUNITY_USER WHERE GATEWAY_ID=? AND COMMUNITY_USER_NAME=?";
PreparedStatement preparedStatement = null;
@@ -108,7 +108,7 @@ public class CommunityUserDAO extends ParentDAO {
public void deleteCommunityUserByToken(CommunityUser user, String token, Connection connection)
throws CredentialStoreException {
- String sql = "DELETE FROM COMMUNITY_USER WHERE GATEWAY_NAME=? AND COMMUNITY_USER_NAME=? AND TOKEN_ID=?";
+ String sql = "DELETE FROM COMMUNITY_USER WHERE GATEWAY_ID=? AND COMMUNITY_USER_NAME=? AND TOKEN_ID=?";
PreparedStatement preparedStatement = null;
@@ -144,7 +144,7 @@ public class CommunityUserDAO extends ParentDAO {
public CommunityUser getCommunityUser(String gatewayName, String communityUserName, Connection connection)
throws CredentialStoreException {
- String sql = "SELECT * FROM COMMUNITY_USER WHERE GATEWAY_NAME=? AND COMMUNITY_USER_NAME=?";
+ String sql = "SELECT * FROM COMMUNITY_USER WHERE GATEWAY_ID=? AND COMMUNITY_USER_NAME=?";
PreparedStatement preparedStatement = null;
@@ -181,7 +181,7 @@ public class CommunityUserDAO extends ParentDAO {
public CommunityUser getCommunityUserByToken(String gatewayName, String tokenId, Connection connection)
throws CredentialStoreException {
- String sql = "SELECT * FROM COMMUNITY_USER WHERE GATEWAY_NAME=? AND TOKEN_ID=?";
+ String sql = "SELECT * FROM COMMUNITY_USER WHERE GATEWAY_ID=? AND TOKEN_ID=?";
PreparedStatement preparedStatement = null;
@@ -221,7 +221,7 @@ public class CommunityUserDAO extends ParentDAO {
List<CommunityUser> userList = new ArrayList<CommunityUser>();
- String sql = "SELECT * FROM COMMUNITY_USER WHERE GATEWAY_NAME=?";
+ String sql = "SELECT * FROM COMMUNITY_USER WHERE GATEWAY_ID=?";
PreparedStatement preparedStatement = null;
http://git-wip-us.apache.org/repos/asf/airavata/blob/9d960f76/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryImpl.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryImpl.java
index d2af1cd..9dcf96f 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryImpl.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryImpl.java
@@ -204,6 +204,7 @@ public class RegistryImpl implements Registry {
break;
case GATEWAY:
gatewayRegistry.updateGateway((String)identifier, (Gateway)newObjectToUpdate);
+ break;
case EXPERIMENT:
experimentRegistry.updateExperiment((Experiment) newObjectToUpdate, (String) identifier);
break;
http://git-wip-us.apache.org/repos/asf/airavata/blob/9d960f76/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql b/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
index 9d02c3a..b7c8a7d 100644
--- a/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
+++ b/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
@@ -36,7 +36,7 @@ CREATE TABLE CONFIGURATION
PRIMARY KEY(CONFIG_KEY, CONFIG_VAL, CATEGORY_ID)
);
-INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL, EXPIRE_DATE, CATEGORY_ID) VALUES('registry.version', '0.12', CURRENT_TIMESTAMP ,'SYSTEM');
+INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL, EXPIRE_DATE, CATEGORY_ID) VALUES('registry.version', '0.15', CURRENT_TIMESTAMP ,'SYSTEM');
CREATE TABLE USERS
(
http://git-wip-us.apache.org/repos/asf/airavata/blob/9d960f76/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql b/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
index ec2fb42..442a47b 100644
--- a/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
+++ b/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
@@ -36,7 +36,7 @@ CREATE TABLE CONFIGURATION
PRIMARY KEY(CONFIG_KEY, CONFIG_VAL, CATEGORY_ID)
);
-INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL, EXPIRE_DATE, CATEGORY_ID) VALUES('registry.version', '0.12', CURRENT_TIMESTAMP ,'SYSTEM');
+INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL, EXPIRE_DATE, CATEGORY_ID) VALUES('registry.version', '0.15', CURRENT_TIMESTAMP ,'SYSTEM');
CREATE TABLE USERS
(
http://git-wip-us.apache.org/repos/asf/airavata/blob/9d960f76/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql b/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql
index 9d02c3a..b7c8a7d 100644
--- a/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql
+++ b/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql
@@ -36,7 +36,7 @@ CREATE TABLE CONFIGURATION
PRIMARY KEY(CONFIG_KEY, CONFIG_VAL, CATEGORY_ID)
);
-INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL, EXPIRE_DATE, CATEGORY_ID) VALUES('registry.version', '0.12', CURRENT_TIMESTAMP ,'SYSTEM');
+INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL, EXPIRE_DATE, CATEGORY_ID) VALUES('registry.version', '0.15', CURRENT_TIMESTAMP ,'SYSTEM');
CREATE TABLE USERS
(
[34/50] [abbrv] airavata git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/airavata
Posted by sh...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/airavata
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/f31637e8
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/f31637e8
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/f31637e8
Branch: refs/heads/new-workflow-design
Commit: f31637e8c10559ca070a49036e69776b43cb2333
Parents: 674db3c 13b480d
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Wed Mar 11 18:07:12 2015 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Wed Mar 11 18:07:12 2015 -0400
----------------------------------------------------------------------
.../client/samples/CreateLaunchExperiment.java | 630 ++++++-------------
.../tools/RegisterSampleApplications.java | 180 +++++-
.../server/src/main/resources/LSFTemplate.xslt | 3 +-
.../gfac/ssh/provider/impl/SSHProvider.java | 1 +
.../gsissh/src/main/resources/LSFTemplate.xslt | 2 +-
5 files changed, 371 insertions(+), 445 deletions(-)
----------------------------------------------------------------------
[38/50] [abbrv] airavata git commit: fixing AIRAVATA-1630
Posted by sh...@apache.org.
fixing AIRAVATA-1630
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/990d72a1
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/990d72a1
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/990d72a1
Branch: refs/heads/new-workflow-design
Commit: 990d72a1f007accea95d49a756cc5e10b20d924c
Parents: 757e8a3
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Fri Mar 13 14:35:57 2015 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Fri Mar 13 14:35:57 2015 -0400
----------------------------------------------------------------------
.../org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java | 7 +++++++
.../java/org/apache/airavata/gfac/core/utils/GFacUtils.java | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/990d72a1/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
index 420df6d..2ff0338 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
@@ -210,6 +210,7 @@ public class BetterGfacImpl implements GFac,Watcher {
return submitJob(jobExecutionContext);
} catch (Exception e) {
log.error("Error inovoking the job with experiment ID: " + experimentID);
+ GFacUtils.saveErrorDetails(jobExecutionContext, e.getLocalizedMessage(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR );
throw new GFacException(e);
}
}
@@ -495,10 +496,13 @@ public class BetterGfacImpl implements GFac,Watcher {
}
return true;
} catch (ApplicationSettingsException e) {
+ GFacUtils.saveErrorDetails(jobExecutionContext, e.getLocalizedMessage(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR );
throw new GFacException("Error launching the Job",e);
} catch (KeeperException e) {
+ GFacUtils.saveErrorDetails(jobExecutionContext, e.getLocalizedMessage(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR );
throw new GFacException("Error launching the Job",e);
} catch (InterruptedException e) {
+ GFacUtils.saveErrorDetails(jobExecutionContext, e.getLocalizedMessage(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR );
throw new GFacException("Error launching the Job",e);
}
}
@@ -509,6 +513,7 @@ public class BetterGfacImpl implements GFac,Watcher {
jobExecutionContext = createJEC(experimentID, taskID, gatewayID);
return cancel(jobExecutionContext);
} catch (Exception e) {
+ GFacUtils.saveErrorDetails(jobExecutionContext, e.getLocalizedMessage(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR );
log.error("Error inovoking the job with experiment ID: " + experimentID);
throw new GFacException(e);
}
@@ -660,6 +665,7 @@ public class BetterGfacImpl implements GFac,Watcher {
jobExecutionContext.getExperimentID(),
jobExecutionContext.getGatewayID());
monitorPublisher.publish(new JobStatusChangeEvent(JobState.FAILED, jobIdentity));
+ GFacUtils.saveErrorDetails(jobExecutionContext, e.getLocalizedMessage(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR );
} catch (NullPointerException e1) {
log.error("Error occured during updating the statuses of Experiments,tasks or Job statuses to failed, "
+ "NullPointerException occurred because at this point there might not have Job Created", e1, e);
@@ -671,6 +677,7 @@ public class BetterGfacImpl implements GFac,Watcher {
jobExecutionContext.getExperimentID(),
jobExecutionContext.getGatewayID());
monitorPublisher.publish(new TaskStatusChangeEvent(TaskState.FAILED, taskIdentity));
+ GFacUtils.saveErrorDetails(jobExecutionContext, e.getLocalizedMessage(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR );
}
jobExecutionContext.setProperty(ERROR_SENT, "true");
http://git-wip-us.apache.org/repos/asf/airavata/blob/990d72a1/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
index cbbce48..d30816e 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
@@ -792,7 +792,7 @@ public class GFacUtils {
CorrectiveAction action, ErrorCategory errorCatogory)
throws GFacException {
try {
- Registry registry = RegistryFactory.getDefaultRegistry();
+ Registry registry = jobExecutionContext.getRegistry();
ErrorDetails details = new ErrorDetails();
details.setActualErrorMessage(errorMessage);
details.setCorrectiveAction(action);
[43/50] [abbrv] airavata git commit: Fixed AIRAVATA-1631.
Posted by sh...@apache.org.
Fixed AIRAVATA-1631.
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/5d7a0341
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/5d7a0341
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/5d7a0341
Branch: refs/heads/new-workflow-design
Commit: 5d7a034155f0acb48c15f1420c3ab452523f40ad
Parents: a4fb489
Author: raminder <ra...@apache.org>
Authored: Mon Mar 16 14:22:50 2015 -0400
Committer: raminder <ra...@apache.org>
Committed: Mon Mar 16 14:22:50 2015 -0400
----------------------------------------------------------------------
.../airavata/gfac/core/cpi/BetterGfacImpl.java | 18 +++++++++++++++---
.../airavata/gfac/ssh/util/HandleOutputs.java | 5 +----
2 files changed, 16 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/5d7a0341/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
index 2ff0338..6b20118 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
@@ -385,10 +385,22 @@ public class BetterGfacImpl implements GFac,Watcher {
for (OutputDataObjectType objectType : taskOutputs){
if (objectType.getType() == DataType.URI && objectType.getValue() != null){
- // this should be also the relatvie path : in case of clone, this will contain full path
+ // this should be also the relative path : in case of clone, this will contain full path
String filePath = objectType.getValue();
- filePath = filePath.substring(filePath.lastIndexOf(File.separatorChar) + 1, filePath.length());
- objectType.setValue(jobExecutionContext.getOutputDir() + File.separator + filePath);
+ if(objectType.getLocation() == null && objectType.getLocation().isEmpty() && filePath.contains(File.separator)){
+ filePath = jobExecutionContext.getOutputDir() + File.separator + filePath.substring(filePath.lastIndexOf(File.separatorChar) + 1, filePath.length());
+ }
+ //output is not in working folder
+ if (objectType.getLocation() != null && !objectType.getLocation().isEmpty()) {
+ if(objectType.getLocation().startsWith(File.separator)){
+ filePath = objectType.getLocation() + File.separator + filePath;
+ }else{
+ filePath = jobExecutionContext.getOutputDir() + File.separator + filePath;
+ }
+ filePath = objectType.getLocation()+ filePath;
+ }
+ objectType.setValue(filePath);
+
}
if (objectType.getType() == DataType.STDOUT){
objectType.setValue(jobExecutionContext.getOutputDir() + File.separator + jobExecutionContext.getApplicationName() + ".stdout");
http://git-wip-us.apache.org/repos/asf/airavata/blob/5d7a0341/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java
index e64b0be..ddab0f4 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java
@@ -37,12 +37,9 @@ public class HandleOutputs {
String outputFile = output.getValue();
String fileName = outputFile.substring(outputFile.lastIndexOf(File.separatorChar) + 1, outputFile.length());
- if (!outputList.contains(fileName) && output.isIsRequired()) {
+ if (output.getLocation() == null && !outputList.contains(fileName) && output.isIsRequired()) {
missingOutput = true;
} else {
- if (output.getLocation() != null && !output.getLocation().isEmpty()) {
- outputFile = output.getLocation()+ fileName;
- }
cluster.scpFrom(outputFile, outputDataDir);
String localFile = outputDataDir + File.separator + fileName;
jobExecutionContext.addOutputFile(localFile);
[33/50] [abbrv] airavata git commit: using login username inside gfac
Posted by sh...@apache.org.
using login username inside gfac
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/674db3c3
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/674db3c3
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/674db3c3
Branch: refs/heads/new-workflow-design
Commit: 674db3c3e7e5adb252102ea18581d4d0523d5d62
Parents: 4000b82
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Wed Mar 11 17:22:49 2015 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Wed Mar 11 17:22:49 2015 -0400
----------------------------------------------------------------------
.../airavata/gfac/core/context/JobExecutionContext.java | 9 +++++++++
.../apache/airavata/gfac/core/cpi/BetterGfacImpl.java | 4 ++++
.../org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java | 12 +++++++++---
3 files changed, 22 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/674db3c3/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
index c8c48ef..6a8dd5f 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
@@ -78,6 +78,7 @@ public class JobExecutionContext extends AbstractContext implements Serializable
* User defined scratch/temp directory
*/
private String scratchLocation;
+ private String loginUserName;
/**
* User defined working directory.
*/
@@ -500,4 +501,12 @@ public class JobExecutionContext extends AbstractContext implements Serializable
return applicationContext.getApplicationDeploymentDescription().getExecutablePath();
}
}
+
+ public String getLoginUserName() {
+ return loginUserName;
+ }
+
+ public void setLoginUserName(String loginUserName) {
+ this.loginUserName = loginUserName;
+ }
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/674db3c3/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
index 00d313c..420df6d 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
@@ -353,6 +353,10 @@ public class BetterGfacImpl implements GFac,Watcher {
}
}
+ if(gatewayResourcePreferences.getLoginUserName() != null){
+ jobExecutionContext.setLoginUserName(gatewayResourcePreferences.getLoginUserName());
+ }
+
// set gatewayUserPreferred data movement protocol and interface
jobExecutionContext.setPreferredDataMovementProtocol(gatewayResourcePreferences.getPreferredDataMovementProtocol());
if (gatewayResourcePreferences.getPreferredJobSubmissionProtocol() == null) {
http://git-wip-us.apache.org/repos/asf/airavata/blob/674db3c3/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
index 890768a..f477f62 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
@@ -110,12 +110,18 @@ public class GFACSSHUtils {
Properties configurationProperties = ServerSettings.getProperties();
tokenizedSSHAuthInfo = new DefaultPasswordAuthenticationInfo(configurationProperties.getProperty(Constants.SSH_PASSWORD));
}
- serverInfo.setUserName(credentials.getPortalUserName());
- jobExecutionContext.getExperiment().setUserName(credentials.getPortalUserName());
+ // This should be the login user name from compute resource preference
+ String loginUser = jobExecutionContext.getLoginUserName();
+ if (loginUser == null) {
+ loginUser = credentials.getPortalUserName();
+ }
+ serverInfo.setUserName(loginUser);
+ jobExecutionContext.getExperiment().setUserName(loginUser);
+
// inside the pbsCluser object
- String key = credentials.getPortalUserName() + jobExecutionContext.getHostName() + serverInfo.getPort();
+ String key = loginUser + jobExecutionContext.getHostName() + serverInfo.getPort();
boolean recreate = false;
synchronized (clusters) {
if (clusters.containsKey(key) && clusters.get(key).size() < maxClusterCount) {
[21/50] [abbrv] airavata git commit: Show error message when there is
no compute resources found.
Posted by sh...@apache.org.
Show error message when there is no compute resources found.
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/ad8e4826
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/ad8e4826
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/ad8e4826
Branch: refs/heads/new-workflow-design
Commit: ad8e482674b7c3523eed16b99b5d448dfb83f63c
Parents: 774b092
Author: shamrath <sh...@gmail.com>
Authored: Mon Mar 9 20:44:35 2015 -0400
Committer: shamrath <sh...@gmail.com>
Committed: Mon Mar 9 20:44:35 2015 -0400
----------------------------------------------------------------------
.../xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/ad8e4826/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
index c0c6b45..3425a4f 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
@@ -151,6 +151,13 @@ public class WorkflowInterpreterLaunchWindow {
try {
hosts = airavataClient.getAllComputeResourceNames();
+ if (hosts.isEmpty()) {
+ JOptionPane.showMessageDialog(engine.getGUI().getFrame(),
+ "No Compute Resources found",
+ "Compute Resources",
+ JOptionPane.ERROR_MESSAGE);
+ return;
+ }
} catch (InvalidRequestException e2) {
// TODO Auto-generated catch block
e2.printStackTrace();
[36/50] [abbrv] airavata git commit: Simple null check
Posted by sh...@apache.org.
Simple null check
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/a2181e44
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/a2181e44
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/a2181e44
Branch: refs/heads/new-workflow-design
Commit: a2181e44af8fc3e19fa0069898f8053e253adb2b
Parents: 6da7a74
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Thu Mar 12 15:46:34 2015 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Thu Mar 12 15:46:34 2015 -0400
----------------------------------------------------------------------
.../java/org/apache/airavata/gsi/ssh/GSSContextX509.java | 11 +++++++++--
.../airavata/gsi/ssh/impl/GSISSHAbstractCluster.java | 2 +-
2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/a2181e44/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/GSSContextX509.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/GSSContextX509.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/GSSContextX509.java
index 2eb70c6..351e1af 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/GSSContextX509.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/GSSContextX509.java
@@ -168,12 +168,19 @@ public class GSSContextX509 implements com.jcraft.jsch.GSSContext {
public boolean isEstablished() {
// this must check to see if the call returned GSS_S_COMPLETE
- return context.isEstablished();
+ if (context != null){
+ return context.isEstablished();
+ }
+ return false;
}
public byte[] init(byte[] token, int s, int l) throws JSchException {
try {
- return context.initSecContext(token, s, l);
+ if (context != null){
+ return context.initSecContext(token, s, l);
+ }else {
+ throw new JSchException("Context is null..");
+ }
} catch (GSSException ex) {
throw new JSchException(ex.toString());
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/a2181e44/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
index 0420cff..cf9f931 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
@@ -109,7 +109,7 @@ public class GSISSHAbstractCluster implements Cluster {
this.authenticationInfo = authenticationInfo;
if (authenticationInfo instanceof GSIAuthenticationInfo) {
- JSch.setConfig("gssapi-with-mic.x509", "org.apache.airavata.gsi.ssh.GSSContextX509");
+ JSch.setConfig("gssapi-with-mic.x509", "org.apache.airavata.gsi.ssh.GSSContextX509");
JSch.setConfig("userauth.gssapi-with-mic", "com.jcraft.jsch.UserAuthGSSAPIWithMICGSSCredentials");
System.setProperty(X509_CERT_DIR, (String) ((GSIAuthenticationInfo) authenticationInfo).getProperties().
get("X509_CERT_DIR"));
[45/50] [abbrv] airavata git commit: Fixing. AIRAVATA-1631
Posted by sh...@apache.org.
Fixing. AIRAVATA-1631
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/5749f124
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/5749f124
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/5749f124
Branch: refs/heads/new-workflow-design
Commit: 5749f124e15a3704c4815f9e00e5fad90481a76d
Parents: be1c6a0
Author: raminder <ra...@apache.org>
Authored: Mon Mar 16 14:46:50 2015 -0400
Committer: raminder <ra...@apache.org>
Committed: Mon Mar 16 14:46:50 2015 -0400
----------------------------------------------------------------------
.../java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/5749f124/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
index cc8a899..5dcea2e 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
@@ -395,7 +395,7 @@ public class BetterGfacImpl implements GFac,Watcher {
if(objectType.getLocation().startsWith(File.separator)){
filePath = objectType.getLocation() + File.separator + filePath;
}else{
- filePath = jobExecutionContext.getOutputDir() + File.separator + objectType.getLocation()+ filePath;
+ filePath = jobExecutionContext.getOutputDir() + File.separator + objectType.getLocation() + File.separator + filePath;
}
}
objectType.setValue(filePath);
[10/50] [abbrv] airavata git commit: change persistent_data to
experiment_catalog
Posted by sh...@apache.org.
change persistent_data to experiment_catalog
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/9385c4eb
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/9385c4eb
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/9385c4eb
Branch: refs/heads/new-workflow-design
Commit: 9385c4eb0ad9df573e62657bacecc552fdeb97bb
Parents: e9468ca
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Fri Mar 6 14:20:18 2015 -0500
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Fri Mar 6 14:20:18 2015 -0500
----------------------------------------------------------------------
.../org/apache/airavata/common/utils/DatabaseTestCases.java | 2 +-
.../client/src/main/resources/airavata-client.properties | 2 +-
.../server/src/main/resources/airavata-server.properties | 6 +++---
.../credential/store/store/impl/db/SSHCredentialTest.java | 2 +-
.../src/main/resources/airavata-server.properties | 4 ++--
modules/security/src/test/resources/jdbc-authenticator.xml | 2 +-
modules/security/src/test/resources/session-authenticator.xml | 2 +-
tools/registry-tool/README | 2 +-
8 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/9385c4eb/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DatabaseTestCases.java
----------------------------------------------------------------------
diff --git a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DatabaseTestCases.java b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DatabaseTestCases.java
index 019a53c..6ff528d 100644
--- a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DatabaseTestCases.java
+++ b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DatabaseTestCases.java
@@ -62,7 +62,7 @@ public class DatabaseTestCases {
public static String getJDBCUrl() {
return new StringBuilder().append("jdbc:derby://").append(getHostAddress()).append(":").append(getPort())
- .append("/persistent_data;create=true;user=").append(getUserName()).append(";password=")
+ .append("/experiment_catalog;create=true;user=").append(getUserName()).append(";password=")
.append(getPassword()).toString();
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/9385c4eb/modules/configuration/client/src/main/resources/airavata-client.properties
----------------------------------------------------------------------
diff --git a/modules/configuration/client/src/main/resources/airavata-client.properties b/modules/configuration/client/src/main/resources/airavata-client.properties
index 98972cd..70f2bae 100644
--- a/modules/configuration/client/src/main/resources/airavata-client.properties
+++ b/modules/configuration/client/src/main/resources/airavata-client.properties
@@ -39,7 +39,7 @@
#for derby [AiravataJPARegistry]
registry.jdbc.driver=org.apache.derby.jdbc.ClientDriver
-registry.jdbc.url=jdbc:derby://localhost:1527/persistent_data;create=true;user=airavata;password=airavata
+registry.jdbc.url=jdbc:derby://localhost:1527/experiment_catalog;create=true;user=airavata;password=airavata
registry.jdbc.user=airavata
registry.jdbc.password=airavata
start.derby.server.mode=true
http://git-wip-us.apache.org/repos/asf/airavata/blob/9385c4eb/modules/configuration/server/src/main/resources/airavata-server.properties
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/airavata-server.properties b/modules/configuration/server/src/main/resources/airavata-server.properties
index c493752..55fbba6 100644
--- a/modules/configuration/server/src/main/resources/airavata-server.properties
+++ b/modules/configuration/server/src/main/resources/airavata-server.properties
@@ -31,10 +31,10 @@
#for derby [AiravataJPARegistry]
registry.jdbc.driver=org.apache.derby.jdbc.ClientDriver
-registry.jdbc.url=jdbc:derby://localhost:1527/persistent_data;create=true;user=airavata;password=airavata
+registry.jdbc.url=jdbc:derby://localhost:1527/experiment_catalog;create=true;user=airavata;password=airavata
# MySql database configuration
#registry.jdbc.driver=com.mysql.jdbc.Driver
-#registry.jdbc.url=jdbc:mysql://localhost:3306/persistent_data
+#registry.jdbc.url=jdbc:mysql://localhost:3306/experiment_catalog
registry.jdbc.user=airavata
registry.jdbc.password=airavata
start.derby.server.mode=true
@@ -100,7 +100,7 @@ start.credential.store=false
credential.store.keystore.url=/Users/chathuri/dev/airavata/credential-store/oa4mp/airavata_sym.jks
credential.store.keystore.alias=airavata
credential.store.keystore.password=airavata
-credential.store.jdbc.url=jdbc:derby://localhost:1527/persistent_data;create=true;user=airavata;password=airavata
+credential.store.jdbc.url=jdbc:derby://localhost:1527/experiment_catalog;create=true;user=airavata;password=airavata
credential.store.jdbc.user=airavata
credential.store.jdbc.password=airavata
credential.store.jdbc.driver=org.apache.derby.jdbc.ClientDriver
http://git-wip-us.apache.org/repos/asf/airavata/blob/9385c4eb/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java b/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
index 7f44125..84b6bd3 100644
--- a/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
+++ b/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
@@ -38,7 +38,7 @@ import java.io.IOException;
public class SSHCredentialTest {
public static void main(String[] args) {
- String jdbcURL = "jdbc:derby://localhost:1527/persistent_data;create=true;user=airavata;password=airavata";
+ String jdbcURL = "jdbc:derby://localhost:1527/experiment_catalog;create=true;user=airavata;password=airavata";
String jdbcDriver = "org.apache.derby.jdbc.ClientDriver";
String userName = "airavata";
String password = "airavata";
http://git-wip-us.apache.org/repos/asf/airavata/blob/9385c4eb/modules/credential-store/credential-store-webapp/src/main/resources/airavata-server.properties
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-webapp/src/main/resources/airavata-server.properties b/modules/credential-store/credential-store-webapp/src/main/resources/airavata-server.properties
index fb02901..badf28d 100644
--- a/modules/credential-store/credential-store-webapp/src/main/resources/airavata-server.properties
+++ b/modules/credential-store/credential-store-webapp/src/main/resources/airavata-server.properties
@@ -31,7 +31,7 @@
#for derby [AiravataJPARegistry]
registry.jdbc.driver=org.apache.derby.jdbc.ClientDriver
-registry.jdbc.url=jdbc:derby://localhost:1527/persistent_data;create=true;user=airavata;password=airavata
+registry.jdbc.url=jdbc:derby://localhost:1527/experiment_catalog;create=true;user=airavata;password=airavata
# MySql database configuration
#registry.jdbc.driver=com.mysql.jdbc.Driver
#registry.jdbc.url=jdbc:mysql://localhost:3306/persistent_data
@@ -89,7 +89,7 @@ orchestrator.server.min.threads=50
credential.store.keystore.url=/Users/lahirugunathilake/Downloads/airavata_sym.jks
credential.store.keystore.alias=airavata
credential.store.keystore.password=airavata
-credential.store.jdbc.url=jdbc:derby://localhost:1527/persistent_data;create=true;user=airavata;password=airavata
+credential.store.jdbc.url=jdbc:derby://localhost:1527/experiment_catalog;create=true;user=airavata;password=airavata
credential.store.jdbc.user=airavata
credential.store.jdbc.password=airavata
credential.store.jdbc.driver=org.apache.derby.jdbc.ClientDriver
http://git-wip-us.apache.org/repos/asf/airavata/blob/9385c4eb/modules/security/src/test/resources/jdbc-authenticator.xml
----------------------------------------------------------------------
diff --git a/modules/security/src/test/resources/jdbc-authenticator.xml b/modules/security/src/test/resources/jdbc-authenticator.xml
index c27b60f..fccf8b8 100644
--- a/modules/security/src/test/resources/jdbc-authenticator.xml
+++ b/modules/security/src/test/resources/jdbc-authenticator.xml
@@ -26,7 +26,7 @@
<specificConfigurations>
<database>
<!--jdbcUrl>jdbc:h2:modules/commons/airavata-registry-rest/src/test/resources/testdb/test</jdbcUrl-->
- <jdbcUrl>jdbc:derby://localhost:20000/persistent_data;create=true</jdbcUrl>
+ <jdbcUrl>jdbc:derby://localhost:20000/experiment_catalog;create=true</jdbcUrl>
<userName>admin</userName>
<password>admin</password>
<databaseDriver>org.apache.derby.jdbc.ClientDriver</databaseDriver>
http://git-wip-us.apache.org/repos/asf/airavata/blob/9385c4eb/modules/security/src/test/resources/session-authenticator.xml
----------------------------------------------------------------------
diff --git a/modules/security/src/test/resources/session-authenticator.xml b/modules/security/src/test/resources/session-authenticator.xml
index 670913e..2c3fd2e 100644
--- a/modules/security/src/test/resources/session-authenticator.xml
+++ b/modules/security/src/test/resources/session-authenticator.xml
@@ -28,7 +28,7 @@
<database>
<!--jdbcUrl>jdbc:h2:modules/commons/airavata-registry-rest/src/test/resources/testdb/test</jdbcUrl-->
<!-- Points to /Users/thejaka/development/apache/airavata/trunk/modules/commons/airavata-registry-rest/target/tomcat6x/. -->
- <jdbcUrl>jdbc:derby://localhost:20000/persistent_data;create=true</jdbcUrl>
+ <jdbcUrl>jdbc:derby://localhost:20000/experiment_catalog;create=true</jdbcUrl>
<!--jdbcUrl>jdbc:h2:modules/security/src/test/resources/testdb/test</jdbcUrl-->
http://git-wip-us.apache.org/repos/asf/airavata/blob/9385c4eb/tools/registry-tool/README
----------------------------------------------------------------------
diff --git a/tools/registry-tool/README b/tools/registry-tool/README
index d21be0f..40a8e65 100644
--- a/tools/registry-tool/README
+++ b/tools/registry-tool/README
@@ -6,4 +6,4 @@
3. Copy db-migrate.sh file to <AIRAVATA_HOME>/bin
4. Make sure previous version of airavata database is up and running
5. Run db-migrate.sh script file
- ./db-migrate.sh -url jdbc:mysql://localhost:3306/persistent_data -user airavata -pwd airavata -v 0.7
\ No newline at end of file
+ ./db-migrate.sh -url jdbc:mysql://localhost:3306/experiment_catalog -user airavata -pwd airavata -v 0.7
\ No newline at end of file
[17/50] [abbrv] airavata git commit: fixing monitoring issues with LSF
Posted by sh...@apache.org.
fixing monitoring issues with LSF
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/04cecb4d
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/04cecb4d
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/04cecb4d
Branch: refs/heads/new-workflow-design
Commit: 04cecb4d4c2d52883ca03cd5791c1031b7d2bd6c
Parents: 565b5a3
Author: Lahiru Gunathilake <gl...@gmail.com>
Authored: Sat Mar 7 01:18:03 2015 -0500
Committer: Lahiru Gunathilake <gl...@gmail.com>
Committed: Sat Mar 7 01:18:03 2015 -0500
----------------------------------------------------------------------
.../monitor/impl/pull/qstat/ResourceConnection.java | 12 ++++++------
.../apache/airavata/gfac/ssh/util/GFACSSHUtils.java | 14 +++++++++++---
.../airavata/gsi/ssh/api/job/LSFOutputParser.java | 7 ++++---
3 files changed, 21 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/04cecb4d/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/ResourceConnection.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/ResourceConnection.java b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/ResourceConnection.java
index e13d907..f718535 100644
--- a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/ResourceConnection.java
+++ b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/ResourceConnection.java
@@ -113,27 +113,27 @@ public class ResourceConnection {
private JobState getStatusFromString(String status) {
log.info("parsing the job status returned : " + status);
if (status != null) {
- if ("C".equals(status) || "CD".equals(status) || "E".equals(status) || "CG".equals(status)) {
+ if ("C".equals(status) || "CD".equals(status) || "E".equals(status) || "CG".equals(status) || "DONE".equals(status)) {
return JobState.COMPLETE;
} else if ("H".equals(status) || "h".equals(status)) {
return JobState.HELD;
- } else if ("Q".equals(status) || "qw".equals(status)) {
+ } else if ("Q".equals(status) || "qw".equals(status) || "PEND".equals(status)) {
return JobState.QUEUED;
- } else if ("R".equals(status) || "CF".equals(status) || "r".equals(status)) {
+ } else if ("R".equals(status) || "CF".equals(status) || "r".equals(status) || "RUN".equals(status)) {
return JobState.ACTIVE;
} else if ("T".equals(status)) {
return JobState.HELD;
} else if ("W".equals(status) || "PD".equals(status)) {
return JobState.QUEUED;
- } else if ("S".equals(status)) {
+ } else if ("S".equals(status) || "PSUSP".equals(status) || "USUSP".equals(status) || "SSUSP".equals(status)) {
return JobState.SUSPENDED;
} else if ("CA".equals(status)) {
return JobState.CANCELED;
- } else if ("F".equals(status) || "NF".equals(status) || "TO".equals(status)) {
+ } else if ("F".equals(status) || "NF".equals(status) || "TO".equals(status) || "EXIT".equals(status)) {
return JobState.FAILED;
} else if ("PR".equals(status) || "Er".equals(status)) {
return JobState.FAILED;
- } else if ("U".equals(status)) {
+ } else if ("U".equals(status) || ("UNKWN".equals(status))) {
return JobState.UNKNOWN;
}
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/04cecb4d/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
index c4d25f5..890768a 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
@@ -325,9 +325,7 @@ public class GFACSSHUtils {
if (computationalProjectAccount != null) {
jobDescriptor.setAcountString(computationalProjectAccount);
}
- Random random = new Random();
- int i = random.nextInt(Integer.MAX_VALUE);
- jobDescriptor.setJobName(String.valueOf(i + 99999999));
+ jobDescriptor.setJobName(String.valueOf(generateJobName()));
jobDescriptor.setWorkingDirectory(jobExecutionContext.getWorkingDir());
List<String> inputValues = new ArrayList<String>();
@@ -455,6 +453,16 @@ public class GFACSSHUtils {
return jobDescriptor;
}
+ private static int generateJobName() {
+ Random random = new Random();
+ int i = random.nextInt(Integer.MAX_VALUE);
+ i = i + 99999999;
+ if(i<0) {
+ i = i * (-1);
+ }
+ return i;
+ }
+
private static String parseCommand(String value, JobExecutionContext jobExecutionContext) {
String parsedValue = value.replaceAll("\\$workingDir", jobExecutionContext.getWorkingDir());
parsedValue = parsedValue.replaceAll("\\$inputDir", jobExecutionContext.getInputDir());
http://git-wip-us.apache.org/repos/asf/airavata/blob/04cecb4d/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/LSFOutputParser.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/LSFOutputParser.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/LSFOutputParser.java
index bd02e37..71c3339 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/LSFOutputParser.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/LSFOutputParser.java
@@ -94,16 +94,17 @@ public class LSFOutputParser implements OutputParser {
String test = "Job <2477982> is submitted to queue <short>.";
System.out.println(test.substring(test.indexOf("<")+1, test.indexOf(">")));
String test1 = "JOBID USER STAT QUEUE FROM_HOST EXEC_HOST JOB_NAME SUBMIT_TIME\n" +
- "2477983 cjh RUN short ghpcc05 c17b06 *sleep_300 Feb 25 10:25";
+ "2636607 lg11w RUN long ghpcc06 c11b02 *069656647 Mar 7 00:58\n" +
+ "2636582 lg11w RUN long ghpcc06 c02b01 2134490944 Mar 7 00:48";
Map<String, JobStatus> statusMap = new HashMap<String, JobStatus>();
- statusMap.put("2477983,*sleep_300", JobStatus.U);
+ statusMap.put("2477983,2134490944", JobStatus.U);
LSFOutputParser lsfOutputParser = new LSFOutputParser();
try {
lsfOutputParser.parseJobStatuses("cjh", statusMap, test1);
} catch (SSHApiException e) {
logger.error(e.getMessage(), e);
}
- System.out.println(statusMap.get("2477983,*sleep_300"));
+ System.out.println(statusMap.get("2477983,2134490944"));
}
}
[08/50] [abbrv] airavata git commit: adding test class to save ssh
credentials
Posted by sh...@apache.org.
adding test class to save ssh credentials
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/e9468ca5
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/e9468ca5
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/e9468ca5
Branch: refs/heads/new-workflow-design
Commit: e9468ca5b68083527cb918c2ce195ec0d4f2a8a1
Parents: ac574c9
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Fri Mar 6 12:26:14 2015 -0500
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Fri Mar 6 12:26:14 2015 -0500
----------------------------------------------------------------------
.../credential-store-service/pom.xml | 6 ++
.../store/store/impl/db/SSHCredentialTest.java | 92 ++++++++++++++++++++
2 files changed, 98 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/e9468ca5/modules/credential-store/credential-store-service/pom.xml
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/pom.xml b/modules/credential-store/credential-store-service/pom.xml
index 1595ed6..7f9e329 100644
--- a/modules/credential-store/credential-store-service/pom.xml
+++ b/modules/credential-store/credential-store-service/pom.xml
@@ -80,6 +80,12 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>airavata-server-configuration</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbyclient</artifactId>
<version>${derby.version}</version>
http://git-wip-us.apache.org/repos/asf/airavata/blob/e9468ca5/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java b/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
new file mode 100644
index 0000000..7f44125
--- /dev/null
+++ b/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
@@ -0,0 +1,92 @@
+/*
+ *
+ * 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.credential.store.store.impl.db;
+
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.AiravataUtils;
+import org.apache.airavata.common.utils.DBUtil;
+import org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential;
+import org.apache.airavata.credential.store.store.CredentialStoreException;
+import org.apache.airavata.credential.store.store.impl.SSHCredentialWriter;
+import org.apache.airavata.credential.store.util.TokenGenerator;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+public class SSHCredentialTest {
+
+ public static void main(String[] args) {
+ String jdbcURL = "jdbc:derby://localhost:1527/persistent_data;create=true;user=airavata;password=airavata";
+ String jdbcDriver = "org.apache.derby.jdbc.ClientDriver";
+ String userName = "airavata";
+ String password = "airavata";
+ String gatewayId = "default";
+ String privateKeyPath = "/Users/chathuri/.ssh/id_dsa";
+ String pubKeyPath = "/Users/chathuri/.ssh/id_dsa.pub";
+
+ try {
+ AiravataUtils.setExecutionAsServer();
+ DBUtil dbUtil = new DBUtil(jdbcURL, userName, password, jdbcDriver);
+ SSHCredentialWriter writer = new SSHCredentialWriter(dbUtil);
+ SSHCredential sshCredential = new SSHCredential();
+ sshCredential.setGateway(gatewayId);
+ String token = TokenGenerator.generateToken(gatewayId, null);
+ sshCredential.setToken(token);
+ sshCredential.setPortalUserName("admin");
+ FileInputStream privateKeyStream = new FileInputStream(privateKeyPath);
+ File filePri = new File(privateKeyPath);
+ byte[] bFilePri = new byte[(int) filePri.length()];
+ privateKeyStream.read(bFilePri);
+ FileInputStream pubKeyStream = new FileInputStream(pubKeyPath);
+ File filePub = new File(pubKeyPath);
+ byte[] bFilePub = new byte[(int) filePub.length()];
+ pubKeyStream.read(bFilePub);
+ privateKeyStream.close();
+ pubKeyStream.close();
+ sshCredential.setPrivateKey(bFilePub);
+ sshCredential.setPublicKey(bFilePub);
+ sshCredential.setPassphrase("test");
+ writer.writeCredentials(sshCredential);
+ System.out.println(token);
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ } catch (InstantiationException e) {
+ e.printStackTrace();
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (ApplicationSettingsException e) {
+ e.printStackTrace();
+ } catch (CredentialStoreException e) {
+ e.printStackTrace();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+
+ }
+
+}
[27/50] [abbrv] airavata git commit: fixing compilation isssue,
bug in getAvailableAppInterfaceComputeResources(), fixing AIRAVATA-1226,
AIRAVATA-1626
Posted by sh...@apache.org.
fixing compilation isssue, bug in getAvailableAppInterfaceComputeResources(), fixing AIRAVATA-1226, AIRAVATA-1626
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/56efa8e5
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/56efa8e5
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/56efa8e5
Branch: refs/heads/new-workflow-design
Commit: 56efa8e5e7b1bdbc69a8238968ca305c2d8f5ad0
Parents: 7ef8800
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Tue Mar 10 13:30:28 2015 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Tue Mar 10 13:30:28 2015 -0400
----------------------------------------------------------------------
.../server/handler/AiravataServerHandler.java | 30 +-
.../java/org/apache/airavata/api/Airavata.java | 5264 +++++++++++-------
.../main/resources/lib/airavata/Airavata.cpp | 381 ++
.../src/main/resources/lib/airavata/Airavata.h | 161 +
.../lib/airavata/Airavata_server.skeleton.cpp | 5 +
.../resources/lib/Airavata/API/Airavata.php | 296 +
.../client/samples/CreateLaunchExperiment.java | 31 +-
.../computeresource/AuthenticationMode.java | 70 +
.../airavataAPI.thrift | 6 +
9 files changed, 4246 insertions(+), 1998 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/56efa8e5/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index c111a07..f250f37 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -337,9 +337,9 @@ public class AiravataServerHandler implements Airavata.Iface {
}
return (Project)registry.get(RegistryModelType.PROJECT, projectId);
} catch (RegistryException e) {
- logger.error("Error while updating the project", e);
+ logger.error("Error while retrieving the project", e);
ProjectNotFoundException exception = new ProjectNotFoundException();
- exception.setMessage("Error while updating the project. More info : " + e.getMessage());
+ exception.setMessage("Error while retrieving the project. More info : " + e.getMessage());
throw exception;
}
}
@@ -1868,8 +1868,10 @@ public class AiravataServerHandler implements Airavata.Iface {
List<ApplicationDeploymentDescription> applicationDeployments =
applicationDeployment.getApplicationDeployements(filters);
for (ApplicationDeploymentDescription deploymentDescription : applicationDeployments) {
- availableComputeResources.put(deploymentDescription.getComputeHostId(),
- allComputeResources.get(deploymentDescription.getComputeHostId()));
+ if (allComputeResources.get(deploymentDescription.getComputeHostId()) != null){
+ availableComputeResources.put(deploymentDescription.getComputeHostId(),
+ allComputeResources.get(deploymentDescription.getComputeHostId()));
+ }
}
}
}
@@ -3096,4 +3098,24 @@ public class AiravataServerHandler implements Airavata.Iface {
return workflowCatalog;
}
+ @Override
+ public boolean deleteProject(String projectId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, ProjectNotFoundException, TException {
+ try {
+ registry = RegistryFactory.getDefaultRegistry();
+ if (!registry.isExist(RegistryModelType.PROJECT, projectId)){
+ logger.error("Project does not exist in the system. Please provide a valid project ID...");
+ ProjectNotFoundException exception = new ProjectNotFoundException();
+ exception.setMessage("Project does not exist in the system. Please provide a valid project ID...");
+ throw exception;
+ }
+ registry.remove(RegistryModelType.PROJECT, projectId);
+ return true;
+ } catch (RegistryException e) {
+ logger.error("Error while removing the project", e);
+ ProjectNotFoundException exception = new ProjectNotFoundException();
+ exception.setMessage("Error while removing the project. More info : " + e.getMessage());
+ throw exception;
+ }
+ }
+
}
[40/50] [abbrv] airavata git commit: fixed typo
Posted by sh...@apache.org.
fixed typo
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/48192d98
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/48192d98
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/48192d98
Branch: refs/heads/new-workflow-design
Commit: 48192d98f48f381d039decb3712512336610e533
Parents: 9700459
Author: shamrath <sh...@gmail.com>
Authored: Fri Mar 13 14:42:06 2015 -0400
Committer: shamrath <sh...@gmail.com>
Committed: Fri Mar 13 14:42:06 2015 -0400
----------------------------------------------------------------------
.../simple/workflow/engine/SimpleWorkflowInterpreter.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/48192d98/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/SimpleWorkflowInterpreter.java
----------------------------------------------------------------------
diff --git a/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/SimpleWorkflowInterpreter.java b/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/SimpleWorkflowInterpreter.java
index 5504f84..191988c 100644
--- a/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/SimpleWorkflowInterpreter.java
+++ b/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/SimpleWorkflowInterpreter.java
@@ -123,7 +123,7 @@ class SimpleWorkflowInterpreter{
sb.append("=");
sb.append(workflowInputNode.getInputObject().getValue());
}
- throw new AiravataException("No workflow application node in ready state to run with experiment inputs" + sb.toString());
+ throw new AiravataException("No workflow application node is in ready state to run with experiment inputs" + sb.toString());
}
processReadyList();
}
@@ -136,7 +136,7 @@ class SimpleWorkflowInterpreter{
*/
void processReadyList() throws RegistryException, AiravataException {
if (readyList.isEmpty() && processingQueue.isEmpty() && !waitingList.isEmpty()) {
- throw new AiravataException("No workflow application node in ready state to run");
+ throw new AiravataException("No workflow application node is in ready state to run");
}
for (WorkflowNode readyNode : readyList.values()) {
if (readyNode instanceof WorkflowOutputNode) {
[04/50] [abbrv] airavata git commit: Reorganizing duplicate generated
classed and instead using the stubs artifact - AIRAVATA-1621
Posted by sh...@apache.org.
Reorganizing duplicate generated classed and instead using the stubs artifact - AIRAVATA-1621
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/b25e0a5d
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/b25e0a5d
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/b25e0a5d
Branch: refs/heads/new-workflow-design
Commit: b25e0a5db9d137731a2bd0f9a7c2ed1368e6f0e7
Parents: 58c58cf
Author: Suresh Marru <sm...@apache.org>
Authored: Thu Mar 5 23:29:26 2015 -0500
Committer: Suresh Marru <sm...@apache.org>
Committed: Thu Mar 5 23:29:26 2015 -0500
----------------------------------------------------------------------
.../apache/airavata/common/utils/Constants.java | 4 +-
.../credential-store-service/pom.xml | 268 +-
.../credential/store/client/TestSSLClient.java | 8 +-
.../store/cpi/CredentialStoreService.java | 6888 ------------------
.../store/cpi/cs_cpi_serviceConstants.java | 55 -
.../store/datamodel/CertificateCredential.java | 1104 ---
.../store/datamodel/CommunityUser.java | 589 --
.../store/datamodel/PasswordCredential.java | 698 --
.../store/datamodel/SSHCredential.java | 998 ---
.../store/datamodel/csDataModelConstants.java | 55 -
.../exception/CredentialStoreException.java | 397 -
.../store/server/CredentialStoreServer.java | 4 +-
.../server/CredentialStoreServerHandler.java | 10 +-
13 files changed, 150 insertions(+), 10928 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/b25e0a5d/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/Constants.java
----------------------------------------------------------------------
diff --git a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/Constants.java b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/Constants.java
index fd17064..154bea1 100644
--- a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/Constants.java
+++ b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/Constants.java
@@ -41,8 +41,8 @@ public final class Constants {
public static final String ORCHESTRATOR_SERVER_PORT = "orchestrator.server.port";
public static final String GFAC_SERVER_HOST = "gfac.server.host";
public static final String GFAC_SERVER_PORT = "gfac.server.port";
- public static final String CREDNETIAL_SERVER_HOST = "credential.store.server.host";
- public static final String CREDNETIAL_SERVER_PORT = "credential.store.server.port";
+ public static final String CREDENTIAL_SERVER_HOST = "credential.store.server.host";
+ public static final String CREDENTIAL_SERVER_PORT = "credential.store.server.port";
public static final String ZOOKEEPER_EXPERIMENT_CATALOG = "experiment-catalog";
public static final String ZOOKEEPER_APPCATALOG = "app-catalog";
public static final String ZOOKEEPER_RABBITMQ = "rabbit-mq";
http://git-wip-us.apache.org/repos/asf/airavata/blob/b25e0a5d/modules/credential-store/credential-store-service/pom.xml
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/pom.xml b/modules/credential-store/credential-store-service/pom.xml
index d8af25f..1595ed6 100644
--- a/modules/credential-store/credential-store-service/pom.xml
+++ b/modules/credential-store/credential-store-service/pom.xml
@@ -11,144 +11,150 @@
OF ANY ~ KIND, either express or implied. See the License for the specific
language governing permissions and limitations under the License. -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>org.apache.airavata</groupId>
- <artifactId>airavata</artifactId>
- <version>0.15-SNAPSHOT</version>
- <relativePath>../../../pom.xml</relativePath>
- </parent>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>airavata</artifactId>
+ <version>0.15-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>airavata-credential-store</artifactId>
- <name>Airavata Credential Store</name>
- <description>Module to manage credentials</description>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>airavata-credential-store</artifactId>
+ <name>Airavata Credential Store</name>
+ <description>Module to manage credentials</description>
- <dependencies>
- <dependency>
- <groupId>edu.uiuc.ncsa.myproxy</groupId>
- <artifactId>oa4mp-client-api</artifactId>
- <version>${oa4mp.version}</version>
- </dependency>
- <dependency>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>airavata-credential-store-stubs</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>edu.uiuc.ncsa.myproxy</groupId>
+ <artifactId>oa4mp-client-api</artifactId>
+ <version>${oa4mp.version}</version>
+ </dependency>
+ <dependency>
<groupId>edu.uiuc.ncsa.myproxy</groupId>
<artifactId>oa4mp-client-loader-oauth1</artifactId>
<version>${oa4mp.version}</version>
<exclusions>
- <exclusion>
- <groupId>net.oauth.core</groupId>
- <artifactId>oauth-httpclient4</artifactId>
- </exclusion>
- <exclusion>
- <groupId>net.oauth.core</groupId>
- <artifactId>oauth-consumer</artifactId>
- </exclusion>
- <exclusion>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- </exclusion>
- <exclusion>
- <groupId>postgresql</groupId>
- <artifactId>postgresql</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>net.oauth.core</groupId>
+ <artifactId>oauth-httpclient4</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>net.oauth.core</groupId>
+ <artifactId>oauth-consumer</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ </exclusion>
</exclusions>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.7</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <version>${derby.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derbyclient</artifactId>
- <version>${derby.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derbynet</artifactId>
- <version>${derby.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derbytools</artifactId>
- <version>${derby.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-dbcp</groupId>
- <artifactId>commons-dbcp</artifactId>
- <version>1.4</version>
- </dependency>
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>airavata-common-utils</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>com.jcraft</groupId>
- <artifactId>jsch</artifactId>
- <version>0.1.50</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-email</artifactId>
- <version>1.3.2</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-io</artifactId>
- <version>1.3.2</version>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>${surefire.version}</version>
- <inherited>true</inherited>
- <configuration>
- <systemPropertyVariables>
- <credential.module.directory>${basedir}</credential.module.directory>
- </systemPropertyVariables>
- <excludes>
- <exclude>**/DAOBaseTestCase.java</exclude>
- <exclude>**/MappingDAOTest.java</exclude>
- </excludes>
- <testSourceDirectory>${basedir}\src\test\java\</testSourceDirectory>
- </configuration>
- </plugin>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.7</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derby</artifactId>
+ <version>${derby.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derbyclient</artifactId>
+ <version>${derby.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derbynet</artifactId>
+ <version>${derby.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derbytools</artifactId>
+ <version>${derby.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-dbcp</groupId>
+ <artifactId>commons-dbcp</artifactId>
+ <version>1.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>airavata-common-utils</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.jcraft</groupId>
+ <artifactId>jsch</artifactId>
+ <version>0.1.50</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-email</artifactId>
+ <version>1.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.3.2</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${surefire.version}</version>
+ <inherited>true</inherited>
+ <configuration>
+ <systemPropertyVariables>
+ <credential.module.directory>${basedir}</credential.module.directory>
+ </systemPropertyVariables>
+ <excludes>
+ <exclude>**/DAOBaseTestCase.java</exclude>
+ <exclude>**/MappingDAOTest.java</exclude>
+ </excludes>
+ <testSourceDirectory>${basedir}\src\test\java\</testSourceDirectory>
+ </configuration>
+ </plugin>
- </plugins>
- <testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>
- <testOutputDirectory>${project.build.directory}/test-classes</testOutputDirectory>
- <testResources>
- <testResource>
- <directory>${project.basedir}/src/test/resources</directory>
- </testResource>
- </testResources>
- </build>
+ </plugins>
+ <testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>
+ <testOutputDirectory>${project.build.directory}/test-classes</testOutputDirectory>
+ <testResources>
+ <testResource>
+ <directory>${project.basedir}/src/test/resources</directory>
+ </testResource>
+ </testResources>
+ </build>
</project>
http://git-wip-us.apache.org/repos/asf/airavata/blob/b25e0a5d/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java
index 12105e2..cc5ebb6 100644
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java
+++ b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java
@@ -56,8 +56,8 @@ public class TestSSLClient {
String keystorePath = ServerSettings.getCredentialStoreThriftServerKeyStorePath();
String keystorePWD = ServerSettings.getCredentialStoreThriftServerKeyStorePassword();
params.setTrustStore(keystorePath, keystorePWD);
- final int serverPort = Integer.parseInt(ServerSettings.getSetting(Constants.CREDNETIAL_SERVER_PORT, "8960"));
- final String serverHost = ServerSettings.getSetting(Constants.CREDNETIAL_SERVER_HOST, null);
+ final int serverPort = Integer.parseInt(ServerSettings.getSetting(Constants.CREDENTIAL_SERVER_PORT, "8960"));
+ final String serverHost = ServerSettings.getSetting(Constants.CREDENTIAL_SERVER_HOST, null);
transport = TSSLTransportFactory.getClientSocket(serverHost, serverPort, 10000, params);
TProtocol protocol = new TBinaryProtocol(transport);
@@ -98,7 +98,7 @@ public class TestSSLClient {
certificateCredential.setCommunityUser(communityUser);
X509Certificate[] x509Certificates = new X509Certificate[1];
KeyStore ks = KeyStore.getInstance("JKS");
- File keyStoreFile = new File("/Users/chathuri/dev/airavata/credential-store/oa4mp/airavata.jks");
+ File keyStoreFile = new File("/Users/smarru/code/airavata-master/modules/configuration/server/src/main/resources/airavata.jks");
FileInputStream fis = new FileInputStream(keyStoreFile);
char[] password = "airavata".toCharArray();
ks.load(fis,password);
@@ -114,7 +114,7 @@ public class TestSSLClient {
System.out.println("Certificate Token :" + token);
CertificateCredential credential = client.getCertificateCredential(token, "testGateway");
System.out.println("certificate : " + credential.getX509Cert());
- System.out.println("gateway name : " + credential.getCommunityUser().getGatewayNmae());
+ System.out.println("gateway name : " + credential.getCommunityUser().getGatewayName());
}catch (TTransportException e) {
e.printStackTrace();
} catch (TException e) {
[44/50] [abbrv] airavata git commit: Missed a condition. AIRAVATA-1631
Posted by sh...@apache.org.
Missed a condition. AIRAVATA-1631
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/be1c6a0d
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/be1c6a0d
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/be1c6a0d
Branch: refs/heads/new-workflow-design
Commit: be1c6a0d07f1c0e4c21f7c082335703e1d940b3b
Parents: 5d7a034
Author: raminder <ra...@apache.org>
Authored: Mon Mar 16 14:38:26 2015 -0400
Committer: raminder <ra...@apache.org>
Committed: Mon Mar 16 14:38:26 2015 -0400
----------------------------------------------------------------------
.../java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/be1c6a0d/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
index 6b20118..cc8a899 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
@@ -395,9 +395,8 @@ public class BetterGfacImpl implements GFac,Watcher {
if(objectType.getLocation().startsWith(File.separator)){
filePath = objectType.getLocation() + File.separator + filePath;
}else{
- filePath = jobExecutionContext.getOutputDir() + File.separator + filePath;
+ filePath = jobExecutionContext.getOutputDir() + File.separator + objectType.getLocation()+ filePath;
}
- filePath = objectType.getLocation()+ filePath;
}
objectType.setValue(filePath);
[25/50] [abbrv] airavata git commit: fixing compilation isssue,
bug in getAvailableAppInterfaceComputeResources(), fixing AIRAVATA-1226,
AIRAVATA-1626
Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/56efa8e5/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
index 121db80..5a6df09 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.cpp
@@ -3049,6 +3049,251 @@ uint32_t Airavata_getProject_presult::read(::apache::thrift::protocol::TProtocol
return xfer;
}
+uint32_t Airavata_deleteProject_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+ bool isset_projectId = false;
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->projectId);
+ isset_projectId = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_projectId)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t Airavata_deleteProject_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("Airavata_deleteProject_args");
+
+ xfer += oprot->writeFieldBegin("projectId", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->projectId);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t Airavata_deleteProject_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("Airavata_deleteProject_pargs");
+
+ xfer += oprot->writeFieldBegin("projectId", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString((*(this->projectId)));
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t Airavata_deleteProject_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 0:
+ if (ftype == ::apache::thrift::protocol::T_BOOL) {
+ xfer += iprot->readBool(this->success);
+ this->__isset.success = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+ xfer += this->ire.read(iprot);
+ this->__isset.ire = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+ xfer += this->ace.read(iprot);
+ this->__isset.ace = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 3:
+ if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+ xfer += this->ase.read(iprot);
+ this->__isset.ase = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 4:
+ if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+ xfer += this->pnfe.read(iprot);
+ this->__isset.pnfe = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
+uint32_t Airavata_deleteProject_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+ uint32_t xfer = 0;
+
+ xfer += oprot->writeStructBegin("Airavata_deleteProject_result");
+
+ if (this->__isset.success) {
+ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0);
+ xfer += oprot->writeBool(this->success);
+ xfer += oprot->writeFieldEnd();
+ } else if (this->__isset.ire) {
+ xfer += oprot->writeFieldBegin("ire", ::apache::thrift::protocol::T_STRUCT, 1);
+ xfer += this->ire.write(oprot);
+ xfer += oprot->writeFieldEnd();
+ } else if (this->__isset.ace) {
+ xfer += oprot->writeFieldBegin("ace", ::apache::thrift::protocol::T_STRUCT, 2);
+ xfer += this->ace.write(oprot);
+ xfer += oprot->writeFieldEnd();
+ } else if (this->__isset.ase) {
+ xfer += oprot->writeFieldBegin("ase", ::apache::thrift::protocol::T_STRUCT, 3);
+ xfer += this->ase.write(oprot);
+ xfer += oprot->writeFieldEnd();
+ } else if (this->__isset.pnfe) {
+ xfer += oprot->writeFieldBegin("pnfe", ::apache::thrift::protocol::T_STRUCT, 4);
+ xfer += this->pnfe.write(oprot);
+ xfer += oprot->writeFieldEnd();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t Airavata_deleteProject_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 0:
+ if (ftype == ::apache::thrift::protocol::T_BOOL) {
+ xfer += iprot->readBool((*(this->success)));
+ this->__isset.success = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+ xfer += this->ire.read(iprot);
+ this->__isset.ire = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+ xfer += this->ace.read(iprot);
+ this->__isset.ace = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 3:
+ if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+ xfer += this->ase.read(iprot);
+ this->__isset.ase = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 4:
+ if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+ xfer += this->pnfe.read(iprot);
+ this->__isset.pnfe = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
uint32_t Airavata_getAllUserProjects_args::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
@@ -29080,6 +29325,76 @@ void AiravataClient::recv_getProject( ::apache::airavata::model::workspace::Proj
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getProject failed: unknown result");
}
+bool AiravataClient::deleteProject(const std::string& projectId)
+{
+ send_deleteProject(projectId);
+ return recv_deleteProject();
+}
+
+void AiravataClient::send_deleteProject(const std::string& projectId)
+{
+ int32_t cseqid = 0;
+ oprot_->writeMessageBegin("deleteProject", ::apache::thrift::protocol::T_CALL, cseqid);
+
+ Airavata_deleteProject_pargs args;
+ args.projectId = &projectId;
+ args.write(oprot_);
+
+ oprot_->writeMessageEnd();
+ oprot_->getTransport()->writeEnd();
+ oprot_->getTransport()->flush();
+}
+
+bool AiravataClient::recv_deleteProject()
+{
+
+ int32_t rseqid = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TMessageType mtype;
+
+ iprot_->readMessageBegin(fname, mtype, rseqid);
+ if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+ ::apache::thrift::TApplicationException x;
+ x.read(iprot_);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+ throw x;
+ }
+ if (mtype != ::apache::thrift::protocol::T_REPLY) {
+ iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+ }
+ if (fname.compare("deleteProject") != 0) {
+ iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+ }
+ bool _return;
+ Airavata_deleteProject_presult result;
+ result.success = &_return;
+ result.read(iprot_);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+
+ if (result.__isset.success) {
+ return _return;
+ }
+ if (result.__isset.ire) {
+ throw result.ire;
+ }
+ if (result.__isset.ace) {
+ throw result.ace;
+ }
+ if (result.__isset.ase) {
+ throw result.ase;
+ }
+ if (result.__isset.pnfe) {
+ throw result.pnfe;
+ }
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "deleteProject failed: unknown result");
+}
+
void AiravataClient::getAllUserProjects(std::vector< ::apache::airavata::model::workspace::Project> & _return, const std::string& gatewayId, const std::string& userName)
{
send_getAllUserProjects(gatewayId, userName);
@@ -36812,6 +37127,72 @@ void AiravataProcessor::process_getProject(int32_t seqid, ::apache::thrift::prot
}
}
+void AiravataProcessor::process_deleteProject(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+ void* ctx = NULL;
+ if (this->eventHandler_.get() != NULL) {
+ ctx = this->eventHandler_->getContext("Airavata.deleteProject", callContext);
+ }
+ ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Airavata.deleteProject");
+
+ if (this->eventHandler_.get() != NULL) {
+ this->eventHandler_->preRead(ctx, "Airavata.deleteProject");
+ }
+
+ Airavata_deleteProject_args args;
+ args.read(iprot);
+ iprot->readMessageEnd();
+ uint32_t bytes = iprot->getTransport()->readEnd();
+
+ if (this->eventHandler_.get() != NULL) {
+ this->eventHandler_->postRead(ctx, "Airavata.deleteProject", bytes);
+ }
+
+ Airavata_deleteProject_result result;
+ try {
+ result.success = iface_->deleteProject(args.projectId);
+ result.__isset.success = true;
+ } catch ( ::apache::airavata::api::error::InvalidRequestException &ire) {
+ result.ire = ire;
+ result.__isset.ire = true;
+ } catch ( ::apache::airavata::api::error::AiravataClientException &ace) {
+ result.ace = ace;
+ result.__isset.ace = true;
+ } catch ( ::apache::airavata::api::error::AiravataSystemException &ase) {
+ result.ase = ase;
+ result.__isset.ase = true;
+ } catch ( ::apache::airavata::api::error::ProjectNotFoundException &pnfe) {
+ result.pnfe = pnfe;
+ result.__isset.pnfe = true;
+ } catch (const std::exception& e) {
+ if (this->eventHandler_.get() != NULL) {
+ this->eventHandler_->handlerError(ctx, "Airavata.deleteProject");
+ }
+
+ ::apache::thrift::TApplicationException x(e.what());
+ oprot->writeMessageBegin("deleteProject", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+ x.write(oprot);
+ oprot->writeMessageEnd();
+ oprot->getTransport()->writeEnd();
+ oprot->getTransport()->flush();
+ return;
+ }
+
+ if (this->eventHandler_.get() != NULL) {
+ this->eventHandler_->preWrite(ctx, "Airavata.deleteProject");
+ }
+
+ oprot->writeMessageBegin("deleteProject", ::apache::thrift::protocol::T_REPLY, seqid);
+ result.write(oprot);
+ oprot->writeMessageEnd();
+ bytes = oprot->getTransport()->writeEnd();
+ oprot->getTransport()->flush();
+
+ if (this->eventHandler_.get() != NULL) {
+ this->eventHandler_->postWrite(ctx, "Airavata.deleteProject", bytes);
+ }
+}
+
void AiravataProcessor::process_getAllUserProjects(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
{
void* ctx = NULL;
http://git-wip-us.apache.org/repos/asf/airavata/blob/56efa8e5/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
index 4604bf8..78a7e9c 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata.h
@@ -45,6 +45,7 @@ class AiravataIf {
virtual void createProject(std::string& _return, const std::string& gatewayId, const ::apache::airavata::model::workspace::Project& project) = 0;
virtual void updateProject(const std::string& projectId, const ::apache::airavata::model::workspace::Project& updatedProject) = 0;
virtual void getProject( ::apache::airavata::model::workspace::Project& _return, const std::string& projectId) = 0;
+ virtual bool deleteProject(const std::string& projectId) = 0;
virtual void getAllUserProjects(std::vector< ::apache::airavata::model::workspace::Project> & _return, const std::string& gatewayId, const std::string& userName) = 0;
virtual void searchProjectsByProjectName(std::vector< ::apache::airavata::model::workspace::Project> & _return, const std::string& gatewayId, const std::string& userName, const std::string& projectName) = 0;
virtual void searchProjectsByProjectDesc(std::vector< ::apache::airavata::model::workspace::Project> & _return, const std::string& gatewayId, const std::string& userName, const std::string& description) = 0;
@@ -217,6 +218,10 @@ class AiravataNull : virtual public AiravataIf {
void getProject( ::apache::airavata::model::workspace::Project& /* _return */, const std::string& /* projectId */) {
return;
}
+ bool deleteProject(const std::string& /* projectId */) {
+ bool _return = false;
+ return _return;
+ }
void getAllUserProjects(std::vector< ::apache::airavata::model::workspace::Project> & /* _return */, const std::string& /* gatewayId */, const std::string& /* userName */) {
return;
}
@@ -2290,6 +2295,148 @@ class Airavata_getProject_presult {
};
+class Airavata_deleteProject_args {
+ public:
+
+ Airavata_deleteProject_args() : projectId() {
+ }
+
+ virtual ~Airavata_deleteProject_args() throw() {}
+
+ std::string projectId;
+
+ void __set_projectId(const std::string& val) {
+ projectId = val;
+ }
+
+ bool operator == (const Airavata_deleteProject_args & rhs) const
+ {
+ if (!(projectId == rhs.projectId))
+ return false;
+ return true;
+ }
+ bool operator != (const Airavata_deleteProject_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const Airavata_deleteProject_args & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class Airavata_deleteProject_pargs {
+ public:
+
+
+ virtual ~Airavata_deleteProject_pargs() throw() {}
+
+ const std::string* projectId;
+
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_deleteProject_result__isset {
+ _Airavata_deleteProject_result__isset() : success(false), ire(false), ace(false), ase(false), pnfe(false) {}
+ bool success;
+ bool ire;
+ bool ace;
+ bool ase;
+ bool pnfe;
+} _Airavata_deleteProject_result__isset;
+
+class Airavata_deleteProject_result {
+ public:
+
+ Airavata_deleteProject_result() : success(0) {
+ }
+
+ virtual ~Airavata_deleteProject_result() throw() {}
+
+ bool success;
+ ::apache::airavata::api::error::InvalidRequestException ire;
+ ::apache::airavata::api::error::AiravataClientException ace;
+ ::apache::airavata::api::error::AiravataSystemException ase;
+ ::apache::airavata::api::error::ProjectNotFoundException pnfe;
+
+ _Airavata_deleteProject_result__isset __isset;
+
+ void __set_success(const bool val) {
+ success = val;
+ }
+
+ void __set_ire(const ::apache::airavata::api::error::InvalidRequestException& val) {
+ ire = val;
+ }
+
+ void __set_ace(const ::apache::airavata::api::error::AiravataClientException& val) {
+ ace = val;
+ }
+
+ void __set_ase(const ::apache::airavata::api::error::AiravataSystemException& val) {
+ ase = val;
+ }
+
+ void __set_pnfe(const ::apache::airavata::api::error::ProjectNotFoundException& val) {
+ pnfe = val;
+ }
+
+ bool operator == (const Airavata_deleteProject_result & rhs) const
+ {
+ if (!(success == rhs.success))
+ return false;
+ if (!(ire == rhs.ire))
+ return false;
+ if (!(ace == rhs.ace))
+ return false;
+ if (!(ase == rhs.ase))
+ return false;
+ if (!(pnfe == rhs.pnfe))
+ return false;
+ return true;
+ }
+ bool operator != (const Airavata_deleteProject_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const Airavata_deleteProject_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _Airavata_deleteProject_presult__isset {
+ _Airavata_deleteProject_presult__isset() : success(false), ire(false), ace(false), ase(false), pnfe(false) {}
+ bool success;
+ bool ire;
+ bool ace;
+ bool ase;
+ bool pnfe;
+} _Airavata_deleteProject_presult__isset;
+
+class Airavata_deleteProject_presult {
+ public:
+
+
+ virtual ~Airavata_deleteProject_presult() throw() {}
+
+ bool* success;
+ ::apache::airavata::api::error::InvalidRequestException ire;
+ ::apache::airavata::api::error::AiravataClientException ace;
+ ::apache::airavata::api::error::AiravataSystemException ase;
+ ::apache::airavata::api::error::ProjectNotFoundException pnfe;
+
+ _Airavata_deleteProject_presult__isset __isset;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+
class Airavata_getAllUserProjects_args {
public:
@@ -16351,6 +16498,9 @@ class AiravataClient : virtual public AiravataIf {
void getProject( ::apache::airavata::model::workspace::Project& _return, const std::string& projectId);
void send_getProject(const std::string& projectId);
void recv_getProject( ::apache::airavata::model::workspace::Project& _return);
+ bool deleteProject(const std::string& projectId);
+ void send_deleteProject(const std::string& projectId);
+ bool recv_deleteProject();
void getAllUserProjects(std::vector< ::apache::airavata::model::workspace::Project> & _return, const std::string& gatewayId, const std::string& userName);
void send_getAllUserProjects(const std::string& gatewayId, const std::string& userName);
void recv_getAllUserProjects(std::vector< ::apache::airavata::model::workspace::Project> & _return);
@@ -16685,6 +16835,7 @@ class AiravataProcessor : public ::apache::thrift::TDispatchProcessor {
void process_createProject(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_updateProject(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_getProject(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ void process_deleteProject(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_getAllUserProjects(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_searchProjectsByProjectName(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_searchProjectsByProjectDesc(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
@@ -16803,6 +16954,7 @@ class AiravataProcessor : public ::apache::thrift::TDispatchProcessor {
processMap_["createProject"] = &AiravataProcessor::process_createProject;
processMap_["updateProject"] = &AiravataProcessor::process_updateProject;
processMap_["getProject"] = &AiravataProcessor::process_getProject;
+ processMap_["deleteProject"] = &AiravataProcessor::process_deleteProject;
processMap_["getAllUserProjects"] = &AiravataProcessor::process_getAllUserProjects;
processMap_["searchProjectsByProjectName"] = &AiravataProcessor::process_searchProjectsByProjectName;
processMap_["searchProjectsByProjectDesc"] = &AiravataProcessor::process_searchProjectsByProjectDesc;
@@ -17059,6 +17211,15 @@ class AiravataMultiface : virtual public AiravataIf {
return;
}
+ bool deleteProject(const std::string& projectId) {
+ size_t sz = ifaces_.size();
+ size_t i = 0;
+ for (; i < (sz - 1); ++i) {
+ ifaces_[i]->deleteProject(projectId);
+ }
+ return ifaces_[i]->deleteProject(projectId);
+ }
+
void getAllUserProjects(std::vector< ::apache::airavata::model::workspace::Project> & _return, const std::string& gatewayId, const std::string& userName) {
size_t sz = ifaces_.size();
size_t i = 0;
http://git-wip-us.apache.org/repos/asf/airavata/blob/56efa8e5/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
index 482119d..96b9e0f 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/Airavata_server.skeleton.cpp
@@ -104,6 +104,11 @@ class AiravataHandler : virtual public AiravataIf {
printf("getProject\n");
}
+ bool deleteProject(const std::string& projectId) {
+ // Your implementation goes here
+ printf("deleteProject\n");
+ }
+
void getAllUserProjects(std::vector< ::apache::airavata::model::workspace::Project> & _return, const std::string& gatewayId, const std::string& userName) {
// Your implementation goes here
printf("getAllUserProjects\n");
http://git-wip-us.apache.org/repos/asf/airavata/blob/56efa8e5/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
index 85bf7e6..0865706 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/API/Airavata.php
@@ -30,6 +30,7 @@ interface AiravataIf {
public function createProject($gatewayId, \Airavata\Model\Workspace\Project $project);
public function updateProject($projectId, \Airavata\Model\Workspace\Project $updatedProject);
public function getProject($projectId);
+ public function deleteProject($projectId);
public function getAllUserProjects($gatewayId, $userName);
public function searchProjectsByProjectName($gatewayId, $userName, $projectName);
public function searchProjectsByProjectDesc($gatewayId, $userName, $description);
@@ -927,6 +928,69 @@ class AiravataClient implements \Airavata\API\AiravataIf {
throw new \Exception("getProject failed: unknown result");
}
+ public function deleteProject($projectId)
+ {
+ $this->send_deleteProject($projectId);
+ return $this->recv_deleteProject();
+ }
+
+ public function send_deleteProject($projectId)
+ {
+ $args = new \Airavata\API\Airavata_deleteProject_args();
+ $args->projectId = $projectId;
+ $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'deleteProject', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('deleteProject', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_deleteProject()
+ {
+ $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_deleteProject_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new \Airavata\API\Airavata_deleteProject_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->ire !== null) {
+ throw $result->ire;
+ }
+ if ($result->ace !== null) {
+ throw $result->ace;
+ }
+ if ($result->ase !== null) {
+ throw $result->ase;
+ }
+ if ($result->pnfe !== null) {
+ throw $result->pnfe;
+ }
+ throw new \Exception("deleteProject failed: unknown result");
+ }
+
public function getAllUserProjects($gatewayId, $userName)
{
$this->send_getAllUserProjects($gatewayId, $userName);
@@ -9983,6 +10047,238 @@ class Airavata_getProject_result {
}
+class Airavata_deleteProject_args {
+ static $_TSPEC;
+
+ public $projectId = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'projectId',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['projectId'])) {
+ $this->projectId = $vals['projectId'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Airavata_deleteProject_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->projectId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('Airavata_deleteProject_args');
+ if ($this->projectId !== null) {
+ $xfer += $output->writeFieldBegin('projectId', TType::STRING, 1);
+ $xfer += $output->writeString($this->projectId);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class Airavata_deleteProject_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $ire = null;
+ public $ace = null;
+ public $ase = null;
+ public $pnfe = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::BOOL,
+ ),
+ 1 => array(
+ 'var' => 'ire',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\InvalidRequestException',
+ ),
+ 2 => array(
+ 'var' => 'ace',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\AiravataClientException',
+ ),
+ 3 => array(
+ 'var' => 'ase',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\AiravataSystemException',
+ ),
+ 4 => array(
+ 'var' => 'pnfe',
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\API\Error\ProjectNotFoundException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['ire'])) {
+ $this->ire = $vals['ire'];
+ }
+ if (isset($vals['ace'])) {
+ $this->ace = $vals['ace'];
+ }
+ if (isset($vals['ase'])) {
+ $this->ase = $vals['ase'];
+ }
+ if (isset($vals['pnfe'])) {
+ $this->pnfe = $vals['pnfe'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Airavata_deleteProject_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->success);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->ire = new \Airavata\API\Error\InvalidRequestException();
+ $xfer += $this->ire->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->ace = new \Airavata\API\Error\AiravataClientException();
+ $xfer += $this->ace->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRUCT) {
+ $this->ase = new \Airavata\API\Error\AiravataSystemException();
+ $xfer += $this->ase->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::STRUCT) {
+ $this->pnfe = new \Airavata\API\Error\ProjectNotFoundException();
+ $xfer += $this->pnfe->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('Airavata_deleteProject_result');
+ if ($this->success !== null) {
+ $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+ $xfer += $output->writeBool($this->success);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ire !== null) {
+ $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+ $xfer += $this->ire->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ace !== null) {
+ $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+ $xfer += $this->ace->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ase !== null) {
+ $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+ $xfer += $this->ase->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->pnfe !== null) {
+ $xfer += $output->writeFieldBegin('pnfe', TType::STRUCT, 4);
+ $xfer += $this->pnfe->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
class Airavata_getAllUserProjects_args {
static $_TSPEC;
http://git-wip-us.apache.org/repos/asf/airavata/blob/56efa8e5/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
index 3d58197..6110f53 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
@@ -61,7 +61,7 @@ public class CreateLaunchExperiment {
private static String echoAppId = "Echo_8506337e-ab7a-46b6-9b71-4a461b6c5e35";
private static String mpiAppId = "HelloMPI_720e159f-198f-4daa-96ca-9f5eafee92c9";
private static String wrfAppId = "WRF_7ad5da38-c08b-417c-a9ea-da9298839762";
- private static String amberAppId = "Amber_a56d457c-f239-4c0b-ba00-66bda936f7bc";
+ private static String amberAppId = "Amber_aa083c86-4680-4002-b3ef-fad93c181926";
private static String gromacsAppId = "GROMACS_05622038-9edd-4cb1-824e-0b7cb993364b";
private static String espressoAppId = "ESPRESSO_10cc2820-5d0b-4c63-9546-8a8b595593c1";
private static String lammpsAppId = "LAMMPS_10893eb5-3840-438c-8446-d26c7ecb001f";
@@ -85,15 +85,36 @@ public class CreateLaunchExperiment {
public static void main(String[] args) throws Exception {
airavataClient = AiravataClientFactory.createAiravataClient(THRIFT_SERVER_HOST, THRIFT_SERVER_PORT);
System.out.println("API version is " + airavataClient.getAPIVersion());
+ getAvailableAppInterfaceComputeResources("Echo_4fb76cb3-6bf6-409e-aa17-7cc7ee6e41af");
// createGateway();
// getGateway("testGatewayId");
-// registerApplications(); // run this only the first time
- createAndLaunchExp();
+// registerApplications(); // run this only the first time
+// createAndLaunchExp();
}
private static String fsdResourceId;
+ public static void getAvailableAppInterfaceComputeResources(String appInterfaceId) {
+ try {
+ Map<String, String> availableAppInterfaceComputeResources = airavataClient.getAvailableAppInterfaceComputeResources(appInterfaceId);
+ for (String key : availableAppInterfaceComputeResources.keySet()){
+ System.out.println("id : " + key);
+ System.out.println("name : " + availableAppInterfaceComputeResources.get(key));
+ }
+ } catch (AiravataSystemException e) {
+ e.printStackTrace();
+ } catch (InvalidRequestException e) {
+ e.printStackTrace();
+ } catch (AiravataClientException e) {
+ e.printStackTrace();
+ } catch (TException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+
public static void createGateway(){
try {
Gateway gateway = new Gateway();
@@ -154,14 +175,14 @@ public class CreateLaunchExperiment {
// final String expId = createExperimentForBR2Amber(airavataClient);
// final String expId = createExperimentWRFStampede(airavataClient);
// final String expId = createExperimentForStampedeAmber(airavataClient);
-// final String expId = createExperimentForTrestlesAmber(airavataClient);
+ final String expId = createExperimentForTrestlesAmber(airavataClient);
// final String expId = createExperimentGROMACSStampede(airavataClient);
// final String expId = createExperimentESPRESSOStampede(airavataClient);
// final String expId = createExperimentLAMMPSStampede(airavataClient);
// final String expId = createExperimentNWCHEMStampede(airavataClient);
// final String expId = createExperimentTRINITYStampede(airavataClient);
// final String expId = createExperimentAUTODOCKStampede(airavataClient); // this is not working , we need to register AutoDock app on stampede
- final String expId = createExperimentForLSF(airavataClient);
+// final String expId = createExperimentForLSF(airavataClient);
// final String expId = "Ultrascan_ln_eb029947-391a-4ccf-8ace-9bafebe07cc0";
System.out.println("Experiment ID : " + expId);
// updateExperiment(airavata, expId);
http://git-wip-us.apache.org/repos/asf/airavata/blob/56efa8e5/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/AuthenticationMode.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/AuthenticationMode.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/AuthenticationMode.java
new file mode 100644
index 0000000..762d031
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/AuthenticationMode.java
@@ -0,0 +1,70 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.appcatalog.computeresource;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+/**
+ * AuthenticationMode
+ *
+ * SERVER_ISSUED: use CA credentials to generate a certificate based on user name.
+ * server properties.
+ * MYPROXY_ISSUED: rely on GSI method implementation already provided
+ * by Airavata security libs.
+ */
+@SuppressWarnings("all") public enum AuthenticationMode implements org.apache.thrift.TEnum {
+ SERVER_ISSUED(0),
+ MYPROXY_ISSUED(1);
+
+ private final int value;
+
+ private AuthenticationMode(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static AuthenticationMode findByValue(int value) {
+ switch (value) {
+ case 0:
+ return SERVER_ISSUED;
+ case 1:
+ return MYPROXY_ISSUED;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/56efa8e5/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
index 95a91e6..b12c3b8 100644
--- a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
+++ b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
@@ -176,6 +176,12 @@ service Airavata {
3: airavataErrors.AiravataSystemException ase,
4: airavataErrors.ProjectNotFoundException pnfe)
+ bool deleteProject (1: required string projectId)
+ throws (1: airavataErrors.InvalidRequestException ire,
+ 2: airavataErrors.AiravataClientException ace,
+ 3: airavataErrors.AiravataSystemException ase,
+ 4: airavataErrors.ProjectNotFoundException pnfe)
+
/**
* Get all Project by user
*
[32/50] [abbrv] airavata git commit: fixing LSF issues
Posted by sh...@apache.org.
fixing LSF issues
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/13b480d8
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/13b480d8
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/13b480d8
Branch: refs/heads/new-workflow-design
Commit: 13b480d84cdfcaf110536688309834122db8917e
Parents: c2bacf2 10c5abf
Author: Lahiru Gunathilake <gl...@gmail.com>
Authored: Wed Mar 11 16:21:50 2015 -0400
Committer: Lahiru Gunathilake <gl...@gmail.com>
Committed: Wed Mar 11 16:21:50 2015 -0400
----------------------------------------------------------------------
.../server/handler/AiravataServerHandler.java | 34 +-
.../java/org/apache/airavata/api/Airavata.java | 5264 +++++++++++-------
.../main/resources/lib/airavata/Airavata.cpp | 381 ++
.../src/main/resources/lib/airavata/Airavata.h | 161 +
.../lib/airavata/Airavata_server.skeleton.cpp | 5 +
.../lib/airavata/computeResourceModel_types.cpp | 203 +-
.../lib/airavata/computeResourceModel_types.h | 38 +-
.../resources/lib/Airavata/API/Airavata.php | 296 +
.../Model/AppCatalog/ComputeResource/Types.php | 49 +
.../client/samples/CreateLaunchExperiment.java | 584 +-
.../tools/RegisterSampleApplications.java | 158 +-
.../computeresource/AuthenticationMode.java | 70 +
.../computeresource/UnicoreJobSubmission.java | 222 +-
.../airavataAPI.thrift | 6 +
.../computeResourceModel.thrift | 25 +-
.../catalog/data/impl/ComputeResourceImpl.java | 1 +
.../data/model/UnicoreJobSubmission.java | 16 +-
.../data/resources/AbstractResource.java | 1 +
.../resources/UnicoreJobSubmissionResource.java | 39 +-
.../catalog/data/util/AppCatalogJPAUtils.java | 1 +
.../data/util/AppCatalogThriftConversion.java | 3 +-
.../src/main/resources/appcatalog-derby.sql | 1 +
.../src/main/resources/appcatalog-mysql.sql | 1 +
.../registry/jpa/impl/ExperimentRegistry.java | 3 +
24 files changed, 5039 insertions(+), 2523 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/13b480d8/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------
diff --cc airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
index b5a5bcc,bb914fa..ed141b9
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
@@@ -58,13 -58,13 +58,13 @@@ public class CreateLaunchExperiment
private static final String DEFAULT_GATEWAY = "php_reference_gateway";
private static Airavata.Client airavataClient;
- private static String echoAppId = "Echo_8506337e-ab7a-46b6-9b71-4a461b6c5e35";
+ private static String echoAppId = "Echo_61988d1f-7ca9-47ba-9212-a0ac2e973cf1";
private static String mpiAppId = "HelloMPI_720e159f-198f-4daa-96ca-9f5eafee92c9";
private static String wrfAppId = "WRF_7ad5da38-c08b-417c-a9ea-da9298839762";
- private static String amberAppId = "Amber_a56d457c-f239-4c0b-ba00-66bda936f7bc";
+ private static String amberAppId = "Amber_aa083c86-4680-4002-b3ef-fad93c181926";
private static String gromacsAppId = "GROMACS_05622038-9edd-4cb1-824e-0b7cb993364b";
private static String espressoAppId = "ESPRESSO_10cc2820-5d0b-4c63-9546-8a8b595593c1";
- private static String lammpsAppId = "LAMMPS_10893eb5-3840-438c-8446-d26c7ecb001f";
+ private static String lammpsAppId = "LAMMPS_2472685b-8acf-497e-aafe-cc66fe5f4cb6";
private static String nwchemAppId = "NWChem_2c8fee64-acf9-4a89-b6d3-91eb53c7640c";
private static String trinityAppId = "Trinity_e894acf5-9bca-46e8-a1bd-7e2d5155191a";
private static String autodockAppId = "AutoDock_43d9fdd0-c404-49f4-b913-3abf9080a8c9";
@@@ -162,7 -183,6 +183,7 @@@
// final String expId = createExperimentTRINITYStampede(airavataClient);
// final String expId = createExperimentAUTODOCKStampede(airavataClient); // this is not working , we need to register AutoDock app on stampede
// final String expId = createExperimentForLSF(airavataClient);
- final String expId = createExperimentLAMMPSForLSF(airavataClient);
++// final String expId = createExperimentLAMMPSForLSF(airavataClient);
// final String expId = "Ultrascan_ln_eb029947-391a-4ccf-8ace-9bafebe07cc0";
System.out.println("Experiment ID : " + expId);
// updateExperiment(airavata, expId);
@@@ -1356,8 -1112,9 +1113,7 @@@
for (InputDataObjectType inputDataObjectType : exInputs) {
inputDataObjectType.setValue("Hello World");
}
-
List<OutputDataObjectType> exOut = client.getApplicationOutputs(echoAppId);
-
-
Project project = ProjectModelUtil.createProject("default", "lg11w", "test project");
String projectId = client.createProject(DEFAULT_GATEWAY, project);
http://git-wip-us.apache.org/repos/asf/airavata/blob/13b480d8/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
----------------------------------------------------------------------
[26/50] [abbrv] airavata git commit: fixing compilation isssue,
bug in getAvailableAppInterfaceComputeResources(), fixing AIRAVATA-1226,
AIRAVATA-1626
Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/56efa8e5/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 f893bb6..ff7d330 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
@@ -128,6 +128,8 @@ import org.slf4j.LoggerFactory;
*/
public org.apache.airavata.model.workspace.Project getProject(String projectId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.ProjectNotFoundException, org.apache.thrift.TException;
+ public boolean deleteProject(String projectId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.ProjectNotFoundException, org.apache.thrift.TException;
+
/**
* * Get all Project by user
* *
@@ -1527,6 +1529,8 @@ import org.slf4j.LoggerFactory;
public void getProject(String projectId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void deleteProject(String projectId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
public void getAllUserProjects(String gatewayId, String userName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void searchProjectsByProjectName(String gatewayId, String userName, String projectName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -2171,6 +2175,41 @@ import org.slf4j.LoggerFactory;
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getProject failed: unknown result");
}
+ public boolean deleteProject(String projectId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.ProjectNotFoundException, org.apache.thrift.TException
+ {
+ send_deleteProject(projectId);
+ return recv_deleteProject();
+ }
+
+ public void send_deleteProject(String projectId) throws org.apache.thrift.TException
+ {
+ deleteProject_args args = new deleteProject_args();
+ args.setProjectId(projectId);
+ sendBase("deleteProject", args);
+ }
+
+ public boolean recv_deleteProject() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.ProjectNotFoundException, org.apache.thrift.TException
+ {
+ deleteProject_result result = new deleteProject_result();
+ receiveBase(result, "deleteProject");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.ire != null) {
+ throw result.ire;
+ }
+ if (result.ace != null) {
+ throw result.ace;
+ }
+ if (result.ase != null) {
+ throw result.ase;
+ }
+ if (result.pnfe != null) {
+ throw result.pnfe;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteProject failed: unknown result");
+ }
+
public List<org.apache.airavata.model.workspace.Project> getAllUserProjects(String gatewayId, String userName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
{
send_getAllUserProjects(gatewayId, userName);
@@ -5945,6 +5984,38 @@ import org.slf4j.LoggerFactory;
}
}
+ public void deleteProject(String projectId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ deleteProject_call method_call = new deleteProject_call(projectId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class deleteProject_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String projectId;
+ public deleteProject_call(String projectId, 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.projectId = projectId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteProject", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ deleteProject_args args = new deleteProject_args();
+ args.setProjectId(projectId);
+ 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.ProjectNotFoundException, 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_deleteProject();
+ }
+ }
+
public void getAllUserProjects(String gatewayId, String userName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
getAllUserProjects_call method_call = new getAllUserProjects_call(gatewayId, userName, resultHandler, this, ___protocolFactory, ___transport);
@@ -9436,6 +9507,7 @@ import org.slf4j.LoggerFactory;
processMap.put("createProject", new createProject());
processMap.put("updateProject", new updateProject());
processMap.put("getProject", new getProject());
+ processMap.put("deleteProject", new deleteProject());
processMap.put("getAllUserProjects", new getAllUserProjects());
processMap.put("searchProjectsByProjectName", new searchProjectsByProjectName());
processMap.put("searchProjectsByProjectDesc", new searchProjectsByProjectDesc());
@@ -9911,6 +9983,37 @@ import org.slf4j.LoggerFactory;
}
}
+ public static class deleteProject<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteProject_args> {
+ public deleteProject() {
+ super("deleteProject");
+ }
+
+ public deleteProject_args getEmptyArgsInstance() {
+ return new deleteProject_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public deleteProject_result getResult(I iface, deleteProject_args args) throws org.apache.thrift.TException {
+ deleteProject_result result = new deleteProject_result();
+ try {
+ result.success = iface.deleteProject(args.projectId);
+ result.setSuccessIsSet(true);
+ } catch (org.apache.airavata.model.error.InvalidRequestException ire) {
+ result.ire = ire;
+ } catch (org.apache.airavata.model.error.AiravataClientException ace) {
+ result.ace = ace;
+ } catch (org.apache.airavata.model.error.AiravataSystemException ase) {
+ result.ase = ase;
+ } catch (org.apache.airavata.model.error.ProjectNotFoundException pnfe) {
+ result.pnfe = pnfe;
+ }
+ return result;
+ }
+ }
+
public static class getAllUserProjects<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllUserProjects_args> {
public getAllUserProjects() {
super("getAllUserProjects");
@@ -12837,6 +12940,7 @@ import org.slf4j.LoggerFactory;
processMap.put("createProject", new createProject());
processMap.put("updateProject", new updateProject());
processMap.put("getProject", new getProject());
+ processMap.put("deleteProject", new deleteProject());
processMap.put("getAllUserProjects", new getAllUserProjects());
processMap.put("searchProjectsByProjectName", new searchProjectsByProjectName());
processMap.put("searchProjectsByProjectDesc", new searchProjectsByProjectDesc());
@@ -13823,6 +13927,79 @@ import org.slf4j.LoggerFactory;
}
}
+ public static class deleteProject<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteProject_args, Boolean> {
+ public deleteProject() {
+ super("deleteProject");
+ }
+
+ public deleteProject_args getEmptyArgsInstance() {
+ return new deleteProject_args();
+ }
+
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ deleteProject_result result = new deleteProject_result();
+ result.success = o;
+ result.setSuccessIsSet(true);
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ deleteProject_result result = new deleteProject_result();
+ if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
+ result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
+ result.setIreIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
+ result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
+ result.setAceIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
+ result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
+ result.setAseIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof org.apache.airavata.model.error.ProjectNotFoundException) {
+ result.pnfe = (org.apache.airavata.model.error.ProjectNotFoundException) e;
+ result.setPnfeIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, deleteProject_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.deleteProject(args.projectId,resultHandler);
+ }
+ }
+
public static class getAllUserProjects<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserProjects_args, List<org.apache.airavata.model.workspace.Project>> {
public getAllUserProjects() {
super("getAllUserProjects");
@@ -20792,33 +20969,993 @@ import org.slf4j.LoggerFactory;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_args.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_args.class, metaDataMap);
+ }
+
+ public getAPIVersion_args() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getAPIVersion_args(getAPIVersion_args other) {
+ }
+
+ public getAPIVersion_args deepCopy() {
+ return new getAPIVersion_args(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getAPIVersion_args)
+ return this.equals((getAPIVersion_args)that);
+ return false;
+ }
+
+ public boolean equals(getAPIVersion_args that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getAPIVersion_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getAPIVersion_args(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ 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 getAPIVersion_argsStandardSchemeFactory implements SchemeFactory {
+ public getAPIVersion_argsStandardScheme getScheme() {
+ return new getAPIVersion_argsStandardScheme();
+ }
+ }
+
+ private static class getAPIVersion_argsStandardScheme extends StandardScheme<getAPIVersion_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getAPIVersion_argsTupleSchemeFactory implements SchemeFactory {
+ public getAPIVersion_argsTupleScheme getScheme() {
+ return new getAPIVersion_argsTupleScheme();
+ }
+ }
+
+ private static class getAPIVersion_argsTupleScheme extends TupleScheme<getAPIVersion_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
+ }
+
+ public static class getAPIVersion_result implements org.apache.thrift.TBase<getAPIVersion_result, getAPIVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (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);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getAPIVersion_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getAPIVersion_resultTupleSchemeFactory());
+ }
+
+ public String 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
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success"),
+ IRE((short)1, "ire"),
+ ACE((short)2, "ace"),
+ ASE((short)3, "ase");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // IRE
+ return IRE;
+ case 2: // ACE
+ return ACE;
+ case 3: // ASE
+ return ASE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ 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.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ 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,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ tmpMap.put(_Fields.ASE, new org.apache.thrift.meta_data.FieldMetaData("ase", 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(getAPIVersion_result.class, metaDataMap);
+ }
+
+ public getAPIVersion_result() {
+ }
+
+ public getAPIVersion_result(
+ String success,
+ org.apache.airavata.model.error.InvalidRequestException ire,
+ org.apache.airavata.model.error.AiravataClientException ace,
+ org.apache.airavata.model.error.AiravataSystemException ase)
+ {
+ this();
+ this.success = success;
+ this.ire = ire;
+ this.ace = ace;
+ this.ase = ase;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getAPIVersion_result(getAPIVersion_result other) {
+ if (other.isSetSuccess()) {
+ this.success = other.success;
+ }
+ if (other.isSetIre()) {
+ this.ire = new org.apache.airavata.model.error.InvalidRequestException(other.ire);
+ }
+ if (other.isSetAce()) {
+ this.ace = new org.apache.airavata.model.error.AiravataClientException(other.ace);
+ }
+ if (other.isSetAse()) {
+ this.ase = new org.apache.airavata.model.error.AiravataSystemException(other.ase);
+ }
+ }
+
+ public getAPIVersion_result deepCopy() {
+ return new getAPIVersion_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.ire = null;
+ this.ace = null;
+ this.ase = null;
+ }
+
+ public String getSuccess() {
+ return this.success;
+ }
+
+ public getAPIVersion_result setSuccess(String success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public org.apache.airavata.model.error.InvalidRequestException getIre() {
+ return this.ire;
+ }
+
+ public getAPIVersion_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) {
+ this.ire = ire;
+ return this;
+ }
+
+ public void unsetIre() {
+ this.ire = null;
+ }
+
+ /** Returns true if field ire is set (has been assigned a value) and false otherwise */
+ public boolean isSetIre() {
+ return this.ire != null;
+ }
+
+ public void setIreIsSet(boolean value) {
+ if (!value) {
+ this.ire = null;
+ }
+ }
+
+ public org.apache.airavata.model.error.AiravataClientException getAce() {
+ return this.ace;
+ }
+
+ public getAPIVersion_result setAce(org.apache.airavata.model.error.AiravataClientException ace) {
+ this.ace = ace;
+ return this;
+ }
+
+ public void unsetAce() {
+ this.ace = null;
+ }
+
+ /** Returns true if field ace is set (has been assigned a value) and false otherwise */
+ public boolean isSetAce() {
+ return this.ace != null;
+ }
+
+ public void setAceIsSet(boolean value) {
+ if (!value) {
+ this.ace = null;
+ }
+ }
+
+ public org.apache.airavata.model.error.AiravataSystemException getAse() {
+ return this.ase;
+ }
+
+ public getAPIVersion_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) {
+ this.ase = ase;
+ return this;
+ }
+
+ public void unsetAse() {
+ this.ase = null;
+ }
+
+ /** Returns true if field ase is set (has been assigned a value) and false otherwise */
+ public boolean isSetAse() {
+ return this.ase != null;
+ }
+
+ public void setAseIsSet(boolean value) {
+ if (!value) {
+ this.ase = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((String)value);
+ }
+ break;
+
+ case IRE:
+ if (value == null) {
+ unsetIre();
+ } else {
+ setIre((org.apache.airavata.model.error.InvalidRequestException)value);
+ }
+ break;
+
+ case ACE:
+ if (value == null) {
+ unsetAce();
+ } else {
+ setAce((org.apache.airavata.model.error.AiravataClientException)value);
+ }
+ break;
+
+ case ASE:
+ if (value == null) {
+ unsetAse();
+ } else {
+ setAse((org.apache.airavata.model.error.AiravataSystemException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case IRE:
+ return getIre();
+
+ case ACE:
+ return getAce();
+
+ case ASE:
+ return getAse();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case IRE:
+ return isSetIre();
+ case ACE:
+ return isSetAce();
+ case ASE:
+ return isSetAse();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getAPIVersion_result)
+ return this.equals((getAPIVersion_result)that);
+ return false;
+ }
+
+ public boolean equals(getAPIVersion_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ boolean this_present_ire = true && this.isSetIre();
+ boolean that_present_ire = true && that.isSetIre();
+ if (this_present_ire || that_present_ire) {
+ if (!(this_present_ire && that_present_ire))
+ return false;
+ if (!this.ire.equals(that.ire))
+ return false;
+ }
+
+ boolean this_present_ace = true && this.isSetAce();
+ boolean that_present_ace = true && that.isSetAce();
+ if (this_present_ace || that_present_ace) {
+ if (!(this_present_ace && that_present_ace))
+ return false;
+ if (!this.ace.equals(that.ace))
+ return false;
+ }
+
+ boolean this_present_ase = true && this.isSetAse();
+ boolean that_present_ase = true && that.isSetAse();
+ if (this_present_ase || that_present_ase) {
+ if (!(this_present_ase && that_present_ase))
+ return false;
+ if (!this.ase.equals(that.ase))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getAPIVersion_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIre()).compareTo(other.isSetIre());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIre()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ire, other.ire);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAce()).compareTo(other.isSetAce());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAce()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ace, other.ace);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAse()).compareTo(other.isSetAse());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAse()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ase, other.ase);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getAPIVersion_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("ire:");
+ if (this.ire == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ire);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("ace:");
+ if (this.ace == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ace);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("ase:");
+ if (this.ase == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ase);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ 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 getAPIVersion_resultStandardSchemeFactory implements SchemeFactory {
+ public getAPIVersion_resultStandardScheme getScheme() {
+ return new getAPIVersion_resultStandardScheme();
+ }
+ }
+
+ private static class getAPIVersion_resultStandardScheme extends StandardScheme<getAPIVersion_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.success = iprot.readString();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // IRE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.ire = new org.apache.airavata.model.error.InvalidRequestException();
+ struct.ire.read(iprot);
+ struct.setIreIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // ACE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.ace = new org.apache.airavata.model.error.AiravataClientException();
+ struct.ace.read(iprot);
+ struct.setAceIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // ASE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.ase = new org.apache.airavata.model.error.AiravataSystemException();
+ struct.ase.read(iprot);
+ struct.setAseIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeString(struct.success);
+ oprot.writeFieldEnd();
+ }
+ if (struct.ire != null) {
+ oprot.writeFieldBegin(IRE_FIELD_DESC);
+ struct.ire.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.ace != null) {
+ oprot.writeFieldBegin(ACE_FIELD_DESC);
+ struct.ace.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.ase != null) {
+ oprot.writeFieldBegin(ASE_FIELD_DESC);
+ struct.ase.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getAPIVersion_resultTupleSchemeFactory implements SchemeFactory {
+ public getAPIVersion_resultTupleScheme getScheme() {
+ return new getAPIVersion_resultTupleScheme();
+ }
+ }
+
+ private static class getAPIVersion_resultTupleScheme extends TupleScheme<getAPIVersion_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetIre()) {
+ optionals.set(1);
+ }
+ if (struct.isSetAce()) {
+ optionals.set(2);
+ }
+ if (struct.isSetAse()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetSuccess()) {
+ oprot.writeString(struct.success);
+ }
+ if (struct.isSetIre()) {
+ struct.ire.write(oprot);
+ }
+ if (struct.isSetAce()) {
+ struct.ace.write(oprot);
+ }
+ if (struct.isSetAse()) {
+ struct.ase.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.success = iprot.readString();
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.ire = new org.apache.airavata.model.error.InvalidRequestException();
+ struct.ire.read(iprot);
+ struct.setIreIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.ace = new org.apache.airavata.model.error.AiravataClientException();
+ struct.ace.read(iprot);
+ struct.setAceIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.ase = new org.apache.airavata.model.error.AiravataSystemException();
+ struct.ase.read(iprot);
+ struct.setAseIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class addGateway_args implements org.apache.thrift.TBase<addGateway_args, addGateway_args._Fields>, java.io.Serializable, Cloneable, Comparable<addGateway_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addGateway_args");
+
+ private static final org.apache.thrift.protocol.TField GATEWAY_FIELD_DESC = new org.apache.thrift.protocol.TField("gateway", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new addGateway_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new addGateway_argsTupleSchemeFactory());
+ }
+
+ public org.apache.airavata.model.workspace.Gateway gateway; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ GATEWAY((short)1, "gateway");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // GATEWAY
+ return GATEWAY;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ 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.GATEWAY, new org.apache.thrift.meta_data.FieldMetaData("gateway", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.workspace.Gateway.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addGateway_args.class, metaDataMap);
}
- public getAPIVersion_args() {
+ public addGateway_args() {
+ }
+
+ public addGateway_args(
+ org.apache.airavata.model.workspace.Gateway gateway)
+ {
+ this();
+ this.gateway = gateway;
}
/**
* Performs a deep copy on <i>other</i>.
*/
- public getAPIVersion_args(getAPIVersion_args other) {
+ public addGateway_args(addGateway_args other) {
+ if (other.isSetGateway()) {
+ this.gateway = new org.apache.airavata.model.workspace.Gateway(other.gateway);
+ }
}
- public getAPIVersion_args deepCopy() {
- return new getAPIVersion_args(this);
+ public addGateway_args deepCopy() {
+ return new addGateway_args(this);
}
@Override
public void clear() {
+ this.gateway = null;
+ }
+
+ public org.apache.airavata.model.workspace.Gateway getGateway() {
+ return this.gateway;
+ }
+
+ public addGateway_args setGateway(org.apache.airavata.model.workspace.Gateway gateway) {
+ this.gateway = gateway;
+ return this;
+ }
+
+ public void unsetGateway() {
+ this.gateway = null;
+ }
+
+ /** Returns true if field gateway is set (has been assigned a value) and false otherwise */
+ public boolean isSetGateway() {
+ return this.gateway != null;
+ }
+
+ public void setGatewayIsSet(boolean value) {
+ if (!value) {
+ this.gateway = null;
+ }
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
+ case GATEWAY:
+ if (value == null) {
+ unsetGateway();
+ } else {
+ setGateway((org.apache.airavata.model.workspace.Gateway)value);
+ }
+ break;
+
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
+ case GATEWAY:
+ return getGateway();
+
}
throw new IllegalStateException();
}
@@ -20830,6 +21967,8 @@ import org.slf4j.LoggerFactory;
}
switch (field) {
+ case GATEWAY:
+ return isSetGateway();
}
throw new IllegalStateException();
}
@@ -20838,15 +21977,24 @@ import org.slf4j.LoggerFactory;
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof getAPIVersion_args)
- return this.equals((getAPIVersion_args)that);
+ if (that instanceof addGateway_args)
+ return this.equals((addGateway_args)that);
return false;
}
- public boolean equals(getAPIVersion_args that) {
+ public boolean equals(addGateway_args that) {
if (that == null)
return false;
+ boolean this_present_gateway = true && this.isSetGateway();
+ boolean that_present_gateway = true && that.isSetGateway();
+ if (this_present_gateway || that_present_gateway) {
+ if (!(this_present_gateway && that_present_gateway))
+ return false;
+ if (!this.gateway.equals(that.gateway))
+ return false;
+ }
+
return true;
}
@@ -20856,13 +22004,23 @@ import org.slf4j.LoggerFactory;
}
@Override
- public int compareTo(getAPIVersion_args other) {
+ public int compareTo(addGateway_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
+ lastComparison = Boolean.valueOf(isSetGateway()).compareTo(other.isSetGateway());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGateway()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gateway, other.gateway);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -20880,16 +22038,29 @@ import org.slf4j.LoggerFactory;
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("getAPIVersion_args(");
+ StringBuilder sb = new StringBuilder("addGateway_args(");
boolean first = true;
+ sb.append("gateway:");
+ if (this.gateway == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.gateway);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ if (gateway == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'gateway' was not present! Struct: " + toString());
+ }
// check for sub-struct validity
+ if (gateway != null) {
+ gateway.validate();
+ }
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -20908,15 +22079,15 @@ import org.slf4j.LoggerFactory;
}
}
- private static class getAPIVersion_argsStandardSchemeFactory implements SchemeFactory {
- public getAPIVersion_argsStandardScheme getScheme() {
- return new getAPIVersion_argsStandardScheme();
+ private static class addGateway_argsStandardSchemeFactory implements SchemeFactory {
+ public addGateway_argsStandardScheme getScheme() {
+ return new addGateway_argsStandardScheme();
}
}
- private static class getAPIVersion_argsStandardScheme extends StandardScheme<getAPIVersion_args> {
+ private static class addGateway_argsStandardScheme extends StandardScheme<addGateway_args> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, addGateway_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
@@ -20926,6 +22097,15 @@ import org.slf4j.LoggerFactory;
break;
}
switch (schemeField.id) {
+ case 1: // GATEWAY
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.gateway = new org.apache.airavata.model.workspace.Gateway();
+ struct.gateway.read(iprot);
+ struct.setGatewayIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -20937,39 +22117,48 @@ import org.slf4j.LoggerFactory;
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, addGateway_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.gateway != null) {
+ oprot.writeFieldBegin(GATEWAY_FIELD_DESC);
+ struct.gateway.write(oprot);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
- private static class getAPIVersion_argsTupleSchemeFactory implements SchemeFactory {
- public getAPIVersion_argsTupleScheme getScheme() {
- return new getAPIVersion_argsTupleScheme();
+ private static class addGateway_argsTupleSchemeFactory implements SchemeFactory {
+ public addGateway_argsTupleScheme getScheme() {
+ return new addGateway_argsTupleScheme();
}
}
- private static class getAPIVersion_argsTupleScheme extends TupleScheme<getAPIVersion_args> {
+ private static class addGateway_argsTupleScheme extends TupleScheme<addGateway_args> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, addGateway_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
+ struct.gateway.write(oprot);
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot, addGateway_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.gateway = new org.apache.airavata.model.workspace.Gateway();
+ struct.gateway.read(iprot);
+ struct.setGatewayIsSet(true);
}
}
}
- public static class getAPIVersion_result implements org.apache.thrift.TBase<getAPIVersion_result, getAPIVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_result");
+ public static class addGateway_result implements org.apache.thrift.TBase<addGateway_result, addGateway_result._Fields>, java.io.Serializable, Cloneable, Comparable<addGateway_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addGateway_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (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);
@@ -20978,8 +22167,8 @@ import org.slf4j.LoggerFactory;
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
- schemes.put(StandardScheme.class, new getAPIVersion_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getAPIVersion_resultTupleSchemeFactory());
+ schemes.put(StandardScheme.class, new addGateway_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new addGateway_resultTupleSchemeFactory());
}
public String success; // required
@@ -21067,13 +22256,13 @@ import org.slf4j.LoggerFactory;
tmpMap.put(_Fields.ASE, new org.apache.thrift.meta_data.FieldMetaData("ase", 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(getAPIVersion_result.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addGateway_result.class, metaDataMap);
}
- public getAPIVersion_result() {
+ public addGateway_result() {
}
- public getAPIVersion_result(
+ public addGateway_result(
String success,
org.apache.airavata.model.error.InvalidRequestException ire,
org.apache.airavata.model.error.AiravataClientException ace,
@@ -21089,7 +22278,7 @@ import org.slf4j.LoggerFactory;
/**
* Performs a deep copy on <i>other</i>.
*/
- public getAPIVersion_result(getAPIVersion_result other) {
+ public addGateway_result(addGateway_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
@@ -21104,8 +22293,8 @@ import org.slf4j.LoggerFactory;
}
}
- public getAPIVersion_result deepCopy() {
- return new getAPIVersion_result(this);
+ public addGateway_result deepCopy() {
+ return new addGateway_result(this);
}
@Override
@@ -21120,7 +22309,7 @@ import org.slf4j.LoggerFactory;
return this.success;
}
- public getAPIVersion_result setSuccess(String success) {
+ public addGateway_result setSuccess(String success) {
this.success = success;
return this;
}
@@ -21144,7 +22333,7 @@ import org.slf4j.LoggerFactory;
return this.ire;
}
- public getAPIVersion_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) {
+ public addGateway_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) {
this.ire = ire;
return this;
}
@@ -21168,7 +22357,7 @@ import org.slf4j.LoggerFactory;
return this.ace;
}
- public getAPIVersion_result setAce(org.apache.airavata.model.error.AiravataClientException ace) {
+ public addGateway_result setAce(org.apache.airavata.model.error.AiravataClientException ace) {
this.ace = ace;
return this;
}
@@ -21192,7 +22381,7 @@ import org.slf4j.LoggerFactory;
return this.ase;
}
- public getAPIVersion_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) {
+ public addGateway_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) {
this.ase = ase;
return this;
}
@@ -21290,12 +22479,12 @@ import org.slf4j.LoggerFactory;
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof getAPIVersion_result)
- return this.equals((getAPIVersion_result)that);
+ if (that instanceof addGateway_result)
+ return this.equals((addGateway_result)that);
return false;
}
- public boolean equals(getAPIVersion_result that) {
+ public boolean equals(addGateway_result that) {
if (that == null)
return false;
@@ -21344,7 +22533,7 @@ import org.slf4j.LoggerFactory;
}
@Override
- public int compareTo(getAPIVersion_result other) {
+ public int compareTo(addGateway_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
@@ -21408,7 +22597,7 @@ import org.slf4j.LoggerFactory;
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("getAPIVersion_result(");
+ StringBuilder sb = new StringBuilder("addGateway_result(");
boolean first = true;
sb.append("success:");
@@ -21467,15 +22656,15 @@ import org.slf4j.LoggerFactory;
}
}
- private static class getAPIVersion_resultStandardSchemeFactory implements SchemeFactory {
- public getAPIVersion_resultStandardScheme getScheme() {
- return new getAPIVersion_resultStandardScheme();
+ private static class addGateway_resultStandardSchemeFactory implements SchemeFactory {
+ public addGateway_resultStandardScheme getScheme() {
+ return new addGateway_resultStandardScheme();
}
}
- private static class getAPIVersion_resultStandardScheme extends StandardScheme<getAPIVersion_result> {
+ private static class addGateway_resultStandardScheme extends StandardScheme<addGateway_result> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, addGateway_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
@@ -21531,7 +22720,7 @@ import org.slf4j.LoggerFactory;
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, addGateway_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -21561,16 +22750,16 @@ import org.slf4j.LoggerFactory;
}
- private static class getAPIVersion_resultTupleSchemeFactory implements SchemeFactory {
- public getAPIVersion_resultTupleScheme getScheme() {
- return new getAPIVersion_resultTupleScheme();
+ private static class addGateway_resultTupleSchemeFactory implements SchemeFactory {
+ public addGateway_resultTupleScheme getScheme() {
+ return new addGateway_resultTupleScheme();
}
}
- private static class getAPIVersion_resultTupleScheme extends TupleScheme<getAPIVersion_result> {
+ private static class addGateway_resultTupleScheme extends TupleScheme<addGateway_result> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, addGateway_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
@@ -21601,7 +22790,7 @@ import org.slf4j.LoggerFactory;
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot, addGateway_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
@@ -21628,22 +22817,25 @@ import org.slf4j.LoggerFactory;
}
- public static class addGateway_args implements org.apache.thrift.TBase<addGateway_args, addGateway_args._Fields>, java.io.Serializable, Cloneable, Comparable<addGateway_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addGateway_args");
+ public static class updateGateway_args implements org.apache.thrift.TBase<updateGateway_args, updateGateway_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateGateway_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateGateway_args");
- private static final org.apache.thrift.protocol.TField GATEWAY_FIELD_DESC = new org.apache.thrift.protocol.TField("gateway", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField UPDATED_GATEWAY_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedGateway", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
- schemes.put(StandardScheme.class, new addGateway_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new addGateway_argsTupleSchemeFactory());
+ schemes.put(StandardScheme.class, new updateGateway_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new updateGateway_argsTupleSchemeFactory());
}
- public org.apache.airavata.model.workspace.Gateway gateway; // required
+ public String gatewayId; // required
+ public org.apache.airavata.model.workspace.Gateway updatedGateway; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- GATEWAY((short)1, "gateway");
+ GATEWAY_ID((short)1, "gatewayId"),
+ UPDATED_GATEWAY((short)2, "updatedGateway");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -21658,8 +22850,10 @@ import org.slf4j.LoggerFactory;
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // GATEWAY
- return GATEWAY;
+ case 1: // GATEWAY_ID
+ return GATEWAY_ID;
+ case 2: // UPDATED_GATEWAY
+ return UPDATED_GATEWAY;
default:
return null;
}
@@ -21703,71 +22897,111 @@ import org.slf4j.LoggerFactory;
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.GATEWAY, new org.apache.thrift.meta_data.FieldMetaData("gateway", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.UPDATED_GATEWAY, new org.apache.thrift.meta_data.FieldMetaData("updatedGateway", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.workspace.Gateway.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addGateway_args.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateGateway_args.class, metaDataMap);
}
- public addGateway_args() {
+ public updateGateway_args() {
}
- public addGateway_args(
- org.apache.airavata.model.workspace.Gateway gateway)
+ public updateGateway_args(
+ String gatewayId,
+ org.apache.airavata.model.workspace.Gateway updatedGateway)
{
this();
- this.gateway = gateway;
+ this.gatewayId = gatewayId;
+ this.updatedGateway = updatedGateway;
}
/**
* Performs a deep copy on <i>other</i>.
*/
- public addGateway_args(addGateway_args other) {
- if (other.isSetGateway()) {
- this.gateway = new org.apache.airavata.model.workspace.Gateway(other.gateway);
+ public updateGateway_args(updateGateway_args other) {
+ if (other.isSetGatewayId()) {
+ this.gatewayId = other.gatewayId;
+ }
+ if (other.isSetUpdatedGateway()) {
+ this.updatedGateway = new org.apache.airavata.model.workspace.Gateway(other.updatedGateway);
}
}
- public addGateway_args deepCopy() {
- return new addGateway_args(this);
+ public updateGateway_args deepCopy() {
+ return new updateGateway_args(this);
}
@Override
public void clear() {
- this.gateway = null;
+ this.gatewayId = null;
+ this.updatedGateway = null;
}
- public org.apache.airavata.model.workspace.Gateway getGateway() {
- return this.gateway;
+ public String getGatewayId() {
+ return this.gatewayId;
}
- public addGateway_args setGateway(org.apache.airavata.model.workspace.Gateway gateway) {
- this.gateway = gateway;
+ public updateGateway_args setGatewayId(String gatewayId) {
+ this.gatewayId = gatewayId;
return this;
}
- public void unsetGateway() {
- this.gateway = null;
+ public void unsetGatewayId() {
+ this.gatewayId = null;
}
- /** Returns true if field gateway is set (has been assigned a value) and false otherwise */
- public boolean isSetGateway() {
- return this.gateway != null;
+ /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
+ public boolean isSetGatewayId() {
+ return this.gatewayId != null;
}
- public void setGatewayIsSet(boolean value) {
+ public void setGatewayIdIsSet(boolean value) {
if (!value) {
- this.gateway = null;
+ this.gatewayId = null;
+ }
+ }
+
+ public org.apache.airavata.model.workspace.Gateway getUpdatedGateway() {
+ return this.updatedGateway;
+ }
+
+ public updateGateway_args setUpdatedGateway(org.apache.airavata.model.workspace.Gateway updatedGateway) {
+ this.updatedGateway = updatedGateway;
+ return this;
+ }
+
+ public void unsetUpdatedGateway() {
+ this.updatedGateway = null;
+ }
+
+ /** Returns true if field updatedGateway is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdatedGateway() {
+ return this.updatedGateway != null;
+ }
+
+ public void setUpdatedGatewayIsSet(boolean value) {
+ if (!value) {
+ this.updatedGateway = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case GATEWAY:
+ case GATEWAY_ID:
if (value == null) {
- unsetGateway();
+ unsetGatewayId();
} else {
- setGateway((org.apache.airavata.model.workspace.Gateway)value);
+ setGatewayId((String)value);
+ }
+ break;
+
+ case UPDATED_GATEWAY:
+ if (value == null) {
+ unsetUpdatedGateway();
+ } else {
+ setUpdatedGateway((org.apache.airavata.model.workspace.Gateway)value);
}
break;
@@ -21776,8 +23010,11 @@ import org.slf4j.LoggerFactory;
public Object getFieldValue(_Fields field) {
switch (field) {
- case GATEWAY:
- return getGateway();
+ case GATEWAY_ID:
+ return getGatewayId();
+
+ case UPDATED_GATEWAY:
+ return getUpdatedGateway();
}
throw new IllegalStateException();
@@ -21790,8 +23027,10 @@ import org.slf4j.LoggerFactory;
}
switch (field) {
- case GATEWAY:
- return isSetGateway();
+ case GATEWAY_ID:
+ return isSetGatewayId();
+ case UPDATED_GATEWAY:
+ return isSetUpdatedGateway();
}
throw new IllegalStateException();
}
@@ -21800,21 +23039,30 @@ import org.slf4j.LoggerFactory;
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof addGateway_args)
- return this.equals((addGateway_args)that);
+ if (that instanceof updateGateway_args)
+ return this.equals((updateGateway_args)that);
return false;
}
- public boolean equals(addGateway_args that) {
+ public boolean equals(updateGateway_args that) {
if (that == null)
return false;
- boolean this_present_gateway = true && this.isSetGateway();
- boolean that_present_gateway = true && that.isSetGateway();
- if (this_present_gateway || that_present_gateway) {
- if (!(this_present_gateway && that_present_gateway))
+ boolean this_present_gatewayId = true && this.isSetGatewayId();
+ boolean that_present_gatewayId = true && that.isSetGatewayId();
+ if (this_present_gatewayId || that_present_gatewayId) {
+ if (!(this_present_gatewayId && that_present_gatewayId))
return false;
- if (!this.gateway.equals(that.gateway))
+ if (!this.gatewayId.equals(that.gatewayId))
+ return false;
+ }
+
+ boolean this_present_updatedGateway = true && this.isSetUpdatedGateway();
+ boolean that_present_updatedGateway = true && that.isSetUpdatedGateway();
+ if (this_present_updatedGateway || that_present_updatedGateway) {
+ if (!(this_present_updatedGateway && that_present_updatedGateway))
+ return false;
+ if (!this.updatedGateway.equals(that.updatedGateway))
return false;
}
@@ -21827,19 +23075,29 @@ import org.slf4j.LoggerFactory;
}
@Override
- public int compareTo(addGateway_args other) {
+ public int compareTo(updateGateway_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetGateway()).compareTo(other.isSetGateway());
+ lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetGateway()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gateway, other.gateway);
+ if (isSetGatewayId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdatedGateway()).compareTo(other.isSetUpdatedGateway());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdatedGateway()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedGateway, other.updatedGateway);
if (lastComparison != 0) {
return lastComparison;
}
@@ -21861,14 +23119,22 @@ import org.slf4j.LoggerFactory;
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("addGateway_args(");
+ StringBuilder sb = new StringBuilder("updateGateway_args(");
boolean first = true;
- sb.append("gateway:");
- if (this.gateway == null) {
+ sb.append("gatewayId:");
+ if (this.gatewayId == null) {
sb.append("null");
} else {
- sb.append(this.gateway);
+ sb.append(this.gatewayId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("updatedGateway:");
+ if (this.updatedGateway == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.updatedGateway);
}
first = false;
sb.append(")");
@@ -21877,12 +23143,15 @@ import org.slf4j.LoggerFactory;
public void validate() throws org.apache.thrift.TException {
// check for required fields
- if (gateway == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'gateway' was not present! Struct: " + toString());
+ if (gatewayId == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString());
+ }
+ if (updatedGateway == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'updatedGateway' was not present! Struct: " + toString());
}
// check for sub-struct validity
- if (gateway != null) {
- gateway.validate();
+ if (updatedGateway != null) {
+ updatedGateway.validate();
}
}
@@ -21902,15 +23171,15 @@ import org.slf4j.LoggerFactory;
}
}
- private static class addGateway_argsStandardSchemeFactory implements SchemeFactory {
- public addGateway_argsStandardScheme getScheme() {
- return new addGateway_argsStandardScheme();
+ private static class updateGateway_argsStandardSchemeFactory implements SchemeFactory {
+ public updateGateway_argsStandardScheme getScheme() {
+ return new updateGateway_argsStandardScheme();
}
}
- private static class addGateway_argsStandardScheme extends StandardScheme<addGateway_args> {
+ private static class updateGateway_argsStandardScheme extends StandardScheme<updateGateway_args> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, addGateway_args struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, updateGateway_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
@@ -21920,11 +23189,19 @@ import org.slf4j.LoggerFactory;
break;
}
switch (schemeField.id) {
- case 1: // GATEWAY
+ case 1: // GATEWAY_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.gatewayId = iprot.readString();
+ struct.setGatewayIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // UPDATED_GATEWAY
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.gateway = new org.apache.airavata.model.workspace.Gateway();
- struct.gateway.read(iprot);
- struct.setGatewayIsSet(true);
+ struct.updatedGateway = new org.apache.airavata.model.workspace.Gateway();
+ struct.updatedGateway.read(iprot);
+ struct.setUpdatedGatewayIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -21940,13 +23217,18 @@ import org.slf4j.LoggerFactory;
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, addGateway_args struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, updateGateway_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (struct.gateway != null) {
- oprot.writeFieldBegin(GATEWAY_FIELD_DESC);
- struct.gateway.write(oprot);
+ if (struct.gatewayId != null) {
+ oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
+ oprot.writeString(struct.gatewayId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.updatedGateway != null) {
+ oprot.writeFieldBegin(UPDATED_GATEWAY_FIELD_DESC);
+ struct.updatedGateway.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -21955,53 +23237,53 @@ import org.slf4j.LoggerFactory;
}
- private static class addGateway_argsTupleSchemeFactory implements SchemeFactory {
- public addGateway_argsTupleScheme getScheme() {
- return new addGateway_argsTupleScheme();
+ private static class updateGateway_argsTupleSchemeFactory implements SchemeFactory {
+ public updateGateway_argsTupleScheme getScheme() {
+ return new updateGateway_argsTupleScheme();
}
}
- private static class addGateway_argsTupleScheme extends TupleScheme<addGateway_args> {
+ private static class updateGateway_argsTupleScheme extends TupleScheme<updateGateway_args> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, addGateway_args struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, updateGateway_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
- struct.gateway.write(oprot);
+ oprot.writeString(struct.gatewayId);
+ struct.updatedGateway.write(oprot);
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, addGateway_args struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot, updateGateway_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.gateway = new org.apache.airavata.model.workspace.Gateway();
- struct.gateway.read(iprot);
- struct.setGatewayIsSet(true);
+ struct.gatewayId = iprot.readString();
+ struct.setGatewayIdIsSet(true);
+ struct.updatedGateway = new org.apache.airavata.model.workspace.Gateway();
+ struct.updatedGateway.read(iprot);
+ struct.setUpdatedGatewayIsSet(true);
}
}
}
- public static class addGateway_result implements org.apache.thrift.TBase<addGateway_result, addGateway_result._Fields>, java.io.Serializable, Cloneable, Comparable<addGateway_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addGateway_result");
+ public static class updateGateway_result implements org.apache.thrift.TBase<updateGateway_result, updateGateway_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateGateway_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateGateway_result");
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (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);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
- schemes.put(StandardScheme.class, new addGateway_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new addGateway_resultTupleSchemeFactory());
+ schemes.put(StandardScheme.class, new updateGateway_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new updateGateway_resultTupleSchemeFactory());
}
- public String 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
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success"),
IRE((short)1, "ire"),
ACE((short)2, "ace"),
ASE((short)3, "ase");
@@ -22019,8 +23301,6 @@ import org.slf4j.LoggerFactory;
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
case 1: // IRE
return IRE;
case 2: // ACE
@@ -22070,8 +23350,6 @@ import org.slf4j.LoggerFactory;
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.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
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,
@@ -22079,20 +23357,18 @@ import org.slf4j.LoggerFactory;
tmpMap.put(_Fields.ASE, new org.apache.thrift.meta_data.FieldMetaData("ase", 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(addGateway_result.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateGateway_result.class, metaDataMap);
}
- public addGateway_result() {
+ public updateGateway_result() {
}
- public addGateway_result(
- String success,
+ public updateGateway_result(
org.apache.airavata.model.error.InvalidRequestException ire,
org.apache.airavata.model.error.AiravataClientException ace,
org.apache.airavata.model.error.AiravataSystemException ase)
{
this();
- this.success = success;
this.ire = ire;
this.ace = ace;
this.ase = ase;
@@ -22101,10 +23377,7 @@ import org.slf4j.LoggerFactory;
/**
* Performs a deep copy on <i>other</i>.
*/
- public addGateway_result(addGateway_result other) {
- if (other.isSetSuccess()) {
- this.success = other.success;
- }
+ public updateGateway_result(updateGateway_result other) {
if (other.isSetIre()) {
this.ire = new org.apache.airavata.model.error.InvalidRequestException(other.ire);
}
@@ -22116,47 +23389,22 @@ import org.slf4j.LoggerFactory;
}
}
- public addGateway_result deepCopy() {
- return new addGateway_result(this);
+ public updateGateway_result deepCopy() {
+ return new updateGateway_result(this);
}
@Override
public void clear() {
- this.success = null;
this.ire = null;
this.ace = null;
this.ase = null;
}
- public String getSuccess() {
- return this.success;
- }
-
- public addGateway_result setSuccess(String success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
public org.apache.airavata.model.error.InvalidRequestException getIre() {
return this.ire;
}
- public addGateway_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) {
+ public updateGateway_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) {
this.ire = ire;
return this;
}
@@ -22180,7 +23428,7 @@ import org.slf4j.LoggerFactory;
return this.ace;
}
- public addGateway_result setAce(org.apache.airavata.model.error.AiravataClientException ace) {
+ public updateGateway_result setAce(org.apache.airavata.model.error.AiravataClientException ace) {
this.ace = ace;
return this;
}
@@ -22204,7 +23452,7 @@ import org.slf4j.LoggerFactory;
return this.ase;
}
- public addGateway_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) {
+ public updateGateway_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) {
this.ase = ase;
return this;
}
@@ -22226,14 +23474,6 @@ import org.slf4j.LoggerFactory;
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((String)value);
- }
- break;
-
case IRE:
if (value == null) {
unsetIre();
@@ -22263,9 +23503,6 @@ import org.slf4j.LoggerFactory;
public Object getFieldValue(_Fields field) {
switch (field) {
- case SUCCESS:
- return getSuccess();
-
case IRE:
return getIre();
@@ -22286,8 +23523,6 @@ import org.slf4j.LoggerFactory;
}
switch (field) {
- case SUCCESS:
- return isSetSuccess();
case IRE:
return isSetIre();
case ACE:
@@ -22302,24 +23537,15 @@ import org.slf4j.LoggerFactory;
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof addGateway_result)
- return this.equals((addGateway_result)that);
+ if (that instanceof updateGateway_result)
+ return this.equals((updateGateway_result)that);
return false;
}
- public boolean equals(addGateway_result that) {
+ public boolean equals(updateGateway_result that) {
if (that == null)
retu
<TRUNCATED>
[23/50] [abbrv] airavata git commit: generated thrift files
Posted by sh...@apache.org.
generated thrift files
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/7883eb97
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/7883eb97
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/7883eb97
Branch: refs/heads/new-workflow-design
Commit: 7883eb971f8c468698a15bd7c7317c14530efaa7
Parents: 8d3b137
Author: msmemon <sh...@gmail.com>
Authored: Tue Mar 10 16:52:24 2015 +0100
Committer: msmemon <sh...@gmail.com>
Committed: Tue Mar 10 16:52:24 2015 +0100
----------------------------------------------------------------------
.../lib/airavata/computeResourceModel_types.cpp | 203 ++++++++++-------
.../lib/airavata/computeResourceModel_types.h | 38 +++-
.../Model/AppCatalog/ComputeResource/Types.php | 49 ++++
.../computeresource/UnicoreJobSubmission.java | 222 ++++++++++++++++++-
.../computeResourceModel.thrift | 26 ++-
5 files changed, 441 insertions(+), 97 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/7883eb97/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
index d54c519..4d52172 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
@@ -137,6 +137,16 @@ const char* _kDataMovementProtocolNames[] = {
};
const std::map<int, const char*> _DataMovementProtocol_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kDataMovementProtocolValues, _kDataMovementProtocolNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+int _kAuthenticationModeValues[] = {
+ AuthenticationMode::SERVER_ISSUED,
+ AuthenticationMode::MYPROXY_ISSUED
+};
+const char* _kAuthenticationModeNames[] = {
+ "SERVER_ISSUED",
+ "MYPROXY_ISSUED"
+};
+const std::map<int, const char*> _AuthenticationMode_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kAuthenticationModeValues, _kAuthenticationModeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+
int _kProviderNameValues[] = {
ProviderName::EC2,
ProviderName::AWSEC2,
@@ -1180,8 +1190,8 @@ void swap(GlobusJobSubmission &a, GlobusJobSubmission &b) {
swap(a.__isset, b.__isset);
}
-const char* UnicoreJobSubmission::ascii_fingerprint = "D9F4CFE2F293A8B1052FD3031DD2C847";
-const uint8_t UnicoreJobSubmission::binary_fingerprint[16] = {0xD9,0xF4,0xCF,0xE2,0xF2,0x93,0xA8,0xB1,0x05,0x2F,0xD3,0x03,0x1D,0xD2,0xC8,0x47};
+const char* UnicoreJobSubmission::ascii_fingerprint = "06B870319715692996F28828C4AF836C";
+const uint8_t UnicoreJobSubmission::binary_fingerprint[16] = {0x06,0xB8,0x70,0x31,0x97,0x15,0x69,0x29,0x96,0xF2,0x88,0x28,0xC4,0xAF,0x83,0x6C};
uint32_t UnicoreJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
@@ -1197,6 +1207,7 @@ uint32_t UnicoreJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot
bool isset_jobSubmissionInterfaceId = false;
bool isset_securityProtocol = false;
bool isset_unicoreEndPointURL = false;
+ bool isset_authenticationMode = false;
while (true)
{
@@ -1232,6 +1243,24 @@ uint32_t UnicoreJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot
xfer += iprot->skip(ftype);
}
break;
+ case 4:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ int32_t ecast29;
+ xfer += iprot->readI32(ecast29);
+ this->authenticationMode = (AuthenticationMode::type)ecast29;
+ isset_authenticationMode = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 5:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->userDN);
+ this->__isset.userDN = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
default:
xfer += iprot->skip(ftype);
break;
@@ -1247,6 +1276,8 @@ uint32_t UnicoreJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_unicoreEndPointURL)
throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_authenticationMode)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
@@ -1266,6 +1297,15 @@ uint32_t UnicoreJobSubmission::write(::apache::thrift::protocol::TProtocol* opro
xfer += oprot->writeString(this->unicoreEndPointURL);
xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("authenticationMode", ::apache::thrift::protocol::T_I32, 4);
+ xfer += oprot->writeI32((int32_t)this->authenticationMode);
+ xfer += oprot->writeFieldEnd();
+
+ if (this->__isset.userDN) {
+ xfer += oprot->writeFieldBegin("userDN", ::apache::thrift::protocol::T_STRING, 5);
+ xfer += oprot->writeString(this->userDN);
+ xfer += oprot->writeFieldEnd();
+ }
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
@@ -1276,6 +1316,9 @@ void swap(UnicoreJobSubmission &a, UnicoreJobSubmission &b) {
swap(a.jobSubmissionInterfaceId, b.jobSubmissionInterfaceId);
swap(a.securityProtocol, b.securityProtocol);
swap(a.unicoreEndPointURL, b.unicoreEndPointURL);
+ swap(a.authenticationMode, b.authenticationMode);
+ swap(a.userDN, b.userDN);
+ swap(a.__isset, b.__isset);
}
const char* CloudJobSubmission::ascii_fingerprint = "F98AE2E6E51F2426504F2566EB71B5CC";
@@ -1317,9 +1360,9 @@ uint32_t CloudJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast29;
- xfer += iprot->readI32(ecast29);
- this->securityProtocol = (SecurityProtocol::type)ecast29;
+ int32_t ecast30;
+ xfer += iprot->readI32(ecast30);
+ this->securityProtocol = (SecurityProtocol::type)ecast30;
isset_securityProtocol = true;
} else {
xfer += iprot->skip(ftype);
@@ -1343,9 +1386,9 @@ uint32_t CloudJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast30;
- xfer += iprot->readI32(ecast30);
- this->providerName = (ProviderName::type)ecast30;
+ int32_t ecast31;
+ xfer += iprot->readI32(ecast31);
+ this->providerName = (ProviderName::type)ecast31;
isset_providerName = true;
} else {
xfer += iprot->skip(ftype);
@@ -1462,9 +1505,9 @@ uint32_t JobSubmissionInterface::read(::apache::thrift::protocol::TProtocol* ipr
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast31;
- xfer += iprot->readI32(ecast31);
- this->jobSubmissionProtocol = (JobSubmissionProtocol::type)ecast31;
+ int32_t ecast32;
+ xfer += iprot->readI32(ecast32);
+ this->jobSubmissionProtocol = (JobSubmissionProtocol::type)ecast32;
isset_jobSubmissionProtocol = true;
} else {
xfer += iprot->skip(ftype);
@@ -1560,9 +1603,9 @@ uint32_t DataMovementInterface::read(::apache::thrift::protocol::TProtocol* ipro
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast32;
- xfer += iprot->readI32(ecast32);
- this->dataMovementProtocol = (DataMovementProtocol::type)ecast32;
+ int32_t ecast33;
+ xfer += iprot->readI32(ecast33);
+ this->dataMovementProtocol = (DataMovementProtocol::type)ecast33;
isset_dataMovementProtocol = true;
} else {
xfer += iprot->skip(ftype);
@@ -1667,14 +1710,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->hostAliases.clear();
- uint32_t _size33;
- ::apache::thrift::protocol::TType _etype36;
- xfer += iprot->readListBegin(_etype36, _size33);
- this->hostAliases.resize(_size33);
- uint32_t _i37;
- for (_i37 = 0; _i37 < _size33; ++_i37)
+ uint32_t _size34;
+ ::apache::thrift::protocol::TType _etype37;
+ xfer += iprot->readListBegin(_etype37, _size34);
+ this->hostAliases.resize(_size34);
+ uint32_t _i38;
+ for (_i38 = 0; _i38 < _size34; ++_i38)
{
- xfer += iprot->readString(this->hostAliases[_i37]);
+ xfer += iprot->readString(this->hostAliases[_i38]);
}
xfer += iprot->readListEnd();
}
@@ -1687,14 +1730,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->ipAddresses.clear();
- uint32_t _size38;
- ::apache::thrift::protocol::TType _etype41;
- xfer += iprot->readListBegin(_etype41, _size38);
- this->ipAddresses.resize(_size38);
- uint32_t _i42;
- for (_i42 = 0; _i42 < _size38; ++_i42)
+ uint32_t _size39;
+ ::apache::thrift::protocol::TType _etype42;
+ xfer += iprot->readListBegin(_etype42, _size39);
+ this->ipAddresses.resize(_size39);
+ uint32_t _i43;
+ for (_i43 = 0; _i43 < _size39; ++_i43)
{
- xfer += iprot->readString(this->ipAddresses[_i42]);
+ xfer += iprot->readString(this->ipAddresses[_i43]);
}
xfer += iprot->readListEnd();
}
@@ -1715,14 +1758,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->batchQueues.clear();
- uint32_t _size43;
- ::apache::thrift::protocol::TType _etype46;
- xfer += iprot->readListBegin(_etype46, _size43);
- this->batchQueues.resize(_size43);
- uint32_t _i47;
- for (_i47 = 0; _i47 < _size43; ++_i47)
+ uint32_t _size44;
+ ::apache::thrift::protocol::TType _etype47;
+ xfer += iprot->readListBegin(_etype47, _size44);
+ this->batchQueues.resize(_size44);
+ uint32_t _i48;
+ for (_i48 = 0; _i48 < _size44; ++_i48)
{
- xfer += this->batchQueues[_i47].read(iprot);
+ xfer += this->batchQueues[_i48].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -1735,19 +1778,19 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->fileSystems.clear();
- uint32_t _size48;
- ::apache::thrift::protocol::TType _ktype49;
- ::apache::thrift::protocol::TType _vtype50;
- xfer += iprot->readMapBegin(_ktype49, _vtype50, _size48);
- uint32_t _i52;
- for (_i52 = 0; _i52 < _size48; ++_i52)
+ uint32_t _size49;
+ ::apache::thrift::protocol::TType _ktype50;
+ ::apache::thrift::protocol::TType _vtype51;
+ xfer += iprot->readMapBegin(_ktype50, _vtype51, _size49);
+ uint32_t _i53;
+ for (_i53 = 0; _i53 < _size49; ++_i53)
{
- FileSystems::type _key53;
- int32_t ecast55;
- xfer += iprot->readI32(ecast55);
- _key53 = (FileSystems::type)ecast55;
- std::string& _val54 = this->fileSystems[_key53];
- xfer += iprot->readString(_val54);
+ FileSystems::type _key54;
+ int32_t ecast56;
+ xfer += iprot->readI32(ecast56);
+ _key54 = (FileSystems::type)ecast56;
+ std::string& _val55 = this->fileSystems[_key54];
+ xfer += iprot->readString(_val55);
}
xfer += iprot->readMapEnd();
}
@@ -1760,14 +1803,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->jobSubmissionInterfaces.clear();
- uint32_t _size56;
- ::apache::thrift::protocol::TType _etype59;
- xfer += iprot->readListBegin(_etype59, _size56);
- this->jobSubmissionInterfaces.resize(_size56);
- uint32_t _i60;
- for (_i60 = 0; _i60 < _size56; ++_i60)
+ uint32_t _size57;
+ ::apache::thrift::protocol::TType _etype60;
+ xfer += iprot->readListBegin(_etype60, _size57);
+ this->jobSubmissionInterfaces.resize(_size57);
+ uint32_t _i61;
+ for (_i61 = 0; _i61 < _size57; ++_i61)
{
- xfer += this->jobSubmissionInterfaces[_i60].read(iprot);
+ xfer += this->jobSubmissionInterfaces[_i61].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -1780,14 +1823,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->dataMovementInterfaces.clear();
- uint32_t _size61;
- ::apache::thrift::protocol::TType _etype64;
- xfer += iprot->readListBegin(_etype64, _size61);
- this->dataMovementInterfaces.resize(_size61);
- uint32_t _i65;
- for (_i65 = 0; _i65 < _size61; ++_i65)
+ uint32_t _size62;
+ ::apache::thrift::protocol::TType _etype65;
+ xfer += iprot->readListBegin(_etype65, _size62);
+ this->dataMovementInterfaces.resize(_size62);
+ uint32_t _i66;
+ for (_i66 = 0; _i66 < _size62; ++_i66)
{
- xfer += this->dataMovementInterfaces[_i65].read(iprot);
+ xfer += this->dataMovementInterfaces[_i66].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -1836,10 +1879,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("hostAliases", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->hostAliases.size()));
- std::vector<std::string> ::const_iterator _iter66;
- for (_iter66 = this->hostAliases.begin(); _iter66 != this->hostAliases.end(); ++_iter66)
+ std::vector<std::string> ::const_iterator _iter67;
+ for (_iter67 = this->hostAliases.begin(); _iter67 != this->hostAliases.end(); ++_iter67)
{
- xfer += oprot->writeString((*_iter66));
+ xfer += oprot->writeString((*_iter67));
}
xfer += oprot->writeListEnd();
}
@@ -1849,10 +1892,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("ipAddresses", ::apache::thrift::protocol::T_LIST, 4);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->ipAddresses.size()));
- std::vector<std::string> ::const_iterator _iter67;
- for (_iter67 = this->ipAddresses.begin(); _iter67 != this->ipAddresses.end(); ++_iter67)
+ std::vector<std::string> ::const_iterator _iter68;
+ for (_iter68 = this->ipAddresses.begin(); _iter68 != this->ipAddresses.end(); ++_iter68)
{
- xfer += oprot->writeString((*_iter67));
+ xfer += oprot->writeString((*_iter68));
}
xfer += oprot->writeListEnd();
}
@@ -1867,10 +1910,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("batchQueues", ::apache::thrift::protocol::T_LIST, 6);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->batchQueues.size()));
- std::vector<BatchQueue> ::const_iterator _iter68;
- for (_iter68 = this->batchQueues.begin(); _iter68 != this->batchQueues.end(); ++_iter68)
+ std::vector<BatchQueue> ::const_iterator _iter69;
+ for (_iter69 = this->batchQueues.begin(); _iter69 != this->batchQueues.end(); ++_iter69)
{
- xfer += (*_iter68).write(oprot);
+ xfer += (*_iter69).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -1880,11 +1923,11 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("fileSystems", ::apache::thrift::protocol::T_MAP, 7);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->fileSystems.size()));
- std::map<FileSystems::type, std::string> ::const_iterator _iter69;
- for (_iter69 = this->fileSystems.begin(); _iter69 != this->fileSystems.end(); ++_iter69)
+ std::map<FileSystems::type, std::string> ::const_iterator _iter70;
+ for (_iter70 = this->fileSystems.begin(); _iter70 != this->fileSystems.end(); ++_iter70)
{
- xfer += oprot->writeI32((int32_t)_iter69->first);
- xfer += oprot->writeString(_iter69->second);
+ xfer += oprot->writeI32((int32_t)_iter70->first);
+ xfer += oprot->writeString(_iter70->second);
}
xfer += oprot->writeMapEnd();
}
@@ -1894,10 +1937,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("jobSubmissionInterfaces", ::apache::thrift::protocol::T_LIST, 8);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->jobSubmissionInterfaces.size()));
- std::vector<JobSubmissionInterface> ::const_iterator _iter70;
- for (_iter70 = this->jobSubmissionInterfaces.begin(); _iter70 != this->jobSubmissionInterfaces.end(); ++_iter70)
+ std::vector<JobSubmissionInterface> ::const_iterator _iter71;
+ for (_iter71 = this->jobSubmissionInterfaces.begin(); _iter71 != this->jobSubmissionInterfaces.end(); ++_iter71)
{
- xfer += (*_iter70).write(oprot);
+ xfer += (*_iter71).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -1907,10 +1950,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("dataMovementInterfaces", ::apache::thrift::protocol::T_LIST, 9);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->dataMovementInterfaces.size()));
- std::vector<DataMovementInterface> ::const_iterator _iter71;
- for (_iter71 = this->dataMovementInterfaces.begin(); _iter71 != this->dataMovementInterfaces.end(); ++_iter71)
+ std::vector<DataMovementInterface> ::const_iterator _iter72;
+ for (_iter72 = this->dataMovementInterfaces.begin(); _iter72 != this->dataMovementInterfaces.end(); ++_iter72)
{
- xfer += (*_iter71).write(oprot);
+ xfer += (*_iter72).write(oprot);
}
xfer += oprot->writeListEnd();
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/7883eb97/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
index 76037b2..b1b70d5 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
@@ -117,6 +117,15 @@ struct DataMovementProtocol {
extern const std::map<int, const char*> _DataMovementProtocol_VALUES_TO_NAMES;
+struct AuthenticationMode {
+ enum type {
+ SERVER_ISSUED = 0,
+ MYPROXY_ISSUED = 1
+ };
+};
+
+extern const std::map<int, const char*> _AuthenticationMode_VALUES_TO_NAMES;
+
struct ProviderName {
enum type {
EC2 = 0,
@@ -720,14 +729,18 @@ class GlobusJobSubmission {
void swap(GlobusJobSubmission &a, GlobusJobSubmission &b);
+typedef struct _UnicoreJobSubmission__isset {
+ _UnicoreJobSubmission__isset() : userDN(false) {}
+ bool userDN;
+} _UnicoreJobSubmission__isset;
class UnicoreJobSubmission {
public:
- static const char* ascii_fingerprint; // = "D9F4CFE2F293A8B1052FD3031DD2C847";
- static const uint8_t binary_fingerprint[16]; // = {0xD9,0xF4,0xCF,0xE2,0xF2,0x93,0xA8,0xB1,0x05,0x2F,0xD3,0x03,0x1D,0xD2,0xC8,0x47};
+ static const char* ascii_fingerprint; // = "06B870319715692996F28828C4AF836C";
+ static const uint8_t binary_fingerprint[16]; // = {0x06,0xB8,0x70,0x31,0x97,0x15,0x69,0x29,0x96,0xF2,0x88,0x28,0xC4,0xAF,0x83,0x6C};
- UnicoreJobSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), unicoreEndPointURL() {
+ UnicoreJobSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), unicoreEndPointURL(), authenticationMode((AuthenticationMode::type)0), userDN() {
}
virtual ~UnicoreJobSubmission() throw() {}
@@ -735,6 +748,10 @@ class UnicoreJobSubmission {
std::string jobSubmissionInterfaceId;
SecurityProtocol::type securityProtocol;
std::string unicoreEndPointURL;
+ AuthenticationMode::type authenticationMode;
+ std::string userDN;
+
+ _UnicoreJobSubmission__isset __isset;
void __set_jobSubmissionInterfaceId(const std::string& val) {
jobSubmissionInterfaceId = val;
@@ -748,6 +765,15 @@ class UnicoreJobSubmission {
unicoreEndPointURL = val;
}
+ void __set_authenticationMode(const AuthenticationMode::type val) {
+ authenticationMode = val;
+ }
+
+ void __set_userDN(const std::string& val) {
+ userDN = val;
+ __isset.userDN = true;
+ }
+
bool operator == (const UnicoreJobSubmission & rhs) const
{
if (!(jobSubmissionInterfaceId == rhs.jobSubmissionInterfaceId))
@@ -756,6 +782,12 @@ class UnicoreJobSubmission {
return false;
if (!(unicoreEndPointURL == rhs.unicoreEndPointURL))
return false;
+ if (!(authenticationMode == rhs.authenticationMode))
+ return false;
+ if (__isset.userDN != rhs.__isset.userDN)
+ return false;
+ else if (__isset.userDN && !(userDN == rhs.userDN))
+ return false;
return true;
}
bool operator != (const UnicoreJobSubmission &rhs) const {
http://git-wip-us.apache.org/repos/asf/airavata/blob/7883eb97/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
index 2280d94..9bfced0 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
@@ -120,6 +120,15 @@ final class DataMovementProtocol {
);
}
+final class AuthenticationMode {
+ const SERVER_ISSUED = 0;
+ const MYPROXY_ISSUED = 1;
+ static public $__names = array(
+ 0 => 'SERVER_ISSUED',
+ 1 => 'MYPROXY_ISSUED',
+ );
+}
+
final class ProviderName {
const EC2 = 0;
const AWSEC2 = 1;
@@ -1381,6 +1390,8 @@ class UnicoreJobSubmission {
public $jobSubmissionInterfaceId = "DO_NOT_SET_AT_CLIENTS";
public $securityProtocol = null;
public $unicoreEndPointURL = null;
+ public $authenticationMode = null;
+ public $userDN = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
@@ -1397,6 +1408,14 @@ class UnicoreJobSubmission {
'var' => 'unicoreEndPointURL',
'type' => TType::STRING,
),
+ 4 => array(
+ 'var' => 'authenticationMode',
+ 'type' => TType::I32,
+ ),
+ 5 => array(
+ 'var' => 'userDN',
+ 'type' => TType::STRING,
+ ),
);
}
if (is_array($vals)) {
@@ -1409,6 +1428,12 @@ class UnicoreJobSubmission {
if (isset($vals['unicoreEndPointURL'])) {
$this->unicoreEndPointURL = $vals['unicoreEndPointURL'];
}
+ if (isset($vals['authenticationMode'])) {
+ $this->authenticationMode = $vals['authenticationMode'];
+ }
+ if (isset($vals['userDN'])) {
+ $this->userDN = $vals['userDN'];
+ }
}
}
@@ -1452,6 +1477,20 @@ class UnicoreJobSubmission {
$xfer += $input->skip($ftype);
}
break;
+ case 4:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->authenticationMode);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->userDN);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
default:
$xfer += $input->skip($ftype);
break;
@@ -1480,6 +1519,16 @@ class UnicoreJobSubmission {
$xfer += $output->writeString($this->unicoreEndPointURL);
$xfer += $output->writeFieldEnd();
}
+ if ($this->authenticationMode !== null) {
+ $xfer += $output->writeFieldBegin('authenticationMode', TType::I32, 4);
+ $xfer += $output->writeI32($this->authenticationMode);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->userDN !== null) {
+ $xfer += $output->writeFieldBegin('userDN', TType::STRING, 5);
+ $xfer += $output->writeString($this->userDN);
+ $xfer += $output->writeFieldEnd();
+ }
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
http://git-wip-us.apache.org/repos/asf/airavata/blob/7883eb97/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/UnicoreJobSubmission.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/UnicoreJobSubmission.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/UnicoreJobSubmission.java
index 9a3ed90..d65ec86 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/UnicoreJobSubmission.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/UnicoreJobSubmission.java
@@ -54,6 +54,11 @@ import org.slf4j.LoggerFactory;
*
* unicoreEndPointURL:
* unicoreGateway End Point. The provider will query this service to fetch required service end points.
+ * authenticationMode
+ * The authenticationMode defines the way certificate is fetched.
+ * userDN
+ * This attribute captures the userDN used for launching jobs and create temporary storages. The attribute should be
+ * provided if the authentication mode is set as SERVER_ISSUED.
*/
@SuppressWarnings("all") public class UnicoreJobSubmission implements org.apache.thrift.TBase<UnicoreJobSubmission, UnicoreJobSubmission._Fields>, java.io.Serializable, Cloneable, Comparable<UnicoreJobSubmission> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UnicoreJobSubmission");
@@ -61,6 +66,8 @@ import org.slf4j.LoggerFactory;
private static final org.apache.thrift.protocol.TField JOB_SUBMISSION_INTERFACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jobSubmissionInterfaceId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField SECURITY_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("securityProtocol", org.apache.thrift.protocol.TType.I32, (short)2);
private static final org.apache.thrift.protocol.TField UNICORE_END_POINT_URL_FIELD_DESC = new org.apache.thrift.protocol.TField("unicoreEndPointURL", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField AUTHENTICATION_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("authenticationMode", org.apache.thrift.protocol.TType.I32, (short)4);
+ private static final org.apache.thrift.protocol.TField USER_DN_FIELD_DESC = new org.apache.thrift.protocol.TField("userDN", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -71,6 +78,8 @@ import org.slf4j.LoggerFactory;
private String jobSubmissionInterfaceId; // required
private SecurityProtocol securityProtocol; // required
private String unicoreEndPointURL; // required
+ private AuthenticationMode authenticationMode; // required
+ private String userDN; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -80,7 +89,13 @@ import org.slf4j.LoggerFactory;
* @see SecurityProtocol
*/
SECURITY_PROTOCOL((short)2, "securityProtocol"),
- UNICORE_END_POINT_URL((short)3, "unicoreEndPointURL");
+ UNICORE_END_POINT_URL((short)3, "unicoreEndPointURL"),
+ /**
+ *
+ * @see AuthenticationMode
+ */
+ AUTHENTICATION_MODE((short)4, "authenticationMode"),
+ USER_DN((short)5, "userDN");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -101,6 +116,10 @@ import org.slf4j.LoggerFactory;
return SECURITY_PROTOCOL;
case 3: // UNICORE_END_POINT_URL
return UNICORE_END_POINT_URL;
+ case 4: // AUTHENTICATION_MODE
+ return AUTHENTICATION_MODE;
+ case 5: // USER_DN
+ return USER_DN;
default:
return null;
}
@@ -141,6 +160,7 @@ import org.slf4j.LoggerFactory;
}
// isset id assignments
+ private _Fields optionals[] = {_Fields.USER_DN};
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);
@@ -150,6 +170,10 @@ import org.slf4j.LoggerFactory;
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SecurityProtocol.class)));
tmpMap.put(_Fields.UNICORE_END_POINT_URL, new org.apache.thrift.meta_data.FieldMetaData("unicoreEndPointURL", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.AUTHENTICATION_MODE, new org.apache.thrift.meta_data.FieldMetaData("authenticationMode", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AuthenticationMode.class)));
+ tmpMap.put(_Fields.USER_DN, new org.apache.thrift.meta_data.FieldMetaData("userDN", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UnicoreJobSubmission.class, metaDataMap);
}
@@ -162,12 +186,14 @@ import org.slf4j.LoggerFactory;
public UnicoreJobSubmission(
String jobSubmissionInterfaceId,
SecurityProtocol securityProtocol,
- String unicoreEndPointURL)
+ String unicoreEndPointURL,
+ AuthenticationMode authenticationMode)
{
this();
this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
this.securityProtocol = securityProtocol;
this.unicoreEndPointURL = unicoreEndPointURL;
+ this.authenticationMode = authenticationMode;
}
/**
@@ -183,6 +209,12 @@ import org.slf4j.LoggerFactory;
if (other.isSetUnicoreEndPointURL()) {
this.unicoreEndPointURL = other.unicoreEndPointURL;
}
+ if (other.isSetAuthenticationMode()) {
+ this.authenticationMode = other.authenticationMode;
+ }
+ if (other.isSetUserDN()) {
+ this.userDN = other.userDN;
+ }
}
public UnicoreJobSubmission deepCopy() {
@@ -195,6 +227,8 @@ import org.slf4j.LoggerFactory;
this.securityProtocol = null;
this.unicoreEndPointURL = null;
+ this.authenticationMode = null;
+ this.userDN = null;
}
public String getJobSubmissionInterfaceId() {
@@ -274,6 +308,60 @@ import org.slf4j.LoggerFactory;
}
}
+ /**
+ *
+ * @see AuthenticationMode
+ */
+ public AuthenticationMode getAuthenticationMode() {
+ return this.authenticationMode;
+ }
+
+ /**
+ *
+ * @see AuthenticationMode
+ */
+ public void setAuthenticationMode(AuthenticationMode authenticationMode) {
+ this.authenticationMode = authenticationMode;
+ }
+
+ public void unsetAuthenticationMode() {
+ this.authenticationMode = null;
+ }
+
+ /** Returns true if field authenticationMode is set (has been assigned a value) and false otherwise */
+ public boolean isSetAuthenticationMode() {
+ return this.authenticationMode != null;
+ }
+
+ public void setAuthenticationModeIsSet(boolean value) {
+ if (!value) {
+ this.authenticationMode = null;
+ }
+ }
+
+ public String getUserDN() {
+ return this.userDN;
+ }
+
+ public void setUserDN(String userDN) {
+ this.userDN = userDN;
+ }
+
+ public void unsetUserDN() {
+ this.userDN = null;
+ }
+
+ /** Returns true if field userDN is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserDN() {
+ return this.userDN != null;
+ }
+
+ public void setUserDNIsSet(boolean value) {
+ if (!value) {
+ this.userDN = null;
+ }
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case JOB_SUBMISSION_INTERFACE_ID:
@@ -300,6 +388,22 @@ import org.slf4j.LoggerFactory;
}
break;
+ case AUTHENTICATION_MODE:
+ if (value == null) {
+ unsetAuthenticationMode();
+ } else {
+ setAuthenticationMode((AuthenticationMode)value);
+ }
+ break;
+
+ case USER_DN:
+ if (value == null) {
+ unsetUserDN();
+ } else {
+ setUserDN((String)value);
+ }
+ break;
+
}
}
@@ -314,6 +418,12 @@ import org.slf4j.LoggerFactory;
case UNICORE_END_POINT_URL:
return getUnicoreEndPointURL();
+ case AUTHENTICATION_MODE:
+ return getAuthenticationMode();
+
+ case USER_DN:
+ return getUserDN();
+
}
throw new IllegalStateException();
}
@@ -331,6 +441,10 @@ import org.slf4j.LoggerFactory;
return isSetSecurityProtocol();
case UNICORE_END_POINT_URL:
return isSetUnicoreEndPointURL();
+ case AUTHENTICATION_MODE:
+ return isSetAuthenticationMode();
+ case USER_DN:
+ return isSetUserDN();
}
throw new IllegalStateException();
}
@@ -375,6 +489,24 @@ import org.slf4j.LoggerFactory;
return false;
}
+ boolean this_present_authenticationMode = true && this.isSetAuthenticationMode();
+ boolean that_present_authenticationMode = true && that.isSetAuthenticationMode();
+ if (this_present_authenticationMode || that_present_authenticationMode) {
+ if (!(this_present_authenticationMode && that_present_authenticationMode))
+ return false;
+ if (!this.authenticationMode.equals(that.authenticationMode))
+ return false;
+ }
+
+ boolean this_present_userDN = true && this.isSetUserDN();
+ boolean that_present_userDN = true && that.isSetUserDN();
+ if (this_present_userDN || that_present_userDN) {
+ if (!(this_present_userDN && that_present_userDN))
+ return false;
+ if (!this.userDN.equals(that.userDN))
+ return false;
+ }
+
return true;
}
@@ -421,6 +553,26 @@ import org.slf4j.LoggerFactory;
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetAuthenticationMode()).compareTo(other.isSetAuthenticationMode());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAuthenticationMode()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authenticationMode, other.authenticationMode);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUserDN()).compareTo(other.isSetUserDN());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserDN()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userDN, other.userDN);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -464,6 +616,24 @@ import org.slf4j.LoggerFactory;
sb.append(this.unicoreEndPointURL);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("authenticationMode:");
+ if (this.authenticationMode == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.authenticationMode);
+ }
+ first = false;
+ if (isSetUserDN()) {
+ if (!first) sb.append(", ");
+ sb.append("userDN:");
+ if (this.userDN == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userDN);
+ }
+ first = false;
+ }
sb.append(")");
return sb.toString();
}
@@ -482,6 +652,10 @@ import org.slf4j.LoggerFactory;
throw new org.apache.thrift.protocol.TProtocolException("Required field 'unicoreEndPointURL' is unset! Struct:" + toString());
}
+ if (!isSetAuthenticationMode()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'authenticationMode' is unset! Struct:" + toString());
+ }
+
// check for sub-struct validity
}
@@ -543,6 +717,22 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 4: // AUTHENTICATION_MODE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.authenticationMode = AuthenticationMode.findByValue(iprot.readI32());
+ struct.setAuthenticationModeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // USER_DN
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.userDN = iprot.readString();
+ struct.setUserDNIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -571,6 +761,18 @@ import org.slf4j.LoggerFactory;
oprot.writeString(struct.unicoreEndPointURL);
oprot.writeFieldEnd();
}
+ if (struct.authenticationMode != null) {
+ oprot.writeFieldBegin(AUTHENTICATION_MODE_FIELD_DESC);
+ oprot.writeI32(struct.authenticationMode.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.userDN != null) {
+ if (struct.isSetUserDN()) {
+ oprot.writeFieldBegin(USER_DN_FIELD_DESC);
+ oprot.writeString(struct.userDN);
+ oprot.writeFieldEnd();
+ }
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -591,6 +793,15 @@ import org.slf4j.LoggerFactory;
oprot.writeString(struct.jobSubmissionInterfaceId);
oprot.writeI32(struct.securityProtocol.getValue());
oprot.writeString(struct.unicoreEndPointURL);
+ oprot.writeI32(struct.authenticationMode.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetUserDN()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetUserDN()) {
+ oprot.writeString(struct.userDN);
+ }
}
@Override
@@ -602,6 +813,13 @@ import org.slf4j.LoggerFactory;
struct.setSecurityProtocolIsSet(true);
struct.unicoreEndPointURL = iprot.readString();
struct.setUnicoreEndPointURLIsSet(true);
+ struct.authenticationMode = AuthenticationMode.findByValue(iprot.readI32());
+ struct.setAuthenticationModeIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.userDN = iprot.readString();
+ struct.setUserDNIsSet(true);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/7883eb97/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift b/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
index 8e89908..9bf1b72 100644
--- a/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
+++ b/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
@@ -329,6 +329,20 @@ struct GlobusJobSubmission {
}
/**
+ * AuthenticationMode
+ *
+ * SERVER_ISSUED: use CA credentials to generate a certificate based on user name.
+ * server properties.
+ * MYPROXY_ISSUED: rely on GSI method implementation already provided
+ * by Airavata security libs.
+*/
+enum AuthenticationMode {
+ SERVER_ISSUED,
+ MYPROXY_ISSUED
+}
+
+
+/**
* Unicore Job Submission
*
* unicoreEndPointURL:
@@ -347,18 +361,6 @@ struct UnicoreJobSubmission {
5: optional string userDN
}
-/**
- * AuthenticationMode
- *
- * SERVER_ISSUED: use CA credentials to generate a certificate based on user name.
- * server properties.
- * MYPROXY_ISSUED: rely on GSI method implementation already provided
- * by Airavata security libs.
-*/
-enum AuthenticationMode {
- SERVER_ISSUED,
- MYPROXY_ISSUED
-}
/**
[28/50] [abbrv] airavata git commit: fixing bug in clone experiment -
AIRAVATA-1626
Posted by sh...@apache.org.
fixing bug in clone experiment - AIRAVATA-1626
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/4000b82c
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/4000b82c
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/4000b82c
Branch: refs/heads/new-workflow-design
Commit: 4000b82c0dbbbae8fe54c396114ea84da5c09dde
Parents: 56efa8e
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Tue Mar 10 15:18:04 2015 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Tue Mar 10 15:18:04 2015 -0400
----------------------------------------------------------------------
.../airavata/api/server/handler/AiravataServerHandler.java | 4 ++--
.../persistance/registry/jpa/impl/ExperimentRegistry.java | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/4000b82c/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index f250f37..a2bd3c7 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -85,7 +85,6 @@ import org.apache.airavata.registry.cpi.RegistryModelType;
import org.apache.airavata.registry.cpi.utils.Constants;
import org.apache.airavata.workflow.catalog.WorkflowCatalogFactory;
import org.apache.thrift.TException;
-import org.python.antlr.ast.Str;
import java.util.ArrayList;
import java.util.HashMap;
@@ -1360,6 +1359,7 @@ public class AiravataServerHandler implements Airavata.Iface {
throw new ExperimentNotFoundException("Requested experiment id " + existingExperimentID + " does not exist in the system..");
}
Experiment existingExperiment = (Experiment)registry.get(RegistryModelType.EXPERIMENT, existingExperimentID);
+ String gatewayId = (String)registry.getValue(RegistryModelType.EXPERIMENT, existingExperimentID, Constants.FieldConstants.ExperimentConstants.GATEWAY);
existingExperiment.setCreationTime(AiravataUtils.getCurrentTimestamp().getTime());
if (validateString(newExperiementName)){
existingExperiment.setName(newExperiementName);
@@ -1370,7 +1370,7 @@ public class AiravataServerHandler implements Airavata.Iface {
if (existingExperiment.getErrors() != null ){
existingExperiment.getErrors().clear();
}
- return (String)registry.add(ParentDataType.EXPERIMENT, existingExperiment, null);
+ return (String)registry.add(ParentDataType.EXPERIMENT, existingExperiment, gatewayId);
} catch (Exception e) {
logger.errorId(existingExperimentID, "Error while cloning the experiment with existing configuration...", e);
AiravataSystemException exception = new AiravataSystemException();
http://git-wip-us.apache.org/repos/asf/airavata/blob/4000b82c/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
index 0c90322..0da148b 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
@@ -62,6 +62,7 @@ public class ExperimentRegistry {
if (!ResourceUtils.isUserExist(experiment.getUserName())) {
ResourceUtils.addUser(experiment.getUserName(), null);
}
+
experimentID = getExperimentID(experiment.getName());
experiment.setExperimentID(experimentID);
ExperimentResource experimentResource = new ExperimentResource();
@@ -2002,6 +2003,8 @@ public class ExperimentRegistry {
return ThriftDataModelConversion.getExperiment(resource);
} else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)) {
return resource.getExecutionUser();
+ }else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY)) {
+ return resource.getGateway().getGatewayId();
} else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_NAME)) {
return resource.getExpName();
} else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_DESC)) {
[20/50] [abbrv] airavata git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/airavata
Posted by sh...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/airavata
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/34b06cc9
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/34b06cc9
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/34b06cc9
Branch: refs/heads/new-workflow-design
Commit: 34b06cc9999d747cd21eee356049f5dbc47dc45e
Parents: fcbda21 fd557d8
Author: Lahiru Gunathilake <gl...@gmail.com>
Authored: Mon Mar 9 17:03:46 2015 -0400
Committer: Lahiru Gunathilake <gl...@gmail.com>
Committed: Mon Mar 9 17:03:46 2015 -0400
----------------------------------------------------------------------
.../server/handler/AiravataServerHandler.java | 43 ++++++++++++++++++++
.../data/impl/GwyResourceProfileImpl.java | 2 +-
.../integration/tools/DocumentCreatorNew.java | 7 +++-
3 files changed, 49 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
[49/50] [abbrv] airavata git commit: fixing AIRAVATA-1638
Posted by sh...@apache.org.
fixing AIRAVATA-1638
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/73f371d8
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/73f371d8
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/73f371d8
Branch: refs/heads/new-workflow-design
Commit: 73f371d81fd3a3ceecf6d015ac98b17dffc1eec9
Parents: 7d57c09
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Thu Mar 19 10:03:28 2015 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Thu Mar 19 10:03:28 2015 -0400
----------------------------------------------------------------------
.../registry/jpa/impl/ExperimentRegistry.java | 4 ++++
.../jpa/model/ExperimentConfigData.java | 20 ++++++++++++++++++
.../jpa/resources/ConfigDataResource.java | 22 ++++++++++++++++++++
.../registry/jpa/resources/Utils.java | 3 ++-
.../registry/jpa/resources/WorkerResource.java | 6 +++++-
.../jpa/utils/ThriftDataModelConversion.java | 2 ++
.../src/main/resources/registry-derby.sql | 2 ++
.../src/main/resources/registry-mysql.sql | 2 ++
.../src/test/resources/registry-derby.sql | 2 ++
9 files changed, 61 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/73f371d8/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
index 0da148b..113a966 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
@@ -152,6 +152,8 @@ public class ExperimentRegistry {
configData.setAiravataAutoSchedule(configurationData.isAiravataAutoSchedule());
configData.setOverrideManualParams(configurationData.isOverrideManualScheduledParams());
configData.setShareExp(configurationData.isShareExperimentPublicly());
+ configData.setUserDn(configurationData.getUserDN());
+ configData.setGenerateCert(configurationData.isGenerateCert());
configData.save();
ComputationalResourceScheduling resourceScheduling = configurationData.getComputationalResourceScheduling();
if (resourceScheduling != null) {
@@ -1687,6 +1689,8 @@ public class ExperimentRegistry {
resource.setAiravataAutoSchedule(configData.isAiravataAutoSchedule());
resource.setOverrideManualParams(configData.isOverrideManualScheduledParams());
resource.setShareExp(configData.isShareExperimentPublicly());
+ resource.setUserDn(configData.getUserDN());
+ resource.setGenerateCert(configData.isGenerateCert());
resource.save();
ComputationalResourceScheduling resourceScheduling = configData.getComputationalResourceScheduling();
if (resourceScheduling != null) {
http://git-wip-us.apache.org/repos/asf/airavata/blob/73f371d8/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ExperimentConfigData.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ExperimentConfigData.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ExperimentConfigData.java
index 6ddbff7..63e91ad 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ExperimentConfigData.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ExperimentConfigData.java
@@ -39,6 +39,10 @@ public class ExperimentConfigData implements Serializable {
private boolean overrideManualParams;
@Column(name = "SHARE_EXPERIMENT")
private boolean shareExp;
+ @Column(name = "USER_DN")
+ private String userDn;
+ @Column(name = "GENERATE_CERT")
+ private boolean generateCert;
@ManyToOne(cascade= CascadeType.MERGE)
@JoinColumn(name = "EXPERIMENT_ID")
@@ -83,4 +87,20 @@ public class ExperimentConfigData implements Serializable {
public void setExperiment(Experiment experiment) {
this.experiment = experiment;
}
+
+ public String getUserDn() {
+ return userDn;
+ }
+
+ public void setUserDn(String userDn) {
+ this.userDn = userDn;
+ }
+
+ public boolean isGenerateCert() {
+ return generateCert;
+ }
+
+ public void setGenerateCert(boolean generateCert) {
+ this.generateCert = generateCert;
+ }
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/73f371d8/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigDataResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigDataResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigDataResource.java
index c042eb6..c45ba07 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigDataResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigDataResource.java
@@ -39,6 +39,24 @@ public class ConfigDataResource extends AbstractResource {
private boolean airavataAutoSchedule;
private boolean overrideManualParams;
private boolean shareExp;
+ private String userDn;
+ private boolean generateCert;
+
+ public String getUserDn() {
+ return userDn;
+ }
+
+ public void setUserDn(String userDn) {
+ this.userDn = userDn;
+ }
+
+ public boolean isGenerateCert() {
+ return generateCert;
+ }
+
+ public void setGenerateCert(boolean generateCert) {
+ this.generateCert = generateCert;
+ }
public ExperimentResource getExperimentResource() {
return experimentResource;
@@ -113,12 +131,16 @@ public class ConfigDataResource extends AbstractResource {
configData.setAiravataAutoSchedule(airavataAutoSchedule);
configData.setOverrideManualParams(overrideManualParams);
configData.setShareExp(shareExp);
+ configData.setUserDn(userDn);
+ configData.setGenerateCert(generateCert);
if (existingConfig != null) {
existingConfig.setExpId(experimentResource.getExpID());
existingConfig.setExperiment(experiment);
existingConfig.setAiravataAutoSchedule(airavataAutoSchedule);
existingConfig.setOverrideManualParams(overrideManualParams);
existingConfig.setShareExp(shareExp);
+ existingConfig.setUserDn(userDn);
+ existingConfig.setGenerateCert(generateCert);
configData = em.merge(existingConfig);
} else {
em.persist(configData);
http://git-wip-us.apache.org/repos/asf/airavata/blob/73f371d8/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
index 7c4850a..7bf6cfd 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
@@ -722,8 +722,9 @@ public class Utils {
configDataResource.setAiravataAutoSchedule(o.isAiravataAutoSchedule());
configDataResource.setOverrideManualParams(o.isOverrideManualParams());
configDataResource.setShareExp(o.isShareExp());
+ configDataResource.setUserDn(o.getUserDn());
+ configDataResource.setGenerateCert(o.isGenerateCert());
}
-
return configDataResource;
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/73f371d8/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
index e732566..2654596 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
@@ -461,7 +461,9 @@ public class WorkerResource extends AbstractResource {
String filterVal = filters.get(field);
if (field.equals(ProjectConstants.USERNAME)) {
query += "p." + field + "= '" + filterVal + "' AND ";
- } else {
+ }else if (field.equals(ProjectConstants.GATEWAY_ID)) {
+ query += "p." + field + "= '" + filterVal + "' AND ";
+ }else {
if (filterVal.contains("*")){
filterVal = filterVal.replaceAll("\\*", "");
}
@@ -505,6 +507,8 @@ public class WorkerResource extends AbstractResource {
String filterVal = filters.get(field);
if (field.equals(ExperimentConstants.EXECUTION_USER)) {
query += "e." + field + "= '" + filterVal + "' AND ";
+ }else if (field.equals(ExperimentConstants.GATEWAY_ID)) {
+ query += "e." + field + "= '" + filterVal + "' AND ";
} else {
if (filterVal.contains("*")){
filterVal = filterVal.replaceAll("\\*", "");
http://git-wip-us.apache.org/repos/asf/airavata/blob/73f371d8/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
index 95c0e29..101f98f 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
@@ -625,6 +625,8 @@ public class ThriftDataModelConversion {
data.setAiravataAutoSchedule(resource.isAiravataAutoSchedule());
data.setOverrideManualScheduledParams(resource.isOverrideManualParams());
data.setShareExperimentPublicly(resource.isShareExp());
+ data.setUserDN(resource.getUserDn());
+ data.setGenerateCert(resource.isGenerateCert());
ExperimentResource experimentResource = resource.getExperimentResource();
String expID = experimentResource.getExpID();
if (experimentResource.isExists(ResourceType.COMPUTATIONAL_RESOURCE_SCHEDULING, expID)){
http://git-wip-us.apache.org/repos/asf/airavata/blob/73f371d8/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql b/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
index 2fd1283..9ea8c37 100644
--- a/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
+++ b/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
@@ -301,6 +301,8 @@ CREATE TABLE CONFIG_DATA
AIRAVATA_AUTO_SCHEDULE SMALLINT NOT NULL,
OVERRIDE_MANUAL_SCHEDULE_PARAMS SMALLINT NOT NULL,
SHARE_EXPERIMENT SMALLINT,
+ USER_DN VARCHAR(255),
+ GENERATE_CERT SMALLINT,
PRIMARY KEY(EXPERIMENT_ID)
);
http://git-wip-us.apache.org/repos/asf/airavata/blob/73f371d8/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql b/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
index 750067b..33db1d5 100644
--- a/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
+++ b/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
@@ -300,6 +300,8 @@ CREATE TABLE CONFIG_DATA
AIRAVATA_AUTO_SCHEDULE SMALLINT NOT NULL,
OVERRIDE_MANUAL_SCHEDULE_PARAMS SMALLINT NOT NULL,
SHARE_EXPERIMENT SMALLINT,
+ USER_DN VARCHAR(255),
+ GENERATE_CERT SMALLINT,
PRIMARY KEY(EXPERIMENT_ID),
FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
http://git-wip-us.apache.org/repos/asf/airavata/blob/73f371d8/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql b/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql
index 2fd1283..9ea8c37 100644
--- a/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql
+++ b/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql
@@ -301,6 +301,8 @@ CREATE TABLE CONFIG_DATA
AIRAVATA_AUTO_SCHEDULE SMALLINT NOT NULL,
OVERRIDE_MANUAL_SCHEDULE_PARAMS SMALLINT NOT NULL,
SHARE_EXPERIMENT SMALLINT,
+ USER_DN VARCHAR(255),
+ GENERATE_CERT SMALLINT,
PRIMARY KEY(EXPERIMENT_ID)
);
[35/50] [abbrv] airavata git commit: fixing a bug in ssh credential
registration client
Posted by sh...@apache.org.
fixing a bug in ssh credential registration client
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/6da7a74e
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/6da7a74e
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/6da7a74e
Branch: refs/heads/new-workflow-design
Commit: 6da7a74e34f8fa02d3a1f693917996b0ca16b34e
Parents: f31637e
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Wed Mar 11 22:33:28 2015 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Wed Mar 11 22:33:28 2015 -0400
----------------------------------------------------------------------
.../credential/store/store/impl/db/SSHCredentialTest.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/6da7a74e/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java b/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
index e6969e6..45c0be3 100644
--- a/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
+++ b/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
@@ -65,9 +65,9 @@ public class SSHCredentialTest {
pubKeyStream.read(bFilePub);
privateKeyStream.close();
pubKeyStream.close();
- sshCredential.setPrivateKey(bFilePub);
+ sshCredential.setPrivateKey(bFilePri);
sshCredential.setPublicKey(bFilePub);
- sshCredential.setPassphrase("ljclqowueqllad_lqlj");
+ sshCredential.setPassphrase("test");
writer.writeCredentials(sshCredential);
System.out.println(token);
} catch (ClassNotFoundException e) {
[14/50] [abbrv] airavata git commit: Fixed AIRAVATA-1620.
Posted by sh...@apache.org.
Fixed AIRAVATA-1620.
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/774b092d
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/774b092d
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/774b092d
Branch: refs/heads/new-workflow-design
Commit: 774b092d31e41919b39ca3ce9f1edd5af1c30669
Parents: 44d89ee
Author: shamrath <sh...@gmail.com>
Authored: Fri Mar 6 16:18:44 2015 -0500
Committer: shamrath <sh...@gmail.com>
Committed: Fri Mar 6 16:18:44 2015 -0500
----------------------------------------------------------------------
.../server/OrchestratorServerHandler.java | 31 +-
.../engine/SimpleWorkflowInterpreter.java | 280 ++++++++-----------
.../engine/WorkflowEnactmentService.java | 129 ++++++++-
3 files changed, 259 insertions(+), 181 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/774b092d/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
index d168c26..fe306d7 100644
--- a/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
+++ b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
@@ -52,11 +52,20 @@ import org.apache.airavata.model.messaging.event.ExperimentStatusChangeEvent;
import org.apache.airavata.model.messaging.event.MessageType;
import org.apache.airavata.model.messaging.event.ProcessSubmitEvent;
import org.apache.airavata.model.util.ExecutionType;
-import org.apache.airavata.model.workspace.experiment.*;
+import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.model.workspace.experiment.ExperimentState;
+import org.apache.airavata.model.workspace.experiment.ExperimentStatus;
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
+import org.apache.airavata.model.workspace.experiment.TaskState;
+import org.apache.airavata.model.workspace.experiment.TaskStatus;
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeState;
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeStatus;
import org.apache.airavata.orchestrator.core.exception.OrchestratorException;
import org.apache.airavata.orchestrator.cpi.OrchestratorService;
import org.apache.airavata.orchestrator.cpi.impl.SimpleOrchestratorImpl;
import org.apache.airavata.orchestrator.cpi.orchestrator_cpi_serviceConstants;
+import org.apache.airavata.orchestrator.util.DataModelUtils;
import org.apache.airavata.orchestrator.util.OrchestratorServerThreadPoolExecutor;
import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
import org.apache.airavata.registry.cpi.Registry;
@@ -64,17 +73,25 @@ import org.apache.airavata.registry.cpi.RegistryException;
import org.apache.airavata.registry.cpi.RegistryModelType;
import org.apache.airavata.registry.cpi.utils.Constants.FieldConstants.TaskDetailConstants;
import org.apache.airavata.registry.cpi.utils.Constants.FieldConstants.WorkflowNodeConstants;
-import org.apache.airavata.orchestrator.util.DataModelUtils;
-import org.apache.airavata.simple.workflow.engine.SimpleWorkflowInterpreter;
import org.apache.airavata.simple.workflow.engine.WorkflowEnactmentService;
import org.apache.thrift.TBase;
import org.apache.thrift.TException;
-import org.apache.zookeeper.*;
+import org.apache.zookeeper.CreateMode;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.Watcher;
+import org.apache.zookeeper.ZooDefs;
+import org.apache.zookeeper.ZooKeeper;
import org.apache.zookeeper.data.Stat;
import java.io.File;
import java.io.IOException;
-import java.util.*;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
public class OrchestratorServerHandler implements OrchestratorService.Iface,
Watcher {
@@ -656,10 +673,8 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface,
try {
WorkflowEnactmentService.getInstance().
submitWorkflow(experimentId, airavataCredStoreToken, getGatewayName(), getRabbitMQProcessPublisher());
- } catch (RegistryException e) {
- log.error("Error while launching workflow", e);
} catch (Exception e) {
- log.error("Error while initializing rabbit mq process publisher");
+ log.error("Error while launching workflow", e);
}
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/774b092d/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/SimpleWorkflowInterpreter.java
----------------------------------------------------------------------
diff --git a/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/SimpleWorkflowInterpreter.java b/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/SimpleWorkflowInterpreter.java
index a052e5c..ee7ff6b 100644
--- a/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/SimpleWorkflowInterpreter.java
+++ b/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/SimpleWorkflowInterpreter.java
@@ -24,8 +24,6 @@ package org.apache.airavata.simple.workflow.engine;
import org.apache.airavata.common.exception.AiravataException;
import org.apache.airavata.common.utils.AiravataUtils;
import org.apache.airavata.messaging.core.MessageContext;
-import org.apache.airavata.messaging.core.MessageHandler;
-import org.apache.airavata.messaging.core.MessagingConstants;
import org.apache.airavata.messaging.core.impl.RabbitMQProcessPublisher;
import org.apache.airavata.messaging.core.impl.RabbitMQStatusConsumer;
import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
@@ -66,7 +64,10 @@ import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
-public class SimpleWorkflowInterpreter implements Runnable{
+/**
+ * Package-Private class
+ */
+class SimpleWorkflowInterpreter{
private static final Logger log = LoggerFactory.getLogger(SimpleWorkflowInterpreter.class);
private List<WorkflowInputNode> workflowInputNodes;
@@ -102,8 +103,11 @@ public class SimpleWorkflowInterpreter implements Runnable{
this.publisher = publisher;
}
-
- public void launchWorkflow() throws Exception {
+ /**
+ * Package-Private method.
+ * @throws Exception
+ */
+ void launchWorkflow() throws Exception {
WorkflowFactoryImpl wfFactory = WorkflowFactoryImpl.getInstance();
WorkflowParser workflowParser = wfFactory.getWorkflowParser(experiment.getExperimentID(), credentialToken);
log.debug("Initialized workflow parser");
@@ -111,15 +115,16 @@ public class SimpleWorkflowInterpreter implements Runnable{
log.debug("Parsed the workflow and got the workflow input nodes");
// process workflow input nodes
processWorkflowInputNodes(getWorkflowInputNodes());
- // initialize the rabbitmq status consumer
- statusConsumer = new RabbitMQStatusConsumer();
- consumerId = statusConsumer.listen(new TaskMessageHandler());
-
processReadyList();
}
// try to remove synchronization tag
- private synchronized void processReadyList() throws RegistryException, AiravataException {
+ /**
+ * Package-Private method.
+ * @throws RegistryException
+ * @throws AiravataException
+ */
+ void processReadyList() throws RegistryException, AiravataException {
for (WorkflowNode readyNode : readyList.values()) {
if (readyNode instanceof WorkflowOutputNode) {
WorkflowOutputNode wfOutputNode = (WorkflowOutputNode) readyNode;
@@ -232,10 +237,11 @@ public class SimpleWorkflowInterpreter implements Runnable{
}
/**
+ * Package-Private method.
* Remove the workflow node from waiting queue and add it to the ready queue.
* @param workflowNode - Workflow Node
*/
- private synchronized void addToReadyQueue(WorkflowNode workflowNode) {
+ synchronized void addToReadyQueue(WorkflowNode workflowNode) {
waitingList.remove(workflowNode.getId());
readyList.put(workflowNode.getId(), workflowNode);
}
@@ -265,31 +271,8 @@ public class SimpleWorkflowInterpreter implements Runnable{
readyList.remove(wfOutputNode.getId());
}
- @Override
- public void run() {
- try {
- log.debug("Launching workflow");
- launchWorkflow();
- while (continueWorkflow && !(waitingList.isEmpty() && readyList.isEmpty())) {
-// processReadyList();
- Thread.sleep(1000);
- }
- if (continueWorkflow) {
- log.info("Successfully launched workflow for experiment : " + getExperiment().getExperimentID());
- } else if (!(waitingList.isEmpty() || readyList.isEmpty())) {
- log.error("Workflow couldn't execute all workflow nodes due to an error");
- }
- } catch (Exception e) {
- log.error("Error launching workflow", e);
- } finally {
- try {
- statusConsumer.stopListen(consumerId);
- log.info("Successfully un-bind status consumer for experiment " + getExperiment().getExperimentID());
- } catch (AiravataException e) {
- log.error("Error while un-binding status consumer: " + consumerId + " for experiment "
- + getExperiment().getExperimentID());
- }
- }
+ boolean isAllDone() {
+ return !continueWorkflow || (waitingList.isEmpty() && readyList.isEmpty());
}
private void setExperiment(String experimentId) throws RegistryException {
@@ -297,147 +280,108 @@ public class SimpleWorkflowInterpreter implements Runnable{
log.debug("Retrieve Experiment for experiment id : " + experimentId);
}
- class TaskMessageHandler implements MessageHandler{
-
- @Override
- public Map<String, Object> getProperties() {
- Map<String, Object> props = new HashMap<String, Object>();
- String gatewayId = "*";
- String experimentId = getExperiment().getExperimentID();
- List<String> routingKeys = new ArrayList<String>();
-// routingKeys.add(gatewayName+ "." + getExperiment().getExperimentID() + ".*");
- routingKeys.add(gatewayId);
- routingKeys.add(gatewayId + "." + experimentId);
- routingKeys.add(gatewayId + "." + experimentId+ ".*");
- routingKeys.add(gatewayId + "." + experimentId+ ".*.*");
- props.put(MessagingConstants.RABBIT_ROUTING_KEY, routingKeys);
- return props;
- }
-
- @Override
- public void onMessage(MessageContext msgCtx) {
- String message;
- if (msgCtx.getType() == MessageType.TASK) {
- TaskStatusChangeEvent event = (TaskStatusChangeEvent) msgCtx.getEvent();
- TaskIdentifier taskIdentifier = event.getTaskIdentity();
- handleTaskStatusChangeEvent(event);
- message = "Received task output change event , expId : " + taskIdentifier.getExperimentId() + ", taskId : " + taskIdentifier.getTaskId() + ", workflow node Id : " + taskIdentifier.getWorkflowNodeId();
- log.debug(message);
- }else if (msgCtx.getType() == MessageType.TASKOUTPUT) {
- TaskOutputChangeEvent event = (TaskOutputChangeEvent) msgCtx.getEvent();
- TaskIdentifier taskIdentifier = event.getTaskIdentity();
- handleTaskOutputChangeEvent(event);
- message = "Received task output change event , expId : " + taskIdentifier.getExperimentId() + ", taskId : " + taskIdentifier.getTaskId() + ", workflow node Id : " + taskIdentifier.getWorkflowNodeId();
- log.debug(message);
- } else {
- // not interesting, ignores
- }
- }
-
- private void handleTaskOutputChangeEvent(TaskOutputChangeEvent taskOutputChangeEvent) {
-
- String taskId = taskOutputChangeEvent.getTaskIdentity().getTaskId();
- log.debug("Task Output changed event received for workflow node : " +
- taskOutputChangeEvent.getTaskIdentity().getWorkflowNodeId() + ", task : " + taskId);
- ProcessContext processContext = processingQueue.get(taskId);
- Set<WorkflowNode> tempWfNodeSet = new HashSet<WorkflowNode>();
- if (processContext != null) {
- WorkflowNode workflowNode = processContext.getWorkflowNode();
- if (workflowNode instanceof ApplicationNode) {
- ApplicationNode applicationNode = (ApplicationNode) workflowNode;
- // Workflow node can have one to many output ports and each output port can have one to many links
- for (OutPort outPort : applicationNode.getOutputPorts()) {
- for (OutputDataObjectType outputDataObjectType : taskOutputChangeEvent.getOutput()) {
- if (outPort.getOutputObject().getName().equals(outputDataObjectType.getName())) {
- outPort.getOutputObject().setValue(outputDataObjectType.getValue());
- break;
- }
+ synchronized void handleTaskOutputChangeEvent(TaskOutputChangeEvent taskOutputChangeEvent) {
+
+ String taskId = taskOutputChangeEvent.getTaskIdentity().getTaskId();
+ log.debug("Task Output changed event received for workflow node : " +
+ taskOutputChangeEvent.getTaskIdentity().getWorkflowNodeId() + ", task : " + taskId);
+ ProcessContext processContext = processingQueue.get(taskId);
+ Set<WorkflowNode> tempWfNodeSet = new HashSet<WorkflowNode>();
+ if (processContext != null) {
+ WorkflowNode workflowNode = processContext.getWorkflowNode();
+ if (workflowNode instanceof ApplicationNode) {
+ ApplicationNode applicationNode = (ApplicationNode) workflowNode;
+ // Workflow node can have one to many output ports and each output port can have one to many links
+ for (OutPort outPort : applicationNode.getOutputPorts()) {
+ for (OutputDataObjectType outputDataObjectType : taskOutputChangeEvent.getOutput()) {
+ if (outPort.getOutputObject().getName().equals(outputDataObjectType.getName())) {
+ outPort.getOutputObject().setValue(outputDataObjectType.getValue());
+ break;
}
- for (Edge edge : outPort.getOutEdges()) {
- edge.getToPort().getInputObject().setValue(outPort.getOutputObject().getValue());
- if (edge.getToPort().getNode().isReady()) {
- addToReadyQueue(edge.getToPort().getNode());
- }
+ }
+ for (Edge edge : outPort.getOutEdges()) {
+ edge.getToPort().getInputObject().setValue(outPort.getOutputObject().getValue());
+ if (edge.getToPort().getNode().isReady()) {
+ addToReadyQueue(edge.getToPort().getNode());
}
}
}
- addToCompleteQueue(processContext);
- log.debug("removed task from processing queue : " + taskId);
- try {
- processReadyList();
- } catch (Exception e) {
- log.error("Error while processing ready workflow nodes", e);
- continueWorkflow = false;
- }
+ }
+ addToCompleteQueue(processContext);
+ log.debug("removed task from processing queue : " + taskId);
+ try {
+ processReadyList();
+ } catch (Exception e) {
+ log.error("Error while processing ready workflow nodes", e);
+ continueWorkflow = false;
}
}
+ }
- private void handleTaskStatusChangeEvent(TaskStatusChangeEvent taskStatusChangeEvent) {
- TaskState taskState = taskStatusChangeEvent.getState();
- TaskIdentifier taskIdentity = taskStatusChangeEvent.getTaskIdentity();
- String taskId = taskIdentity.getTaskId();
- ProcessContext processContext = processingQueue.get(taskId);
- if (processContext != null) {
- WorkflowNodeState wfNodeState = WorkflowNodeState.INVOKED;
- switch (taskState) {
- case WAITING:
- break;
- case STARTED:
- break;
- case PRE_PROCESSING:
- wfNodeState = WorkflowNodeState.INVOKED;
- processContext.getWorkflowNode().setState(NodeState.PRE_PROCESSING);
- break;
- case INPUT_DATA_STAGING:
- wfNodeState = WorkflowNodeState.INVOKED;
- processContext.getWorkflowNode().setState(NodeState.PRE_PROCESSING);
- break;
- case EXECUTING:
- wfNodeState = WorkflowNodeState.EXECUTING;
- processContext.getWorkflowNode().setState(NodeState.EXECUTING);
- break;
- case OUTPUT_DATA_STAGING:
- wfNodeState = WorkflowNodeState.COMPLETED;
- processContext.getWorkflowNode().setState(NodeState.POST_PROCESSING);
- break;
- case POST_PROCESSING:
- wfNodeState = WorkflowNodeState.COMPLETED;
- processContext.getWorkflowNode().setState(NodeState.POST_PROCESSING);
- break;
- case COMPLETED:
- wfNodeState = WorkflowNodeState.COMPLETED;
- processContext.getWorkflowNode().setState(NodeState.EXECUTED);
- break;
- case FAILED:
- wfNodeState = WorkflowNodeState.FAILED;
- processContext.getWorkflowNode().setState(NodeState.FAILED);
- break;
- case UNKNOWN:
- wfNodeState = WorkflowNodeState.UNKNOWN;
- break;
- case CONFIGURING_WORKSPACE:
- wfNodeState = WorkflowNodeState.COMPLETED;
- break;
- case CANCELED:
- case CANCELING:
- wfNodeState = WorkflowNodeState.CANCELED;
- processContext.getWorkflowNode().setState(NodeState.FAILED);
- break;
- default:
- break;
- }
- if (wfNodeState != WorkflowNodeState.UNKNOWN) {
- try {
- updateWorkflowNodeStatus(processContext.getWfNodeDetails(), wfNodeState);
- } catch (RegistryException e) {
- log.error("Error while updating workflow node status update to the registry. nodeInstanceId :"
- + processContext.getWfNodeDetails().getNodeInstanceId() + " status to: "
- + processContext.getWfNodeDetails().getWorkflowNodeStatus().toString() , e);
- }
+ void handleTaskStatusChangeEvent(TaskStatusChangeEvent taskStatusChangeEvent) {
+ TaskState taskState = taskStatusChangeEvent.getState();
+ TaskIdentifier taskIdentity = taskStatusChangeEvent.getTaskIdentity();
+ String taskId = taskIdentity.getTaskId();
+ ProcessContext processContext = processingQueue.get(taskId);
+ if (processContext != null) {
+ WorkflowNodeState wfNodeState = WorkflowNodeState.INVOKED;
+ switch (taskState) {
+ case WAITING:
+ break;
+ case STARTED:
+ break;
+ case PRE_PROCESSING:
+ wfNodeState = WorkflowNodeState.INVOKED;
+ processContext.getWorkflowNode().setState(NodeState.PRE_PROCESSING);
+ break;
+ case INPUT_DATA_STAGING:
+ wfNodeState = WorkflowNodeState.INVOKED;
+ processContext.getWorkflowNode().setState(NodeState.PRE_PROCESSING);
+ break;
+ case EXECUTING:
+ wfNodeState = WorkflowNodeState.EXECUTING;
+ processContext.getWorkflowNode().setState(NodeState.EXECUTING);
+ break;
+ case OUTPUT_DATA_STAGING:
+ wfNodeState = WorkflowNodeState.COMPLETED;
+ processContext.getWorkflowNode().setState(NodeState.POST_PROCESSING);
+ break;
+ case POST_PROCESSING:
+ wfNodeState = WorkflowNodeState.COMPLETED;
+ processContext.getWorkflowNode().setState(NodeState.POST_PROCESSING);
+ break;
+ case COMPLETED:
+ wfNodeState = WorkflowNodeState.COMPLETED;
+ processContext.getWorkflowNode().setState(NodeState.EXECUTED);
+ break;
+ case FAILED:
+ wfNodeState = WorkflowNodeState.FAILED;
+ processContext.getWorkflowNode().setState(NodeState.FAILED);
+ break;
+ case UNKNOWN:
+ wfNodeState = WorkflowNodeState.UNKNOWN;
+ break;
+ case CONFIGURING_WORKSPACE:
+ wfNodeState = WorkflowNodeState.COMPLETED;
+ break;
+ case CANCELED:
+ case CANCELING:
+ wfNodeState = WorkflowNodeState.CANCELED;
+ processContext.getWorkflowNode().setState(NodeState.FAILED);
+ break;
+ default:
+ break;
+ }
+ if (wfNodeState != WorkflowNodeState.UNKNOWN) {
+ try {
+ updateWorkflowNodeStatus(processContext.getWfNodeDetails(), wfNodeState);
+ } catch (RegistryException e) {
+ log.error("Error while updating workflow node status update to the registry. nodeInstanceId :"
+ + processContext.getWfNodeDetails().getNodeInstanceId() + " status to: "
+ + processContext.getWfNodeDetails().getWorkflowNodeStatus().toString() , e);
}
}
-
}
- }
+ }
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/774b092d/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/WorkflowEnactmentService.java
----------------------------------------------------------------------
diff --git a/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/WorkflowEnactmentService.java b/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/WorkflowEnactmentService.java
index ec5acfa..c7ab7b9 100644
--- a/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/WorkflowEnactmentService.java
+++ b/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/WorkflowEnactmentService.java
@@ -21,23 +21,46 @@
package org.apache.airavata.simple.workflow.engine;
+import org.apache.airavata.common.exception.AiravataException;
import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.messaging.core.MessageContext;
+import org.apache.airavata.messaging.core.MessageHandler;
+import org.apache.airavata.messaging.core.MessagingConstants;
import org.apache.airavata.messaging.core.impl.RabbitMQProcessPublisher;
-import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.messaging.core.impl.RabbitMQStatusConsumer;
+import org.apache.airavata.model.messaging.event.MessageType;
+import org.apache.airavata.model.messaging.event.TaskIdentifier;
+import org.apache.airavata.model.messaging.event.TaskOutputChangeEvent;
+import org.apache.airavata.model.messaging.event.TaskStatusChangeEvent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class WorkflowEnactmentService {
private static WorkflowEnactmentService workflowEnactmentService;
+ private final RabbitMQStatusConsumer statusConsumer;
+ private String consumerId;
private ExecutorService executor;
+ private Map<String,SimpleWorkflowInterpreter> workflowMap;
- private WorkflowEnactmentService () {
+ private WorkflowEnactmentService () throws AiravataException {
executor = Executors.newFixedThreadPool(getThreadPoolSize());
+ workflowMap = new ConcurrentHashMap<String, SimpleWorkflowInterpreter>();
+ statusConsumer = new RabbitMQStatusConsumer();
+ consumerId = statusConsumer.listen(new TaskMessageHandler());
+ // register the shutdown hook to un-bind status consumer.
+ Runtime.getRuntime().addShutdownHook(new EnactmentShutDownHook());
}
- public static WorkflowEnactmentService getInstance(){
+ public static WorkflowEnactmentService getInstance() throws AiravataException {
if (workflowEnactmentService == null) {
synchronized (WorkflowEnactmentService.class) {
if (workflowEnactmentService == null) {
@@ -51,14 +74,110 @@ public class WorkflowEnactmentService {
public void submitWorkflow(String experimentId,
String credentialToken,
String gatewayName,
- RabbitMQProcessPublisher publisher) throws RegistryException {
+ RabbitMQProcessPublisher publisher) throws Exception {
SimpleWorkflowInterpreter simpleWorkflowInterpreter = new SimpleWorkflowInterpreter(
experimentId, credentialToken,gatewayName, publisher);
- executor.execute(simpleWorkflowInterpreter);
+ workflowMap.put(experimentId, simpleWorkflowInterpreter);
+ simpleWorkflowInterpreter.launchWorkflow();
+
}
private int getThreadPoolSize() {
return ServerSettings.getEnactmentThreadPoolSize();
}
+
+ private class TaskMessageHandler implements MessageHandler {
+
+ @Override
+ public Map<String, Object> getProperties() {
+ Map<String, Object> props = new HashMap<String, Object>();
+ String gatewayId = "*";
+ String experimentId = "*";
+ List<String> routingKeys = new ArrayList<String>();
+ routingKeys.add(gatewayId);
+ routingKeys.add(gatewayId + "." + experimentId);
+ routingKeys.add(gatewayId + "." + experimentId+ ".*");
+ routingKeys.add(gatewayId + "." + experimentId+ ".*.*");
+ props.put(MessagingConstants.RABBIT_ROUTING_KEY, routingKeys);
+ return props;
+ }
+
+ @Override
+ public void onMessage(MessageContext msgCtx) {
+ StatusHandler statusHandler = new StatusHandler(msgCtx);
+ executor.execute(statusHandler);
+ }
+
+
+ }
+
+ private class StatusHandler implements Runnable{
+ private final Logger log = LoggerFactory.getLogger(StatusHandler.class);
+
+ private final MessageContext msgCtx;
+
+ public StatusHandler(MessageContext msgCtx) {
+ this.msgCtx = msgCtx;
+ }
+
+ @Override
+ public void run() {
+ process();
+ }
+
+ private void process() {
+ String message;
+ SimpleWorkflowInterpreter simpleWorkflowInterpreter;
+ if (msgCtx.getType() == MessageType.TASK) {
+ TaskStatusChangeEvent event = (TaskStatusChangeEvent) msgCtx.getEvent();
+ TaskIdentifier taskIdentifier = event.getTaskIdentity();
+ simpleWorkflowInterpreter = getInterpreter(taskIdentifier.getExperimentId());
+ if (simpleWorkflowInterpreter != null) {
+ simpleWorkflowInterpreter.handleTaskStatusChangeEvent(event);
+ } else {
+ // this happens when Task status messages comes after the Taskoutput messages,as we have worked on
+ // output changes it is ok to ignore this.
+ }
+ message = "Received task output change event , expId : " + taskIdentifier.getExperimentId() + ", taskId : " + taskIdentifier.getTaskId() + ", workflow node Id : " + taskIdentifier.getWorkflowNodeId();
+ log.debug(message);
+ }else if (msgCtx.getType() == MessageType.TASKOUTPUT) {
+ TaskOutputChangeEvent event = (TaskOutputChangeEvent) msgCtx.getEvent();
+ TaskIdentifier taskIdentifier = event.getTaskIdentity();
+ simpleWorkflowInterpreter = getInterpreter(taskIdentifier.getExperimentId());
+ if (simpleWorkflowInterpreter != null) {
+ simpleWorkflowInterpreter.handleTaskOutputChangeEvent(event);
+ if (simpleWorkflowInterpreter.isAllDone()) {
+ workflowMap.remove(taskIdentifier.getExperimentId());
+ }
+ } else {
+ throw new IllegalArgumentException("Error while processing TaskOutputChangeEvent, " +
+ "There is no registered workflow for experiment Id : " + taskIdentifier.getExperimentId());
+ }
+ message = "Received task output change event , expId : " + taskIdentifier.getExperimentId() + ", taskId : " + taskIdentifier.getTaskId() + ", workflow node Id : " + taskIdentifier.getWorkflowNodeId();
+ log.debug(message);
+ } else {
+ // not interested, ignores
+ }
+ }
+
+ private SimpleWorkflowInterpreter getInterpreter(String experimentId){
+ return workflowMap.get(experimentId);
+ }
+ }
+
+
+ private class EnactmentShutDownHook extends Thread {
+ private final Logger log = LoggerFactory.getLogger(EnactmentShutDownHook.class);
+ @Override
+ public void run() {
+ super.run();
+ try {
+ statusConsumer.stopListen(consumerId);
+ log.info("Successfully un-binded task status consumer");
+ } catch (AiravataException e) {
+ log.error("Error while un-bind enactment status consumer", e);
+ }
+ }
+ }
}
[50/50] [abbrv] airavata git commit: Mereged master branch
Posted by sh...@apache.org.
Mereged master branch
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/0db33d2e
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/0db33d2e
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/0db33d2e
Branch: refs/heads/new-workflow-design
Commit: 0db33d2e515603f94a8fc4abd34b1b91f6a1faa4
Parents: 48192d9 73f371d
Author: shamrath <sh...@gmail.com>
Authored: Thu Mar 19 15:11:10 2015 -0400
Committer: shamrath <sh...@gmail.com>
Committed: Thu Mar 19 15:11:10 2015 -0400
----------------------------------------------------------------------
.../airavata/api/server/AiravataAPIServer.java | 38 +-
.../server/handler/AiravataServerHandler.java | 498 +-
.../api/server/util/DataModelUtils.java | 8 +-
.../java/org/apache/airavata/api/Airavata.java | 49461 ++++++++++++-----
.../airavata/api/airavataAPIConstants.java | 2 +-
.../main/resources/lib/airavata/Airavata.cpp | 15118 +++--
.../src/main/resources/lib/airavata/Airavata.h | 7404 ++-
.../lib/airavata/Airavata_server.skeleton.cpp | 115 +-
.../lib/airavata/airavataAPI_constants.cpp | 2 +-
.../lib/airavata/computeResourceModel_types.cpp | 12 +-
.../lib/airavata/computeResourceModel_types.h | 5 +-
.../lib/airavata/experimentModel_types.cpp | 62 +-
.../lib/airavata/experimentModel_types.h | 61 +-
.../gatewayResourceProfileModel_constants.cpp | 2 -
.../gatewayResourceProfileModel_constants.h | 1 -
.../gatewayResourceProfileModel_types.cpp | 72 +-
.../gatewayResourceProfileModel_types.h | 45 +-
.../lib/airavata/workspaceModel_types.cpp | 51 +-
.../lib/airavata/workspaceModel_types.h | 45 +-
.../resources/lib/Airavata/API/Airavata.php | 13160 +++--
.../main/resources/lib/Airavata/API/Types.php | 2 +-
.../Model/AppCatalog/ComputeResource/Types.php | 10 +-
.../Model/AppCatalog/GatewayProfile/Types.php | 92 +-
.../Model/Workspace/Experiment/Types.php | 60 +
.../lib/Airavata/Model/Workspace/Types.php | 58 +-
.../client/samples/CreateLaunchExperiment.java | 1007 +-
.../samples/CreateLaunchExperimentUS3.java | 20 +-
.../client/samples/RegisterSampleData.java | 37 +-
.../samples/TestCreateLaunchExperiment.java | 10 +-
.../tools/RegisterOGCEUS3Application.java | 10 +-
.../tools/RegisterSampleApplications.java | 366 +-
.../client/tools/RegisterUS3Application.java | 14 +-
.../computeresource/AuthenticationMode.java | 70 +
.../computeresource/ResourceJobManagerType.java | 42 +-
.../computeresource/UnicoreJobSubmission.java | 2 +
.../ComputeResourcePreference.java | 168 +-
.../gatewayprofile/GatewayResourceProfile.java | 226 +-
.../airavata/model/workspace/Gateway.java | 334 +-
.../ComputationalResourceScheduling.java | 109 +-
.../experiment/UserConfigurationData.java | 205 +-
.../airavataAPI.thrift | 192 +-
.../computeResourceModel.thrift | 23 +-
.../experimentModel.thrift | 11 +-
.../gatewayResourceProfileModel.thrift | 28 +-
.../workspaceModel.thrift | 6 +-
.../appcatalog/cpi/ApplicationDeployment.java | 4 +-
.../appcatalog/cpi/ApplicationInterface.java | 8 +-
.../appcatalog/cpi/ComputeResource.java | 3 +
.../appcatalog/cpi/WorkflowCatalog.java | 4 +-
.../data/impl/ApplicationDeploymentImpl.java | 6 +-
.../data/impl/ApplicationInterfaceImpl.java | 12 +-
.../catalog/data/impl/ComputeResourceImpl.java | 45 +-
.../data/impl/GwyResourceProfileImpl.java | 30 +-
.../catalog/data/impl/WorkflowCatalogImpl.java | 6 +-
.../data/model/ApplicationDeployment.java | 10 +
.../data/model/ApplicationInterface.java | 10 +
.../catalog/data/model/ApplicationModule.java | 10 +
.../data/model/ComputeResourcePreference.java | 10 +
.../catalog/data/model/GatewayProfile.java | 19 -
.../catalog/data/model/UnicoreDataMovement.java | 65 +
.../data/model/UnicoreJobSubmission.java | 5 +-
.../catalog/data/model/Workflow.java | 10 +
.../data/resources/AbstractResource.java | 13 +-
.../data/resources/AppDeploymentResource.java | 12 +
.../data/resources/AppInterfaceResource.java | 12 +
.../data/resources/AppModuleResource.java | 12 +
.../ComputeHostPreferenceResource.java | 11 +
.../data/resources/GatewayProfileResource.java | 30 +-
.../resources/UnicoreDataMovementResource.java | 255 +
.../resources/UnicoreJobSubmissionResource.java | 16 +-
.../data/resources/WorkflowResource.java | 12 +
.../catalog/data/util/AppCatalogJPAUtils.java | 26 +-
.../data/util/AppCatalogResourceType.java | 1 +
.../data/util/AppCatalogThriftConversion.java | 29 +-
.../src/main/resources/META-INF/persistence.xml | 1 +
.../src/main/resources/appcatalog-derby.sql | 219 +-
.../src/main/resources/appcatalog-mysql.sql | 218 +-
.../app/catalog/test/AppDeploymentTest.java | 11 +-
.../app/catalog/test/AppInterfaceTest.java | 12 +-
.../app/catalog/test/GatewayProfileTest.java | 5 +-
.../src/test/resources/appcatalog-derby.sql | 219 +-
modules/commons/utils/pom.xml | 4 +-
.../apache/airavata/common/utils/Constants.java | 4 +-
.../common/utils/DatabaseTestCases.java | 2 +-
.../airavata/common/utils/WSConstants.java | 10 +-
.../apache/airavata/common/utils/WSDLUtil.java | 764 +-
.../apache/airavata/common/utils/XMLUtil.java | 34 +-
.../main/resources/airavata-client.properties | 2 +-
.../server/src/main/resources/LSFTemplate.xslt | 92 +
.../server/src/main/resources/PBSTemplate.xslt | 22 +-
.../server/src/main/resources/SGETemplate.xslt | 18 +-
.../src/main/resources/SLURMTemplate.xslt | 22 +-
.../main/resources/airavata-server.properties | 6 +-
.../credential-store-webapp/pom.xml | 158 -
.../basic/BasicAccessAuthenticator.java | 226 -
.../credentialstore/local/LocalUserStore.java | 339 -
.../session/HttpAuthenticatorFilter.java | 191 -
.../session/ServletRequestHelper.java | 129 -
.../main/resources/airavata-server.properties | 241 -
.../main/resources/credential-store/client.xml | 36 -
.../credential-store/oauth-privkey.pk8 | 28 -
.../resources/credential-store/oauth-pubkey.pem | 9 -
.../src/main/webapp/WEB-INF/web.xml | 130 -
.../src/main/webapp/acs/index.jsp | 44 -
.../src/main/webapp/credential-store/error.jsp | 53 -
.../credential-store/password-credentials.jsp | 33 -
.../webapp/credential-store/show-redirect.jsp | 44 -
.../main/webapp/credential-store/success.jsp | 25 -
.../src/main/webapp/gateway/acs.jsp | 62 -
.../src/main/webapp/gateway/callback.jsp | 78 -
.../src/main/webapp/gateway/list_users.jsp | 78 -
.../src/main/webapp/gateway/logout.jsp | 35 -
.../src/main/webapp/gateway/user.jsp | 102 -
.../src/main/webapp/images/airavata-logo-2.png | Bin 4314 -> 0 bytes
.../src/main/webapp/index.jsp | 26 -
.../src/main/webapp/user-store/add.jsp | 142 -
.../src/main/webapp/user-store/index.jsp | 138 -
.../src/main/webapp/user-store/password.jsp | 157 -
.../credential-store/pom.xml | 149 -
.../scripts/credential-store-h2.sql | 42 -
.../scripts/credential-store-mysql.sql | 42 -
.../credential/store/client/TestSSLClient.java | 140 -
.../store/cpi/CredentialStoreService.java | 6888 ---
.../store/cpi/cs_cpi_serviceConstants.java | 55 -
.../credential/store/credential/AuditInfo.java | 53 -
.../store/credential/CommunityUser.java | 71 -
.../credential/store/credential/Credential.java | 62 -
.../impl/certificate/CertificateAuditInfo.java | 101 -
.../impl/certificate/CertificateCredential.java | 102 -
.../impl/password/PasswordCredential.java | 53 -
.../credential/impl/ssh/SSHCredential.java | 88 -
.../impl/ssh/SSHCredentialGenerator.java | 103 -
.../store/datamodel/CertificateCredential.java | 1104 -
.../store/datamodel/CommunityUser.java | 589 -
.../store/datamodel/PasswordCredential.java | 698 -
.../store/datamodel/SSHCredential.java | 998 -
.../store/datamodel/csDataModelConstants.java | 55 -
.../exception/CredentialStoreException.java | 397 -
.../store/notifier/CredentialStoreNotifier.java | 42 -
.../store/notifier/NotificationMessage.java | 46 -
.../store/notifier/NotifierBootstrap.java | 144 -
.../notifier/impl/EmailNotificationMessage.java | 58 -
.../store/notifier/impl/EmailNotifier.java | 71 -
.../impl/EmailNotifierConfiguration.java | 84 -
.../store/server/CredentialStoreServer.java | 158 -
.../server/CredentialStoreServerHandler.java | 201 -
.../store/servlet/CredentialBootstrapper.java | 49 -
.../servlet/CredentialStoreCallbackServlet.java | 272 -
.../servlet/CredentialStoreStartServlet.java | 183 -
.../store/store/CredentialReader.java | 112 -
.../store/store/CredentialReaderFactory.java | 54 -
.../store/store/CredentialStoreException.java | 40 -
.../store/store/CredentialWriter.java | 39 -
.../store/impl/CertificateCredentialWriter.java | 121 -
.../store/store/impl/CredentialReaderImpl.java | 162 -
.../store/store/impl/SSHCredentialWriter.java | 87 -
.../store/store/impl/db/CommunityUserDAO.java | 257 -
.../store/store/impl/db/CredentialsDAO.java | 458 -
.../store/store/impl/db/ParentDAO.java | 37 -
.../store/util/ConfigurationReader.java | 121 -
.../store/util/CredentialStoreConstants.java | 37 -
.../credential/store/util/PrivateKeyStore.java | 70 -
.../credential/store/util/TokenGenerator.java | 57 -
.../airavata/credential/store/util/Utility.java | 110 -
.../store/notifier/impl/EmailNotifierTest.java | 56 -
.../store/impl/db/CommunityUserDAOTest.java | 207 -
.../store/store/impl/db/CredentialsDAOTest.java | 421 -
.../store/util/ConfigurationReaderTest.java | 58 -
.../store/util/TokenGeneratorTest.java | 42 -
.../test/resources/credential-store/client.xml | 35 -
.../src/test/resources/keystore.jks | Bin 2230 -> 0 bytes
.../src/test/resources/mykeystore.jks | Bin 498 -> 0 bytes
.../credentialStoreErrors.thrift | 32 -
.../cs-thrift-description/cs.cpi.service.thrift | 50 -
.../cs-thrift-description/csDataModel.thrift | 61 -
.../cs-thrift-description/generate-cs-stubs.sh | 134 -
modules/credential-store-service/pom.xml | 42 -
.../credential-store-service/pom.xml | 166 +
.../scripts/credential-store-h2.sql | 42 +
.../scripts/credential-store-mysql.sql | 42 +
.../credential/store/credential/AuditInfo.java | 53 +
.../store/credential/CommunityUser.java | 71 +
.../credential/store/credential/Credential.java | 62 +
.../impl/certificate/CertificateAuditInfo.java | 101 +
.../impl/certificate/CertificateCredential.java | 102 +
.../impl/password/PasswordCredential.java | 53 +
.../credential/impl/ssh/SSHCredential.java | 88 +
.../impl/ssh/SSHCredentialGenerator.java | 103 +
.../store/notifier/CredentialStoreNotifier.java | 42 +
.../store/notifier/NotificationMessage.java | 46 +
.../store/notifier/NotifierBootstrap.java | 144 +
.../notifier/impl/EmailNotificationMessage.java | 58 +
.../store/notifier/impl/EmailNotifier.java | 71 +
.../impl/EmailNotifierConfiguration.java | 84 +
.../store/server/CredentialStoreServer.java | 158 +
.../server/CredentialStoreServerHandler.java | 202 +
.../store/servlet/CredentialBootstrapper.java | 49 +
.../servlet/CredentialStoreCallbackServlet.java | 272 +
.../servlet/CredentialStoreStartServlet.java | 183 +
.../store/store/CredentialReader.java | 112 +
.../store/store/CredentialReaderFactory.java | 54 +
.../store/store/CredentialStoreException.java | 40 +
.../store/store/CredentialWriter.java | 39 +
.../store/impl/CertificateCredentialWriter.java | 121 +
.../store/store/impl/CredentialReaderImpl.java | 162 +
.../store/store/impl/SSHCredentialWriter.java | 87 +
.../store/store/impl/db/CommunityUserDAO.java | 257 +
.../store/store/impl/db/CredentialsDAO.java | 458 +
.../store/store/impl/db/ParentDAO.java | 37 +
.../store/util/ConfigurationReader.java | 121 +
.../store/util/CredentialStoreConstants.java | 37 +
.../credential/store/util/PrivateKeyStore.java | 70 +
.../credential/store/util/TokenGenerator.java | 57 +
.../airavata/credential/store/util/Utility.java | 110 +
.../store/notifier/impl/EmailNotifierTest.java | 56 +
.../store/impl/db/CommunityUserDAOTest.java | 207 +
.../store/store/impl/db/CredentialsDAOTest.java | 421 +
.../store/store/impl/db/SSHCredentialTest.java | 92 +
.../store/util/ConfigurationReaderTest.java | 58 +
.../store/util/TokenGeneratorTest.java | 42 +
.../test/resources/airavata-server.properties | 254 +
.../test/resources/credential-store/client.xml | 35 +
.../src/test/resources/keystore.jks | Bin 0 -> 2230 bytes
.../src/test/resources/mykeystore.jks | Bin 0 -> 498 bytes
.../credential-store-stubs/pom.xml | 50 +
.../credential/store/client/TestSSLClient.java | 140 +
.../store/cpi/CredentialStoreService.java | 6888 +++
.../store/cpi/credentialStoreCPIConstants.java | 55 +
.../store/datamodel/CertificateCredential.java | 1104 +
.../store/datamodel/CommunityUser.java | 589 +
.../store/datamodel/PasswordCredential.java | 698 +
.../store/datamodel/SSHCredential.java | 998 +
.../credentialStoreDataModelConstants.java | 55 +
.../exception/CredentialStoreException.java | 397 +
.../credential-store-webapp/pom.xml | 158 +
.../basic/BasicAccessAuthenticator.java | 226 +
.../credentialstore/local/LocalUserStore.java | 339 +
.../session/HttpAuthenticatorFilter.java | 191 +
.../session/ServletRequestHelper.java | 129 +
.../main/resources/airavata-server.properties | 241 +
.../main/resources/credential-store/client.xml | 36 +
.../credential-store/oauth-privkey.pk8 | 28 +
.../resources/credential-store/oauth-pubkey.pem | 9 +
.../src/main/webapp/WEB-INF/web.xml | 130 +
.../src/main/webapp/acs/index.jsp | 44 +
.../src/main/webapp/credential-store/error.jsp | 53 +
.../credential-store/password-credentials.jsp | 33 +
.../webapp/credential-store/show-redirect.jsp | 44 +
.../main/webapp/credential-store/success.jsp | 25 +
.../src/main/webapp/gateway/acs.jsp | 62 +
.../src/main/webapp/gateway/callback.jsp | 78 +
.../src/main/webapp/gateway/list_users.jsp | 78 +
.../src/main/webapp/gateway/logout.jsp | 35 +
.../src/main/webapp/gateway/user.jsp | 102 +
.../src/main/webapp/images/airavata-logo-2.png | Bin 0 -> 4314 bytes
.../src/main/webapp/index.jsp | 26 +
.../src/main/webapp/user-store/add.jsp | 142 +
.../src/main/webapp/user-store/index.jsp | 138 +
.../src/main/webapp/user-store/password.jsp | 157 +
.../credentialStoreCPI.thrift | 61 +
.../credentialStoreDataModel.thrift | 61 +
.../credentialStoreErrors.thrift | 32 +
.../cs-thrift-descriptions/generate-cs-stubs.sh | 134 +
modules/credential-store/pom.xml | 43 +
modules/distribution/server/pom.xml | 1251 +-
.../server/src/main/assembly/bin-assembly.xml | 1 +
.../server/src/main/resources/bin/data.sql | 141 -
.../airavata/gfac/server/GfacServerHandler.java | 44 +-
.../airavata/gfac/client/util/Initialize.java | 4 +-
modules/gfac/gfac-bes/pom.xml | 9 +-
.../gfac/bes/provider/impl/BESProvider.java | 10 +-
.../org/apache/airavata/gfac/RequestData.java | 2 +
.../gfac/core/context/JobExecutionContext.java | 9 +
.../airavata/gfac/core/cpi/BetterGfacImpl.java | 26 +-
.../airavata/gfac/core/utils/GFacUtils.java | 2 +-
.../gfac/core/utils/OutHandlerWorker.java | 11 +-
modules/gfac/gfac-gsissh/pom.xml | 10 -
.../handler/GSISSHDirectorySetupHandler.java | 7 +-
.../gfac/gsissh/util/GFACGSISSHUtils.java | 10 +-
.../monitor/impl/pull/qstat/HPCPullMonitor.java | 42 +-
.../impl/pull/qstat/ResourceConnection.java | 16 +-
.../airavata/gfac/monitor/util/CommonUtils.java | 1 +
modules/gfac/gfac-ssh/pom.xml | 10 -
.../ssh/handler/SSHDirectorySetupHandler.java | 7 +-
.../gfac/ssh/provider/impl/SSHProvider.java | 1 +
.../gfac/ssh/security/TokenizedSSHAuthInfo.java | 5 +-
.../airavata/gfac/ssh/util/GFACSSHUtils.java | 98 +-
.../airavata/gfac/ssh/util/HandleOutputs.java | 5 +-
.../apache/airavata/integration/BaseCaseIT.java | 4 +-
.../airavata/integration/DataRetrievalIT.java | 8 +-
.../airavata/integration/SimpleEchoIT.java | 4 +-
.../SingleAppIntegrationTestBase.java | 6 +-
.../WorkflowIntegrationTestBase.java | 2 +-
.../integration/tools/DocumentCreatorNew.java | 75 +-
.../messaging/client/RabbitMQListener.java | 13 +
.../airavata/messaging/client/TestReader.java | 50 +
.../core/impl/RabbitMQStatusPublisher.java | 5 +-
.../messaging/core/stats/CountWriterTask.java | 35 +
.../messaging/core/stats/LatencyWriterTask.java | 37 +
.../messaging/core/stats/StatCounter.java | 38 +-
.../messaging/core/stats/WriterTask.java | 38 -
.../orchestrator/util/DataModelUtils.java | 10 +-
.../orchestrator/client/util/Initialize.java | 4 +-
.../airavata/orchestrator/cpi/Orchestrator.java | 2 +-
.../orchestrator/core/util/Initialize.java | 4 +-
.../persistance/registry/jpa/ResourceType.java | 2 -
.../persistance/registry/jpa/ResourceUtils.java | 69 +-
.../registry/jpa/impl/ExperimentRegistry.java | 16 +-
.../registry/jpa/impl/GatewayRegistry.java | 76 +
.../registry/jpa/impl/LoggingRegistryImpl.java | 35 +-
.../registry/jpa/impl/ProjectRegistry.java | 16 +-
.../registry/jpa/impl/RegistryFactory.java | 17 +
.../registry/jpa/impl/RegistryImpl.java | 28 +-
.../Computational_Resource_Scheduling.java | 10 +
.../registry/jpa/model/Experiment.java | 14 +-
.../jpa/model/ExperimentConfigData.java | 20 +
.../persistance/registry/jpa/model/Gateway.java | 32 +-
.../registry/jpa/model/Gateway_Worker.java | 14 +-
.../registry/jpa/model/Gateway_Worker_PK.java | 14 +-
.../persistance/registry/jpa/model/Project.java | 13 +-
.../registry/jpa/model/Published_Workflow.java | 124 -
.../jpa/model/Published_Workflow_PK.java | 64 -
.../registry/jpa/model/User_Workflow.java | 122 -
.../registry/jpa/model/User_Workflow_PK.java | 74 -
.../jpa/resources/AbstractResource.java | 33 +-
.../ComputationSchedulingResource.java | 10 +
.../jpa/resources/ConfigDataResource.java | 22 +
.../jpa/resources/ExperimentResource.java | 6 +-
.../registry/jpa/resources/GatewayResource.java | 159 +-
.../registry/jpa/resources/ProjectResource.java | 4 +-
.../jpa/resources/PublishWorkflowResource.java | 282 -
.../jpa/resources/UserWorkflowResource.java | 174 -
.../registry/jpa/resources/Utils.java | 72 +-
.../registry/jpa/resources/WorkerResource.java | 100 +-
.../jpa/utils/ThriftDataModelConversion.java | 22 +
.../src/main/resources/META-INF/persistence.xml | 2 -
.../src/main/resources/registry-derby.sql | 58 +-
.../src/main/resources/registry-mysql.sql | 56 +-
.../registry/jpa/GatewayResourceTest.java | 26 +-
.../jpa/PublishWorkflowResourceTest.java | 62 -
.../registry/jpa/UserWorkflowResourceTest.java | 66 -
.../registry/jpa/util/Initialize.java | 4 +-
.../src/test/resources/registry-derby.sql | 58 +-
.../airavata/registry/cpi/ParentDataType.java | 3 +-
.../apache/airavata/registry/cpi/Registry.java | 2 +-
.../registry/cpi/RegistryModelType.java | 1 +
.../airavata/registry/cpi/utils/Constants.java | 3 +-
.../src/test/resources/jdbc-authenticator.xml | 2 +-
.../test/resources/session-authenticator.xml | 2 +-
modules/test-suite/pom.xml | 116 -
.../tests/LeadCallbackHandlerTest.java | 173 -
.../tests/LeadNotificationManagerTest.java | 49 -
.../tests/MultipleSubscriptionTest.java | 105 -
.../tests/RenewSubscriptionTest.java | 155 -
.../tests/ThreadMessagePassingCallback.java | 27 -
.../tests/impl/publish/Test.java | 40 -
.../tests/impl/publish/TestWSMPublisher.java | 119 -
.../tests/messagebox/MessagePullerTest.java | 140 -
.../MultipleSubscriptionForMessageBoxTest.java | 118 -
.../tests/messagebox/RenewSubscriptionTest.java | 109 -
.../tests/messagebox/SubscriberThread.java | 96 -
.../restart/MessageBoxClientRestartTest.java | 131 -
.../restart/MessageBoxCreateThread.java | 83 -
.../tests/samples/workflow/SimpleTest.java | 202 -
.../workflow/SimpleWorkflowExecution.java | 473 -
.../workflow/WorkflowNotificationListener.java | 127 -
.../tests/util/CommonUtils.java | 26 -
.../tests/util/SubscriberThread.java | 91 -
.../tests/util/TestConfigKeys.java | 34 -
.../src/test/resources/gram.properties.template | 70 -
.../src/test/resources/unit_test.properties | 26 -
modules/workflow-model/workflow-engine/pom.xml | 5 +-
.../airavata/workflow/engine/WorkflowUtils.java | 10 +-
.../engine/gfac/GFacRegistryClient.java | 186 +-
.../workflow/engine/gfac/SimpleWSClient.java | 166 +-
.../interpretor/SystemComponentInvoker.java | 86 +-
.../engine/interpretor/WorkflowInterpreter.java | 24 +-
.../engine/invoker/AsynchronousInvoker.java | 98 +-
.../workflow/engine/invoker/DynamicInvoker.java | 48 +-
.../workflow/engine/invoker/Invoker.java | 84 +-
.../workflow/engine/invoker/SimpleInvoker.java | 411 +-
.../workflow/engine/util/InterpreterUtil.java | 112 +-
.../workflow/engine/util/XBayaUtil.java | 94 +-
.../engine/workflow/proxy/WorkflowContext.java | 4 +-
.../workflow-model-component/pom.xml | 7 +-
.../registry/JCRComponentRegistry.java | 3 +-
.../workflow-model/workflow-model-core/pom.xml | 8 +-
.../component/system/SubWorkflowComponent.java | 4 +-
.../component/url/URLComponentRegistry.java | 12 +-
.../component/ws/WSComponentApplication.java | 2 +-
.../model/component/ws/WSComponentFactory.java | 8 +-
.../model/component/ws/WSComponentRegistry.java | 32 +-
.../model/component/ws/WorkflowComponent.java | 108 +-
.../airavata/workflow/model/gpel/DSCUtil.java | 140 +-
.../workflow/model/gpel/script/BPELScript.java | 1276 +-
.../model/gpel/script/WorkflowWSDL.java | 528 +-
.../model/graph/system/StreamSourceNode.java | 7 +-
.../workflow/model/ode/ODEBPELTransformer.java | 1260 +-
.../airavata/workflow/model/ode/ODEClient.java | 200 +-
.../model/ode/ODEDeploymentDescriptor.java | 368 +-
.../workflow/model/ode/ODEWSDLTransformer.java | 872 +-
.../workflow/model/ode/WSDLCleaner.java | 196 +-
.../workflow/model/wf/TridentTransformer.java | 50 +-
.../airavata/workflow/model/wf/Workflow.java | 542 +-
modules/xbaya-gui/pom.xml | 5 +
.../xbaya/core/generators/BPELFiler.java | 38 +-
.../xbaya/core/generators/ODEScriptFiler.java | 68 +-
.../xbaya/invoker/factory/InvokerFactory.java | 16 +-
.../graph/dynamic/DynamicNodeWindow.java | 72 +-
.../dialogs/workflow/WorkflowImportWindow.java | 3 +-
.../ui/experiment/LaunchApplicationWindow.java | 8 +-
.../RegistryWorkflowPublisherWindow.java | 3 +-
.../WorkflowInterpreterLaunchWindow.java | 9 +-
pom.xml | 6 +-
tools/gsissh/pom.xml | 8 +-
.../java/com/jcraft/jsch/ExtendedSession.java | 2 -
.../illinois/ncsa/BCGSS/BCGSSContextImpl.java | 2894 +-
.../illinois/ncsa/BCGSS/CircularByteBuffer.java | 1648 +-
.../ncsa/BCGSS/GlobusTlsCipherFactory.java | 126 +-
.../illinois/ncsa/BCGSS/GlobusTlsClient.java | 494 +-
.../edu/illinois/ncsa/BCGSS/TlsHandlerUtil.java | 564 +-
.../apache/airavata/gsi/ssh/GSSContextX509.java | 43 +-
.../airavata/gsi/ssh/api/job/JobDescriptor.java | 14 +
.../ssh/api/job/JobManagerConfiguration.java | 9 +-
.../gsi/ssh/api/job/LSFJobConfiguration.java | 116 +
.../gsi/ssh/api/job/LSFOutputParser.java | 110 +
.../airavata/gsi/ssh/api/job/OutputParser.java | 14 +-
.../gsi/ssh/api/job/PBSJobConfiguration.java | 15 +
.../gsi/ssh/api/job/PBSOutputParser.java | 8 +-
.../gsi/ssh/api/job/SGEOutputParser.java | 8 +-
.../gsi/ssh/api/job/SlurmJobConfiguration.java | 15 +
.../gsi/ssh/api/job/SlurmOutputParser.java | 10 +-
.../gsi/ssh/impl/GSISSHAbstractCluster.java | 233 +-
.../apache/airavata/gsi/ssh/impl/JobStatus.java | 20 +-
.../airavata/gsi/ssh/impl/PBSCluster.java | 4 +
.../airavata/gsi/ssh/impl/RawCommandInfo.java | 8 +-
.../gsi/ssh/listener/JobSubmissionListener.java | 2 +-
.../airavata/gsi/ssh/util/CommonUtils.java | 13 +
.../apache/airavata/gsi/ssh/util/SSHUtils.java | 4 +-
.../gsissh/src/main/resources/LSFTemplate.xslt | 93 +
.../main/resources/schemas/PBSJobDescriptor.xsd | 3 +-
.../impl/DefaultSSHApiTestWithMyProxyAuth.java | 32 +-
.../gsi/ssh/impl/VanilaTestWithSSHAuth.java | 90 +-
tools/registry-tool/README | 2 +-
444 files changed, 91302 insertions(+), 58080 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/0db33d2e/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/0db33d2e/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------
diff --cc airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
index dd8686d,ed141b9..812f6c4
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
@@@ -54,16 -55,16 +55,17 @@@ public class CreateLaunchExperiment
private final static Logger logger = LoggerFactory.getLogger(CreateLaunchExperiment.class);
private static final String DEFAULT_USER = "default.registry.user";
- private static final String DEFAULT_GATEWAY = "default.registry.gateway";
+ private static final String DEFAULT_GATEWAY = "php_reference_gateway";
private static Airavata.Client airavataClient;
- private static String echoAppId = "Echo_a8fc8511-7b8e-431a-ad0f-de5eb1a9c576";
++
+ private static String echoAppId = "Echo_61988d1f-7ca9-47ba-9212-a0ac2e973cf1";
private static String mpiAppId = "HelloMPI_720e159f-198f-4daa-96ca-9f5eafee92c9";
private static String wrfAppId = "WRF_7ad5da38-c08b-417c-a9ea-da9298839762";
- private static String amberAppId = "Amber_42124128-628b-484c-829d-aff8b584eb00";
+ private static String amberAppId = "Amber_aa083c86-4680-4002-b3ef-fad93c181926";
private static String gromacsAppId = "GROMACS_05622038-9edd-4cb1-824e-0b7cb993364b";
private static String espressoAppId = "ESPRESSO_10cc2820-5d0b-4c63-9546-8a8b595593c1";
- private static String lammpsAppId = "LAMMPS_10893eb5-3840-438c-8446-d26c7ecb001f";
+ private static String lammpsAppId = "LAMMPS_2472685b-8acf-497e-aafe-cc66fe5f4cb6";
private static String nwchemAppId = "NWChem_2c8fee64-acf9-4a89-b6d3-91eb53c7640c";
private static String trinityAppId = "Trinity_e894acf5-9bca-46e8-a1bd-7e2d5155191a";
private static String autodockAppId = "AutoDock_43d9fdd0-c404-49f4-b913-3abf9080a8c9";
@@@ -89,11 -95,75 +96,76 @@@
private static String fsdResourceId;
+ public static void getAvailableAppInterfaceComputeResources(String appInterfaceId) {
+ try {
+ Map<String, String> availableAppInterfaceComputeResources = airavataClient.getAvailableAppInterfaceComputeResources(appInterfaceId);
+ for (String key : availableAppInterfaceComputeResources.keySet()){
+ System.out.println("id : " + key);
+ System.out.println("name : " + availableAppInterfaceComputeResources.get(key));
+ }
+ } catch (AiravataSystemException e) {
+ e.printStackTrace();
+ } catch (InvalidRequestException e) {
+ e.printStackTrace();
+ } catch (AiravataClientException e) {
+ e.printStackTrace();
+ } catch (TException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+
+ public static void createGateway(){
+ try {
+ Gateway gateway = new Gateway();
+ gateway.setGatewayId("testGatewayId2");
+ gateway.setGatewayName("testGateway2");
+ gatewayId = airavataClient.addGateway(gateway);
+ System.out.println(gatewayId);
+ } catch (AiravataSystemException e) {
+ e.printStackTrace();
+ } catch (InvalidRequestException e) {
+ e.printStackTrace();
+ } catch (AiravataClientException e) {
+ e.printStackTrace();
+ } catch (TException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ public static void getGateway(String gatewayId){
+ try {
+ Gateway gateway = airavataClient.getGateway(gatewayId);
+ gateway.setDomain("testDomain");
+ airavataClient.updateGateway(gatewayId, gateway);
+ List<Gateway> allGateways = airavataClient.getAllGateways();
+ System.out.println(allGateways.size());
+ if (airavataClient.isGatewayExist(gatewayId)){
+ Gateway gateway1 = airavataClient.getGateway(gatewayId);
+ System.out.println(gateway1.getGatewayName());
+ }
+ boolean b = airavataClient.deleteGateway("testGatewayId2");
+ System.out.println(b);
+ } catch (AiravataSystemException e) {
+ e.printStackTrace();
+ } catch (InvalidRequestException e) {
+ e.printStackTrace();
+ } catch (AiravataClientException e) {
+ e.printStackTrace();
+ } catch (TException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+
public static void createAndLaunchExp() throws TException {
// final String expId = createEchoExperimentForFSD(airavataClient);
+ List<String> experimentIds = new ArrayList<String>();
try {
- for (int i = 0; i < 100; i++) {
+ for (int i = 0; i < 1; i++) {
// final String expId = createExperimentForSSHHost(airavata);
// final String expId = createEchoExperimentForFSD(airavataClient);
// final String expId = createMPIExperimentForFSD(airavataClient);
http://git-wip-us.apache.org/repos/asf/airavata/blob/0db33d2e/modules/configuration/server/src/main/resources/airavata-server.properties
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/0db33d2e/modules/credential-store/credential-store-webapp/src/main/resources/airavata-server.properties
----------------------------------------------------------------------
diff --cc modules/credential-store/credential-store-webapp/src/main/resources/airavata-server.properties
index 0000000,badf28d..fe4de5d
mode 000000,100644..100644
--- a/modules/credential-store/credential-store-webapp/src/main/resources/airavata-server.properties
+++ b/modules/credential-store/credential-store-webapp/src/main/resources/airavata-server.properties
@@@ -1,0 -1,234 +1,241 @@@
+ #
+ #
+ # 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.
+ #
+
+ ###########################################################################
+ #
+ # This properties file provides configuration for all Airavata Services:
+ # API Server, Registry, Workflow Interpreter, GFac, Orchestrator
+ #
+ ###########################################################################
+
+ ###########################################################################
+ # API Server Registry Configuration
+ ###########################################################################
+
+ #for derby [AiravataJPARegistry]
+ registry.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+ registry.jdbc.url=jdbc:derby://localhost:1527/experiment_catalog;create=true;user=airavata;password=airavata
+ # MySql database configuration
+ #registry.jdbc.driver=com.mysql.jdbc.Driver
+ #registry.jdbc.url=jdbc:mysql://localhost:3306/persistent_data
+ registry.jdbc.user=airavata
+ registry.jdbc.password=airavata
+ start.derby.server.mode=true
+ validationQuery=SELECT 1 from CONFIGURATION
+ jpa.cache.size=5000
+ #jpa.connection.properties=MaxActive=10,MaxIdle=5,MinIdle=2,MaxWait=60000,testWhileIdle=true,testOnBorrow=true
+
+ # Properties for default user mode
+ default.registry.user=admin
+ default.registry.password=admin
+ default.registry.password.hash.method=SHA
+ default.registry.gateway=default
+
+ #ip=127.0.0.1
+
+ ###########################################################################
+ # Application Catalog DB Configuration
+ ###########################################################################
+ #for derby [AiravataJPARegistry]
+ appcatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+ appcatalog.jdbc.url=jdbc:derby://localhost:1527/app_catalog;create=true;user=airavata;password=airavata
+ # MySql database configuration
+ #appcatalog.jdbc.driver=com.mysql.jdbc.Driver
+ #appcatalog.jdbc.url=jdbc:mysql://localhost:3306/app_catalog
+ appcatalog.jdbc.user=airavata
+ appcatalog.jdbc.password=airavata
+ appcatalog.validationQuery=SELECT 1 from CONFIGURATION
+
+ ###########################################################################
+ # Server module Configuration
+ ###########################################################################
+
+ servers=apiserver,orchestrator,gfac,workflowserver
+ #shutdown.trategy=NONE
+ shutdown.trategy=SELF_TERMINATE
+
+
+ apiserver.server.host=localhost
+ apiserver.server.port=8930
+ apiserver.server.min.threads=50
+ workflow.server.host=localhost
+ workflow.server.port=8931
+ orchestrator.server.host=localhost
+ orchestrator.server.port=8940
+ gfac.server.host=localhost
+ gfac.server.port=8950
+ orchestrator.server.min.threads=50
+
+ ###########################################################################
+ # Credential Store module Configuration
+ ###########################################################################
+ credential.store.keystore.url=/Users/lahirugunathilake/Downloads/airavata_sym.jks
+ credential.store.keystore.alias=airavata
+ credential.store.keystore.password=airavata
+ credential.store.jdbc.url=jdbc:derby://localhost:1527/experiment_catalog;create=true;user=airavata;password=airavata
+ credential.store.jdbc.user=airavata
+ credential.store.jdbc.password=airavata
+ credential.store.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+
+ notifier.enabled=false
+ #period in milliseconds
+ notifier.duration=5000
+
+ email.server=smtp.googlemail.com
+ email.server.port=465
+ email.user=airavata
+ email.password=xxx
+ email.ssl=true
+ email.from=airavata@apache.org
+
+ ###########################################################################
+ # Airavata GFac MyProxy GSI credentials to access Grid Resources.
+ ###########################################################################
+ #
+ # Security Configuration used by Airavata Generic Factory Service
+ # to interact with Computational Resources.
+ #
+ gfac=org.apache.airavata.gfac.server.GfacServer
+ myproxy.server=myproxy.teragrid.org
+ myproxy.username=ogce
+ myproxy.password=
+ myproxy.life=3600
+ # XSEDE Trusted certificates can be downloaded from https://software.xsede.org/security/xsede-certs.tar.gz
+ trusted.cert.location=/Users/lahirugunathilake/Downloads/certificates
+ # SSH PKI key pair or ssh password can be used SSH based authentication is used.
+ # if user specify both password authentication gets the higher preference
+
+ ################# ---------- For ssh key pair authentication ------------------- ################
+ #public.ssh.key=/path to public key for ssh
+ #ssh.username=username for ssh connection
+ #private.ssh.key=/path to private key file for ssh
+ #ssh.keypass=passphrase for the private key
+
+
+ ################# ---------- For ssh key pair authentication ------------------- ################
+ #ssh.username=username for ssh connection
+ #ssh.password=Password for ssh connection
+
+
+
+ ###########################################################################
+ # Airavata Workflow Interpreter Configurations
+ ###########################################################################
+
+ #runInThread=true
+ #provenance=true
+ #provenanceWriterThreadPoolSize=20
+ #gfac.embedded=true
+ #workflowserver=org.apache.airavata.api.server.WorkflowServer
++enactment.thread.pool.size=10
++
++#to define custom workflow parser user following property
++#workflow.parser=org.apache.airavata.simple.workflow.engine.parser.AiravataWorkflowParser
+
+
+ ###########################################################################
+ # API Server module Configuration
+ ###########################################################################
+ apiserver=org.apache.airavata.api.server.AiravataAPIServer
+
+ ###########################################################################
+ # Workflow Server module Configuration
+ ###########################################################################
+
+ workflowserver=org.apache.airavata.api.server.WorkflowServer
+
+ ###########################################################################
+ # Advance configuration to change service implementations
+ ###########################################################################
+ # If false, disables two phase commit when submitting jobs
+ TwoPhase=true
+ #
+ # Class which implemented HostScheduler interface. It will determine the which host to submit the request
+ #
+ host.scheduler=org.apache.airavata.gfac.core.scheduler.impl.SimpleHostScheduler
+
+ ###########################################################################
+ # Monitoring module Configuration
+ ###########################################################################
+
+ #This will be the primary monitoring tool which runs in airavata, in future there will be multiple monitoring
+ #mechanisms and one would be able to start a monitor
+ monitors=org.apache.airavata.gfac.monitor.impl.pull.qstat.QstatMonitor,org.apache.airavata.gfac.monitor.impl.LocalJobMonitor
+
+
+ ###########################################################################
+ # AMQP Notification Configuration
+ ###########################################################################
+
+
+ amqp.notification.enable=1
+
+ amqp.broker.host=localhost
+ amqp.broker.port=5672
+ amqp.broker.username=guest
+ amqp.broker.password=guest
+
+ amqp.sender=org.apache.airavata.wsmg.client.amqp.rabbitmq.AMQPSenderImpl
+ amqp.topic.sender=org.apache.airavata.wsmg.client.amqp.rabbitmq.AMQPTopicSenderImpl
+ amqp.broadcast.sender=org.apache.airavata.wsmg.client.amqp.rabbitmq.AMQPBroadcastSenderImpl
+
+ #,org.apache.airavata.gfac.monitor.impl.push.amqp.AMQPMonitor
+ #This is the amqp related configuration and this lists down the Rabbitmq host, this is an xsede specific configuration
+ amqp.hosts=info1.dyn.teragrid.org,info2.dyn.teragrid.org
+ proxy.file.path=/Users/lahirugunathilake/Downloads/x509up_u503876
+ connection.name=xsede
+ #publisher
+ activity.listeners=org.apache.airavata.gfac.core.monitor.AiravataJobStatusUpdator,org.apache.airavata.gfac.core.monitor.AiravataTaskStatusUpdator,org.apache.airavata.gfac.core.monitor.AiravataWorkflowNodeStatusUpdator,org.apache.airavata.api.server.listener.AiravataExperimentStatusUpdator,org.apache.airavata.gfac.core.monitor.GfacInternalStatusUpdator,org.apache.airavata.workflow.engine.util.ProxyMonitorPublisher
+ publish.rabbitmq=false
-activity.publisher=org.apache.airavata.messaging.core.impl.RabbitMQPublisher
++status.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
++task.launch.publisher=org.apache.airavata.messaging.core.impl.RabbitMQTaskLaunchPublisher
+ rabbitmq.broker.url=amqp://localhost:5672
-rabbitmq.exchange.name=airavata_rabbitmq_exchange
++rabbitmq.status.exchange.name=airavata_rabbitmq_exchange
++rabbitmq.task.launch.exchange.name=airavata_task_launch_rabbitmq_exchange
+
+ ###########################################################################
+ # Orchestrator module Configuration
+ ###########################################################################
+
+ #job.submitter=org.apache.airavata.orchestrator.core.impl.GFACEmbeddedJobSubmitter
-job.submitter=org.apache.airavata.orchestrator.core.impl.GFACServiceJobSubmitter
++#job.submitter=org.apache.airavata.orchestrator.core.impl.GFACPassiveJobSubmitter
++job.submitter=org.apache.airavata.orchestrator.core.impl.GFACRPCJobSubmitter
+ job.validators=org.apache.airavata.orchestrator.core.validator.impl.SimpleAppDataValidator,org.apache.airavata.orchestrator.core.validator.impl.ExperimentStatusValidator
+ submitter.interval=10000
+ threadpool.size=10
+ start.submitter=true
+ embedded.mode=true
+ enable.validation=true
+ orchestrator=org.apache.airavata.orchestrator.server.OrchestratorServer
+
+ ###########################################################################
+ # Zookeeper Server Configuration
+ ###########################################################################
+
+ embedded.zk=true
+ zookeeper.server.host=localhost
+ zookeeper.server.port=2181
+ airavata-server=/api-server
+ orchestrator-server=/orchestrator-server
+ gfac-server=/gfac-server
+ gfac-experiments=/gfac-experiments
+ gfac-server-name=gfac-node0
+ orchestrator-server-name=orch-node0
+ airavata-server-name=api-node0
http://git-wip-us.apache.org/repos/asf/airavata/blob/0db33d2e/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
----------------------------------------------------------------------
diff --cc modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
index 1c0f095,4973a41..2fc3f16
--- a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
+++ b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
@@@ -27,7 -27,10 +27,11 @@@ import org.apache.aiaravata.application
import org.apache.airavata.common.exception.ApplicationSettingsException;
import org.apache.airavata.common.logger.AiravataLogger;
import org.apache.airavata.common.logger.AiravataLoggerFactory;
- import org.apache.airavata.common.utils.*;
+ import org.apache.airavata.common.utils.AiravataZKUtils;
+ import org.apache.airavata.common.utils.Constants;
+ import org.apache.airavata.common.utils.MonitorPublisher;
+ import org.apache.airavata.common.utils.ServerSettings;
++import org.apache.airavata.common.utils.ThriftUtils;
import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
import org.apache.airavata.gfac.core.cpi.GFac;
import org.apache.airavata.gfac.core.utils.GFacThreadPoolExecutor;
http://git-wip-us.apache.org/repos/asf/airavata/blob/0db33d2e/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/0db33d2e/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/0db33d2e/modules/messaging/client/src/main/java/org/apache/airavata/messaging/client/RabbitMQListener.java
----------------------------------------------------------------------
diff --cc modules/messaging/client/src/main/java/org/apache/airavata/messaging/client/RabbitMQListener.java
index c1bdc3d,53d08d3..3f876ae
--- a/modules/messaging/client/src/main/java/org/apache/airavata/messaging/client/RabbitMQListener.java
+++ b/modules/messaging/client/src/main/java/org/apache/airavata/messaging/client/RabbitMQListener.java
@@@ -55,12 -56,16 +56,16 @@@ public class RabbitMQListener
private static boolean allMessages = false;
public static void main(String[] args) {
+ File file = new File("/tmp/latency_client");
parseArguments(args);
try {
+ FileOutputStream fos = new FileOutputStream(file, false);
+ final BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(fos));
AiravataUtils.setExecutionAsServer();
String brokerUrl = ServerSettings.getSetting(RABBITMQ_BROKER_URL);
+ System.out.println("broker url " + brokerUrl);
final String exchangeName = ServerSettings.getSetting(RABBITMQ_EXCHANGE_NAME);
- RabbitMQConsumer consumer = new RabbitMQConsumer(brokerUrl, exchangeName);
+ RabbitMQStatusConsumer consumer = new RabbitMQStatusConsumer(brokerUrl, exchangeName);
consumer.listen(new MessageHandler() {
@Override
public Map<String, Object> getProperties() {
http://git-wip-us.apache.org/repos/asf/airavata/blob/0db33d2e/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQStatusPublisher.java
----------------------------------------------------------------------
diff --cc modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQStatusPublisher.java
index a149037,0000000..2ba7a19
mode 100644,000000..100644
--- a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQStatusPublisher.java
+++ b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQStatusPublisher.java
@@@ -1,107 -1,0 +1,106 @@@
+/*
+ *
+ * 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.messaging.core.impl;
+
+import org.apache.airavata.common.exception.AiravataException;
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.common.utils.ThriftUtils;
+import org.apache.airavata.messaging.core.MessageContext;
+import org.apache.airavata.messaging.core.MessagingConstants;
+import org.apache.airavata.messaging.core.Publisher;
- import org.apache.airavata.messaging.core.stats.StatCounter;
+import org.apache.airavata.model.messaging.event.*;
+import org.apache.thrift.TException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RabbitMQStatusPublisher implements Publisher {
+
+ private static Logger log = LoggerFactory.getLogger(RabbitMQStatusPublisher.class);
+
+ private RabbitMQProducer rabbitMQProducer;
+
- StatCounter statCounter = StatCounter.getInstance();
++// StatCounter statCounter = StatCounter.getInstance();
+
+ public RabbitMQStatusPublisher() throws Exception {
+ String brokerUrl;
+ String exchangeName;
+ try {
+ brokerUrl = ServerSettings.getSetting(MessagingConstants.RABBITMQ_BROKER_URL);
+ exchangeName = ServerSettings.getSetting(MessagingConstants.RABBITMQ_STATUS_EXCHANGE_NAME);
+ } catch (ApplicationSettingsException e) {
+ String message = "Failed to get read the required properties from airavata to initialize rabbitmq";
+ log.error(message, e);
+ throw new AiravataException(message, e);
+ }
+ rabbitMQProducer = new RabbitMQProducer(brokerUrl, exchangeName);
+ rabbitMQProducer.open();
+ }
+
+ public void publish(MessageContext msgCtx) throws AiravataException {
+ try {
+ log.info("Publishing status to rabbitmq...");
+ byte[] body = ThriftUtils.serializeThriftObject(msgCtx.getEvent());
+ Message message = new Message();
+ message.setEvent(body);
+ message.setMessageId(msgCtx.getMessageId());
+ message.setMessageType(msgCtx.getType());
+ message.setUpdatedTime(msgCtx.getUpdatedTime().getTime());
+ String gatewayId = msgCtx.getGatewayId();
+ String routingKey = null;
+ if (msgCtx.getType() == MessageType.EXPERIMENT) {
+ ExperimentStatusChangeEvent event = (ExperimentStatusChangeEvent) msgCtx.getEvent();
+ routingKey = gatewayId + "." + event.getExperimentId();
+ } else if (msgCtx.getType() == MessageType.TASK) {
+ TaskStatusChangeEvent event = (TaskStatusChangeEvent) msgCtx.getEvent();
+ routingKey = gatewayId + "." + event.getTaskIdentity().getExperimentId() + "." +
+ event.getTaskIdentity().getWorkflowNodeId() + "." + event.getTaskIdentity().getTaskId();
+ } else if (msgCtx.getType() == MessageType.TASKOUTPUT) {
+ TaskOutputChangeEvent event = (TaskOutputChangeEvent) msgCtx.getEvent();
+ routingKey = gatewayId + "." + event.getTaskIdentity().getExperimentId() + "." +
+ event.getTaskIdentity().getWorkflowNodeId() + "." + event.getTaskIdentity().getTaskId();
+ } else if (msgCtx.getType() == MessageType.WORKFLOWNODE) {
+ WorkflowNodeStatusChangeEvent event = (WorkflowNodeStatusChangeEvent) msgCtx.getEvent();
+ WorkflowIdentifier workflowNodeIdentity = event.getWorkflowNodeIdentity();
+ routingKey = gatewayId + "." + workflowNodeIdentity.getExperimentId() + "." + workflowNodeIdentity.getWorkflowNodeId();
+ } else if (msgCtx.getType() == MessageType.JOB) {
+ JobStatusChangeEvent event = (JobStatusChangeEvent) msgCtx.getEvent();
+ JobIdentifier identity = event.getJobIdentity();
+ routingKey = gatewayId + "." + identity.getExperimentId() + "." +
+ identity.getWorkflowNodeId() + "." +
+ identity.getTaskId() + "." +
+ identity.getJobId();
+ }
+ byte[] messageBody = ThriftUtils.serializeThriftObject(message);
+ rabbitMQProducer.send(messageBody, routingKey);
- statCounter.add();
++// statCounter.add(message);
+ } catch (TException e) {
+ String msg = "Error while deserializing the object";
+ log.error(msg, e);
+ throw new AiravataException(msg, e);
+ } catch (Exception e) {
+ String msg = "Error while sending to rabbitmq";
+ log.error(msg, e);
+ throw new AiravataException(msg, e);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/0db33d2e/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/stats/CountWriterTask.java
----------------------------------------------------------------------
diff --cc modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/stats/CountWriterTask.java
index 0000000,286e059..5261512
mode 000000,100644..100644
--- a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/stats/CountWriterTask.java
+++ b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/stats/CountWriterTask.java
@@@ -1,0 -1,36 +1,35 @@@
+ package org.apache.airavata.messaging.core.stats;
+
+ import java.io.*;
+ import java.util.List;
+ import java.util.TimerTask;
+
+ public class CountWriterTask extends TimerTask {
+
+ private File file;
+ private FileOutputStream fos;
+ private BufferedWriter bw;
+
+ public void setFile(File file) {
+ this.file = file;
+
+ }
+
+ @Override
+ public void run() {
+ try {
- System.out.println("########### calling Write Task ############");
+ StatCounter statCounter = StatCounter.getInstance();
+ List<Long> contPer10S = statCounter.getMessageContPer10S();
+ fos = new FileOutputStream(file, false);
+ bw = new BufferedWriter(new OutputStreamWriter(fos));
+ for (int i = 0; i < contPer10S.size(); i++) {
+ bw.write(String.valueOf(i+1) + " :" + String.valueOf(contPer10S.get(i)));
+ bw.newLine();
+ }
+ bw.flush();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ }
+ }
http://git-wip-us.apache.org/repos/asf/airavata/blob/0db33d2e/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
----------------------------------------------------------------------
diff --cc modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
index 3425a4f,7e7a8ba..2eece65
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
@@@ -360,24 -355,9 +362,25 @@@ public class WorkflowInterpreterLaunchW
}else {
throw new RuntimeException("Resource scheduling failed, target computer resource host name is not defined");
}
+/*
+// code snippet for load test.
+ for (int i = 0; i < 20; i++) {
+ experiment.setName(instanceName + "_" + i);
+
+ experiment.setExperimentID(airavataClient.createExperiment(experiment));
+
+ try {
+ this.engine.getMonitor().subscribe(experiment.getExperimentID());
+ this.engine.getMonitor().fireStartMonitoring(workflow.getName());
+ } catch (MonitorException e) {
+ logger.error("Error while subscribing with experiment Id : " + experiment.getExperimentID(), e);
+ }
+ airavataClient.launchExperiment(experiment.getExperimentID(), "testToken");
+
+ }*/
- experiment.setExperimentID(airavataClient.createExperiment(experiment));
+ //FIXME:: use gatewayId from UI
+ experiment.setExperimentID(airavataClient.createExperiment("default", experiment));
try {
this.engine.getMonitor().subscribe(experiment.getExperimentID());
http://git-wip-us.apache.org/repos/asf/airavata/blob/0db33d2e/pom.xml
----------------------------------------------------------------------
[22/50] [abbrv] airavata git commit: introducing support of myproxy
and server generated identity mechanisms, work is still under development
Posted by sh...@apache.org.
introducing support of myproxy and server generated identity mechanisms,
work is still under development
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/8d3b1374
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/8d3b1374
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/8d3b1374
Branch: refs/heads/new-workflow-design
Commit: 8d3b1374a9ab65f3e9dcceb8cfb4e32391c1c39f
Parents: 34b06cc
Author: msmemon <sh...@gmail.com>
Authored: Tue Mar 10 16:49:25 2015 +0100
Committer: msmemon <sh...@gmail.com>
Committed: Tue Mar 10 16:49:25 2015 +0100
----------------------------------------------------------------------
.../computeResourceModel.thrift | 23 +++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/8d3b1374/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift b/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
index cb924e9..8e89908 100644
--- a/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
+++ b/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
@@ -333,14 +333,35 @@ struct GlobusJobSubmission {
*
* unicoreEndPointURL:
* unicoreGateway End Point. The provider will query this service to fetch required service end points.
+ * authenticationMode
+ * The authenticationMode defines the way certificate is fetched.
+ * userDN
+ * This attribute captures the userDN used for launching jobs and create temporary storages. The attribute should be
+ * provided if the authentication mode is set as SERVER_ISSUED.
*/
struct UnicoreJobSubmission {
1: required string jobSubmissionInterfaceId = DEFAULT_ID,
2: required SecurityProtocol securityProtocol,
- 3: required string unicoreEndPointURL
+ 3: required string unicoreEndPointURL,
+ 4: required AuthenticationMode authenticationMode,
+ 5: optional string userDN
}
/**
+ * AuthenticationMode
+ *
+ * SERVER_ISSUED: use CA credentials to generate a certificate based on user name.
+ * server properties.
+ * MYPROXY_ISSUED: rely on GSI method implementation already provided
+ * by Airavata security libs.
+*/
+enum AuthenticationMode {
+ SERVER_ISSUED,
+ MYPROXY_ISSUED
+}
+
+
+/**
* Provider name
**/
enum ProviderName {
[19/50] [abbrv] airavata git commit: more fixed to support LSF
Posted by sh...@apache.org.
more fixed to support LSF
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/fcbda21f
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/fcbda21f
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/fcbda21f
Branch: refs/heads/new-workflow-design
Commit: fcbda21f3fbbbc75afa01f4b590afe873c192de2
Parents: 04cecb4
Author: Lahiru Gunathilake <gl...@gmail.com>
Authored: Mon Mar 9 17:03:33 2015 -0400
Committer: Lahiru Gunathilake <gl...@gmail.com>
Committed: Mon Mar 9 17:03:33 2015 -0400
----------------------------------------------------------------------
.../airavata/api/server/AiravataAPIServer.java | 38 +++++++++---------
.../client/samples/CreateLaunchExperiment.java | 20 +++++++---
.../tools/RegisterSampleApplications.java | 10 +++--
.../store/store/impl/db/SSHCredentialTest.java | 2 +-
.../airavata/gfac/server/GfacServerHandler.java | 39 +++++++++---------
.../monitor/impl/pull/qstat/HPCPullMonitor.java | 42 +++++++++++++++++---
.../airavata/gfac/monitor/util/CommonUtils.java | 1 +
.../gfac/ssh/security/TokenizedSSHAuthInfo.java | 5 ++-
.../impl/DefaultSSHApiTestWithMyProxyAuth.java | 14 ++++---
.../gsi/ssh/impl/VanilaTestWithSSHAuth.java | 4 +-
10 files changed, 112 insertions(+), 63 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/fcbda21f/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/AiravataAPIServer.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/AiravataAPIServer.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/AiravataAPIServer.java
index 0e6da90..4d465f7 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/AiravataAPIServer.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/AiravataAPIServer.java
@@ -302,26 +302,26 @@ public class AiravataAPIServer implements IServer, Watcher{
synchronized (mutex) {
Event.KeeperState state = watchedEvent.getState();
logger.info(state.name());
- if (state == Event.KeeperState.SyncConnected) {
- mutex.notify();
- } else if(state == Event.KeeperState.Expired ||
- state == Event.KeeperState.Disconnected){
- try {
- mutex = -1;
- zk = new ZooKeeper(AiravataZKUtils.getZKhostPort(), 6000, this);
- synchronized (mutex) {
- mutex.wait(); // waiting for the syncConnected event
+ switch(state){
+ case SyncConnected:
+ mutex.notify();
+ case Expired:case Disconnected:
+ try {
+ mutex = -1;
+ zk = new ZooKeeper(AiravataZKUtils.getZKhostPort(), 6000, this);
+ synchronized (mutex) {
+ mutex.wait(); // waiting for the syncConnected event
+ }
+ storeServerConfig();
+ } catch (IOException e) {
+ logger.error("Error while synchronizing with zookeeper", e);
+ } catch (ApplicationSettingsException e) {
+ logger.error("Error while synchronizing with zookeeper", e);
+ } catch (InterruptedException e) {
+ logger.error("Error while synchronizing with zookeeper", e);
+ } catch (AiravataSystemException e) {
+ logger.error("Error while synchronizing with zookeeper", e);
}
- storeServerConfig();
- } catch (IOException e) {
- logger.error("Error while synchronizing with zookeeper", e);
- } catch (ApplicationSettingsException e) {
- logger.error("Error while synchronizing with zookeeper", e);
- } catch (InterruptedException e) {
- logger.error("Error while synchronizing with zookeeper", e);
- } catch (AiravataSystemException e) {
- logger.error("Error while synchronizing with zookeeper", e);
- }
}
}
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/fcbda21f/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
index bb2ae6e..3d58197 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
@@ -58,7 +58,7 @@ public class CreateLaunchExperiment {
private static final String DEFAULT_GATEWAY = "php_reference_gateway";
private static Airavata.Client airavataClient;
- private static String echoAppId = "Echo_802454e5-6358-4371-9a04-3d5d59cecbc7";
+ private static String echoAppId = "Echo_8506337e-ab7a-46b6-9b71-4a461b6c5e35";
private static String mpiAppId = "HelloMPI_720e159f-198f-4daa-96ca-9f5eafee92c9";
private static String wrfAppId = "WRF_7ad5da38-c08b-417c-a9ea-da9298839762";
private static String amberAppId = "Amber_a56d457c-f239-4c0b-ba00-66bda936f7bc";
@@ -1348,27 +1348,37 @@ public class CreateLaunchExperiment {
public static String createExperimentForLSF(Airavata.Client client) throws TException {
try {
- List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>();
+ List<InputDataObjectType> exInputs = client.getApplicationInputs(echoAppId);
+
+ for (InputDataObjectType inputDataObjectType : exInputs) {
+ inputDataObjectType.setValue("Hello World");
+ }
+ /*List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>();
InputDataObjectType input = new InputDataObjectType();
input.setName("Input_to_Echo");
input.setType(DataType.STRING);
input.setValue("Echoed_Output=Hello World");
input.setRequiredToAddedToCommandLine(true);
- exInputs.add(input);
+ exInputs.add(input);*/
+ List<OutputDataObjectType> exOut = client.getApplicationOutputs(echoAppId);
+ /*
List<OutputDataObjectType> exOut = new ArrayList<OutputDataObjectType>();
OutputDataObjectType output = new OutputDataObjectType();
output.setName("output_file");
output.setType(DataType.URI);
output.setValue("");
- exOut.add(output);
+
+ exOut.add(output);*/
Project project = ProjectModelUtil.createProject("default", "lg11w", "test project");
String projectId = client.createProject(DEFAULT_GATEWAY, project);
+
Experiment simpleExperiment =
ExperimentModelUtil.createSimpleExperiment(projectId, "lg11w", "sshEchoExperiment", "StressMem", echoAppId, exInputs);
simpleExperiment.setExperimentOutputs(exOut);
+ simpleExperiment.setExperimentInputs(exInputs);
Map<String, String> computeResources = airavataClient.getAvailableAppInterfaceComputeResources(echoAppId);
if (computeResources != null && computeResources.size() != 0) {
@@ -1598,7 +1608,7 @@ public class CreateLaunchExperiment {
public static void launchExperiment(Airavata.Client client, String expId)
throws TException {
try {
- String tokenId ="aa-dcdb-48e3-9cd5-ac90b710d55e";
+ String tokenId ="-0bbb-403b-a88a-42b6dbe198e9";
client.launchExperiment(expId, tokenId);
} catch (ExperimentNotFoundException e) {
logger.error("Error occured while launching the experiment...", e.getMessage());
http://git-wip-us.apache.org/repos/asf/airavata/blob/fcbda21f/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
index 8ae2dd2..55dbcf8 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
@@ -497,11 +497,15 @@ public class RegisterSampleApplications {
// applicationInputs.add(input2); applicationInputs.add(input3);
OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("Echoed_Output",
- "", DataType.STRING, false, false);
-
+ "", DataType.STDOUT, false, false);
+
+ OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("Echoed_Error",
+ "", DataType.STDERR, false, false);
+
List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
applicationOutputs.add(output1);
-
+ applicationOutputs.add(output2);
+
echoInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY,
RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(echoName, echoDescription,
http://git-wip-us.apache.org/repos/asf/airavata/blob/fcbda21f/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java b/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
index e78ab7a..e6969e6 100644
--- a/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
+++ b/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
@@ -67,7 +67,7 @@ public class SSHCredentialTest {
pubKeyStream.close();
sshCredential.setPrivateKey(bFilePub);
sshCredential.setPublicKey(bFilePub);
- sshCredential.setPassphrase("gjtlmiJdas7wph");
+ sshCredential.setPassphrase("ljclqowueqllad_lqlj");
writer.writeCredentials(sshCredential);
System.out.println(token);
} catch (ClassNotFoundException e) {
http://git-wip-us.apache.org/repos/asf/airavata/blob/fcbda21f/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
index 1687462..4973a41 100644
--- a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
+++ b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
@@ -156,27 +156,26 @@ public class GfacServerHandler implements GfacService.Iface, Watcher{
synchronized (mutex) {
Event.KeeperState state = watchedEvent.getState();
logger.info(state.name());
- if (state == Event.KeeperState.SyncConnected) {
- mutex.notify();
- connected = true;
- } else if(state == Event.KeeperState.Expired ||
- state == Event.KeeperState.Disconnected){
- try {
- mutex = -1;
- zk = new ZooKeeper(AiravataZKUtils.getZKhostPort(), 6000, this);
- synchronized (mutex) {
- mutex.wait(); // waiting for the syncConnected event
+ switch (state){
+ case SyncConnected:
+ mutex.notify();
+ break;
+ case Expired:case Disconnected:
+ try {
+ zk = new ZooKeeper(AiravataZKUtils.getZKhostPort(), 6000, this);
+ synchronized (mutex) {
+ mutex.wait(); // waiting for the syncConnected event
+ }
+ storeServerConfig();
+ } catch (IOException e) {
+ logger.error(e.getMessage(), e);
+ } catch (ApplicationSettingsException e) {
+ logger.error(e.getMessage(), e);
+ } catch (InterruptedException e) {
+ logger.error(e.getMessage(), e);
+ } catch (KeeperException e) {
+ logger.error(e.getMessage(), e);
}
- storeServerConfig();
- } catch (IOException e) {
- logger.error(e.getMessage(), e);
- } catch (ApplicationSettingsException e) {
- logger.error(e.getMessage(), e);
- } catch (InterruptedException e) {
- logger.error(e.getMessage(), e);
- } catch (KeeperException e) {
- logger.error(e.getMessage(), e);
- }
}
}
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/fcbda21f/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
index b7f08a6..f0b447e 100644
--- a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
+++ b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
@@ -74,6 +74,8 @@ public class HPCPullMonitor extends PullMonitor {
private AuthenticationInfo authenticationInfo;
+ private ArrayList<MonitorID> removeList;
+
public HPCPullMonitor() {
connections = new HashMap<String, ResourceConnection>();
queue = new LinkedBlockingDeque<UserMonitorData>();
@@ -81,6 +83,7 @@ public class HPCPullMonitor extends PullMonitor {
cancelJobList = new LinkedBlockingQueue<String>();
completedJobsFromPush = new ArrayList<String>();
(new SimpleJobFinishConsumer(this.completedJobsFromPush)).listen();
+ removeList = new ArrayList<MonitorID>();
}
public HPCPullMonitor(MonitorPublisher monitorPublisher, AuthenticationInfo authInfo) {
@@ -91,6 +94,7 @@ public class HPCPullMonitor extends PullMonitor {
cancelJobList = new LinkedBlockingQueue<String>();
this.completedJobsFromPush = new ArrayList<String>();
(new SimpleJobFinishConsumer(this.completedJobsFromPush)).listen();
+ removeList = new ArrayList<MonitorID>();
}
public HPCPullMonitor(BlockingQueue<UserMonitorData> queue, MonitorPublisher publisher) {
@@ -100,6 +104,7 @@ public class HPCPullMonitor extends PullMonitor {
cancelJobList = new LinkedBlockingQueue<String>();
this.completedJobsFromPush = new ArrayList<String>();
(new SimpleJobFinishConsumer(this.completedJobsFromPush)).listen();
+ removeList = new ArrayList<MonitorID>();
}
@@ -182,20 +187,23 @@ public class HPCPullMonitor extends PullMonitor {
String cancelMId = iterator1.next();
if (cancelMId.equals(iMonitorID.getExperimentID() + "+" + iMonitorID.getTaskID())) {
iMonitorID.setStatus(JobState.CANCELED);
- CommonUtils.removeMonitorFromQueue(take, iMonitorID);
+// CommonUtils.removeMonitorFromQueue(take, iMonitorID);
+ removeList.add(iMonitorID);
logger.debugId(cancelMId, "Found a match in cancel monitor queue, hence moved to the " +
"completed job queue, experiment {}, task {} , job {}",
iMonitorID.getExperimentID(), iMonitorID.getTaskID(), iMonitorID.getJobID());
logger.info("Job cancelled: marking the Job as ************CANCELLED************ experiment {}, task {}, job name {} .",
iMonitorID.getExperimentID(), iMonitorID.getTaskID(), iMonitorID.getJobName());
sendNotification(iMonitorID);
- monitorIDListIterator.remove();
GFacThreadPoolExecutor.getFixedThreadPool().submit(new OutHandlerWorker(gfac, iMonitorID, publisher));
break;
}
}
iterator1 = cancelJobList.iterator();
}
+
+ cleanup(take);
+
synchronized (completedJobsFromPush) {
for (ListIterator<String> iterator = completedJobsFromPush.listIterator(); iterator.hasNext(); ) {
String completeId = iterator.next();
@@ -204,14 +212,14 @@ public class HPCPullMonitor extends PullMonitor {
if (completeId.equals(iMonitorID.getUserName() + "," + iMonitorID.getJobName())) {
logger.info("This job is finished because push notification came with <username,jobName> " + completeId);
iMonitorID.setStatus(JobState.COMPLETE);
- CommonUtils.removeMonitorFromQueue(take, iMonitorID);//we have to make this empty everytime we iterate, otherwise this list will accumulate and will lead to a memory leak
+// CommonUtils.removeMonitorFromQueue(take, iMonitorID);//we have to make this empty everytime we iterate, otherwise this list will accumulate and will lead to a memory leak
+ removeList.add(iMonitorID);
logger.debugId(completeId, "Push notification updated job {} status to {}. " +
"experiment {} , task {}.", iMonitorID.getJobID(), JobState.COMPLETE.toString(),
iMonitorID.getExperimentID(), iMonitorID.getTaskID());
logger.info("AMQP message recieved: marking the Job as ************COMPLETE************ experiment {}, task {}, job name {} .",
iMonitorID.getExperimentID(), iMonitorID.getTaskID(), iMonitorID.getJobName());
- iterator.remove();
sendNotification(iMonitorID);
GFacThreadPoolExecutor.getFixedThreadPool().submit(new OutHandlerWorker(gfac, iMonitorID, publisher));
break;
@@ -220,6 +228,8 @@ public class HPCPullMonitor extends PullMonitor {
}
}
+ cleanup(take);
+
// we have to get this again because we removed the already completed jobs with amqp messages
monitorID = iHostMonitorData.getMonitorIDs();
Map<String, JobState> jobStatuses = connection.getJobStatuses(monitorID);
@@ -232,7 +242,8 @@ public class HPCPullMonitor extends PullMonitor {
} else if (JobState.COMPLETE.equals(iMonitorID.getStatus())) {
logger.debugId(iMonitorID.getJobID(), "Moved job {} to completed jobs map, experiment {}, " +
"task {}", iMonitorID.getJobID(), iMonitorID.getExperimentID(), iMonitorID.getTaskID());
- CommonUtils.removeMonitorFromQueue(take, iMonitorID);
+// CommonUtils.removeMonitorFromQueue(take, iMonitorID);
+ removeList.add(iMonitorID);
logger.info("PULL Notification is complete: marking the Job as ************COMPLETE************ experiment {}, task {}, job name {} .",
iMonitorID.getExperimentID(), iMonitorID.getTaskID(), iMonitorID.getJobName());
GFacThreadPoolExecutor.getFixedThreadPool().submit(new OutHandlerWorker(gfac, iMonitorID, publisher));
@@ -244,6 +255,9 @@ public class HPCPullMonitor extends PullMonitor {
iMonitorID.setLastMonitored(new Timestamp((new Date()).getTime()));
}
+ cleanup(take);
+
+
for (Iterator<MonitorID> iterator = monitorID.listIterator(); iterator.hasNext(); ) {
MonitorID iMonitorID = iterator.next();
if (iMonitorID.getFailedCount() > FAILED_COUNT) {
@@ -268,7 +282,8 @@ public class HPCPullMonitor extends PullMonitor {
logger.info("Listing directory came as complete: marking the Job as ************COMPLETE************ experiment {}, task {}, job name {} .",
iMonitorID.getExperimentID(), iMonitorID.getTaskID(), iMonitorID.getJobName());
sendNotification(iMonitorID);
- CommonUtils.removeMonitorFromQueue(take, iMonitorID);
+// CommonUtils.removeMonitorFromQueue(take, iMonitorID);
+ removeList.add(iMonitorID);
GFacThreadPoolExecutor.getFixedThreadPool().submit(new OutHandlerWorker(gfac, iMonitorID, publisher));
} else {
iMonitorID.setFailedCount(0);
@@ -281,6 +296,8 @@ public class HPCPullMonitor extends PullMonitor {
}
}
+ cleanup(take);
+
} else {
logger.debug("Qstat Monitor doesn't handle non-gsissh hosts , host {}", iHostMonitorData.
@@ -434,4 +451,17 @@ public class HPCPullMonitor extends PullMonitor {
public void setCancelJobList(LinkedBlockingQueue<String> cancelJobList) {
this.cancelJobList = cancelJobList;
}
+
+
+ private void cleanup(UserMonitorData userMonitorData){
+ for(MonitorID iMonitorId:removeList){
+ try {
+ CommonUtils.removeMonitorFromQueue(userMonitorData, iMonitorId);
+ } catch (AiravataMonitorException e) {
+ logger.error(e.getMessage(), e);
+ logger.error("Error deleting the monitor data: " + iMonitorId.getJobID());
+ }
+ }
+ removeList.clear();
+ }
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/fcbda21f/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/CommonUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/CommonUtils.java b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/CommonUtils.java
index 135349f..cbac726 100644
--- a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/CommonUtils.java
+++ b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/CommonUtils.java
@@ -157,6 +157,7 @@ public class CommonUtils {
logger.info("This might not be an error because someone else removed this job from the queue");
}
+
public static void invokeOutFlowHandlers(JobExecutionContext jobExecutionContext) throws GFacException {
List<GFacHandlerConfig> handlers = jobExecutionContext.getGFacConfiguration().getOutHandlers();
http://git-wip-us.apache.org/repos/asf/airavata/blob/fcbda21f/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/security/TokenizedSSHAuthInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/security/TokenizedSSHAuthInfo.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/security/TokenizedSSHAuthInfo.java
index 683985f..a416dbd 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/security/TokenizedSSHAuthInfo.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/security/TokenizedSSHAuthInfo.java
@@ -21,6 +21,7 @@
package org.apache.airavata.gfac.ssh.security;
import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.IOUtil;
import org.apache.airavata.common.utils.ServerSettings;
import org.apache.airavata.credential.store.credential.Credential;
import org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential;
@@ -148,7 +149,7 @@ public class TokenizedSSHAuthInfo implements SSHPublicKeyFileAuthentication {
* @throws org.apache.airavata.gfac.GFacException If an error occurred while retrieving credentials.
* @throws org.apache.airavata.common.exception.ApplicationSettingsException
*/
- public SSHCredential getDefaultCredentials() throws GFacException, ApplicationSettingsException {
+ public SSHCredential getDefaultCredentials() throws GFacException, ApplicationSettingsException, IOException {
Properties configurationProperties = ServerSettings.getProperties();
String sshUserName = configurationProperties.getProperty(Constants.SSH_USER_NAME);
this.getRequestData().setRequestUser(sshUserName);
@@ -156,7 +157,7 @@ public class TokenizedSSHAuthInfo implements SSHPublicKeyFileAuthentication {
this.publicKeyFile = configurationProperties.getProperty(Constants.SSH_PUBLIC_KEY);
this.passPhrase = configurationProperties.getProperty(Constants.SSH_PRIVATE_KEY_PASS);
this.getRequestData().setRequestUser(sshUserName);
- return new SSHCredential(null, null, null, requestData.getGatewayId(), sshUserName);
+ return new SSHCredential(IOUtil.readToByteArray(new File(this.privateKeyFile)), IOUtil.readToByteArray(new File(this.publicKeyFile)), this.passPhrase, requestData.getGatewayId(), sshUserName);
}
public CredentialReader getCredentialReader() {
http://git-wip-us.apache.org/repos/asf/airavata/blob/fcbda21f/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java b/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
index 0ca7546..7a2fce3 100644
--- a/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
+++ b/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
@@ -27,16 +27,17 @@ import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
import org.apache.airavata.gsi.ssh.config.ConfigReader;
import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
+import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPublicKeyAuthentication;
import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
import org.apache.airavata.gsi.ssh.util.CommonUtils;
+import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.AssertJUnit;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
-import java.io.File;
-import java.io.IOException;
+import java.io.*;
import java.util.ArrayList;
import java.util.List;
@@ -49,11 +50,14 @@ public class DefaultSSHApiTestWithMyProxyAuth {
}
- public static void main(String[]ars){
+ public static void main(String[]ars) throws IOException {
String myProxyUserName = "lg11w";
- DefaultPasswordAuthenticationInfo authenticationInfo
- = new DefaultPasswordAuthenticationInfo("");
+// DefaultPasswordAuthenticationInfo authenticationInfo
+// = new DefaultPasswordAuthenticationInfo("");
+ byte[] privateKey = IOUtils.toByteArray(new BufferedInputStream(new FileInputStream("/Users/lginnali/.ssh/id_dsa")));
+ byte[] publicKey = IOUtils.toByteArray(new BufferedInputStream(new FileInputStream("/Users/lginnali/.ssh/id_dsa.pub")));
+ DefaultPublicKeyAuthentication authenticationInfo = new DefaultPublicKeyAuthentication(privateKey,publicKey,"");
// Create command
CommandInfo commandInfo = new RawCommandInfo("source /etc/bashrc; bsub </home/lg11w/mywork/sshEchoExperiment_9d267072-ca65-4ca8-847a-cd3d130f6050/366787899.lsf");
http://git-wip-us.apache.org/repos/asf/airavata/blob/fcbda21f/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/VanilaTestWithSSHAuth.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/VanilaTestWithSSHAuth.java b/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/VanilaTestWithSSHAuth.java
index 8d70a21..186aca6 100644
--- a/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/VanilaTestWithSSHAuth.java
+++ b/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/VanilaTestWithSSHAuth.java
@@ -75,8 +75,8 @@ public class VanilaTestWithSSHAuth {
System.setProperty("ssh.host",hostName);
System.setProperty("ssh.username", userName);
- System.setProperty("private.ssh.key", "/home/user/.ssh/id_dsa");
- System.setProperty("public.ssh.key", "/home/user/.ssh/id_dsa.pub");
+ System.setProperty("private.ssh.key", "/home/lginnali/.ssh/id_dsa");
+ System.setProperty("public.ssh.key", "/home/lginnali/.ssh/id_dsa.pub");
System.setProperty("ssh.working.directory", "/tmp");
this.hostName = System.getProperty("ssh.host");
[09/50] [abbrv] airavata git commit: Moving credential store client
to stubs module.
Posted by sh...@apache.org.
Moving credential store client to stubs module.
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/52f1e758
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/52f1e758
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/52f1e758
Branch: refs/heads/new-workflow-design
Commit: 52f1e758ee7c8a0ac757d45a8b67f7d6e9ab4c70
Parents: e9468ca
Author: Suresh Marru <sm...@apache.org>
Authored: Fri Mar 6 14:15:26 2015 -0500
Committer: Suresh Marru <sm...@apache.org>
Committed: Fri Mar 6 14:15:26 2015 -0500
----------------------------------------------------------------------
.../credential/store/client/TestSSLClient.java | 140 -------------------
.../credential/store/client/TestSSLClient.java | 140 +++++++++++++++++++
2 files changed, 140 insertions(+), 140 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/52f1e758/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java
deleted file mode 100644
index cc5ebb6..0000000
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.airavata.credential.store.client;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.AiravataUtils;
-import org.apache.airavata.common.utils.Constants;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.credential.store.cpi.CredentialStoreService;
-import org.apache.airavata.credential.store.datamodel.CertificateCredential;
-import org.apache.airavata.credential.store.datamodel.CommunityUser;
-import org.apache.airavata.credential.store.datamodel.SSHCredential;
-import org.apache.thrift.TException;
-import org.apache.thrift.protocol.TBinaryProtocol;
-import org.apache.thrift.protocol.TProtocol;
-import org.apache.thrift.transport.TSSLTransportFactory;
-import org.apache.thrift.transport.TTransport;
-import org.apache.thrift.transport.TTransportException;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.cert.CertificateException;
-import java.security.cert.X509Certificate;
-import org.apache.commons.codec.binary.Base64;
-
-public class TestSSLClient {
- private void invoke() {
- TTransport transport;
- try {
- AiravataUtils.setExecutionAsServer();
- TSSLTransportFactory.TSSLTransportParameters params =
- new TSSLTransportFactory.TSSLTransportParameters();
- String keystorePath = ServerSettings.getCredentialStoreThriftServerKeyStorePath();
- String keystorePWD = ServerSettings.getCredentialStoreThriftServerKeyStorePassword();
- params.setTrustStore(keystorePath, keystorePWD);
- final int serverPort = Integer.parseInt(ServerSettings.getSetting(Constants.CREDENTIAL_SERVER_PORT, "8960"));
- final String serverHost = ServerSettings.getSetting(Constants.CREDENTIAL_SERVER_HOST, null);
-
- transport = TSSLTransportFactory.getClientSocket(serverHost, serverPort, 10000, params);
- TProtocol protocol = new TBinaryProtocol(transport);
-
- CredentialStoreService.Client client = new CredentialStoreService.Client(protocol);
-// testSSHCredential(client);
- testCertificateCredential(client);
- transport.close();
- } catch (TTransportException e) {
- e.printStackTrace();
- }catch (ApplicationSettingsException e) {
- e.printStackTrace();
- }
- }
-
- public static void testSSHCredential (CredentialStoreService.Client client){
- try {
- SSHCredential sshCredential = new SSHCredential();
- sshCredential.setUsername("test");
- sshCredential.setGatewayId("testGateway");
- sshCredential.setPassphrase("mypassphrase");
- String token = client.addSSHCredential(sshCredential);
- System.out.println("SSH Token :" + token);
- SSHCredential credential = client.getSSHCredential(token, "testGateway");
- System.out.println("private key : " + credential.getPrivateKey());
- System.out.println("public key : " + credential.getPublicKey());
- }catch (TTransportException e) {
- e.printStackTrace();
- } catch (TException e) {
- e.printStackTrace();
- }
- }
-
- public static void testCertificateCredential (CredentialStoreService.Client client){
- try {
- CertificateCredential certificateCredential = new CertificateCredential();
- CommunityUser communityUser = new CommunityUser("testGateway", "test", "test@ddsd");
- certificateCredential.setCommunityUser(communityUser);
- X509Certificate[] x509Certificates = new X509Certificate[1];
- KeyStore ks = KeyStore.getInstance("JKS");
- File keyStoreFile = new File("/Users/smarru/code/airavata-master/modules/configuration/server/src/main/resources/airavata.jks");
- FileInputStream fis = new FileInputStream(keyStoreFile);
- char[] password = "airavata".toCharArray();
- ks.load(fis,password);
- x509Certificates[0] = (X509Certificate) ks.getCertificate("airavata");
- Base64 encoder = new Base64(64);
- String cert_begin = "-----BEGIN CERTIFICATE-----\n";
- String end_cert = "-----END CERTIFICATE-----";
- byte[] derCert = x509Certificates[0].getEncoded();
- String pemCertPre = new String(encoder.encode(derCert));
- String pemCert = cert_begin + pemCertPre + end_cert;
- certificateCredential.setX509Cert(pemCert);
- String token = client.addCertificateCredential(certificateCredential);
- System.out.println("Certificate Token :" + token);
- CertificateCredential credential = client.getCertificateCredential(token, "testGateway");
- System.out.println("certificate : " + credential.getX509Cert());
- System.out.println("gateway name : " + credential.getCommunityUser().getGatewayName());
- }catch (TTransportException e) {
- e.printStackTrace();
- } catch (TException e) {
- e.printStackTrace();
- } catch (KeyStoreException e) {
- e.printStackTrace();
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (NoSuchAlgorithmException e) {
- e.printStackTrace();
- } catch (CertificateException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- public static void main(String[] args) {
- TestSSLClient c = new TestSSLClient();
- c.invoke();
-
- }
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/52f1e758/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java
new file mode 100644
index 0000000..cc5ebb6
--- /dev/null
+++ b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java
@@ -0,0 +1,140 @@
+/*
+ *
+ * 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.credential.store.client;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.AiravataUtils;
+import org.apache.airavata.common.utils.Constants;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.credential.store.cpi.CredentialStoreService;
+import org.apache.airavata.credential.store.datamodel.CertificateCredential;
+import org.apache.airavata.credential.store.datamodel.CommunityUser;
+import org.apache.airavata.credential.store.datamodel.SSHCredential;
+import org.apache.thrift.TException;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.protocol.TProtocol;
+import org.apache.thrift.transport.TSSLTransportFactory;
+import org.apache.thrift.transport.TTransport;
+import org.apache.thrift.transport.TTransportException;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+import org.apache.commons.codec.binary.Base64;
+
+public class TestSSLClient {
+ private void invoke() {
+ TTransport transport;
+ try {
+ AiravataUtils.setExecutionAsServer();
+ TSSLTransportFactory.TSSLTransportParameters params =
+ new TSSLTransportFactory.TSSLTransportParameters();
+ String keystorePath = ServerSettings.getCredentialStoreThriftServerKeyStorePath();
+ String keystorePWD = ServerSettings.getCredentialStoreThriftServerKeyStorePassword();
+ params.setTrustStore(keystorePath, keystorePWD);
+ final int serverPort = Integer.parseInt(ServerSettings.getSetting(Constants.CREDENTIAL_SERVER_PORT, "8960"));
+ final String serverHost = ServerSettings.getSetting(Constants.CREDENTIAL_SERVER_HOST, null);
+
+ transport = TSSLTransportFactory.getClientSocket(serverHost, serverPort, 10000, params);
+ TProtocol protocol = new TBinaryProtocol(transport);
+
+ CredentialStoreService.Client client = new CredentialStoreService.Client(protocol);
+// testSSHCredential(client);
+ testCertificateCredential(client);
+ transport.close();
+ } catch (TTransportException e) {
+ e.printStackTrace();
+ }catch (ApplicationSettingsException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public static void testSSHCredential (CredentialStoreService.Client client){
+ try {
+ SSHCredential sshCredential = new SSHCredential();
+ sshCredential.setUsername("test");
+ sshCredential.setGatewayId("testGateway");
+ sshCredential.setPassphrase("mypassphrase");
+ String token = client.addSSHCredential(sshCredential);
+ System.out.println("SSH Token :" + token);
+ SSHCredential credential = client.getSSHCredential(token, "testGateway");
+ System.out.println("private key : " + credential.getPrivateKey());
+ System.out.println("public key : " + credential.getPublicKey());
+ }catch (TTransportException e) {
+ e.printStackTrace();
+ } catch (TException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public static void testCertificateCredential (CredentialStoreService.Client client){
+ try {
+ CertificateCredential certificateCredential = new CertificateCredential();
+ CommunityUser communityUser = new CommunityUser("testGateway", "test", "test@ddsd");
+ certificateCredential.setCommunityUser(communityUser);
+ X509Certificate[] x509Certificates = new X509Certificate[1];
+ KeyStore ks = KeyStore.getInstance("JKS");
+ File keyStoreFile = new File("/Users/smarru/code/airavata-master/modules/configuration/server/src/main/resources/airavata.jks");
+ FileInputStream fis = new FileInputStream(keyStoreFile);
+ char[] password = "airavata".toCharArray();
+ ks.load(fis,password);
+ x509Certificates[0] = (X509Certificate) ks.getCertificate("airavata");
+ Base64 encoder = new Base64(64);
+ String cert_begin = "-----BEGIN CERTIFICATE-----\n";
+ String end_cert = "-----END CERTIFICATE-----";
+ byte[] derCert = x509Certificates[0].getEncoded();
+ String pemCertPre = new String(encoder.encode(derCert));
+ String pemCert = cert_begin + pemCertPre + end_cert;
+ certificateCredential.setX509Cert(pemCert);
+ String token = client.addCertificateCredential(certificateCredential);
+ System.out.println("Certificate Token :" + token);
+ CertificateCredential credential = client.getCertificateCredential(token, "testGateway");
+ System.out.println("certificate : " + credential.getX509Cert());
+ System.out.println("gateway name : " + credential.getCommunityUser().getGatewayName());
+ }catch (TTransportException e) {
+ e.printStackTrace();
+ } catch (TException e) {
+ e.printStackTrace();
+ } catch (KeyStoreException e) {
+ e.printStackTrace();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (NoSuchAlgorithmException e) {
+ e.printStackTrace();
+ } catch (CertificateException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public static void main(String[] args) {
+ TestSSLClient c = new TestSSLClient();
+ c.invoke();
+
+ }
+}
[48/50] [abbrv] airavata git commit: Changed according to
AIRAVATA-1634 in clone fix. AIRAVATA-1631
Posted by sh...@apache.org.
Changed according to AIRAVATA-1634 in clone fix. AIRAVATA-1631
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/7d57c098
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/7d57c098
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/7d57c098
Branch: refs/heads/new-workflow-design
Commit: 7d57c09865be7da0dff3ec506e5b6bd00cbf9268
Parents: f708304
Author: raminder <ra...@apache.org>
Authored: Tue Mar 17 12:41:28 2015 -0400
Committer: raminder <ra...@apache.org>
Committed: Tue Mar 17 12:41:28 2015 -0400
----------------------------------------------------------------------
.../org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/7d57c098/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
index 5dcea2e..9c3e049 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
@@ -385,18 +385,16 @@ public class BetterGfacImpl implements GFac,Watcher {
for (OutputDataObjectType objectType : taskOutputs){
if (objectType.getType() == DataType.URI && objectType.getValue() != null){
- // this should be also the relative path : in case of clone, this will contain full path
String filePath = objectType.getValue();
- if(objectType.getLocation() == null && objectType.getLocation().isEmpty() && filePath.contains(File.separator)){
- filePath = jobExecutionContext.getOutputDir() + File.separator + filePath.substring(filePath.lastIndexOf(File.separatorChar) + 1, filePath.length());
- }
- //output is not in working folder
+ // if output is not in working folder
if (objectType.getLocation() != null && !objectType.getLocation().isEmpty()) {
if(objectType.getLocation().startsWith(File.separator)){
filePath = objectType.getLocation() + File.separator + filePath;
}else{
filePath = jobExecutionContext.getOutputDir() + File.separator + objectType.getLocation() + File.separator + filePath;
}
+ }else{
+ filePath = jobExecutionContext.getOutputDir() + File.separator + filePath;
}
objectType.setValue(filePath);
[29/50] [abbrv] airavata git commit: Fixed AIRAVATA-1596
Posted by sh...@apache.org.
Fixed AIRAVATA-1596
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/b746118e
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/b746118e
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/b746118e
Branch: refs/heads/new-workflow-design
Commit: b746118e5cc06ac5698c9504f6a4b1c29bc802ca
Parents: 4000b82
Author: raminder <ra...@apache.org>
Authored: Tue Mar 10 23:28:07 2015 -0400
Committer: raminder <ra...@apache.org>
Committed: Tue Mar 10 23:28:07 2015 -0400
----------------------------------------------------------------------
.../tools/RegisterSampleApplications.java | 158 +++++++++++++++++--
1 file changed, 143 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/b746118e/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
index 55dbcf8..58dafbb 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
@@ -55,6 +55,8 @@ public class RegisterSampleApplications {
private static String trestlesResourceId = "trestles.sdsc.xsede.org_db29986e-5a27-4949-ae7f-04a6012d0d35";
private static String bigredResourceId = "bigred2.uits.iu.edu_3eae6e9d-a1a7-44ec-ac85-3796ef726ef1";
private static String lsfResourceId = "lsf_3eae6e9d-a1a7-44ec-ac85-3796ef726ef1";
+ private static String alamoResourceId;
+
private static String fsdResourceId;
// unicore service endpoint url
@@ -76,7 +78,8 @@ public class RegisterSampleApplications {
private static final String gaussianName = "Gaussian";
private static final String gamessName = "Gamess";
private static final String stressMemName = "StressMem";
-
+ private static final String ultrascanName = "Ultrascan";
+
//Appplication Descriptions
private static final String echoDescription = "A Simple Echo Application";
private static final String amberDescription = "Assisted Model Building with Energy Refinement MD Package";
@@ -92,8 +95,8 @@ public class RegisterSampleApplications {
private static final String monteXDescription = "Grid Chem Tinker Monte Application";
private static final String gaussianDescription = "Grid Chem Gaussian Application";
private static final String gamessDescription = "A Gamess Application";
-
-
+ private static final String ultrascanDescription = "Ultrascan Application";
+
//App Module Id's
private static String echoModuleId;
private static String amberModuleId;
@@ -124,6 +127,8 @@ public class RegisterSampleApplications {
private static String wrfInterfaceId;
private static String phastaInterfaceId;
private static String gamessInterfaceId;
+ private static String ultrascanModuleId;
+ private static String ultrascanInterfaceId;
public RegisterSampleApplications(Airavata.Client airavataClient) {
this.airavataClient = airavataClient;
@@ -209,6 +214,12 @@ public class RegisterSampleApplications {
fsdResourceId = registerUnicoreEndpoint("fsd-cloud15.zam.kfa-juelich.de", "interop host", JobSubmissionProtocol.UNICORE, SecurityProtocol.GSI);
System.out.println("FSd Resource Id: "+fsdResourceId);
+ //Register Alamo
+ alamoResourceId = registerComputeHost("alamo.uthscsa.edu", "Alamo Cluster",
+ ResourceJobManagerType.PBS, "push", "/usr/bin/", SecurityProtocol.SSH_KEYS, 22, "/usr/bin/mpiexec -np");
+ System.out.println("Alamo Cluster " + alamoResourceId);
+
+
} catch (TException e) {
e.printStackTrace();
}
@@ -335,6 +346,11 @@ public class RegisterSampleApplications {
RegisterSampleApplicationsUtils.createApplicationModule(
gamessName, "17May13", gamessDescription));
System.out.println("Gamess Module Id " + gamessModuleId);
+ //Register Ultrascan
+ ultrascanModuleId = airavataClient.registerApplicationModule(DEFAULT_GATEWAY,
+ RegisterSampleApplicationsUtils.createApplicationModule(
+ ultrascanName, "1.0", ultrascanDescription));
+ System.out.println("Ultrascan Module Id " + ultrascanModuleId);
} catch (TException e) {
e.printStackTrace();
@@ -360,6 +376,9 @@ public class RegisterSampleApplications {
registerFSDApps();
registerLSFApps();
+
+ //Registering Alamo Apps
+ registerAlamoApps();
}
@@ -404,6 +423,9 @@ public class RegisterSampleApplications {
registerTinkerMonteInterface();
registerGaussianInterface();
+
+ // Register Ultrascan
+ registerUltrascanInterface();
}
@@ -432,7 +454,10 @@ public class RegisterSampleApplications {
"", DataType.URI, false, true));
applicationOutputs.add(RegisterSampleApplicationsUtils.createAppOutput("f10_file",
"", DataType.URI, false, true));
-
+ applicationOutputs.add(RegisterSampleApplicationsUtils.createAppOutput("STDOUT",
+ "", DataType.STDOUT, false, true));
+ applicationOutputs.add(RegisterSampleApplicationsUtils.createAppOutput("STDERR",
+ "", DataType.STDERR, false, true));
gamessInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY,
RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("gamess", "gamess",
@@ -458,11 +483,14 @@ public class RegisterSampleApplications {
List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
applicationInputs.add(input1);
- OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("echo_output",
- "", DataType.STRING, false, false);
+ OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("STDOUT",
+ "", DataType.STDOUT, false, false);
+ OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("STDERR",
+ "", DataType.STDERR, false, false);
List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
applicationOutputs.add(output1);
+ applicationOutputs.add(output2);
echoLocalInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY,
RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(echoName, echoDescription,
@@ -531,11 +559,14 @@ public class RegisterSampleApplications {
List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
applicationInputs.add(input1);
- OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("Sample_Output",
- "", DataType.STRING, false, false);
+ OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("STDOutput",
+ "", DataType.STDOUT, true, true);
+ OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("STDErr",
+ "", DataType.STDERR, true, true);
List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
applicationOutputs.add(output1);
+ applicationOutputs.add(output2);
mpiInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY,
@@ -609,17 +640,19 @@ public class RegisterSampleApplications {
InputDataObjectType input3 = RegisterSampleApplicationsUtils.createAppInput("Parameter_Topology_File", null,
DataType.URI, null, 3,true, true, false, "Parameter and Topology coordinates", null);
-
+
List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
applicationInputs.add(input1);
applicationInputs.add(input2);
applicationInputs.add(input3);
- OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("Echoed_Output",
- "", DataType.STRING, true, true);
+ OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("STDOUT",null,DataType.STDOUT, true, true);
+ OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("STDERR",null,DataType.STDERR, true, true);
+
List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
applicationOutputs.add(output1);
+ applicationOutputs.add(output2);
autoDockInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY,
RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(autoDockName, autoDockDescription,
@@ -723,9 +756,14 @@ public class RegisterSampleApplications {
applicationInputs.add(input1);
OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("LAMMPS_Simulation_Log",null,DataType.URI, true, true);
-
+ OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("STDOUT",null,DataType.STDOUT, true, true);
+ OutputDataObjectType output3 = RegisterSampleApplicationsUtils.createAppOutput("STDERR",null,DataType.STDERR, true, true);
+
+
List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
applicationOutputs.add(output1);
+ applicationOutputs.add(output2);
+ applicationOutputs.add(output3);
lammpsInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY,
RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(lammpsName, lammpsDescription,
@@ -752,9 +790,14 @@ public class RegisterSampleApplications {
OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("NWChem_Execution_Log",
null, DataType.URI, true, false);
+ OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("STDOUT",null,DataType.STDOUT, true, true);
+ OutputDataObjectType output3 = RegisterSampleApplicationsUtils.createAppOutput("STDERR",null,DataType.STDERR, true, true);
+
List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
applicationOutputs.add(output1);
+ applicationOutputs.add(output2);
+ applicationOutputs.add(output3);
nwChemInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY,
RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(nwChemName, nwChemDescription,
@@ -786,10 +829,14 @@ public class RegisterSampleApplications {
OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("Trinity_Execution_Log",null,DataType.URI, true, true);
OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("Trinity_FASTA_File",null,DataType.URI, true, true);
+ OutputDataObjectType output3 = RegisterSampleApplicationsUtils.createAppOutput("STDOUT",null,DataType.STDOUT, true, true);
+ OutputDataObjectType output4 = RegisterSampleApplicationsUtils.createAppOutput("STDERR",null,DataType.STDERR, true, true);
List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
applicationOutputs.add(output1);
applicationOutputs.add(output2);
+ applicationOutputs.add(output3);
+ applicationOutputs.add(output4);
trinityInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY,
RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(trinityName, trinityDescription,
@@ -828,11 +875,16 @@ public class RegisterSampleApplications {
OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("WRF_Execution_Log",
"", DataType.URI, true, true);
+ OutputDataObjectType output3 = RegisterSampleApplicationsUtils.createAppOutput("STDOUT",null,DataType.STDOUT, true, true);
+ OutputDataObjectType output4 = RegisterSampleApplicationsUtils.createAppOutput("STDERR",null,DataType.STDERR, true, true);
+
List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
applicationOutputs.add(output1);
applicationOutputs.add(output2);
-
+ applicationOutputs.add(output3);
+ applicationOutputs.add(output4);
+
wrfInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY,
RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(wrfName, wrfDescription,
appModules, applicationInputs, applicationOutputs));
@@ -866,12 +918,18 @@ public class RegisterSampleApplications {
OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("PHASTA_Execution_Log",null,DataType.URI, true, true);
OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("PHASTA_Output_tar",null,DataType.URI, true, true);
+ OutputDataObjectType output3 = RegisterSampleApplicationsUtils.createAppOutput("STDOUT",null,DataType.STDOUT, true, true);
+ OutputDataObjectType output4 = RegisterSampleApplicationsUtils.createAppOutput("STDERR",null,DataType.STDERR, true, true);
+
List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
applicationOutputs.add(output1);
applicationOutputs.add(output2);
+ applicationOutputs.add(output3);
+ applicationOutputs.add(output4);
- amberInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY,
+
+ phastaInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY,
RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(phastaName, phastaDescription,
appModules, applicationInputs, applicationOutputs));
System.out.println("phasta Application Interface Id " + phastaInterfaceId);
@@ -911,10 +969,15 @@ public class RegisterSampleApplications {
OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("gaussian.out",
"", DataType.URI, true, true );
+ OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("STDOUT",null,DataType.STDOUT, true, true);
+ OutputDataObjectType output3 = RegisterSampleApplicationsUtils.createAppOutput("STDERR",null,DataType.STDERR, true, true);
+
List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
applicationOutputs.add(output1);
-
+ applicationOutputs.add(output2);
+ applicationOutputs.add(output3);
+
String addApplicationInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY,
RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("Gaussian", "Gaussian application",
appModules, applicationInputs, applicationOutputs));
@@ -958,9 +1021,14 @@ public class RegisterSampleApplications {
OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("Diskoutputfile_with_dir",
"", DataType.URI, false, false);
+ OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("STDOUT",null,DataType.STDOUT, true, true);
+ OutputDataObjectType output3 = RegisterSampleApplicationsUtils.createAppOutput("STDERR",null,DataType.STDERR, true, true);
+
List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
applicationOutputs.add(output1);
+ applicationOutputs.add(output2);
+ applicationOutputs.add(output3);
String addApplicationInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY,
RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("Tinker_Monte", "Monte application",
@@ -1254,6 +1322,9 @@ public class RegisterSampleApplications {
ComputeResourcePreference fsdResourcePreferences = RegisterSampleApplicationsUtils.
createComputeResourcePreference(fsdResourceId, null, false, null, JobSubmissionProtocol.UNICORE, DataMovementProtocol.UNICORE_STORAGE_SERVICE,null);
+ ComputeResourcePreference alamoResourcePreferences = RegisterSampleApplicationsUtils.
+ createComputeResourcePreference(alamoResourceId, null, false, null, JobSubmissionProtocol.SSH, DataMovementProtocol.SCP,"/home/us3/work/uslims3_cauma3-03896");
+
GatewayResourceProfile gatewayResourceProfile = new GatewayResourceProfile();
gatewayResourceProfile.setGatewayID(DEFAULT_GATEWAY);
gatewayResourceProfile.addToComputeResourcePreferences(stampedeResourcePreferences);
@@ -1298,5 +1369,62 @@ public class RegisterSampleApplications {
e.printStackTrace();
}
}
+ public void registerAlamoApps() {
+ try {
+ System.out.println("#### Registering Application Deployments on Alamo #### \n");
+
+ //Register Ultrascan on Alamo
+ List<String> ultrascanMouldes = new ArrayList<String>();
+ ultrascanMouldes.add("module load intel/2015/64");
+ ultrascanMouldes.add("module load openmpi/intel/1.8.4");
+ ultrascanMouldes.add("module load qt4/4.8.6");
+ ultrascanMouldes.add("module load ultrascan3/3.3");
+
+ String ultrascanAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY,
+ RegisterSampleApplicationsUtils.createApplicationDeployment(ultrascanModuleId, alamoResourceId,
+ "/home/us3/bin/us_mpi_analysis", ApplicationParallelismType.OPENMP, ultrascanDescription, ultrascanMouldes , null, null));
+ System.out.println("Ultrascan on alamo deployment Id " + ultrascanAppDeployId);
+
+ } catch (TException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private void registerUltrascanInterface() {
+ try {
+ System.out.println("#### Registering Ultrascan Application Interface ####");
+
+ List<String> appModules = new ArrayList<String>();
+ appModules.add(ultrascanModuleId);
+
+ InputDataObjectType input1 = RegisterSampleApplicationsUtils.createAppInput("input", null,
+ DataType.URI, null, 1, true, true, false, "input file", null);
+
+ List<InputDataObjectType> applicationInputs = new ArrayList<InputDataObjectType>();
+ applicationInputs.add(input1);
+
+ OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("output/analysis-results.tar",
+ "", DataType.URI, true, true );
+
+ OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("STDOUT",
+ "", DataType.STDOUT, true, true );
+
+ OutputDataObjectType output3 = RegisterSampleApplicationsUtils.createAppOutput("STDERR",
+ "", DataType.STDERR, true, true );
+
+ List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
+ applicationOutputs.add(output1);
+ applicationOutputs.add(output2);
+ applicationOutputs.add(output3);
+
+ String ultrascanInterfaceId = airavataClient.registerApplicationInterface(DEFAULT_GATEWAY,
+ RegisterSampleApplicationsUtils.createApplicationInterfaceDescription("Ultrascan", "Ultrascan application",
+ appModules, applicationInputs, applicationOutputs));
+ System.out.println("Ultrascan Application Interface Id " + ultrascanInterfaceId);
+
+ } catch (TException e) {
+ e.printStackTrace();
+ }
+ }
}
[02/50] [abbrv] airavata git commit: Reorganizing duplicate generated
classed and instead using the stubs artifact - AIRAVATA-1621
Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/b25e0a5d/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/cpi/cs_cpi_serviceConstants.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/cpi/cs_cpi_serviceConstants.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/cpi/cs_cpi_serviceConstants.java
deleted file mode 100644
index 2b8858e..0000000
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/cpi/cs_cpi_serviceConstants.java
+++ /dev/null
@@ -1,55 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.credential.store.cpi;
-
-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 org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class cs_cpi_serviceConstants {
-
- public static final String CS_CPI_VERSION = "0.15.0";
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/b25e0a5d/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/datamodel/CertificateCredential.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/datamodel/CertificateCredential.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/datamodel/CertificateCredential.java
deleted file mode 100644
index ae37b1d..0000000
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/datamodel/CertificateCredential.java
+++ /dev/null
@@ -1,1104 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.credential.store.datamodel;
-
-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 org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class CertificateCredential implements org.apache.thrift.TBase<CertificateCredential, CertificateCredential._Fields>, java.io.Serializable, Cloneable, Comparable<CertificateCredential> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CertificateCredential");
-
- private static final org.apache.thrift.protocol.TField COMMUNITY_USER_FIELD_DESC = new org.apache.thrift.protocol.TField("communityUser", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final org.apache.thrift.protocol.TField X509_CERT_FIELD_DESC = new org.apache.thrift.protocol.TField("x509Cert", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField NOT_AFTER_FIELD_DESC = new org.apache.thrift.protocol.TField("notAfter", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField PRIVATE_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("privateKey", org.apache.thrift.protocol.TType.STRING, (short)4);
- private static final org.apache.thrift.protocol.TField LIFE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lifeTime", org.apache.thrift.protocol.TType.I64, (short)5);
- private static final org.apache.thrift.protocol.TField NOT_BEFORE_FIELD_DESC = new org.apache.thrift.protocol.TField("notBefore", org.apache.thrift.protocol.TType.STRING, (short)6);
- private static final org.apache.thrift.protocol.TField PERSISTED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("persistedTime", org.apache.thrift.protocol.TType.I64, (short)7);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)8);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new CertificateCredentialStandardSchemeFactory());
- schemes.put(TupleScheme.class, new CertificateCredentialTupleSchemeFactory());
- }
-
- public CommunityUser communityUser; // required
- public String x509Cert; // required
- public String notAfter; // optional
- public String privateKey; // optional
- public long lifeTime; // optional
- public String notBefore; // optional
- public long persistedTime; // optional
- public String token; // optional
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- COMMUNITY_USER((short)1, "communityUser"),
- X509_CERT((short)2, "x509Cert"),
- NOT_AFTER((short)3, "notAfter"),
- PRIVATE_KEY((short)4, "privateKey"),
- LIFE_TIME((short)5, "lifeTime"),
- NOT_BEFORE((short)6, "notBefore"),
- PERSISTED_TIME((short)7, "persistedTime"),
- TOKEN((short)8, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // COMMUNITY_USER
- return COMMUNITY_USER;
- case 2: // X509_CERT
- return X509_CERT;
- case 3: // NOT_AFTER
- return NOT_AFTER;
- case 4: // PRIVATE_KEY
- return PRIVATE_KEY;
- case 5: // LIFE_TIME
- return LIFE_TIME;
- case 6: // NOT_BEFORE
- return NOT_BEFORE;
- case 7: // PERSISTED_TIME
- return PERSISTED_TIME;
- case 8: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __LIFETIME_ISSET_ID = 0;
- private static final int __PERSISTEDTIME_ISSET_ID = 1;
- private byte __isset_bitfield = 0;
- private _Fields optionals[] = {_Fields.NOT_AFTER,_Fields.PRIVATE_KEY,_Fields.LIFE_TIME,_Fields.NOT_BEFORE,_Fields.PERSISTED_TIME,_Fields.TOKEN};
- 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.COMMUNITY_USER, new org.apache.thrift.meta_data.FieldMetaData("communityUser", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CommunityUser.class)));
- tmpMap.put(_Fields.X509_CERT, new org.apache.thrift.meta_data.FieldMetaData("x509Cert", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.NOT_AFTER, new org.apache.thrift.meta_data.FieldMetaData("notAfter", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.PRIVATE_KEY, new org.apache.thrift.meta_data.FieldMetaData("privateKey", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.LIFE_TIME, new org.apache.thrift.meta_data.FieldMetaData("lifeTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- tmpMap.put(_Fields.NOT_BEFORE, new org.apache.thrift.meta_data.FieldMetaData("notBefore", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.PERSISTED_TIME, new org.apache.thrift.meta_data.FieldMetaData("persistedTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CertificateCredential.class, metaDataMap);
- }
-
- public CertificateCredential() {
- }
-
- public CertificateCredential(
- CommunityUser communityUser,
- String x509Cert)
- {
- this();
- this.communityUser = communityUser;
- this.x509Cert = x509Cert;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public CertificateCredential(CertificateCredential other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetCommunityUser()) {
- this.communityUser = new CommunityUser(other.communityUser);
- }
- if (other.isSetX509Cert()) {
- this.x509Cert = other.x509Cert;
- }
- if (other.isSetNotAfter()) {
- this.notAfter = other.notAfter;
- }
- if (other.isSetPrivateKey()) {
- this.privateKey = other.privateKey;
- }
- this.lifeTime = other.lifeTime;
- if (other.isSetNotBefore()) {
- this.notBefore = other.notBefore;
- }
- this.persistedTime = other.persistedTime;
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public CertificateCredential deepCopy() {
- return new CertificateCredential(this);
- }
-
- @Override
- public void clear() {
- this.communityUser = null;
- this.x509Cert = null;
- this.notAfter = null;
- this.privateKey = null;
- setLifeTimeIsSet(false);
- this.lifeTime = 0;
- this.notBefore = null;
- setPersistedTimeIsSet(false);
- this.persistedTime = 0;
- this.token = null;
- }
-
- public CommunityUser getCommunityUser() {
- return this.communityUser;
- }
-
- public CertificateCredential setCommunityUser(CommunityUser communityUser) {
- this.communityUser = communityUser;
- return this;
- }
-
- public void unsetCommunityUser() {
- this.communityUser = null;
- }
-
- /** Returns true if field communityUser is set (has been assigned a value) and false otherwise */
- public boolean isSetCommunityUser() {
- return this.communityUser != null;
- }
-
- public void setCommunityUserIsSet(boolean value) {
- if (!value) {
- this.communityUser = null;
- }
- }
-
- public String getX509Cert() {
- return this.x509Cert;
- }
-
- public CertificateCredential setX509Cert(String x509Cert) {
- this.x509Cert = x509Cert;
- return this;
- }
-
- public void unsetX509Cert() {
- this.x509Cert = null;
- }
-
- /** Returns true if field x509Cert is set (has been assigned a value) and false otherwise */
- public boolean isSetX509Cert() {
- return this.x509Cert != null;
- }
-
- public void setX509CertIsSet(boolean value) {
- if (!value) {
- this.x509Cert = null;
- }
- }
-
- public String getNotAfter() {
- return this.notAfter;
- }
-
- public CertificateCredential setNotAfter(String notAfter) {
- this.notAfter = notAfter;
- return this;
- }
-
- public void unsetNotAfter() {
- this.notAfter = null;
- }
-
- /** Returns true if field notAfter is set (has been assigned a value) and false otherwise */
- public boolean isSetNotAfter() {
- return this.notAfter != null;
- }
-
- public void setNotAfterIsSet(boolean value) {
- if (!value) {
- this.notAfter = null;
- }
- }
-
- public String getPrivateKey() {
- return this.privateKey;
- }
-
- public CertificateCredential setPrivateKey(String privateKey) {
- this.privateKey = privateKey;
- return this;
- }
-
- public void unsetPrivateKey() {
- this.privateKey = null;
- }
-
- /** Returns true if field privateKey is set (has been assigned a value) and false otherwise */
- public boolean isSetPrivateKey() {
- return this.privateKey != null;
- }
-
- public void setPrivateKeyIsSet(boolean value) {
- if (!value) {
- this.privateKey = null;
- }
- }
-
- public long getLifeTime() {
- return this.lifeTime;
- }
-
- public CertificateCredential setLifeTime(long lifeTime) {
- this.lifeTime = lifeTime;
- setLifeTimeIsSet(true);
- return this;
- }
-
- public void unsetLifeTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LIFETIME_ISSET_ID);
- }
-
- /** Returns true if field lifeTime is set (has been assigned a value) and false otherwise */
- public boolean isSetLifeTime() {
- return EncodingUtils.testBit(__isset_bitfield, __LIFETIME_ISSET_ID);
- }
-
- public void setLifeTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LIFETIME_ISSET_ID, value);
- }
-
- public String getNotBefore() {
- return this.notBefore;
- }
-
- public CertificateCredential setNotBefore(String notBefore) {
- this.notBefore = notBefore;
- return this;
- }
-
- public void unsetNotBefore() {
- this.notBefore = null;
- }
-
- /** Returns true if field notBefore is set (has been assigned a value) and false otherwise */
- public boolean isSetNotBefore() {
- return this.notBefore != null;
- }
-
- public void setNotBeforeIsSet(boolean value) {
- if (!value) {
- this.notBefore = null;
- }
- }
-
- public long getPersistedTime() {
- return this.persistedTime;
- }
-
- public CertificateCredential setPersistedTime(long persistedTime) {
- this.persistedTime = persistedTime;
- setPersistedTimeIsSet(true);
- return this;
- }
-
- public void unsetPersistedTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PERSISTEDTIME_ISSET_ID);
- }
-
- /** Returns true if field persistedTime is set (has been assigned a value) and false otherwise */
- public boolean isSetPersistedTime() {
- return EncodingUtils.testBit(__isset_bitfield, __PERSISTEDTIME_ISSET_ID);
- }
-
- public void setPersistedTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PERSISTEDTIME_ISSET_ID, value);
- }
-
- public String getToken() {
- return this.token;
- }
-
- public CertificateCredential setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case COMMUNITY_USER:
- if (value == null) {
- unsetCommunityUser();
- } else {
- setCommunityUser((CommunityUser)value);
- }
- break;
-
- case X509_CERT:
- if (value == null) {
- unsetX509Cert();
- } else {
- setX509Cert((String)value);
- }
- break;
-
- case NOT_AFTER:
- if (value == null) {
- unsetNotAfter();
- } else {
- setNotAfter((String)value);
- }
- break;
-
- case PRIVATE_KEY:
- if (value == null) {
- unsetPrivateKey();
- } else {
- setPrivateKey((String)value);
- }
- break;
-
- case LIFE_TIME:
- if (value == null) {
- unsetLifeTime();
- } else {
- setLifeTime((Long)value);
- }
- break;
-
- case NOT_BEFORE:
- if (value == null) {
- unsetNotBefore();
- } else {
- setNotBefore((String)value);
- }
- break;
-
- case PERSISTED_TIME:
- if (value == null) {
- unsetPersistedTime();
- } else {
- setPersistedTime((Long)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case COMMUNITY_USER:
- return getCommunityUser();
-
- case X509_CERT:
- return getX509Cert();
-
- case NOT_AFTER:
- return getNotAfter();
-
- case PRIVATE_KEY:
- return getPrivateKey();
-
- case LIFE_TIME:
- return Long.valueOf(getLifeTime());
-
- case NOT_BEFORE:
- return getNotBefore();
-
- case PERSISTED_TIME:
- return Long.valueOf(getPersistedTime());
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case COMMUNITY_USER:
- return isSetCommunityUser();
- case X509_CERT:
- return isSetX509Cert();
- case NOT_AFTER:
- return isSetNotAfter();
- case PRIVATE_KEY:
- return isSetPrivateKey();
- case LIFE_TIME:
- return isSetLifeTime();
- case NOT_BEFORE:
- return isSetNotBefore();
- case PERSISTED_TIME:
- return isSetPersistedTime();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof CertificateCredential)
- return this.equals((CertificateCredential)that);
- return false;
- }
-
- public boolean equals(CertificateCredential that) {
- if (that == null)
- return false;
-
- boolean this_present_communityUser = true && this.isSetCommunityUser();
- boolean that_present_communityUser = true && that.isSetCommunityUser();
- if (this_present_communityUser || that_present_communityUser) {
- if (!(this_present_communityUser && that_present_communityUser))
- return false;
- if (!this.communityUser.equals(that.communityUser))
- return false;
- }
-
- boolean this_present_x509Cert = true && this.isSetX509Cert();
- boolean that_present_x509Cert = true && that.isSetX509Cert();
- if (this_present_x509Cert || that_present_x509Cert) {
- if (!(this_present_x509Cert && that_present_x509Cert))
- return false;
- if (!this.x509Cert.equals(that.x509Cert))
- return false;
- }
-
- boolean this_present_notAfter = true && this.isSetNotAfter();
- boolean that_present_notAfter = true && that.isSetNotAfter();
- if (this_present_notAfter || that_present_notAfter) {
- if (!(this_present_notAfter && that_present_notAfter))
- return false;
- if (!this.notAfter.equals(that.notAfter))
- return false;
- }
-
- boolean this_present_privateKey = true && this.isSetPrivateKey();
- boolean that_present_privateKey = true && that.isSetPrivateKey();
- if (this_present_privateKey || that_present_privateKey) {
- if (!(this_present_privateKey && that_present_privateKey))
- return false;
- if (!this.privateKey.equals(that.privateKey))
- return false;
- }
-
- boolean this_present_lifeTime = true && this.isSetLifeTime();
- boolean that_present_lifeTime = true && that.isSetLifeTime();
- if (this_present_lifeTime || that_present_lifeTime) {
- if (!(this_present_lifeTime && that_present_lifeTime))
- return false;
- if (this.lifeTime != that.lifeTime)
- return false;
- }
-
- boolean this_present_notBefore = true && this.isSetNotBefore();
- boolean that_present_notBefore = true && that.isSetNotBefore();
- if (this_present_notBefore || that_present_notBefore) {
- if (!(this_present_notBefore && that_present_notBefore))
- return false;
- if (!this.notBefore.equals(that.notBefore))
- return false;
- }
-
- boolean this_present_persistedTime = true && this.isSetPersistedTime();
- boolean that_present_persistedTime = true && that.isSetPersistedTime();
- if (this_present_persistedTime || that_present_persistedTime) {
- if (!(this_present_persistedTime && that_present_persistedTime))
- return false;
- if (this.persistedTime != that.persistedTime)
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(CertificateCredential other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetCommunityUser()).compareTo(other.isSetCommunityUser());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCommunityUser()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.communityUser, other.communityUser);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetX509Cert()).compareTo(other.isSetX509Cert());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetX509Cert()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.x509Cert, other.x509Cert);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetNotAfter()).compareTo(other.isSetNotAfter());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNotAfter()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notAfter, other.notAfter);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetPrivateKey()).compareTo(other.isSetPrivateKey());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPrivateKey()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privateKey, other.privateKey);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetLifeTime()).compareTo(other.isSetLifeTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLifeTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lifeTime, other.lifeTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetNotBefore()).compareTo(other.isSetNotBefore());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNotBefore()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notBefore, other.notBefore);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetPersistedTime()).compareTo(other.isSetPersistedTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPersistedTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.persistedTime, other.persistedTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("CertificateCredential(");
- boolean first = true;
-
- sb.append("communityUser:");
- if (this.communityUser == null) {
- sb.append("null");
- } else {
- sb.append(this.communityUser);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("x509Cert:");
- if (this.x509Cert == null) {
- sb.append("null");
- } else {
- sb.append(this.x509Cert);
- }
- first = false;
- if (isSetNotAfter()) {
- if (!first) sb.append(", ");
- sb.append("notAfter:");
- if (this.notAfter == null) {
- sb.append("null");
- } else {
- sb.append(this.notAfter);
- }
- first = false;
- }
- if (isSetPrivateKey()) {
- if (!first) sb.append(", ");
- sb.append("privateKey:");
- if (this.privateKey == null) {
- sb.append("null");
- } else {
- sb.append(this.privateKey);
- }
- first = false;
- }
- if (isSetLifeTime()) {
- if (!first) sb.append(", ");
- sb.append("lifeTime:");
- sb.append(this.lifeTime);
- first = false;
- }
- if (isSetNotBefore()) {
- if (!first) sb.append(", ");
- sb.append("notBefore:");
- if (this.notBefore == null) {
- sb.append("null");
- } else {
- sb.append(this.notBefore);
- }
- first = false;
- }
- if (isSetPersistedTime()) {
- if (!first) sb.append(", ");
- sb.append("persistedTime:");
- sb.append(this.persistedTime);
- first = false;
- }
- if (isSetToken()) {
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (communityUser == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'communityUser' was not present! Struct: " + toString());
- }
- if (x509Cert == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'x509Cert' was not present! Struct: " + toString());
- }
- // check for sub-struct validity
- if (communityUser != null) {
- communityUser.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bitfield = 0;
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class CertificateCredentialStandardSchemeFactory implements SchemeFactory {
- public CertificateCredentialStandardScheme getScheme() {
- return new CertificateCredentialStandardScheme();
- }
- }
-
- private static class CertificateCredentialStandardScheme extends StandardScheme<CertificateCredential> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, CertificateCredential struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // COMMUNITY_USER
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.communityUser = new CommunityUser();
- struct.communityUser.read(iprot);
- struct.setCommunityUserIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // X509_CERT
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.x509Cert = iprot.readString();
- struct.setX509CertIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // NOT_AFTER
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.notAfter = iprot.readString();
- struct.setNotAfterIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // PRIVATE_KEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.privateKey = iprot.readString();
- struct.setPrivateKeyIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // LIFE_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.lifeTime = iprot.readI64();
- struct.setLifeTimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // NOT_BEFORE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.notBefore = iprot.readString();
- struct.setNotBeforeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // PERSISTED_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.persistedTime = iprot.readI64();
- struct.setPersistedTimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, CertificateCredential struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.communityUser != null) {
- oprot.writeFieldBegin(COMMUNITY_USER_FIELD_DESC);
- struct.communityUser.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.x509Cert != null) {
- oprot.writeFieldBegin(X509_CERT_FIELD_DESC);
- oprot.writeString(struct.x509Cert);
- oprot.writeFieldEnd();
- }
- if (struct.notAfter != null) {
- if (struct.isSetNotAfter()) {
- oprot.writeFieldBegin(NOT_AFTER_FIELD_DESC);
- oprot.writeString(struct.notAfter);
- oprot.writeFieldEnd();
- }
- }
- if (struct.privateKey != null) {
- if (struct.isSetPrivateKey()) {
- oprot.writeFieldBegin(PRIVATE_KEY_FIELD_DESC);
- oprot.writeString(struct.privateKey);
- oprot.writeFieldEnd();
- }
- }
- if (struct.isSetLifeTime()) {
- oprot.writeFieldBegin(LIFE_TIME_FIELD_DESC);
- oprot.writeI64(struct.lifeTime);
- oprot.writeFieldEnd();
- }
- if (struct.notBefore != null) {
- if (struct.isSetNotBefore()) {
- oprot.writeFieldBegin(NOT_BEFORE_FIELD_DESC);
- oprot.writeString(struct.notBefore);
- oprot.writeFieldEnd();
- }
- }
- if (struct.isSetPersistedTime()) {
- oprot.writeFieldBegin(PERSISTED_TIME_FIELD_DESC);
- oprot.writeI64(struct.persistedTime);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- if (struct.isSetToken()) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class CertificateCredentialTupleSchemeFactory implements SchemeFactory {
- public CertificateCredentialTupleScheme getScheme() {
- return new CertificateCredentialTupleScheme();
- }
- }
-
- private static class CertificateCredentialTupleScheme extends TupleScheme<CertificateCredential> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, CertificateCredential struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- struct.communityUser.write(oprot);
- oprot.writeString(struct.x509Cert);
- BitSet optionals = new BitSet();
- if (struct.isSetNotAfter()) {
- optionals.set(0);
- }
- if (struct.isSetPrivateKey()) {
- optionals.set(1);
- }
- if (struct.isSetLifeTime()) {
- optionals.set(2);
- }
- if (struct.isSetNotBefore()) {
- optionals.set(3);
- }
- if (struct.isSetPersistedTime()) {
- optionals.set(4);
- }
- if (struct.isSetToken()) {
- optionals.set(5);
- }
- oprot.writeBitSet(optionals, 6);
- if (struct.isSetNotAfter()) {
- oprot.writeString(struct.notAfter);
- }
- if (struct.isSetPrivateKey()) {
- oprot.writeString(struct.privateKey);
- }
- if (struct.isSetLifeTime()) {
- oprot.writeI64(struct.lifeTime);
- }
- if (struct.isSetNotBefore()) {
- oprot.writeString(struct.notBefore);
- }
- if (struct.isSetPersistedTime()) {
- oprot.writeI64(struct.persistedTime);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, CertificateCredential struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.communityUser = new CommunityUser();
- struct.communityUser.read(iprot);
- struct.setCommunityUserIsSet(true);
- struct.x509Cert = iprot.readString();
- struct.setX509CertIsSet(true);
- BitSet incoming = iprot.readBitSet(6);
- if (incoming.get(0)) {
- struct.notAfter = iprot.readString();
- struct.setNotAfterIsSet(true);
- }
- if (incoming.get(1)) {
- struct.privateKey = iprot.readString();
- struct.setPrivateKeyIsSet(true);
- }
- if (incoming.get(2)) {
- struct.lifeTime = iprot.readI64();
- struct.setLifeTimeIsSet(true);
- }
- if (incoming.get(3)) {
- struct.notBefore = iprot.readString();
- struct.setNotBeforeIsSet(true);
- }
- if (incoming.get(4)) {
- struct.persistedTime = iprot.readI64();
- struct.setPersistedTimeIsSet(true);
- }
- if (incoming.get(5)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/b25e0a5d/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/datamodel/CommunityUser.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/datamodel/CommunityUser.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/datamodel/CommunityUser.java
deleted file mode 100644
index 9b62310..0000000
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/datamodel/CommunityUser.java
+++ /dev/null
@@ -1,589 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.credential.store.datamodel;
-
-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 org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class CommunityUser implements org.apache.thrift.TBase<CommunityUser, CommunityUser._Fields>, java.io.Serializable, Cloneable, Comparable<CommunityUser> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CommunityUser");
-
- private static final org.apache.thrift.protocol.TField GATEWAY_NMAE_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayNmae", org.apache.thrift.protocol.TType.STRING, (short)1);
- 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)2);
- private static final org.apache.thrift.protocol.TField USER_EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("userEmail", org.apache.thrift.protocol.TType.STRING, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new CommunityUserStandardSchemeFactory());
- schemes.put(TupleScheme.class, new CommunityUserTupleSchemeFactory());
- }
-
- public String gatewayNmae; // required
- public String username; // required
- public String userEmail; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- GATEWAY_NMAE((short)1, "gatewayNmae"),
- USERNAME((short)2, "username"),
- USER_EMAIL((short)3, "userEmail");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // GATEWAY_NMAE
- return GATEWAY_NMAE;
- case 2: // USERNAME
- return USERNAME;
- case 3: // USER_EMAIL
- return USER_EMAIL;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- 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.GATEWAY_NMAE, new org.apache.thrift.meta_data.FieldMetaData("gatewayNmae", org.apache.thrift.TFieldRequirementType.REQUIRED,
- 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.USER_EMAIL, new org.apache.thrift.meta_data.FieldMetaData("userEmail", 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(CommunityUser.class, metaDataMap);
- }
-
- public CommunityUser() {
- }
-
- public CommunityUser(
- String gatewayNmae,
- String username,
- String userEmail)
- {
- this();
- this.gatewayNmae = gatewayNmae;
- this.username = username;
- this.userEmail = userEmail;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public CommunityUser(CommunityUser other) {
- if (other.isSetGatewayNmae()) {
- this.gatewayNmae = other.gatewayNmae;
- }
- if (other.isSetUsername()) {
- this.username = other.username;
- }
- if (other.isSetUserEmail()) {
- this.userEmail = other.userEmail;
- }
- }
-
- public CommunityUser deepCopy() {
- return new CommunityUser(this);
- }
-
- @Override
- public void clear() {
- this.gatewayNmae = null;
- this.username = null;
- this.userEmail = null;
- }
-
- public String getGatewayNmae() {
- return this.gatewayNmae;
- }
-
- public CommunityUser setGatewayNmae(String gatewayNmae) {
- this.gatewayNmae = gatewayNmae;
- return this;
- }
-
- public void unsetGatewayNmae() {
- this.gatewayNmae = null;
- }
-
- /** Returns true if field gatewayNmae is set (has been assigned a value) and false otherwise */
- public boolean isSetGatewayNmae() {
- return this.gatewayNmae != null;
- }
-
- public void setGatewayNmaeIsSet(boolean value) {
- if (!value) {
- this.gatewayNmae = null;
- }
- }
-
- public String getUsername() {
- return this.username;
- }
-
- public CommunityUser setUsername(String username) {
- this.username = username;
- return this;
- }
-
- public void unsetUsername() {
- this.username = null;
- }
-
- /** Returns true if field username is set (has been assigned a value) and false otherwise */
- public boolean isSetUsername() {
- return this.username != null;
- }
-
- public void setUsernameIsSet(boolean value) {
- if (!value) {
- this.username = null;
- }
- }
-
- public String getUserEmail() {
- return this.userEmail;
- }
-
- public CommunityUser setUserEmail(String userEmail) {
- this.userEmail = userEmail;
- return this;
- }
-
- public void unsetUserEmail() {
- this.userEmail = null;
- }
-
- /** Returns true if field userEmail is set (has been assigned a value) and false otherwise */
- public boolean isSetUserEmail() {
- return this.userEmail != null;
- }
-
- public void setUserEmailIsSet(boolean value) {
- if (!value) {
- this.userEmail = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case GATEWAY_NMAE:
- if (value == null) {
- unsetGatewayNmae();
- } else {
- setGatewayNmae((String)value);
- }
- break;
-
- case USERNAME:
- if (value == null) {
- unsetUsername();
- } else {
- setUsername((String)value);
- }
- break;
-
- case USER_EMAIL:
- if (value == null) {
- unsetUserEmail();
- } else {
- setUserEmail((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case GATEWAY_NMAE:
- return getGatewayNmae();
-
- case USERNAME:
- return getUsername();
-
- case USER_EMAIL:
- return getUserEmail();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case GATEWAY_NMAE:
- return isSetGatewayNmae();
- case USERNAME:
- return isSetUsername();
- case USER_EMAIL:
- return isSetUserEmail();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof CommunityUser)
- return this.equals((CommunityUser)that);
- return false;
- }
-
- public boolean equals(CommunityUser that) {
- if (that == null)
- return false;
-
- boolean this_present_gatewayNmae = true && this.isSetGatewayNmae();
- boolean that_present_gatewayNmae = true && that.isSetGatewayNmae();
- if (this_present_gatewayNmae || that_present_gatewayNmae) {
- if (!(this_present_gatewayNmae && that_present_gatewayNmae))
- return false;
- if (!this.gatewayNmae.equals(that.gatewayNmae))
- return false;
- }
-
- boolean this_present_username = true && this.isSetUsername();
- boolean that_present_username = true && that.isSetUsername();
- if (this_present_username || that_present_username) {
- if (!(this_present_username && that_present_username))
- return false;
- if (!this.username.equals(that.username))
- return false;
- }
-
- boolean this_present_userEmail = true && this.isSetUserEmail();
- boolean that_present_userEmail = true && that.isSetUserEmail();
- if (this_present_userEmail || that_present_userEmail) {
- if (!(this_present_userEmail && that_present_userEmail))
- return false;
- if (!this.userEmail.equals(that.userEmail))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(CommunityUser other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetGatewayNmae()).compareTo(other.isSetGatewayNmae());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetGatewayNmae()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayNmae, other.gatewayNmae);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUsername()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUserEmail()).compareTo(other.isSetUserEmail());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserEmail()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userEmail, other.userEmail);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("CommunityUser(");
- boolean first = true;
-
- sb.append("gatewayNmae:");
- if (this.gatewayNmae == null) {
- sb.append("null");
- } else {
- sb.append(this.gatewayNmae);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("username:");
- if (this.username == null) {
- sb.append("null");
- } else {
- sb.append(this.username);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("userEmail:");
- if (this.userEmail == null) {
- sb.append("null");
- } else {
- sb.append(this.userEmail);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (gatewayNmae == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayNmae' was not present! Struct: " + toString());
- }
- if (username == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' was not present! Struct: " + toString());
- }
- if (userEmail == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'userEmail' was not present! Struct: " + toString());
- }
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- 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 CommunityUserStandardSchemeFactory implements SchemeFactory {
- public CommunityUserStandardScheme getScheme() {
- return new CommunityUserStandardScheme();
- }
- }
-
- private static class CommunityUserStandardScheme extends StandardScheme<CommunityUser> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, CommunityUser struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // GATEWAY_NMAE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.gatewayNmae = iprot.readString();
- struct.setGatewayNmaeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // USERNAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.username = iprot.readString();
- struct.setUsernameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // USER_EMAIL
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userEmail = iprot.readString();
- struct.setUserEmailIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, CommunityUser struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.gatewayNmae != null) {
- oprot.writeFieldBegin(GATEWAY_NMAE_FIELD_DESC);
- oprot.writeString(struct.gatewayNmae);
- oprot.writeFieldEnd();
- }
- if (struct.username != null) {
- oprot.writeFieldBegin(USERNAME_FIELD_DESC);
- oprot.writeString(struct.username);
- oprot.writeFieldEnd();
- }
- if (struct.userEmail != null) {
- oprot.writeFieldBegin(USER_EMAIL_FIELD_DESC);
- oprot.writeString(struct.userEmail);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class CommunityUserTupleSchemeFactory implements SchemeFactory {
- public CommunityUserTupleScheme getScheme() {
- return new CommunityUserTupleScheme();
- }
- }
-
- private static class CommunityUserTupleScheme extends TupleScheme<CommunityUser> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, CommunityUser struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeString(struct.gatewayNmae);
- oprot.writeString(struct.username);
- oprot.writeString(struct.userEmail);
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, CommunityUser struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.gatewayNmae = iprot.readString();
- struct.setGatewayNmaeIsSet(true);
- struct.username = iprot.readString();
- struct.setUsernameIsSet(true);
- struct.userEmail = iprot.readString();
- struct.setUserEmailIsSet(true);
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/b25e0a5d/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/datamodel/PasswordCredential.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/datamodel/PasswordCredential.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/datamodel/PasswordCredential.java
deleted file mode 100644
index f6b6837..0000000
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/datamodel/PasswordCredential.java
+++ /dev/null
@@ -1,698 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.credential.store.datamodel;
-
-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 org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class PasswordCredential implements org.apache.thrift.TBase<PasswordCredential, PasswordCredential._Fields>, java.io.Serializable, Cloneable, Comparable<PasswordCredential> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PasswordCredential");
-
- 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)1);
- private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField PERSISTED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("persistedTime", org.apache.thrift.protocol.TType.I64, (short)3);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", 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 PasswordCredentialStandardSchemeFactory());
- schemes.put(TupleScheme.class, new PasswordCredentialTupleSchemeFactory());
- }
-
- public String username; // required
- public String password; // required
- public long persistedTime; // optional
- public String token; // optional
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- USERNAME((short)1, "username"),
- PASSWORD((short)2, "password"),
- PERSISTED_TIME((short)3, "persistedTime"),
- TOKEN((short)4, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // USERNAME
- return USERNAME;
- case 2: // PASSWORD
- return PASSWORD;
- case 3: // PERSISTED_TIME
- return PERSISTED_TIME;
- case 4: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __PERSISTEDTIME_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- private _Fields optionals[] = {_Fields.PERSISTED_TIME,_Fields.TOKEN};
- 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.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.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.PERSISTED_TIME, new org.apache.thrift.meta_data.FieldMetaData("persistedTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PasswordCredential.class, metaDataMap);
- }
-
- public PasswordCredential() {
- }
-
- public PasswordCredential(
- String username,
- String password)
- {
- this();
- this.username = username;
- this.password = password;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public PasswordCredential(PasswordCredential other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetUsername()) {
- this.username = other.username;
- }
- if (other.isSetPassword()) {
- this.password = other.password;
- }
- this.persistedTime = other.persistedTime;
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public PasswordCredential deepCopy() {
- return new PasswordCredential(this);
- }
-
- @Override
- public void clear() {
- this.username = null;
- this.password = null;
- setPersistedTimeIsSet(false);
- this.persistedTime = 0;
- this.token = null;
- }
-
- public String getUsername() {
- return this.username;
- }
-
- public PasswordCredential setUsername(String username) {
- this.username = username;
- return this;
- }
-
- public void unsetUsername() {
- this.username = null;
- }
-
- /** Returns true if field username is set (has been assigned a value) and false otherwise */
- public boolean isSetUsername() {
- return this.username != null;
- }
-
- public void setUsernameIsSet(boolean value) {
- if (!value) {
- this.username = null;
- }
- }
-
- public String getPassword() {
- return this.password;
- }
-
- public PasswordCredential setPassword(String password) {
- this.password = password;
- return this;
- }
-
- public void unsetPassword() {
- this.password = null;
- }
-
- /** Returns true if field password is set (has been assigned a value) and false otherwise */
- public boolean isSetPassword() {
- return this.password != null;
- }
-
- public void setPasswordIsSet(boolean value) {
- if (!value) {
- this.password = null;
- }
- }
-
- public long getPersistedTime() {
- return this.persistedTime;
- }
-
- public PasswordCredential setPersistedTime(long persistedTime) {
- this.persistedTime = persistedTime;
- setPersistedTimeIsSet(true);
- return this;
- }
-
- public void unsetPersistedTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PERSISTEDTIME_ISSET_ID);
- }
-
- /** Returns true if field persistedTime is set (has been assigned a value) and false otherwise */
- public boolean isSetPersistedTime() {
- return EncodingUtils.testBit(__isset_bitfield, __PERSISTEDTIME_ISSET_ID);
- }
-
- public void setPersistedTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PERSISTEDTIME_ISSET_ID, value);
- }
-
- public String getToken() {
- return this.token;
- }
-
- public PasswordCredential setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case USERNAME:
- if (value == null) {
- unsetUsername();
- } else {
- setUsername((String)value);
- }
- break;
-
- case PASSWORD:
- if (value == null) {
- unsetPassword();
- } else {
- setPassword((String)value);
- }
- break;
-
- case PERSISTED_TIME:
- if (value == null) {
- unsetPersistedTime();
- } else {
- setPersistedTime((Long)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case USERNAME:
- return getUsername();
-
- case PASSWORD:
- return getPassword();
-
- case PERSISTED_TIME:
- return Long.valueOf(getPersistedTime());
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case USERNAME:
- return isSetUsername();
- case PASSWORD:
- return isSetPassword();
- case PERSISTED_TIME:
- return isSetPersistedTime();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof PasswordCredential)
- return this.equals((PasswordCredential)that);
- return false;
- }
-
- public boolean equals(PasswordCredential that) {
- if (that == null)
- return false;
-
- boolean this_present_username = true && this.isSetUsername();
- boolean that_present_username = true && that.isSetUsername();
- if (this_present_username || that_present_username) {
- if (!(this_present_username && that_present_username))
- return false;
- if (!this.username.equals(that.username))
- return false;
- }
-
- boolean this_present_password = true && this.isSetPassword();
- boolean that_present_password = true && that.isSetPassword();
- if (this_present_password || that_present_password) {
- if (!(this_present_password && that_present_password))
- return false;
- if (!this.password.equals(that.password))
- return false;
- }
-
- boolean this_present_persistedTime = true && this.isSetPersistedTime();
- boolean that_present_persistedTime = true && that.isSetPersistedTime();
- if (this_present_persistedTime || that_present_persistedTime) {
- if (!(this_present_persistedTime && that_present_persistedTime))
- return false;
- if (this.persistedTime != that.persistedTime)
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(PasswordCredential other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUsername()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPassword()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetPersistedTime()).compareTo(other.isSetPersistedTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPersistedTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.persistedTime, other.persistedTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("PasswordCredential(");
- boolean first = true;
-
- sb.append("username:");
- if (this.username == null) {
- sb.append("null");
- } else {
- sb.append(this.username);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("password:");
- if (this.password == null) {
- sb.append("null");
- } else {
- sb.append(this.password);
- }
- first = false;
- if (isSetPersistedTime()) {
- if (!first) sb.append(", ");
- sb.append("persistedTime:");
- sb.append(this.persistedTime);
- first = false;
- }
- if (isSetToken()) {
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (username == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' was not present! Struct: " + toString());
- }
- if (password == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'password' was not present! Struct: " + toString());
- }
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bitfield = 0;
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class PasswordCredentialStandardSchemeFactory implements SchemeFactory {
- public PasswordCredentialStandardScheme getScheme() {
- return new PasswordCredentialStandardScheme();
- }
- }
-
- private static class PasswordCredentialStandardScheme extends StandardScheme<PasswordCredential> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, PasswordCredential struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // USERNAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.username = iprot.readString();
- struct.setUsernameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // PASSWORD
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.password = iprot.readString();
- struct.setPasswordIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // PERSISTED_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.persistedTime = iprot.readI64();
- struct.setPersistedTimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, PasswordCredential struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.username != null) {
- oprot.writeFieldBegin(USERNAME_FIELD_DESC);
- oprot.writeString(struct.username);
- oprot.writeFieldEnd();
- }
- if (struct.password != null) {
- oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
- oprot.writeString(struct.password);
- oprot.writeFieldEnd();
- }
- if (struct.isSetPersistedTime()) {
- oprot.writeFieldBegin(PERSISTED_TIME_FIELD_DESC);
- oprot.writeI64(struct.persistedTime);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- if (struct.isSetToken()) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class PasswordCredentialTupleSchemeFactory implements SchemeFactory {
- public PasswordCredentialTupleScheme getScheme() {
- return new PasswordCredentialTupleScheme();
- }
- }
-
- private static class PasswordCredentialTupleScheme extends TupleScheme<PasswordCredential> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, PasswordCredential struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeString(struct.username);
- oprot.writeString(struct.password);
- BitSet optionals = new BitSet();
- if (struct.isSetPersistedTime()) {
- optionals.set(0);
- }
- if (struct.isSetToken()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetPersistedTime()) {
- oprot.writeI64(struct.persistedTime);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, PasswordCredential struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.username = iprot.readString();
- struct.setUsernameIsSet(true);
- struct.password = iprot.readString();
- struct.setPasswordIsSet(true);
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.persistedTime = iprot.readI64();
- struct.setPersistedTimeIsSet(true);
- }
- if (incoming.get(1)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
-}
-
[03/50] [abbrv] airavata git commit: Reorganizing duplicate generated
classed and instead using the stubs artifact - AIRAVATA-1621
Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/b25e0a5d/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
deleted file mode 100644
index 5d9c05c..0000000
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
+++ /dev/null
@@ -1,6888 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.credential.store.cpi;
-
-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 org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class CredentialStoreService {
-
- public interface Iface {
-
- /**
- * Query CS server to fetch the CPI version
- */
- public String getCSServiceVersion() throws org.apache.thrift.TException;
-
- /**
- * This method is to add SSHCredential which will return the token Id in success
- *
- *
- * @param sshCredential
- */
- public String addSSHCredential(org.apache.airavata.credential.store.datamodel.SSHCredential sshCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
-
- public String addCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
-
- public String addPasswordCredential(org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
-
- public org.apache.airavata.credential.store.datamodel.SSHCredential getSSHCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
-
- public org.apache.airavata.credential.store.datamodel.CertificateCredential getCertificateCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
-
- public org.apache.airavata.credential.store.datamodel.PasswordCredential getPasswordCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
-
- }
-
- public interface AsyncIface {
-
- public void getCSServiceVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void addSSHCredential(org.apache.airavata.credential.store.datamodel.SSHCredential sshCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void addCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void addPasswordCredential(org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getSSHCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getCertificateCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getPasswordCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- }
-
- public static class Client extends org.apache.thrift.TServiceClient implements Iface {
- public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
- public Factory() {}
- public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
- return new Client(prot);
- }
- public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
- return new Client(iprot, oprot);
- }
- }
-
- public Client(org.apache.thrift.protocol.TProtocol prot)
- {
- super(prot, prot);
- }
-
- public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
- super(iprot, oprot);
- }
-
- public String getCSServiceVersion() throws org.apache.thrift.TException
- {
- send_getCSServiceVersion();
- return recv_getCSServiceVersion();
- }
-
- public void send_getCSServiceVersion() throws org.apache.thrift.TException
- {
- getCSServiceVersion_args args = new getCSServiceVersion_args();
- sendBase("getCSServiceVersion", args);
- }
-
- public String recv_getCSServiceVersion() throws org.apache.thrift.TException
- {
- getCSServiceVersion_result result = new getCSServiceVersion_result();
- receiveBase(result, "getCSServiceVersion");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCSServiceVersion failed: unknown result");
- }
-
- public String addSSHCredential(org.apache.airavata.credential.store.datamodel.SSHCredential sshCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
- {
- send_addSSHCredential(sshCredential);
- return recv_addSSHCredential();
- }
-
- public void send_addSSHCredential(org.apache.airavata.credential.store.datamodel.SSHCredential sshCredential) throws org.apache.thrift.TException
- {
- addSSHCredential_args args = new addSSHCredential_args();
- args.setSshCredential(sshCredential);
- sendBase("addSSHCredential", args);
- }
-
- public String recv_addSSHCredential() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
- {
- addSSHCredential_result result = new addSSHCredential_result();
- receiveBase(result, "addSSHCredential");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.csException != null) {
- throw result.csException;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSSHCredential failed: unknown result");
- }
-
- public String addCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
- {
- send_addCertificateCredential(certificateCredential);
- return recv_addCertificateCredential();
- }
-
- public void send_addCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential) throws org.apache.thrift.TException
- {
- addCertificateCredential_args args = new addCertificateCredential_args();
- args.setCertificateCredential(certificateCredential);
- sendBase("addCertificateCredential", args);
- }
-
- public String recv_addCertificateCredential() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
- {
- addCertificateCredential_result result = new addCertificateCredential_result();
- receiveBase(result, "addCertificateCredential");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.csException != null) {
- throw result.csException;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addCertificateCredential failed: unknown result");
- }
-
- public String addPasswordCredential(org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
- {
- send_addPasswordCredential(passwordCredential);
- return recv_addPasswordCredential();
- }
-
- public void send_addPasswordCredential(org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential) throws org.apache.thrift.TException
- {
- addPasswordCredential_args args = new addPasswordCredential_args();
- args.setPasswordCredential(passwordCredential);
- sendBase("addPasswordCredential", args);
- }
-
- public String recv_addPasswordCredential() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
- {
- addPasswordCredential_result result = new addPasswordCredential_result();
- receiveBase(result, "addPasswordCredential");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.csException != null) {
- throw result.csException;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addPasswordCredential failed: unknown result");
- }
-
- public org.apache.airavata.credential.store.datamodel.SSHCredential getSSHCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
- {
- send_getSSHCredential(tokenId, gatewayId);
- return recv_getSSHCredential();
- }
-
- public void send_getSSHCredential(String tokenId, String gatewayId) throws org.apache.thrift.TException
- {
- getSSHCredential_args args = new getSSHCredential_args();
- args.setTokenId(tokenId);
- args.setGatewayId(gatewayId);
- sendBase("getSSHCredential", args);
- }
-
- public org.apache.airavata.credential.store.datamodel.SSHCredential recv_getSSHCredential() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
- {
- getSSHCredential_result result = new getSSHCredential_result();
- receiveBase(result, "getSSHCredential");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.csException != null) {
- throw result.csException;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSSHCredential failed: unknown result");
- }
-
- public org.apache.airavata.credential.store.datamodel.CertificateCredential getCertificateCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
- {
- send_getCertificateCredential(tokenId, gatewayId);
- return recv_getCertificateCredential();
- }
-
- public void send_getCertificateCredential(String tokenId, String gatewayId) throws org.apache.thrift.TException
- {
- getCertificateCredential_args args = new getCertificateCredential_args();
- args.setTokenId(tokenId);
- args.setGatewayId(gatewayId);
- sendBase("getCertificateCredential", args);
- }
-
- public org.apache.airavata.credential.store.datamodel.CertificateCredential recv_getCertificateCredential() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
- {
- getCertificateCredential_result result = new getCertificateCredential_result();
- receiveBase(result, "getCertificateCredential");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.csException != null) {
- throw result.csException;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCertificateCredential failed: unknown result");
- }
-
- public org.apache.airavata.credential.store.datamodel.PasswordCredential getPasswordCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
- {
- send_getPasswordCredential(tokenId, gatewayId);
- return recv_getPasswordCredential();
- }
-
- public void send_getPasswordCredential(String tokenId, String gatewayId) throws org.apache.thrift.TException
- {
- getPasswordCredential_args args = new getPasswordCredential_args();
- args.setTokenId(tokenId);
- args.setGatewayId(gatewayId);
- sendBase("getPasswordCredential", args);
- }
-
- public org.apache.airavata.credential.store.datamodel.PasswordCredential recv_getPasswordCredential() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
- {
- getPasswordCredential_result result = new getPasswordCredential_result();
- receiveBase(result, "getPasswordCredential");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.csException != null) {
- throw result.csException;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPasswordCredential failed: unknown result");
- }
-
- }
- public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
- public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
- private org.apache.thrift.async.TAsyncClientManager clientManager;
- private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
- public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
- this.clientManager = clientManager;
- this.protocolFactory = protocolFactory;
- }
- public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
- return new AsyncClient(protocolFactory, clientManager, transport);
- }
- }
-
- public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
- super(protocolFactory, clientManager, transport);
- }
-
- public void getCSServiceVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getCSServiceVersion_call method_call = new getCSServiceVersion_call(resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getCSServiceVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
- public getCSServiceVersion_call(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);
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCSServiceVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getCSServiceVersion_args args = new getCSServiceVersion_args();
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public String getResult() throws 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_getCSServiceVersion();
- }
- }
-
- public void addSSHCredential(org.apache.airavata.credential.store.datamodel.SSHCredential sshCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- addSSHCredential_call method_call = new addSSHCredential_call(sshCredential, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class addSSHCredential_call extends org.apache.thrift.async.TAsyncMethodCall {
- private org.apache.airavata.credential.store.datamodel.SSHCredential sshCredential;
- public addSSHCredential_call(org.apache.airavata.credential.store.datamodel.SSHCredential sshCredential, 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.sshCredential = sshCredential;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addSSHCredential", org.apache.thrift.protocol.TMessageType.CALL, 0));
- addSSHCredential_args args = new addSSHCredential_args();
- args.setSshCredential(sshCredential);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public String getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, 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_addSSHCredential();
- }
- }
-
- public void addCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- addCertificateCredential_call method_call = new addCertificateCredential_call(certificateCredential, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class addCertificateCredential_call extends org.apache.thrift.async.TAsyncMethodCall {
- private org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential;
- public addCertificateCredential_call(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential, 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.certificateCredential = certificateCredential;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addCertificateCredential", org.apache.thrift.protocol.TMessageType.CALL, 0));
- addCertificateCredential_args args = new addCertificateCredential_args();
- args.setCertificateCredential(certificateCredential);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public String getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, 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_addCertificateCredential();
- }
- }
-
- public void addPasswordCredential(org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- addPasswordCredential_call method_call = new addPasswordCredential_call(passwordCredential, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class addPasswordCredential_call extends org.apache.thrift.async.TAsyncMethodCall {
- private org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential;
- public addPasswordCredential_call(org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential, 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.passwordCredential = passwordCredential;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addPasswordCredential", org.apache.thrift.protocol.TMessageType.CALL, 0));
- addPasswordCredential_args args = new addPasswordCredential_args();
- args.setPasswordCredential(passwordCredential);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public String getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, 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_addPasswordCredential();
- }
- }
-
- public void getSSHCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getSSHCredential_call method_call = new getSSHCredential_call(tokenId, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getSSHCredential_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String tokenId;
- private String gatewayId;
- public getSSHCredential_call(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.tokenId = tokenId;
- this.gatewayId = gatewayId;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSSHCredential", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getSSHCredential_args args = new getSSHCredential_args();
- args.setTokenId(tokenId);
- args.setGatewayId(gatewayId);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public org.apache.airavata.credential.store.datamodel.SSHCredential getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, 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_getSSHCredential();
- }
- }
-
- public void getCertificateCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getCertificateCredential_call method_call = new getCertificateCredential_call(tokenId, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getCertificateCredential_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String tokenId;
- private String gatewayId;
- public getCertificateCredential_call(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.tokenId = tokenId;
- this.gatewayId = gatewayId;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCertificateCredential", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getCertificateCredential_args args = new getCertificateCredential_args();
- args.setTokenId(tokenId);
- args.setGatewayId(gatewayId);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public org.apache.airavata.credential.store.datamodel.CertificateCredential getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, 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_getCertificateCredential();
- }
- }
-
- public void getPasswordCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getPasswordCredential_call method_call = new getPasswordCredential_call(tokenId, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getPasswordCredential_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String tokenId;
- private String gatewayId;
- public getPasswordCredential_call(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.tokenId = tokenId;
- this.gatewayId = gatewayId;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPasswordCredential", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getPasswordCredential_args args = new getPasswordCredential_args();
- args.setTokenId(tokenId);
- args.setGatewayId(gatewayId);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public org.apache.airavata.credential.store.datamodel.PasswordCredential getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, 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_getPasswordCredential();
- }
- }
-
- }
-
- public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
- private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
- public Processor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
- }
-
- protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
- super(iface, getProcessMap(processMap));
- }
-
- private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
- processMap.put("getCSServiceVersion", new getCSServiceVersion());
- processMap.put("addSSHCredential", new addSSHCredential());
- processMap.put("addCertificateCredential", new addCertificateCredential());
- processMap.put("addPasswordCredential", new addPasswordCredential());
- processMap.put("getSSHCredential", new getSSHCredential());
- processMap.put("getCertificateCredential", new getCertificateCredential());
- processMap.put("getPasswordCredential", new getPasswordCredential());
- return processMap;
- }
-
- public static class getCSServiceVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCSServiceVersion_args> {
- public getCSServiceVersion() {
- super("getCSServiceVersion");
- }
-
- public getCSServiceVersion_args getEmptyArgsInstance() {
- return new getCSServiceVersion_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getCSServiceVersion_result getResult(I iface, getCSServiceVersion_args args) throws org.apache.thrift.TException {
- getCSServiceVersion_result result = new getCSServiceVersion_result();
- result.success = iface.getCSServiceVersion();
- return result;
- }
- }
-
- public static class addSSHCredential<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addSSHCredential_args> {
- public addSSHCredential() {
- super("addSSHCredential");
- }
-
- public addSSHCredential_args getEmptyArgsInstance() {
- return new addSSHCredential_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public addSSHCredential_result getResult(I iface, addSSHCredential_args args) throws org.apache.thrift.TException {
- addSSHCredential_result result = new addSSHCredential_result();
- try {
- result.success = iface.addSSHCredential(args.sshCredential);
- } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) {
- result.csException = csException;
- }
- return result;
- }
- }
-
- public static class addCertificateCredential<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addCertificateCredential_args> {
- public addCertificateCredential() {
- super("addCertificateCredential");
- }
-
- public addCertificateCredential_args getEmptyArgsInstance() {
- return new addCertificateCredential_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public addCertificateCredential_result getResult(I iface, addCertificateCredential_args args) throws org.apache.thrift.TException {
- addCertificateCredential_result result = new addCertificateCredential_result();
- try {
- result.success = iface.addCertificateCredential(args.certificateCredential);
- } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) {
- result.csException = csException;
- }
- return result;
- }
- }
-
- public static class addPasswordCredential<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addPasswordCredential_args> {
- public addPasswordCredential() {
- super("addPasswordCredential");
- }
-
- public addPasswordCredential_args getEmptyArgsInstance() {
- return new addPasswordCredential_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public addPasswordCredential_result getResult(I iface, addPasswordCredential_args args) throws org.apache.thrift.TException {
- addPasswordCredential_result result = new addPasswordCredential_result();
- try {
- result.success = iface.addPasswordCredential(args.passwordCredential);
- } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) {
- result.csException = csException;
- }
- return result;
- }
- }
-
- public static class getSSHCredential<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSSHCredential_args> {
- public getSSHCredential() {
- super("getSSHCredential");
- }
-
- public getSSHCredential_args getEmptyArgsInstance() {
- return new getSSHCredential_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getSSHCredential_result getResult(I iface, getSSHCredential_args args) throws org.apache.thrift.TException {
- getSSHCredential_result result = new getSSHCredential_result();
- try {
- result.success = iface.getSSHCredential(args.tokenId, args.gatewayId);
- } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) {
- result.csException = csException;
- }
- return result;
- }
- }
-
- public static class getCertificateCredential<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCertificateCredential_args> {
- public getCertificateCredential() {
- super("getCertificateCredential");
- }
-
- public getCertificateCredential_args getEmptyArgsInstance() {
- return new getCertificateCredential_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getCertificateCredential_result getResult(I iface, getCertificateCredential_args args) throws org.apache.thrift.TException {
- getCertificateCredential_result result = new getCertificateCredential_result();
- try {
- result.success = iface.getCertificateCredential(args.tokenId, args.gatewayId);
- } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) {
- result.csException = csException;
- }
- return result;
- }
- }
-
- public static class getPasswordCredential<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPasswordCredential_args> {
- public getPasswordCredential() {
- super("getPasswordCredential");
- }
-
- public getPasswordCredential_args getEmptyArgsInstance() {
- return new getPasswordCredential_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getPasswordCredential_result getResult(I iface, getPasswordCredential_args args) throws org.apache.thrift.TException {
- getPasswordCredential_result result = new getPasswordCredential_result();
- try {
- result.success = iface.getPasswordCredential(args.tokenId, args.gatewayId);
- } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) {
- result.csException = csException;
- }
- return result;
- }
- }
-
- }
-
- public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
- private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
- public AsyncProcessor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
- }
-
- protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
- super(iface, getProcessMap(processMap));
- }
-
- private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
- processMap.put("getCSServiceVersion", new getCSServiceVersion());
- processMap.put("addSSHCredential", new addSSHCredential());
- processMap.put("addCertificateCredential", new addCertificateCredential());
- processMap.put("addPasswordCredential", new addPasswordCredential());
- processMap.put("getSSHCredential", new getSSHCredential());
- processMap.put("getCertificateCredential", new getCertificateCredential());
- processMap.put("getPasswordCredential", new getPasswordCredential());
- return processMap;
- }
-
- public static class getCSServiceVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getCSServiceVersion_args, String> {
- public getCSServiceVersion() {
- super("getCSServiceVersion");
- }
-
- public getCSServiceVersion_args getEmptyArgsInstance() {
- return new getCSServiceVersion_args();
- }
-
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- getCSServiceVersion_result result = new getCSServiceVersion_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getCSServiceVersion_result result = new getCSServiceVersion_result();
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, getCSServiceVersion_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
- iface.getCSServiceVersion(resultHandler);
- }
- }
-
- public static class addSSHCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addSSHCredential_args, String> {
- public addSSHCredential() {
- super("addSSHCredential");
- }
-
- public addSSHCredential_args getEmptyArgsInstance() {
- return new addSSHCredential_args();
- }
-
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- addSSHCredential_result result = new addSSHCredential_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- addSSHCredential_result result = new addSSHCredential_result();
- if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) {
- result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e;
- result.setCsExceptionIsSet(true);
- msg = result;
- }
- else
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, addSSHCredential_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
- iface.addSSHCredential(args.sshCredential,resultHandler);
- }
- }
-
- public static class addCertificateCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addCertificateCredential_args, String> {
- public addCertificateCredential() {
- super("addCertificateCredential");
- }
-
- public addCertificateCredential_args getEmptyArgsInstance() {
- return new addCertificateCredential_args();
- }
-
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- addCertificateCredential_result result = new addCertificateCredential_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- addCertificateCredential_result result = new addCertificateCredential_result();
- if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) {
- result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e;
- result.setCsExceptionIsSet(true);
- msg = result;
- }
- else
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, addCertificateCredential_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
- iface.addCertificateCredential(args.certificateCredential,resultHandler);
- }
- }
-
- public static class addPasswordCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addPasswordCredential_args, String> {
- public addPasswordCredential() {
- super("addPasswordCredential");
- }
-
- public addPasswordCredential_args getEmptyArgsInstance() {
- return new addPasswordCredential_args();
- }
-
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- addPasswordCredential_result result = new addPasswordCredential_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- addPasswordCredential_result result = new addPasswordCredential_result();
- if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) {
- result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e;
- result.setCsExceptionIsSet(true);
- msg = result;
- }
- else
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, addPasswordCredential_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
- iface.addPasswordCredential(args.passwordCredential,resultHandler);
- }
- }
-
- public static class getSSHCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getSSHCredential_args, org.apache.airavata.credential.store.datamodel.SSHCredential> {
- public getSSHCredential() {
- super("getSSHCredential");
- }
-
- public getSSHCredential_args getEmptyArgsInstance() {
- return new getSSHCredential_args();
- }
-
- public AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.SSHCredential> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.SSHCredential>() {
- public void onComplete(org.apache.airavata.credential.store.datamodel.SSHCredential o) {
- getSSHCredential_result result = new getSSHCredential_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getSSHCredential_result result = new getSSHCredential_result();
- if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) {
- result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e;
- result.setCsExceptionIsSet(true);
- msg = result;
- }
- else
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, getSSHCredential_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.SSHCredential> resultHandler) throws TException {
- iface.getSSHCredential(args.tokenId, args.gatewayId,resultHandler);
- }
- }
-
- public static class getCertificateCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getCertificateCredential_args, org.apache.airavata.credential.store.datamodel.CertificateCredential> {
- public getCertificateCredential() {
- super("getCertificateCredential");
- }
-
- public getCertificateCredential_args getEmptyArgsInstance() {
- return new getCertificateCredential_args();
- }
-
- public AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.CertificateCredential> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.CertificateCredential>() {
- public void onComplete(org.apache.airavata.credential.store.datamodel.CertificateCredential o) {
- getCertificateCredential_result result = new getCertificateCredential_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getCertificateCredential_result result = new getCertificateCredential_result();
- if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) {
- result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e;
- result.setCsExceptionIsSet(true);
- msg = result;
- }
- else
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, getCertificateCredential_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.CertificateCredential> resultHandler) throws TException {
- iface.getCertificateCredential(args.tokenId, args.gatewayId,resultHandler);
- }
- }
-
- public static class getPasswordCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPasswordCredential_args, org.apache.airavata.credential.store.datamodel.PasswordCredential> {
- public getPasswordCredential() {
- super("getPasswordCredential");
- }
-
- public getPasswordCredential_args getEmptyArgsInstance() {
- return new getPasswordCredential_args();
- }
-
- public AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.PasswordCredential> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.PasswordCredential>() {
- public void onComplete(org.apache.airavata.credential.store.datamodel.PasswordCredential o) {
- getPasswordCredential_result result = new getPasswordCredential_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getPasswordCredential_result result = new getPasswordCredential_result();
- if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) {
- result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e;
- result.setCsExceptionIsSet(true);
- msg = result;
- }
- else
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, getPasswordCredential_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.PasswordCredential> resultHandler) throws TException {
- iface.getPasswordCredential(args.tokenId, args.gatewayId,resultHandler);
- }
- }
-
- }
-
- public static class getCSServiceVersion_args implements org.apache.thrift.TBase<getCSServiceVersion_args, getCSServiceVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCSServiceVersion_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCSServiceVersion_args");
-
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getCSServiceVersion_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getCSServiceVersion_argsTupleSchemeFactory());
- }
-
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-;
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
- 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);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCSServiceVersion_args.class, metaDataMap);
- }
-
- public getCSServiceVersion_args() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getCSServiceVersion_args(getCSServiceVersion_args other) {
- }
-
- public getCSServiceVersion_args deepCopy() {
- return new getCSServiceVersion_args(this);
- }
-
- @Override
- public void clear() {
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getCSServiceVersion_args)
- return this.equals((getCSServiceVersion_args)that);
- return false;
- }
-
- public boolean equals(getCSServiceVersion_args that) {
- if (that == null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getCSServiceVersion_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getCSServiceVersion_args(");
- boolean first = true;
-
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- 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 getCSServiceVersion_argsStandardSchemeFactory implements SchemeFactory {
- public getCSServiceVersion_argsStandardScheme getScheme() {
- return new getCSServiceVersion_argsStandardScheme();
- }
- }
-
- private static class getCSServiceVersion_argsStandardScheme extends StandardScheme<getCSServiceVersion_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getCSServiceVersion_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getCSServiceVersion_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getCSServiceVersion_argsTupleSchemeFactory implements SchemeFactory {
- public getCSServiceVersion_argsTupleScheme getScheme() {
- return new getCSServiceVersion_argsTupleScheme();
- }
- }
-
- private static class getCSServiceVersion_argsTupleScheme extends TupleScheme<getCSServiceVersion_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getCSServiceVersion_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getCSServiceVersion_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- }
- }
-
- }
-
- public static class getCSServiceVersion_result implements org.apache.thrift.TBase<getCSServiceVersion_result, getCSServiceVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCSServiceVersion_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCSServiceVersion_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getCSServiceVersion_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getCSServiceVersion_resultTupleSchemeFactory());
- }
-
- public String success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- 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.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCSServiceVersion_result.class, metaDataMap);
- }
-
- public getCSServiceVersion_result() {
- }
-
- public getCSServiceVersion_result(
- String success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getCSServiceVersion_result(getCSServiceVersion_result other) {
- if (other.isSetSuccess()) {
- this.success = other.success;
- }
- }
-
- public getCSServiceVersion_result deepCopy() {
- return new getCSServiceVersion_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public String getSuccess() {
- return this.success;
- }
-
- public getCSServiceVersion_result setSuccess(String success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getCSServiceVersion_result)
- return this.equals((getCSServiceVersion_result)that);
- return false;
- }
-
- public boolean equals(getCSServiceVersion_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getCSServiceVersion_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getCSServiceVersion_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- 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 getCSServiceVersion_resultStandardSchemeFactory implements SchemeFactory {
- public getCSServiceVersion_resultStandardScheme getScheme() {
- return new getCSServiceVersion_resultStandardScheme();
- }
- }
-
- private static class getCSServiceVersion_resultStandardScheme extends StandardScheme<getCSServiceVersion_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getCSServiceVersion_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.success = iprot.readString();
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getCSServiceVersion_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeString(struct.success);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getCSServiceVersion_resultTupleSchemeFactory implements SchemeFactory {
- public getCSServiceVersion_resultTupleScheme getScheme() {
- return new getCSServiceVersion_resultTupleScheme();
- }
- }
-
- private static class getCSServiceVersion_resultTupleScheme extends TupleScheme<getCSServiceVersion_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getCSServiceVersion_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- oprot.writeString(struct.success);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getCSServiceVersion_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readString();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class addSSHCredential_args implements org.apache.thrift.TBase<addSSHCredential_args, addSSHCredential_args._Fields>, java.io.Serializable, Cloneable, Comparable<addSSHCredential_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSSHCredential_args");
-
- private static final org.apache.thrift.protocol.TField SSH_CREDENTIAL_FIELD_DESC = new org.apache.thrift.protocol.TField("sshCredential", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new addSSHCredential_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new addSSHCredential_argsTupleSchemeFactory());
- }
-
- public org.apache.airavata.credential.store.datamodel.SSHCredential sshCredential; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SSH_CREDENTIAL((short)1, "sshCredential");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // SSH_CREDENTIAL
- return SSH_CREDENTIAL;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- 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.SSH_CREDENTIAL, new org.apache.thrift.meta_data.FieldMetaData("sshCredential", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.datamodel.SSHCredential.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSSHCredential_args.class, metaDataMap);
- }
-
- public addSSHCredential_args() {
- }
-
- public addSSHCredential_args(
- org.apache.airavata.credential.store.datamodel.SSHCredential sshCredential)
- {
- this();
- this.sshCredential = sshCredential;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public addSSHCredential_args(addSSHCredential_args other) {
- if (other.isSetSshCredential()) {
- this.sshCredential = new org.apache.airavata.credential.store.datamodel.SSHCredential(other.sshCredential);
- }
- }
-
- public addSSHCredential_args deepCopy() {
- return new addSSHCredential_args(this);
- }
-
- @Override
- public void clear() {
- this.sshCredential = null;
- }
-
- public org.apache.airavata.credential.store.datamodel.SSHCredential getSshCredential() {
- return this.sshCredential;
- }
-
- public addSSHCredential_args setSshCredential(org.apache.airavata.credential.store.datamodel.SSHCredential sshCredential) {
- this.sshCredential = sshCredential;
- return this;
- }
-
- public void unsetSshCredential() {
- this.sshCredential = null;
- }
-
- /** Returns true if field sshCredential is set (has been assigned a value) and false otherwise */
- public boolean isSetSshCredential() {
- return this.sshCredential != null;
- }
-
- public void setSshCredentialIsSet(boolean value) {
- if (!value) {
- this.sshCredential = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SSH_CREDENTIAL:
- if (value == null) {
- unsetSshCredential();
- } else {
- setSshCredential((org.apache.airavata.credential.store.datamodel.SSHCredential)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SSH_CREDENTIAL:
- return getSshCredential();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SSH_CREDENTIAL:
- return isSetSshCredential();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof addSSHCredential_args)
- return this.equals((addSSHCredential_args)that);
- return false;
- }
-
- public boolean equals(addSSHCredential_args that) {
- if (that == null)
- return false;
-
- boolean this_present_sshCredential = true && this.isSetSshCredential();
- boolean that_present_sshCredential = true && that.isSetSshCredential();
- if (this_present_sshCredential || that_present_sshCredential) {
- if (!(this_present_sshCredential && that_present_sshCredential))
- return false;
- if (!this.sshCredential.equals(that.sshCredential))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(addSSHCredential_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSshCredential()).compareTo(other.isSetSshCredential());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSshCredential()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sshCredential, other.sshCredential);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("addSSHCredential_args(");
- boolean first = true;
-
- sb.append("sshCredential:");
- if (this.sshCredential == null) {
- sb.append("null");
- } else {
- sb.append(this.sshCredential);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (sshCredential == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'sshCredential' was not present! Struct: " + toString());
- }
- // check for sub-struct validity
- if (sshCredential != null) {
- sshCredential.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- p
<TRUNCATED>
[11/50] [abbrv] airavata git commit: Moving credential store client
to stubs module.
Posted by sh...@apache.org.
Moving credential store client to stubs module.
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/8c84eeed
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/8c84eeed
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/8c84eeed
Branch: refs/heads/new-workflow-design
Commit: 8c84eeedca003783f167437edfbd4a812e27d70f
Parents: 52f1e75
Author: Suresh Marru <sm...@apache.org>
Authored: Fri Mar 6 14:22:44 2015 -0500
Committer: Suresh Marru <sm...@apache.org>
Committed: Fri Mar 6 14:22:44 2015 -0500
----------------------------------------------------------------------
modules/credential-store/credential-store-stubs/pom.xml | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/8c84eeed/modules/credential-store/credential-store-stubs/pom.xml
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-stubs/pom.xml b/modules/credential-store/credential-store-stubs/pom.xml
index 2a1c431..838b2f3 100644
--- a/modules/credential-store/credential-store-stubs/pom.xml
+++ b/modules/credential-store/credential-store-stubs/pom.xml
@@ -35,6 +35,11 @@
<artifactId>slf4j-log4j12</artifactId>
<version>${org.slf4j.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>airavata-common-utils</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
<properties>
[39/50] [abbrv] airavata git commit: Fixed new workflow interpreter
termination issue.
Posted by sh...@apache.org.
Fixed new workflow interpreter termination issue.
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/97004593
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/97004593
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/97004593
Branch: refs/heads/new-workflow-design
Commit: 970045939852e228bd7059eac8c7df30acad0c0e
Parents: ad8e482
Author: shamrath <sh...@gmail.com>
Authored: Fri Mar 13 14:40:32 2015 -0400
Committer: shamrath <sh...@gmail.com>
Committed: Fri Mar 13 14:40:32 2015 -0400
----------------------------------------------------------------------
.../workflow/engine/SimpleWorkflowInterpreter.java | 15 ++++++++++++++-
.../workflow/engine/dag/port/InputPortIml.java | 3 ++-
2 files changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/97004593/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/SimpleWorkflowInterpreter.java
----------------------------------------------------------------------
diff --git a/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/SimpleWorkflowInterpreter.java b/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/SimpleWorkflowInterpreter.java
index ee7ff6b..5504f84 100644
--- a/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/SimpleWorkflowInterpreter.java
+++ b/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/SimpleWorkflowInterpreter.java
@@ -115,6 +115,16 @@ class SimpleWorkflowInterpreter{
log.debug("Parsed the workflow and got the workflow input nodes");
// process workflow input nodes
processWorkflowInputNodes(getWorkflowInputNodes());
+ if (readyList.isEmpty()) {
+ StringBuilder sb = new StringBuilder();
+ for (WorkflowInputNode workflowInputNode : workflowInputNodes) {
+ sb.append(", ");
+ sb.append(workflowInputNode.getInputObject().getName());
+ sb.append("=");
+ sb.append(workflowInputNode.getInputObject().getValue());
+ }
+ throw new AiravataException("No workflow application node in ready state to run with experiment inputs" + sb.toString());
+ }
processReadyList();
}
@@ -125,6 +135,9 @@ class SimpleWorkflowInterpreter{
* @throws AiravataException
*/
void processReadyList() throws RegistryException, AiravataException {
+ if (readyList.isEmpty() && processingQueue.isEmpty() && !waitingList.isEmpty()) {
+ throw new AiravataException("No workflow application node in ready state to run");
+ }
for (WorkflowNode readyNode : readyList.values()) {
if (readyNode instanceof WorkflowOutputNode) {
WorkflowOutputNode wfOutputNode = (WorkflowOutputNode) readyNode;
@@ -272,7 +285,7 @@ class SimpleWorkflowInterpreter{
}
boolean isAllDone() {
- return !continueWorkflow || (waitingList.isEmpty() && readyList.isEmpty());
+ return !continueWorkflow || (waitingList.isEmpty() && readyList.isEmpty() && processingQueue.isEmpty());
}
private void setExperiment(String experimentId) throws RegistryException {
http://git-wip-us.apache.org/repos/asf/airavata/blob/97004593/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/dag/port/InputPortIml.java
----------------------------------------------------------------------
diff --git a/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/dag/port/InputPortIml.java b/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/dag/port/InputPortIml.java
index c78dc86..076f5b6 100644
--- a/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/dag/port/InputPortIml.java
+++ b/modules/simple-workflow/src/main/java/org/apache/airavata/simple/workflow/engine/dag/port/InputPortIml.java
@@ -69,7 +69,8 @@ public class InputPortIml implements InPort {
@Override
public boolean isReady() {
- return getInputObject() != null && inputDataObjectType.getValue() != null && !inputDataObjectType.getValue().equals("");
+ return getInputObject() != null && (!inputDataObjectType.isIsRequired() ||
+ (inputDataObjectType.getValue() != null && !inputDataObjectType.getValue().equals("")));
}
@Override
[15/50] [abbrv] airavata git commit: adding lsf support with tests
Posted by sh...@apache.org.
adding lsf support with tests
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/5ff650f4
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/5ff650f4
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/5ff650f4
Branch: refs/heads/new-workflow-design
Commit: 5ff650f4c61a9ee7bfcf6f15ea984d74d545ec32
Parents: e9468ca
Author: Lahiru Gunathilake <gl...@gmail.com>
Authored: Sat Mar 7 00:37:06 2015 -0500
Committer: Lahiru Gunathilake <gl...@gmail.com>
Committed: Sat Mar 7 00:37:06 2015 -0500
----------------------------------------------------------------------
.../client/samples/CreateLaunchExperiment.java | 73 +++++-
.../tools/RegisterSampleApplications.java | 53 +++-
.../server/src/main/resources/LSFTemplate.xslt | 43 ++--
.../server/src/main/resources/PBSTemplate.xslt | 3 +-
.../credential/store/client/TestSSLClient.java | 2 +-
.../store/store/impl/db/SSHCredentialTest.java | 6 +-
.../test/resources/airavata-server.properties | 254 +++++++++++++++++++
.../server/src/main/assembly/bin-assembly.xml | 1 +
.../airavata/gfac/server/GfacServerHandler.java | 1 -
.../org/apache/airavata/gfac/RequestData.java | 2 +
.../gfac/gsissh/util/GFACGSISSHUtils.java | 10 +-
.../airavata/gfac/ssh/util/GFACSSHUtils.java | 23 +-
.../ssh/api/job/JobManagerConfiguration.java | 9 +-
.../gsi/ssh/api/job/LSFJobConfiguration.java | 18 +-
.../gsi/ssh/api/job/LSFOutputParser.java | 1 +
.../gsi/ssh/api/job/PBSJobConfiguration.java | 15 ++
.../gsi/ssh/api/job/SlurmJobConfiguration.java | 15 ++
.../gsi/ssh/impl/GSISSHAbstractCluster.java | 10 +-
.../airavata/gsi/ssh/impl/RawCommandInfo.java | 8 +-
.../impl/DefaultSSHApiTestWithMyProxyAuth.java | 15 +-
20 files changed, 500 insertions(+), 62 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/5ff650f4/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
index 3fc74eb..bb2ae6e 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
@@ -58,7 +58,7 @@ public class CreateLaunchExperiment {
private static final String DEFAULT_GATEWAY = "php_reference_gateway";
private static Airavata.Client airavataClient;
- private static String echoAppId = "Echo_f828a575-7f17-4149-9d45-abe2aa9c6109";
+ private static String echoAppId = "Echo_802454e5-6358-4371-9a04-3d5d59cecbc7";
private static String mpiAppId = "HelloMPI_720e159f-198f-4daa-96ca-9f5eafee92c9";
private static String wrfAppId = "WRF_7ad5da38-c08b-417c-a9ea-da9298839762";
private static String amberAppId = "Amber_a56d457c-f239-4c0b-ba00-66bda936f7bc";
@@ -69,15 +69,15 @@ public class CreateLaunchExperiment {
private static String trinityAppId = "Trinity_e894acf5-9bca-46e8-a1bd-7e2d5155191a";
private static String autodockAppId = "AutoDock_43d9fdd0-c404-49f4-b913-3abf9080a8c9";
-
private static String localHost = "localhost";
private static String trestlesHostName = "trestles.sdsc.xsede.org";
private static String unicoreHostName = "fsd-cloud15.zam.kfa-juelich.de";
private static String stampedeHostName = "stampede.tacc.xsede.org";
private static String br2HostName = "bigred2.uits.iu.edu";
+ private static String umassrcHostName = "ghpcc06.umassrc.org";
private static String gatewayId;
-
+
// unicore service endpoint url
private static final String unicoreEndPointURL = "https://fsd-cloud15.zam.kfa-juelich.de:7000/INTEROP1/services/BESFactory?res=default_bes_factory";
@@ -88,7 +88,7 @@ public class CreateLaunchExperiment {
// createGateway();
// getGateway("testGatewayId");
// registerApplications(); // run this only the first time
- createAndLaunchExp();
+ createAndLaunchExp();
}
private static String fsdResourceId;
@@ -154,13 +154,14 @@ public class CreateLaunchExperiment {
// final String expId = createExperimentForBR2Amber(airavataClient);
// final String expId = createExperimentWRFStampede(airavataClient);
// final String expId = createExperimentForStampedeAmber(airavataClient);
- final String expId = createExperimentForTrestlesAmber(airavataClient);
+// final String expId = createExperimentForTrestlesAmber(airavataClient);
// final String expId = createExperimentGROMACSStampede(airavataClient);
// final String expId = createExperimentESPRESSOStampede(airavataClient);
// final String expId = createExperimentLAMMPSStampede(airavataClient);
// final String expId = createExperimentNWCHEMStampede(airavataClient);
// final String expId = createExperimentTRINITYStampede(airavataClient);
// final String expId = createExperimentAUTODOCKStampede(airavataClient); // this is not working , we need to register AutoDock app on stampede
+ final String expId = createExperimentForLSF(airavataClient);
// final String expId = "Ultrascan_ln_eb029947-391a-4ccf-8ace-9bafebe07cc0";
System.out.println("Experiment ID : " + expId);
// updateExperiment(airavata, expId);
@@ -185,6 +186,8 @@ public class CreateLaunchExperiment {
//Register all compute hosts
registerSampleApplications.registerXSEDEHosts();
+ registerSampleApplications.registerNonXSEDEHosts();
+
//Register Gateway Resource Preferences
registerSampleApplications.registerGatewayResourceProfile();
@@ -1343,6 +1346,63 @@ public class CreateLaunchExperiment {
return null;
}
+ public static String createExperimentForLSF(Airavata.Client client) throws TException {
+ try {
+ List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>();
+ InputDataObjectType input = new InputDataObjectType();
+ input.setName("Input_to_Echo");
+ input.setType(DataType.STRING);
+ input.setValue("Echoed_Output=Hello World");
+ input.setRequiredToAddedToCommandLine(true);
+ exInputs.add(input);
+
+ List<OutputDataObjectType> exOut = new ArrayList<OutputDataObjectType>();
+ OutputDataObjectType output = new OutputDataObjectType();
+ output.setName("output_file");
+ output.setType(DataType.URI);
+ output.setValue("");
+ exOut.add(output);
+
+ Project project = ProjectModelUtil.createProject("default", "lg11w", "test project");
+ String projectId = client.createProject(DEFAULT_GATEWAY, project);
+
+ Experiment simpleExperiment =
+ ExperimentModelUtil.createSimpleExperiment(projectId, "lg11w", "sshEchoExperiment", "StressMem", echoAppId, exInputs);
+ simpleExperiment.setExperimentOutputs(exOut);
+
+ Map<String, String> computeResources = airavataClient.getAvailableAppInterfaceComputeResources(echoAppId);
+ if (computeResources != null && computeResources.size() != 0) {
+ for (String id : computeResources.keySet()) {
+ String resourceName = computeResources.get(id);
+ if (resourceName.equals(umassrcHostName)) {
+ ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(id, 10, 1, 1, "long", 60, 0, 1000, "airavata");
+ UserConfigurationData userConfigurationData = new UserConfigurationData();
+ userConfigurationData.setAiravataAutoSchedule(false);
+ userConfigurationData.setOverrideManualScheduledParams(false);
+ userConfigurationData.setComputationalResourceScheduling(scheduling);
+ simpleExperiment.setUserConfigurationData(userConfigurationData);
+ simpleExperiment.setEmailAddresses(Arrays.asList(new String[]{"test@umassmed.edu"}));
+ return client.createExperiment(DEFAULT_GATEWAY, simpleExperiment);
+ }
+ }
+ }
+ } catch (AiravataSystemException e) {
+ logger.error("Error occured while creating the experiment...", e.getMessage());
+ throw new AiravataSystemException(e);
+ } catch (InvalidRequestException e) {
+ logger.error("Error occured while creating the experiment...", e.getMessage());
+ throw new InvalidRequestException(e);
+ } catch (AiravataClientException e) {
+ logger.error("Error occured while creating the experiment...", e.getMessage());
+ throw new AiravataClientException(e);
+ } catch (TException e) {
+ logger.error("Error occured while creating the experiment...", e.getMessage());
+ throw new TException(e);
+ }
+ return null;
+ }
+
+
public static String createExperimentForBR2Amber(Airavata.Client client) throws TException {
try {
List<InputDataObjectType> exInputs = client.getApplicationInputs(amberAppId);
@@ -1538,8 +1598,7 @@ public class CreateLaunchExperiment {
public static void launchExperiment(Airavata.Client client, String expId)
throws TException {
try {
-// String tokenId = "5f116091-0ad3-4ab6-9df7-6ac909f21f8b";
- String tokenId ="aaaaaa";
+ String tokenId ="aa-dcdb-48e3-9cd5-ac90b710d55e";
client.launchExperiment(expId, tokenId);
} catch (ExperimentNotFoundException e) {
logger.error("Error occured while launching the experiment...", e.getMessage());
http://git-wip-us.apache.org/repos/asf/airavata/blob/5ff650f4/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
index 7f7ac1d..8ae2dd2 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
@@ -54,6 +54,8 @@ public class RegisterSampleApplications {
private static String stampedeResourceId = "stampede.tacc.xsede.org_92ac5ed6-35a5-4910-82ef-48f128f9245a";
private static String trestlesResourceId = "trestles.sdsc.xsede.org_db29986e-5a27-4949-ae7f-04a6012d0d35";
private static String bigredResourceId = "bigred2.uits.iu.edu_3eae6e9d-a1a7-44ec-ac85-3796ef726ef1";
+ private static String lsfResourceId = "lsf_3eae6e9d-a1a7-44ec-ac85-3796ef726ef1";
+
private static String fsdResourceId;
// unicore service endpoint url
private static final String unicoreEndPointURL = "https://fsd-cloud15.zam.kfa-juelich.de:7000/INTEROP1/services/BESFactory?res=default_bes_factory";
@@ -73,6 +75,7 @@ public class RegisterSampleApplications {
private static final String monteXName = "TinkerMonte";
private static final String gaussianName = "Gaussian";
private static final String gamessName = "Gamess";
+ private static final String stressMemName = "StressMem";
//Appplication Descriptions
private static final String echoDescription = "A Simple Echo Application";
@@ -90,6 +93,7 @@ public class RegisterSampleApplications {
private static final String gaussianDescription = "Grid Chem Gaussian Application";
private static final String gamessDescription = "A Gamess Application";
+
//App Module Id's
private static String echoModuleId;
private static String amberModuleId;
@@ -136,6 +140,7 @@ public class RegisterSampleApplications {
//Register all compute hosts
registerSampleApplications.registerXSEDEHosts();
+ registerSampleApplications.registerNonXSEDEHosts();
//Register Gateway Resource Preferences
registerSampleApplications.registerGatewayResourceProfile();
@@ -200,10 +205,24 @@ public class RegisterSampleApplications {
bigredResourceId = registerComputeHost("bigred2.uits.iu.edu", "IU BigRed II Cluster",
ResourceJobManagerType.PBS, "push", "/opt/torque/torque-4.2.3.1/bin/", SecurityProtocol.SSH_KEYS, 22, "aprun -n");
System.out.println("BigredII Resource Id is " + bigredResourceId);
-
+
fsdResourceId = registerUnicoreEndpoint("fsd-cloud15.zam.kfa-juelich.de", "interop host", JobSubmissionProtocol.UNICORE, SecurityProtocol.GSI);
System.out.println("FSd Resource Id: "+fsdResourceId);
-
+
+ } catch (TException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ public void registerNonXSEDEHosts() {
+ try {
+ System.out.println("\n #### Registering Non-XSEDE Computational Resources #### \n");
+
+ //Register LSF resource
+ lsfResourceId = registerComputeHost("ghpcc06.umassrc.org", "LSF Cluster",
+ ResourceJobManagerType.LSF, "push", "source /etc/bashrc;/lsf/9.1/linux2.6-glibc2.3-x86_64/bin", SecurityProtocol.SSH_KEYS, 22, null);
+ System.out.println("LSF Resource Id is " + lsfResourceId);
} catch (TException e) {
e.printStackTrace();
@@ -317,7 +336,6 @@ public class RegisterSampleApplications {
gamessName, "17May13", gamessDescription));
System.out.println("Gamess Module Id " + gamessModuleId);
-
} catch (TException e) {
e.printStackTrace();
}
@@ -341,6 +359,7 @@ public class RegisterSampleApplications {
//Registering FSD Apps
registerFSDApps();
+ registerLSFApps();
}
@@ -493,8 +512,8 @@ public class RegisterSampleApplications {
e.printStackTrace();
}
}
-
-
+
+
public void registerMPIInterface() {
try {
System.out.println("#### Registering MPI Interface #### \n");
@@ -1084,6 +1103,22 @@ public class RegisterSampleApplications {
}
}
+ public void registerLSFApps() {
+ try {
+ System.out.println("#### Registering Application Deployments on Trestles #### \n");
+
+ //Register Echo
+ String echoAppDeployId = airavataClient.registerApplicationDeployment(DEFAULT_GATEWAY,
+ RegisterSampleApplicationsUtils.createApplicationDeployment(echoModuleId, lsfResourceId,
+ "/home/lg11w/executables/echo.sh", ApplicationParallelismType.SERIAL,
+ echoDescription, null, null, null));
+ System.out.println("Echo on trestles deployment Id " + echoAppDeployId);
+
+ } catch (TException e) {
+ e.printStackTrace();
+ }
+ }
+
public void registerBigRedApps() {
try {
System.out.println("#### Registering Application Deployments on BigRed II #### \n");
@@ -1127,7 +1162,7 @@ public class RegisterSampleApplications {
e.printStackTrace();
}
}
-
+
public void registerFSDApps() {
try {
System.out.println("#### Registering Application Deployments on FSD #### \n");
@@ -1207,6 +1242,10 @@ public class RegisterSampleApplications {
ComputeResourcePreference bigRedResourcePreferences = RegisterSampleApplicationsUtils.
createComputeResourcePreference(bigredResourceId, "TG-STA110014S", false, null, null, null,
"/N/dc2/scratch/cgateway/gta-work-dirs");
+
+ ComputeResourcePreference lsfResourcePreferences = RegisterSampleApplicationsUtils.
+ createComputeResourcePreference(lsfResourceId, "airavata", false, null, null, null,
+ "/home/lg11w/mywork");
ComputeResourcePreference fsdResourcePreferences = RegisterSampleApplicationsUtils.
createComputeResourcePreference(fsdResourceId, null, false, null, JobSubmissionProtocol.UNICORE, DataMovementProtocol.UNICORE_STORAGE_SERVICE,null);
@@ -1217,6 +1256,7 @@ public class RegisterSampleApplications {
gatewayResourceProfile.addToComputeResourcePreferences(trestlesResourcePreferences);
gatewayResourceProfile.addToComputeResourcePreferences(bigRedResourcePreferences);
gatewayResourceProfile.addToComputeResourcePreferences(fsdResourcePreferences);
+ gatewayResourceProfile.addToComputeResourcePreferences(lsfResourcePreferences);
String gatewayProfile = airavataClient.registerGatewayResourceProfile(gatewayResourceProfile);
System.out.println("Gateway Profile is registered with Id " + gatewayProfile);
@@ -1232,6 +1272,7 @@ public class RegisterSampleApplications {
properties.setProperty("stampedeResourceId", stampedeResourceId);
properties.setProperty("trestlesResourceId", trestlesResourceId);
properties.setProperty("bigredResourceId", bigredResourceId);
+ properties.setProperty("lsfResourceId", lsfResourceId);
properties.setProperty("echoInterfaceId", echoInterfaceId);
properties.setProperty("amberInterfaceId", amberInterfaceId);
http://git-wip-us.apache.org/repos/asf/airavata/blob/5ff650f4/modules/configuration/server/src/main/resources/LSFTemplate.xslt
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/LSFTemplate.xslt b/modules/configuration/server/src/main/resources/LSFTemplate.xslt
index ab9fbbd..7081260 100644
--- a/modules/configuration/server/src/main/resources/LSFTemplate.xslt
+++ b/modules/configuration/server/src/main/resources/LSFTemplate.xslt
@@ -9,47 +9,61 @@
<xsl:output method="text" />
<xsl:template match="/ns:JobDescriptor">
<xsl:param name="quote">"</xsl:param>
- #! /bin/bash
- # LSF batch job submission script generated by Apache Airavata
- #
+#! /bin/bash
+# LSF batch job submission script generated by Apache Airavata
+#
+ <xsl:choose>
+ <xsl:when test="ns:shellName">
+#BSUB -L <xsl:value-of select="ns:shellName"/>
+ </xsl:when></xsl:choose>
<xsl:choose>
<xsl:when test="ns:queueName">
- #BSUB -n <xsl:value-of select="ns:queueName"/>
+#BSUB -q <xsl:value-of select="ns:queueName"/>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="ns:nodes">
+#BSUB -n <xsl:value-of select="ns:nodes"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="ns:mailAddress">
- #BSUB -u <xsl:value-of select="ns:mailAddress"/>
+#BSUB -u <xsl:value-of select="ns:mailAddress"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="ns:jobName">
- #BSUB -J <xsl:value-of select="ns:jobName"/>
+#BSUB -J <xsl:value-of select="ns:jobName"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="ns:acountString">
- #BSUB -P <xsl:value-of select="ns:acountString"/>
- </xsl:when>
- </xsl:choose>
+ <xsl:when test="ns:acountString">
+#BSUB -P <xsl:value-of select="ns:acountString"/>
+ </xsl:when>
+ </xsl:choose>
<xsl:choose>
<xsl:when test="ns:maxWallTime">
- #BSUB -W<xsl:value-of select="ns:maxWallTime"/>
+#BSUB -W <xsl:value-of select="ns:maxWallTime"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="ns:standardOutFile">
- #BSUB -o <xsl:value-of select="ns:standardOutFile"/>
+#BSUB -o "<xsl:value-of select="ns:standardOutFile"/>"
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="ns:standardOutFile">
- #BSUB -e <xsl:value-of select="ns:standardErrorFile"/>
+#BSUB -e "<xsl:value-of select="ns:standardErrorFile"/>"
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="ns:chassisName">
+#BSUB -m c<xsl:value-of select="ns:chassisName"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="ns:usedMem">
- #BSUB -R rusage[mem=<xsl:value-of select="ns:usedMem"/>]
+#BSUB -R rusage[mem=<xsl:value-of select="ns:usedMem"/>]
</xsl:when>
</xsl:choose>
@@ -74,7 +88,6 @@
<xsl:value-of select="."/><xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text>
</xsl:text>
- ~/rabbitmq-java-client-bin-3.3.5/runjava.sh com.rabbitmq.examples.SimpleProducer amqp://<xsl:value-of select="ns:callBackIp"/><xsl:text> </xsl:text><xsl:value-of select="ns:userName"/>,<xsl:value-of select="ns:jobName"/><xsl:text> </xsl:text><xsl:value-of select="$quote"/><xsl:value-of select="$quote"/><xsl:text> </xsl:text><xsl:value-of select="ns:callBackPort"/>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/5ff650f4/modules/configuration/server/src/main/resources/PBSTemplate.xslt
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/PBSTemplate.xslt b/modules/configuration/server/src/main/resources/PBSTemplate.xslt
index aa3cccc..7676883 100644
--- a/modules/configuration/server/src/main/resources/PBSTemplate.xslt
+++ b/modules/configuration/server/src/main/resources/PBSTemplate.xslt
@@ -96,7 +96,6 @@ cd <xsl:text> </xsl:text><xsl:value-of select="ns:workingDirectory"/><xsl:text
<xsl:value-of select="."/><xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text>
</xsl:text>
-~/rabbitmq-java-client-bin-3.3.5/runjava.sh com.rabbitmq.examples.SimpleProducer amqp://<xsl:value-of select="ns:callBackIp"/><xsl:text> </xsl:text><xsl:value-of select="ns:userName"/>,<xsl:value-of select="ns:jobName"/><xsl:text> </xsl:text><xsl:value-of select="$quote"/><xsl:value-of select="$quote"/><xsl:text> </xsl:text><xsl:value-of select="ns:callBackPort"/>
-</xsl:template>
+R</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/5ff650f4/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java
index cc5ebb6..1d9f4d9 100644
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java
+++ b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java
@@ -63,7 +63,7 @@ public class TestSSLClient {
TProtocol protocol = new TBinaryProtocol(transport);
CredentialStoreService.Client client = new CredentialStoreService.Client(protocol);
-// testSSHCredential(client);
+ testSSHCredential(client);
testCertificateCredential(client);
transport.close();
} catch (TTransportException e) {
http://git-wip-us.apache.org/repos/asf/airavata/blob/5ff650f4/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java b/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
index 7f44125..4f72b46 100644
--- a/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
+++ b/modules/credential-store/credential-store-service/src/test/java/org/apache/airavata/credential/store/store/impl/db/SSHCredentialTest.java
@@ -43,8 +43,8 @@ public class SSHCredentialTest {
String userName = "airavata";
String password = "airavata";
String gatewayId = "default";
- String privateKeyPath = "/Users/chathuri/.ssh/id_dsa";
- String pubKeyPath = "/Users/chathuri/.ssh/id_dsa.pub";
+ String privateKeyPath = "/Users/lginnali/.ssh/id_dsa";
+ String pubKeyPath = "/Users/lginnali/.ssh/id_dsa.pub";
try {
AiravataUtils.setExecutionAsServer();
@@ -67,7 +67,7 @@ public class SSHCredentialTest {
pubKeyStream.close();
sshCredential.setPrivateKey(bFilePub);
sshCredential.setPublicKey(bFilePub);
- sshCredential.setPassphrase("test");
+ sshCredential.setPassphrase("gjtlmiJdas7wph");
writer.writeCredentials(sshCredential);
System.out.println(token);
} catch (ClassNotFoundException e) {
http://git-wip-us.apache.org/repos/asf/airavata/blob/5ff650f4/modules/credential-store/credential-store-service/src/test/resources/airavata-server.properties
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/test/resources/airavata-server.properties b/modules/credential-store/credential-store-service/src/test/resources/airavata-server.properties
new file mode 100644
index 0000000..9bdce87
--- /dev/null
+++ b/modules/credential-store/credential-store-service/src/test/resources/airavata-server.properties
@@ -0,0 +1,254 @@
+#
+#
+# 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.
+#
+
+###########################################################################
+#
+# This properties file provides configuration for all Airavata Services:
+# API Server, Registry, Workflow Interpreter, GFac, Orchestrator
+#
+###########################################################################
+
+###########################################################################
+# API Server Registry Configuration
+###########################################################################
+
+#for derby [AiravataJPARegistry]
+registry.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+registry.jdbc.url=jdbc:derby://localhost:1527/persistent_data;create=true;user=airavata;password=airavata
+# MySql database configuration
+#registry.jdbc.driver=com.mysql.jdbc.Driver
+#registry.jdbc.url=jdbc:mysql://localhost:3306/persistent_data
+registry.jdbc.user=airavata
+registry.jdbc.password=airavata
+start.derby.server.mode=true
+validationQuery=SELECT 1 from CONFIGURATION
+jpa.cache.size=5000
+#jpa.connection.properties=MaxActive=10,MaxIdle=5,MinIdle=2,MaxWait=60000,testWhileIdle=true,testOnBorrow=true
+
+# Properties for default user mode
+default.registry.user=admin
+default.registry.password=admin
+default.registry.password.hash.method=SHA
+default.registry.gateway=php_reference_gateway
+
+#ip=127.0.0.1
+
+###########################################################################
+# Application Catalog DB Configuration
+###########################################################################
+#for derby [AiravataJPARegistry]
+appcatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+appcatalog.jdbc.url=jdbc:derby://localhost:1527/app_catalog;create=true;user=airavata;password=airavata
+# MySql database configuration
+#appcatalog.jdbc.driver=com.mysql.jdbc.Driver
+#appcatalog.jdbc.url=jdbc:mysql://localhost:3306/app_catalog
+appcatalog.jdbc.user=airavata
+appcatalog.jdbc.password=airavata
+appcatalog.validationQuery=SELECT 1 from CONFIGURATION
+
+###########################################################################
+# Server module Configuration
+###########################################################################
+
+servers=apiserver,orchestrator,gfac,credentialstore
+#shutdown.trategy=NONE
+shutdown.trategy=SELF_TERMINATE
+
+
+apiserver.server.host=localhost
+apiserver.server.port=8930
+apiserver.server.min.threads=50
+orchestrator.server.host=localhost
+orchestrator.server.port=8940
+gfac.server.host=localhost
+gfac.server.port=8950
+orchestrator.server.min.threads=50
+
+###########################################################################
+# Job Scheduler can send informative email messages to you about the status of your job.
+# Specify a string which consists of either the single character "n" (no mail), or one or more
+# of the characters "a" (send mail when job is aborted), "b" (send mail when job begins),
+# and "e" (send mail when job terminates). The default is "a" if not specified.
+###########################################################################
+
+job.notification.enable=true
+#Provide comma separated email ids as a string if more than one
+job.notification.emailids=
+job.notification.flags=abe
+
+###########################################################################
+# Credential Store module Configuration
+###########################################################################
+start.credential.store=false
+credential.store.keystore.url=/Users/lginnali/Downloads/airavata_sym.jks
+credential.store.keystore.alias=airavata
+credential.store.keystore.password=airavata
+credential.store.jdbc.url=jdbc:derby://localhost:1527/persistent_data;create=true;user=airavata;password=airavata
+credential.store.jdbc.user=airavata
+credential.store.jdbc.password=airavata
+credential.store.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+credential.store.server.host=localhost
+credential.store.server.port=8960
+credentialstore=org.apache.airavata.credential.store.server.CredentialStoreServer
+credential.store.thrift.server.keystore=/Users/chathuri/dev/airavata/credential-store/oa4mp/airavata.jks
+credential.store.thrift.server.keystore.password=airavata
+
+notifier.enabled=false
+#period in milliseconds
+notifier.duration=5000
+
+email.server=smtp.googlemail.com
+email.server.port=465
+email.user=airavata
+email.password=xxx
+email.ssl=true
+email.from=airavata@apache.org
+
+###########################################################################
+# Airavata GFac MyProxy GSI credentials to access Grid Resources.
+###########################################################################
+#
+# Security Configuration used by Airavata Generic Factory Service
+# to interact with Computational Resources.
+#
+gfac.thread.pool.size=50
+airavata.server.thread.pool.size=50
+gfac=org.apache.airavata.gfac.server.GfacServer
+myproxy.server=myproxy.teragrid.org
+myproxy.username=ogce
+myproxy.password=
+myproxy.life=3600
+# XSEDE Trusted certificates can be downloaded from https://software.xsede.org/security/xsede-certs.tar.gz
+trusted.cert.location=/Users/lahirugunathilake/Downloads/certificates
+gfac.passive=true
+# SSH PKI key pair or ssh password can be used SSH based authentication is used.
+# if user specify both password authentication gets the higher preference
+
+################# ---------- For ssh key pair authentication ------------------- ################
+#public.ssh.key=/path to public key for ssh
+#private.ssh.key=/path to private key file for ssh
+#ssh.keypass=passphrase for the private key
+#ssh.username=username for ssh connection
+### Incase of password authentication.
+#ssh.password=Password for ssh connection
+
+
+
+###########################################################################
+# Airavata Workflow Interpreter Configurations
+###########################################################################
+
+#runInThread=true
+#provenance=true
+#provenanceWriterThreadPoolSize=20
+#gfac.embedded=true
+#workflowserver=org.apache.airavata.api.server.WorkflowServer
+
+
+###########################################################################
+# API Server module Configuration
+###########################################################################
+apiserver=org.apache.airavata.api.server.AiravataAPIServer
+
+###########################################################################
+# Workflow Server module Configuration
+###########################################################################
+
+workflowserver=org.apache.airavata.api.server.WorkflowServer
+
+###########################################################################
+# Advance configuration to change service implementations
+###########################################################################
+# If false, disables two phase commit when submitting jobs
+TwoPhase=true
+#
+# Class which implemented HostScheduler interface. It will determine the which host to submit the request
+#
+host.scheduler=org.apache.airavata.gfac.core.scheduler.impl.SimpleHostScheduler
+
+###########################################################################
+# Monitoring module Configuration
+###########################################################################
+
+#This will be the primary monitoring tool which runs in airavata, in future there will be multiple monitoring
+#mechanisms and one would be able to start a monitor
+monitors=org.apache.airavata.gfac.monitor.impl.pull.qstat.QstatMonitor,org.apache.airavata.gfac.monitor.impl.LocalJobMonitor
+
+
+###########################################################################
+# AMQP Notification Configuration
+###########################################################################
+
+
+amqp.notification.enable=1
+
+amqp.broker.host=localhost
+amqp.broker.port=5672
+amqp.broker.username=guest
+amqp.broker.password=guest
+
+amqp.sender=org.apache.airavata.wsmg.client.amqp.rabbitmq.AMQPSenderImpl
+amqp.topic.sender=org.apache.airavata.wsmg.client.amqp.rabbitmq.AMQPTopicSenderImpl
+amqp.broadcast.sender=org.apache.airavata.wsmg.client.amqp.rabbitmq.AMQPBroadcastSenderImpl
+
+#,org.apache.airavata.gfac.monitor.impl.push.amqp.AMQPMonitor
+#This is the amqp related configuration and this lists down the Rabbitmq host, this is an xsede specific configuration
+amqp.hosts=info1.dyn.teragrid.org,info2.dyn.teragrid.org
+proxy.file.path=/Users/lahirugunathilake/Downloads/x509up_u503876
+connection.name=xsede
+#publisher
+activity.listeners=org.apache.airavata.gfac.core.monitor.AiravataJobStatusUpdator,org.apache.airavata.gfac.core.monitor.AiravataTaskStatusUpdator,org.apache.airavata.gfac.core.monitor.AiravataWorkflowNodeStatusUpdator,org.apache.airavata.api.server.listener.AiravataExperimentStatusUpdator,org.apache.airavata.gfac.core.monitor.GfacInternalStatusUpdator,org.apache.airavata.workflow.engine.util.ProxyMonitorPublisher
+publish.rabbitmq=false
+status.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
+task.launch.publisher=org.apache.airavata.messaging.core.impl.RabbitMQTaskLaunchPublisher
+rabbitmq.broker.url=amqp://localhost:5672
+rabbitmq.status.exchange.name=airavata_rabbitmq_exchange
+rabbitmq.task.launch.exchange.name=airavata_task_launch_rabbitmq_exchange
+
+
+###########################################################################
+# Orchestrator module Configuration
+###########################################################################
+
+#job.submitter=org.apache.airavata.orchestrator.core.impl.GFACEmbeddedJobSubmitter
+job.submitter=org.apache.airavata.orchestrator.core.impl.GFACPassiveJobSubmitter
+#job.submitter=org.apache.airavata.orchestrator.core.impl.GFACRPCJobSubmitter
+job.validators=org.apache.airavata.orchestrator.core.validator.impl.SimpleAppDataValidator,org.apache.airavata.orchestrator.core.validator.impl.ExperimentStatusValidator
+submitter.interval=10000
+threadpool.size=10
+start.submitter=true
+embedded.mode=true
+enable.validation=true
+orchestrator=org.apache.airavata.orchestrator.server.OrchestratorServer
+
+###########################################################################
+# Zookeeper Server Configuration
+###########################################################################
+
+embedded.zk=false
+zookeeper.server.host=localhost
+zookeeper.server.port=2181
+airavata-server=/api-server
+orchestrator-server=/orchestrator-server
+gfac-server=/gfac-server
+gfac-experiments=/gfac-experiments
+gfac-server-name=gfac-node0
+orchestrator-server-name=orch-node0
+airavata-server-name=api-node0
http://git-wip-us.apache.org/repos/asf/airavata/blob/5ff650f4/modules/distribution/server/src/main/assembly/bin-assembly.xml
----------------------------------------------------------------------
diff --git a/modules/distribution/server/src/main/assembly/bin-assembly.xml b/modules/distribution/server/src/main/assembly/bin-assembly.xml
index 4f061e4..18ccad6 100644
--- a/modules/distribution/server/src/main/assembly/bin-assembly.xml
+++ b/modules/distribution/server/src/main/assembly/bin-assembly.xml
@@ -127,6 +127,7 @@
<include>gfac-config.xml</include>
<include>PBSTemplate.xslt</include>
<include>SLURMTemplate.xslt</include>
+ <include>LSFTemplate.xslt</include>
<include>SGETemplate.xslt</include>
<include>gsissh.properties</include>
</includes>
http://git-wip-us.apache.org/repos/asf/airavata/blob/5ff650f4/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
index 583ec07..1687462 100644
--- a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
+++ b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
@@ -31,7 +31,6 @@ import org.apache.airavata.common.utils.AiravataZKUtils;
import org.apache.airavata.common.utils.Constants;
import org.apache.airavata.common.utils.MonitorPublisher;
import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.gfac.GFacException;
import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
import org.apache.airavata.gfac.core.cpi.GFac;
import org.apache.airavata.gfac.core.utils.GFacThreadPoolExecutor;
http://git-wip-us.apache.org/repos/asf/airavata/blob/5ff650f4/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/RequestData.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/RequestData.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/RequestData.java
index 9f45ce6..000ea7d 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/RequestData.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/RequestData.java
@@ -49,6 +49,8 @@ public class RequestData {
private int myProxyLifeTime = DEFAULT_LIFE_TIME;
+
+
public RequestData() {
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5ff650f4/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
index 7a432e8..631f59c 100644
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
+++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
@@ -60,6 +60,8 @@ public class GFACGSISSHUtils {
public static final String PBS_JOB_MANAGER = "pbs";
public static final String SLURM_JOB_MANAGER = "slurm";
public static final String SUN_GRID_ENGINE_JOB_MANAGER = "UGE";
+ public static final String LSF_JOB_MANAGER = "lsf";
+
public static int maxClusterCount = 5;
public static Map<String, List<Cluster>> clusters = new HashMap<String, List<Cluster>>();
@@ -138,6 +140,8 @@ public class GFACGSISSHUtils {
jConfig = CommonUtils.getSLURMJobManager(installedParentPath);
} else if (SUN_GRID_ENGINE_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
jConfig = CommonUtils.getSGEJobManager(installedParentPath);
+ }else if(LSF_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
+ jConfig = CommonUtils.getLSFJobManager(installedParentPath);
}
}
pbsCluster = new PBSCluster(serverInfo, tokenizedMyProxyAuthInfo, jConfig);
@@ -177,7 +181,7 @@ public class GFACGSISSHUtils {
if(ServerSettings.getSetting(ServerSettings.JOB_NOTIFICATION_ENABLE).equalsIgnoreCase("true")){
jobDescriptor.setMailOptions(ServerSettings.getSetting(ServerSettings.JOB_NOTIFICATION_FLAGS));
String emailids = ServerSettings.getSetting(ServerSettings.JOB_NOTIFICATION_EMAILIDS);
-
+
if(jobExecutionContext.getTaskData().isSetEmailAddresses()){
List<String> emailList = jobExecutionContext.getTaskData().getEmailAddresses();
String elist = GFacUtils.listToCsv(emailList, ',');
@@ -204,6 +208,7 @@ public class GFACGSISSHUtils {
jobDescriptor.setStandardOutFile(jobExecutionContext.getStandardOutput());
jobDescriptor.setStandardErrorFile(jobExecutionContext.getStandardError());
String computationalProjectAccount = taskData.getTaskScheduling().getComputationalProjectAccount();
+ taskData.getEmailAddresses();
if (computationalProjectAccount == null){
ComputeResourcePreference computeResourcePreference = jobExecutionContext.getApplicationContext().getComputeResourcePreference();
if (computeResourcePreference != null) {
@@ -311,6 +316,9 @@ public class GFACGSISSHUtils {
}
if (taskScheduling.getWallTimeLimit() > 0) {
jobDescriptor.setMaxWallTime(String.valueOf(taskScheduling.getWallTimeLimit()));
+ if(resourceJobManager.getResourceJobManagerType().equals(ResourceJobManagerType.LSF)){
+ jobDescriptor.setMaxWallTimeForLSF(String.valueOf(taskScheduling.getWallTimeLimit()));
+ }
}
if (taskScheduling.getTotalPhysicalMemory() > 0) {
http://git-wip-us.apache.org/repos/asf/airavata/blob/5ff650f4/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
index a9e08d3..c4d25f5 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
@@ -25,6 +25,7 @@ import org.airavata.appcatalog.cpi.AppCatalogException;
import org.apache.airavata.common.exception.ApplicationSettingsException;
import org.apache.airavata.common.utils.ServerSettings;
import org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential;
+import org.apache.airavata.gfac.Constants;
import org.apache.airavata.gfac.GFacException;
import org.apache.airavata.gfac.RequestData;
import org.apache.airavata.gfac.core.context.JobExecutionContext;
@@ -41,6 +42,7 @@ import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
import org.apache.airavata.gsi.ssh.api.job.JobManagerConfiguration;
import org.apache.airavata.gsi.ssh.impl.GSISSHAbstractCluster;
import org.apache.airavata.gsi.ssh.impl.PBSCluster;
+import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
import org.apache.airavata.gsi.ssh.util.CommonUtils;
import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
import org.apache.airavata.model.appcatalog.appinterface.DataType;
@@ -96,15 +98,21 @@ public class GFACSSHUtils {
Cluster pbsCluster = null;
try {
- TokenizedSSHAuthInfo tokenizedSSHAuthInfo = new TokenizedSSHAuthInfo(requestData);
+ AuthenticationInfo tokenizedSSHAuthInfo = new TokenizedSSHAuthInfo(requestData);
String installedParentPath = jobExecutionContext.getResourceJobManager().getJobManagerBinPath();
if (installedParentPath == null) {
installedParentPath = "/";
}
- SSHCredential credentials = tokenizedSSHAuthInfo.getCredentials();// this is just a call to get and set credentials in to this object,data will be used
+ SSHCredential credentials =((TokenizedSSHAuthInfo)tokenizedSSHAuthInfo).getCredentials();// this is just a call to get and set credentials in to this object,data will be used
+ if(credentials.getPrivateKey()==null || credentials.getPublicKey()==null){
+ // now we fall back to username password authentication
+ Properties configurationProperties = ServerSettings.getProperties();
+ tokenizedSSHAuthInfo = new DefaultPasswordAuthenticationInfo(configurationProperties.getProperty(Constants.SSH_PASSWORD));
+ }
serverInfo.setUserName(credentials.getPortalUserName());
jobExecutionContext.getExperiment().setUserName(credentials.getPortalUserName());
+
// inside the pbsCluser object
String key = credentials.getPortalUserName() + jobExecutionContext.getHostName() + serverInfo.getPort();
@@ -147,8 +155,11 @@ public class GFACSSHUtils {
jConfig = CommonUtils.getSLURMJobManager(installedParentPath);
} else if (SUN_GRID_ENGINE_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
jConfig = CommonUtils.getSGEJobManager(installedParentPath);
+ } else if (LSF_JOB_MANAGER.equalsIgnoreCase(jobManager)) {
+ jConfig = CommonUtils.getLSFJobManager(installedParentPath);
}
}
+
pbsCluster = new PBSCluster(serverInfo, tokenizedSSHAuthInfo,jConfig);
List<Cluster> pbsClusters = null;
if (!(clusters.containsKey(key))) {
@@ -322,7 +333,7 @@ public class GFACSSHUtils {
List<String> inputValues = new ArrayList<String>();
MessageContext input = jobExecutionContext.getInMessageContext();
- // sort the inputs first and then build the command List
+ // sort the inputs first and then build the command ListR
Comparator<InputDataObjectType> inputOrderComparator = new Comparator<InputDataObjectType>() {
@Override
public int compare(InputDataObjectType inputDataObjectType, InputDataObjectType t1) {
@@ -411,6 +422,12 @@ public class GFACSSHUtils {
}
if (taskScheduling.getWallTimeLimit() > 0) {
jobDescriptor.setMaxWallTime(String.valueOf(taskScheduling.getWallTimeLimit()));
+ if(resourceJobManager.getResourceJobManagerType().equals(ResourceJobManagerType.LSF)){
+ jobDescriptor.setMaxWallTimeForLSF(String.valueOf(taskScheduling.getWallTimeLimit()));
+ }
+ }
+ if (taskScheduling.getTotalPhysicalMemory() > 0) {
+ jobDescriptor.setUsedMemory(taskScheduling.getTotalPhysicalMemory() + "");
}
} else {
logger.error("Task scheduling cannot be null at this point..");
http://git-wip-us.apache.org/repos/asf/airavata/blob/5ff650f4/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobManagerConfiguration.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobManagerConfiguration.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobManagerConfiguration.java
index f68ba29..85a843e 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobManagerConfiguration.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobManagerConfiguration.java
@@ -37,6 +37,13 @@ public interface JobManagerConfiguration {
public RawCommandInfo getSubmitCommand(String workingDirectory, String pbsFilePath);
public OutputParser getParser();
-
+
public String getInstalledPath();
+
+ public String getBaseCancelCommand();
+
+ public String getBaseMonitorCommand();
+
+ public String getBaseSubmitCommand();
+
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5ff650f4/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/LSFJobConfiguration.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/LSFJobConfiguration.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/LSFJobConfiguration.java
index 018d49d..46fe9ad 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/LSFJobConfiguration.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/LSFJobConfiguration.java
@@ -80,7 +80,7 @@ public class LSFJobConfiguration implements JobManagerConfiguration {
@Override
public RawCommandInfo getSubmitCommand(String workingDirectory, String pbsFilePath) {
- return new RawCommandInfo(this.installedPath + "bsub <" +
+ return new RawCommandInfo(this.installedPath + "bsub < " +
workingDirectory + File.separator + FilenameUtils.getName(pbsFilePath));
}
@@ -97,4 +97,20 @@ public class LSFJobConfiguration implements JobManagerConfiguration {
public String getInstalledPath() {
return installedPath;
}
+
+
+ @Override
+ public String getBaseCancelCommand() {
+ return "bkill";
+ }
+
+ @Override
+ public String getBaseMonitorCommand() {
+ return "bjobs";
+ }
+
+ @Override
+ public String getBaseSubmitCommand() {
+ return "bsub";
+ }
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5ff650f4/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/LSFOutputParser.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/LSFOutputParser.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/LSFOutputParser.java
index 5490ff6..bd02e37 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/LSFOutputParser.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/LSFOutputParser.java
@@ -57,6 +57,7 @@ public class LSFOutputParser implements OutputParser {
@Override
public void parseJobStatuses(String userName, Map<String, JobStatus> statusMap, String rawOutput) throws SSHApiException {
logger.debug(rawOutput);
+
String[] info = rawOutput.split("\n");
// int lastStop = 0;
for (String jobID : statusMap.keySet()) {
http://git-wip-us.apache.org/repos/asf/airavata/blob/5ff650f4/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSJobConfiguration.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSJobConfiguration.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSJobConfiguration.java
index 18ea772..e935dfb 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSJobConfiguration.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSJobConfiguration.java
@@ -95,4 +95,19 @@ public class PBSJobConfiguration implements JobManagerConfiguration {
public RawCommandInfo getUserBasedMonitorCommand(String userName) {
return new RawCommandInfo(this.installedPath + "qstat -u " + userName);
}
+
+ @Override
+ public String getBaseCancelCommand() {
+ return "qdel";
+ }
+
+ @Override
+ public String getBaseMonitorCommand() {
+ return "qstat";
+ }
+
+ @Override
+ public String getBaseSubmitCommand() {
+ return "qsub ";
+ }
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5ff650f4/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SlurmJobConfiguration.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SlurmJobConfiguration.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SlurmJobConfiguration.java
index 0b774ed..807ac42 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SlurmJobConfiguration.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SlurmJobConfiguration.java
@@ -94,4 +94,19 @@ public class SlurmJobConfiguration implements JobManagerConfiguration{
public RawCommandInfo getUserBasedMonitorCommand(String userName) {
return new RawCommandInfo(this.installedPath + "squeue -u " + userName);
}
+
+ @Override
+ public String getBaseCancelCommand() {
+ return "scancel";
+ }
+
+ @Override
+ public String getBaseMonitorCommand() {
+ return "squeue";
+ }
+
+ @Override
+ public String getBaseSubmitCommand() {
+ return "sbatch";
+ }
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5ff650f4/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
index dd7f2d9..0420cff 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
@@ -241,7 +241,7 @@ public class GSISSHAbstractCluster implements Cluster {
StandardOutReader stdOutReader = new StandardOutReader();
CommandExecutor.executeCommand(rawCommandInfo, this.getSession(), stdOutReader);
- String outputifAvailable = getOutputifAvailable(stdOutReader, "Error reading output of job submission",rawCommandInfo.getBaseCommand(jobManagerConfiguration.getInstalledPath()));
+ String outputifAvailable = getOutputifAvailable(stdOutReader, "Error reading output of job submission",jobManagerConfiguration.getBaseCancelCommand());
// this might not be the case for all teh resources, if so Cluster implementation can override this method
// because here after cancelling we try to get the job description and return it back
try {
@@ -274,7 +274,7 @@ public class GSISSHAbstractCluster implements Cluster {
//Check whether pbs submission is successful or not, if it failed throw and exception in submitJob method
// with the error thrown in qsub command
//
- String outputifAvailable = getOutputifAvailable(standardOutReader,"Error reading output of job submission",rawCommandInfo.getBaseCommand(jobManagerConfiguration.getInstalledPath()));
+ String outputifAvailable = getOutputifAvailable(standardOutReader,"Error reading output of job submission",jobManagerConfiguration.getBaseSubmitCommand());
OutputParser outputParser = jobManagerConfiguration.getParser();
return outputParser.parseJobSubmission(outputifAvailable);
}
@@ -411,7 +411,7 @@ public class GSISSHAbstractCluster implements Cluster {
RawCommandInfo rawCommandInfo = jobManagerConfiguration.getMonitorCommand(jobID);
StandardOutReader stdOutReader = new StandardOutReader();
CommandExecutor.executeCommand(rawCommandInfo, this.getSession(), stdOutReader);
- String result = getOutputifAvailable(stdOutReader, "Error getting job information from the resource !",rawCommandInfo.getBaseCommand(jobManagerConfiguration.getInstalledPath()));
+ String result = getOutputifAvailable(stdOutReader, "Error getting job information from the resource !",jobManagerConfiguration.getBaseMonitorCommand());
JobDescriptor jobDescriptor = new JobDescriptor();
jobManagerConfiguration.getParser().parseSingleJob(jobDescriptor, result);
return jobDescriptor;
@@ -421,7 +421,7 @@ public class GSISSHAbstractCluster implements Cluster {
RawCommandInfo rawCommandInfo = jobManagerConfiguration.getMonitorCommand(jobID);
StandardOutReader stdOutReader = new StandardOutReader();
CommandExecutor.executeCommand(rawCommandInfo, this.getSession(), stdOutReader);
- String result = getOutputifAvailable(stdOutReader, "Error getting job information from the resource !", rawCommandInfo.getBaseCommand(jobManagerConfiguration.getInstalledPath()));
+ String result = getOutputifAvailable(stdOutReader, "Error getting job information from the resource !", jobManagerConfiguration.getBaseMonitorCommand());
return jobManagerConfiguration.getParser().parseJobStatus(jobID, result);
}
@@ -638,7 +638,7 @@ public class GSISSHAbstractCluster implements Cluster {
}
}
}
- String result = getOutputifAvailable(stdOutReader, "Error getting job information from the resource !", rawCommandInfo.getBaseCommand(jobManagerConfiguration.getInstalledPath()));
+ String result = getOutputifAvailable(stdOutReader, "Error getting job information from the resource !", jobManagerConfiguration.getBaseMonitorCommand());
jobManagerConfiguration.getParser().parseJobStatuses(userName, jobIDs, result);
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5ff650f4/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/RawCommandInfo.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/RawCommandInfo.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/RawCommandInfo.java
index ac88fe7..0e9d16e 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/RawCommandInfo.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/RawCommandInfo.java
@@ -48,13 +48,7 @@ public class RawCommandInfo implements CommandInfo {
public String getRawCommand() {
return rawCommand;
}
- /*
- * To get command without the path and other parameters. This is required to read errors
- */
- public String getBaseCommand(String installPath) {
- return rawCommand.substring(rawCommand.lastIndexOf(installPath)+1, rawCommand.indexOf(" "));
- }
-
+
public void setRawCommand(String rawCommand) {
this.rawCommand = rawCommand;
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5ff650f4/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java b/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
index 5a12723..0ca7546 100644
--- a/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
+++ b/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
@@ -26,6 +26,7 @@ import org.apache.airavata.gsi.ssh.api.*;
import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
import org.apache.airavata.gsi.ssh.config.ConfigReader;
+import org.apache.airavata.gsi.ssh.impl.authentication.DefaultPasswordAuthenticationInfo;
import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
import org.apache.airavata.gsi.ssh.util.CommonUtils;
import org.slf4j.Logger;
@@ -49,17 +50,13 @@ public class DefaultSSHApiTestWithMyProxyAuth {
public static void main(String[]ars){
- String myProxyUserName = "ogce";
- String myProxyPassword = "OGCE@xsede14";
- String certificateLocation = "/Users/raminder/.globus/certificates";
+ String myProxyUserName = "lg11w";
-
- GSIAuthenticationInfo authenticationInfo
- = new MyProxyAuthenticationInfo(myProxyUserName, myProxyPassword, "myproxy.teragrid.org",
- 7512, 17280000, certificateLocation);
+ DefaultPasswordAuthenticationInfo authenticationInfo
+ = new DefaultPasswordAuthenticationInfo("");
// Create command
- CommandInfo commandInfo = new RawCommandInfo("/bin/ls");
+ CommandInfo commandInfo = new RawCommandInfo("source /etc/bashrc; bsub </home/lg11w/mywork/sshEchoExperiment_9d267072-ca65-4ca8-847a-cd3d130f6050/366787899.lsf");
// Server info
//Stampede
@@ -68,7 +65,7 @@ public class DefaultSSHApiTestWithMyProxyAuth {
// ServerInfo serverInfo = new ServerInfo(myProxyUserName, "trestles.sdsc.xsede.org", 22);
//Lonestar
- ServerInfo serverInfo = new ServerInfo(myProxyUserName, "lonestar.tacc.utexas.edu", 22);
+ ServerInfo serverInfo = new ServerInfo(myProxyUserName, "ghpcc06.umassrc.org", 22);
// Output
CommandOutput commandOutput = new SystemCommandOutput();
[30/50] [abbrv] airavata git commit: Fixed AIRAVATA-1597
Posted by sh...@apache.org.
Fixed AIRAVATA-1597
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/10c5abfd
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/10c5abfd
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/10c5abfd
Branch: refs/heads/new-workflow-design
Commit: 10c5abfdb478c57ba77e0dacdc1b02bec5ff8ed6
Parents: b746118
Author: raminder <ra...@apache.org>
Authored: Tue Mar 10 23:28:34 2015 -0400
Committer: raminder <ra...@apache.org>
Committed: Tue Mar 10 23:28:34 2015 -0400
----------------------------------------------------------------------
.../client/samples/CreateLaunchExperiment.java | 569 +++++--------------
1 file changed, 146 insertions(+), 423 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/10c5abfd/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
index 6110f53..bb914fa 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
@@ -293,36 +293,18 @@ public class CreateLaunchExperiment {
public static String createEchoExperimentForFSD(Airavata.Client client) throws TException {
try {
- List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>();
- InputDataObjectType input = new InputDataObjectType();
- input.setName("Input_to_Echo");
- input.setType(DataType.STRING);
- input.setValue("Hello World");
-
-
- InputDataObjectType i2 = new InputDataObjectType();
- i2.setName("Input_to_Echo2");
- i2.setType(DataType.URI);
- i2.setValue("http://www.textfiles.com/100/ad.txt");
-
- InputDataObjectType i3 = new InputDataObjectType();
- i3.setName("Input_to_Echo3");
- i3.setType(DataType.URI);
- i3.setValue("file:///tmp/test.txt");
-
- exInputs.add(input);
- exInputs.add(i2);
- exInputs.add(i3);
+ List<InputDataObjectType> exInputs = client.getApplicationInputs(echoAppId);
+ for (InputDataObjectType inputDataObjectType : exInputs) {
+ if (inputDataObjectType.getName().equalsIgnoreCase("Input_to_Echo")) {
+ inputDataObjectType.setValue("Hello World");
+ }else if (inputDataObjectType.getName().equalsIgnoreCase("Input_to_Echo2")) {
+ inputDataObjectType.setValue("http://www.textfiles.com/100/ad.txt");
+ }else if (inputDataObjectType.getName().equalsIgnoreCase("Input_to_Echo3")) {
+ inputDataObjectType.setValue("file:///tmp/test.txt");
+ }
+ }
+ List<OutputDataObjectType> exOut = client.getApplicationOutputs(echoAppId);
- List<OutputDataObjectType> exOut = new ArrayList<OutputDataObjectType>();
-
- OutputDataObjectType output = new OutputDataObjectType();
- output.setName("Echoed_Output");
- output.setType(DataType.STRING);
- output.setValue("test.txt");
- exOut.add(output);
-
-
Experiment simpleExperiment =
ExperimentModelUtil.createSimpleExperiment("default", "admin", "echoExperiment", "SimpleEcho2", echoAppId, exInputs);
simpleExperiment.setExperimentOutputs(exOut);
@@ -369,24 +351,18 @@ public class CreateLaunchExperiment {
public static String createMPIExperimentForFSD(Airavata.Client client) throws TException {
try {
-
- List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>();
- InputDataObjectType input = new InputDataObjectType();
- input.setName("Sample_Input");
- input.setType(DataType.STRING);
- input.setValue("");
- exInputs.add(input);
-
- List<OutputDataObjectType> exOut = new ArrayList<OutputDataObjectType>();
- OutputDataObjectType output = new OutputDataObjectType();
- output.setName("Sample_Output");
- output.setType(DataType.STRING);
- output.setValue("");
- exOut.add(output);
-
+ List<InputDataObjectType> exInputs = client.getApplicationInputs(mpiAppId);
+ for (InputDataObjectType inputDataObjectType : exInputs) {
+ if (inputDataObjectType.getName().equalsIgnoreCase("Sample_Input")) {
+ inputDataObjectType.setValue("");
+ }
+ }
+ List<OutputDataObjectType> exOut = client.getApplicationOutputs(mpiAppId);
+
+
Experiment simpleExperiment =
ExperimentModelUtil.createSimpleExperiment("default", "admin", "mpiExperiment", "HelloMPI", mpiAppId, null);
-// simpleExperiment.setExperimentOutputs(exOut);
+ simpleExperiment.setExperimentOutputs(exOut);
@@ -432,43 +408,10 @@ public class CreateLaunchExperiment {
public static String createExperimentWRFStampede(Airavata.Client client) throws TException {
try {
- List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>();
- InputDataObjectType input = new InputDataObjectType();
- input.setName("Config_Namelist_File");
- input.setType(DataType.URI);
- input.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/WRF_FILES/namelist.input");
-
- InputDataObjectType input1 = new InputDataObjectType();
- input1.setName("WRF_Initial_Conditions");
- input1.setType(DataType.URI);
- input1.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/WRF_FILES/wrfinput_d01");
-
- InputDataObjectType input2 = new InputDataObjectType();
- input2.setName("WRF_Boundary_File");
- input2.setType(DataType.URI);
- input2.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/WRF_FILES/wrfbdy_d01");
-
- exInputs.add(input);
- exInputs.add(input1);
- exInputs.add(input2);
-
-
- List<OutputDataObjectType> exOut = new ArrayList<OutputDataObjectType>();
- OutputDataObjectType output = new OutputDataObjectType();
- output.setName("WRF_Output");
- output.setType(DataType.URI);
- output.setValue("");
-
- OutputDataObjectType output1 = new OutputDataObjectType();
- output1.setName("WRF_Execution_Log");
- output1.setType(DataType.URI);
- output1.setValue("");
-
-
- exOut.add(output);
- exOut.add(output1);
-
-
+ List<InputDataObjectType> exInputs = client.getApplicationInputs(wrfAppId);
+ setWRFInputs(exInputs);
+ List<OutputDataObjectType> exOut = client.getApplicationOutputs(wrfAppId);
+
Experiment simpleExperiment =
ExperimentModelUtil.createSimpleExperiment("default", "admin", "WRFExperiment", "Testing", wrfAppId, exInputs);
simpleExperiment.setExperimentOutputs(exOut);
@@ -505,57 +448,26 @@ public class CreateLaunchExperiment {
}
- public static String createExperimentGROMACSStampede(Airavata.Client client) throws TException {
- try {
- List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>();
- InputDataObjectType input = new InputDataObjectType();
- input.setName("GROMOS_Coordinate_File");
- input.setType(DataType.URI);
- input.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/GROMMACS_FILES/pdb1y6l-EM-vacuum.gro");
-
- InputDataObjectType input1 = new InputDataObjectType();
- input1.setName("Portable_Input_Binary_File");
- input1.setType(DataType.URI);
- input1.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/GROMMACS_FILES/pdb1y6l-EM-vacuum.tpr");
-
- exInputs.add(input);
- exInputs.add(input1);
-
-
- List<OutputDataObjectType> exOut = new ArrayList<OutputDataObjectType>();
- OutputDataObjectType output = new OutputDataObjectType();
- output.setName("pdb1y6l-EM-vacuum.tpr.trr");
- output.setType(DataType.URI);
- output.setValue("");
-
- OutputDataObjectType output1 = new OutputDataObjectType();
- output1.setName("pdb1y6l-EM-vacuum.tpr.edr");
- output1.setType(DataType.URI);
- output1.setValue("");
-
- OutputDataObjectType output2 = new OutputDataObjectType();
- output2.setName("pdb1y6l-EM-vacuum.tpr.log");
- output2.setType(DataType.URI);
- output2.setValue("");
-
- OutputDataObjectType output3 = new OutputDataObjectType();
- output3.setName("pdb1y6l-EM-vacuum.gro");
- output3.setType(DataType.URI);
- output3.setValue("");
-
- OutputDataObjectType output4 = new OutputDataObjectType();
- output4.setName("GROMACS.oJobID");
- output4.setType(DataType.URI);
- output4.setValue("");
-
-
- exOut.add(output);
- exOut.add(output1);
- exOut.add(output2);
- exOut.add(output3);
- exOut.add(output4);
+ private static void setWRFInputs(List<InputDataObjectType> exInputs) {
+ for (InputDataObjectType inputDataObjectType : exInputs) {
+ if (inputDataObjectType.getName().equalsIgnoreCase("Config_Namelist_File")) {
+ inputDataObjectType.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/WRF_FILES/namelist.input");
+ }else if (inputDataObjectType.getName().equalsIgnoreCase("WRF_Initial_Conditions")) {
+ inputDataObjectType.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/WRF_FILES/wrfinput_d01");
+ }else if (inputDataObjectType.getName().equalsIgnoreCase("WRF_Boundary_File")) {
+ inputDataObjectType.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/WRF_FILES/wrfbdy_d01");
+ }
+ }
+ }
+ public static String createExperimentGROMACSStampede(Airavata.Client client) throws TException {
+ try {
+
+ List<InputDataObjectType> exInputs = client.getApplicationInputs(gromacsAppId);
+ setGROMACSInputs(exInputs);
+ List<OutputDataObjectType> exOut = client.getApplicationOutputs(gromacsAppId);
+
Experiment simpleExperiment =
ExperimentModelUtil.createSimpleExperiment("default", "admin", "GromacsExperiment", "Testing", gromacsAppId, exInputs);
simpleExperiment.setExperimentOutputs(exOut);
@@ -591,69 +503,21 @@ public class CreateLaunchExperiment {
return null;
}
+ private static void setGROMACSInputs(List<InputDataObjectType> exInputs) {
+ for (InputDataObjectType inputDataObjectType : exInputs) {
+ if (inputDataObjectType.getName().equalsIgnoreCase("GROMOS_Coordinate_File")) {
+ inputDataObjectType.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/GROMMACS_FILES/pdb1y6l-EM-vacuum.gro");
+ }else if (inputDataObjectType.getName().equalsIgnoreCase("Portable_Input_Binary_File")) {
+ inputDataObjectType.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/GROMMACS_FILES/pdb1y6l-EM-vacuum.tpr");
+ }
+ }
+ }
public static String createExperimentESPRESSOStampede(Airavata.Client client) throws TException {
try {
- List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>();
- InputDataObjectType input = new InputDataObjectType();
- input.setName("AI_Pseudopotential_File");
- input.setType(DataType.URI);
- input.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/ESPRESSO_FILES/Al.sample.in");
-
- InputDataObjectType input1 = new InputDataObjectType();
- input1.setName("AI_Primitive_Cell");
- input1.setType(DataType.URI);
- input1.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/ESPRESSO_FILES/Al.pz-vbc.UPF");
-
- exInputs.add(input);
- exInputs.add(input1);
-
-
- List<OutputDataObjectType> exOut = new ArrayList<OutputDataObjectType>();
- OutputDataObjectType output = new OutputDataObjectType();
- output.setName("ESPRESSO_Execution_Log");
- output.setType(DataType.URI);
- output.setValue("");
-
- OutputDataObjectType output1 = new OutputDataObjectType();
- output1.setName("ESPRESSO_WFC_Binary_file");
- output1.setType(DataType.URI);
- output1.setValue("");
-
- OutputDataObjectType output2 = new OutputDataObjectType();
- output2.setName("Al_exc3.wfc1");
- output2.setType(DataType.URI);
- output2.setValue("");
-
- OutputDataObjectType output3 = new OutputDataObjectType();
- output3.setName("Al_exc3.wfc2");
- output3.setType(DataType.URI);
- output3.setValue("");
-
- OutputDataObjectType output4 = new OutputDataObjectType();
- output4.setName("Al_exc3.wfc3");
- output4.setType(DataType.URI);
- output4.setValue("");
-
- OutputDataObjectType output5 = new OutputDataObjectType();
- output5.setName("Al_exc3.wfc4");
- output5.setType(DataType.URI);
- output5.setValue("");
-
- OutputDataObjectType output6 = new OutputDataObjectType();
- output6.setName("ESPRESSO.oJobID");
- output6.setType(DataType.URI);
- output6.setValue("");
-
-
- exOut.add(output);
- exOut.add(output1);
- exOut.add(output2);
- exOut.add(output3);
- exOut.add(output4);
- exOut.add(output5);
- exOut.add(output6);
-
-
+ List<InputDataObjectType> exInputs = client.getApplicationInputs(espressoAppId);
+ setESPRESSOInputs(exInputs);
+ List<OutputDataObjectType> exOut = client.getApplicationOutputs(espressoAppId);
+
Experiment simpleExperiment =
ExperimentModelUtil.createSimpleExperiment("default", "admin", "EspressoExperiment", "Testing", espressoAppId, exInputs);
simpleExperiment.setExperimentOutputs(exOut);
@@ -688,45 +552,22 @@ public class CreateLaunchExperiment {
}
return null;
}
+ private static void setESPRESSOInputs(List<InputDataObjectType> exInputs) {
+ for (InputDataObjectType inputDataObjectType : exInputs) {
+ if (inputDataObjectType.getName().equalsIgnoreCase("AI_Pseudopotential_File")) {
+ inputDataObjectType.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/ESPRESSO_FILES/Al.sample.in");
+ }else if (inputDataObjectType.getName().equalsIgnoreCase("AI_Primitive_Cell")) {
+ inputDataObjectType.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/ESPRESSO_FILES/Al.pz-vbc.UPF");
+ }
+ }
+}
public static String createExperimentTRINITYStampede(Airavata.Client client) throws TException {
try {
- List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>();
- InputDataObjectType input = new InputDataObjectType();
- input.setName("RNA_Seq_Left_Input");
- input.setType(DataType.URI);
- input.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/TRINITY_FILES/reads.left.fq");
-
- InputDataObjectType input1 = new InputDataObjectType();
- input1.setName("RNA_Seq_Right_Input");
- input1.setType(DataType.URI);
- input1.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/TRINITY_FILES/reads.right.fq");
-
- exInputs.add(input);
- exInputs.add(input1);
-
-
- List<OutputDataObjectType> exOut = new ArrayList<OutputDataObjectType>();
- OutputDataObjectType output = new OutputDataObjectType();
- output.setName("Trinity_Execution_Log");
- output.setType(DataType.URI);
- output.setValue("");
-
- OutputDataObjectType output1 = new OutputDataObjectType();
- output1.setName("Trinity_FASTA_File");
- output1.setType(DataType.URI);
- output1.setValue("");
-
- OutputDataObjectType output2 = new OutputDataObjectType();
- output2.setName("Trinity.oJobID");
- output2.setType(DataType.URI);
- output2.setValue("");
-
-
- exOut.add(output);
- exOut.add(output1);
- exOut.add(output2);
-
+ List<InputDataObjectType> exInputs = client.getApplicationInputs(trinityAppId);
+ setTRINITYInputs(exInputs);
+ List<OutputDataObjectType> exOut = client.getApplicationOutputs(trinityAppId);
+
Experiment simpleExperiment =
ExperimentModelUtil.createSimpleExperiment("default", "admin", "TrinityExperiment", "Testing", trinityAppId, exInputs);
simpleExperiment.setExperimentOutputs(exOut);
@@ -761,31 +602,21 @@ public class CreateLaunchExperiment {
}
return null;
}
-
+ private static void setTRINITYInputs(List<InputDataObjectType> exInputs) {
+ for (InputDataObjectType inputDataObjectType : exInputs) {
+ if (inputDataObjectType.getName().equalsIgnoreCase("RNA_Seq_Left_Input")) {
+ inputDataObjectType.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/TRINITY_FILES/reads.left.fq");
+ }else if (inputDataObjectType.getName().equalsIgnoreCase("RNA_Seq_Right_Input")) {
+ inputDataObjectType.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/TRINITY_FILES/reads.right.fq");
+ }
+ }
+ }
public static String createExperimentLAMMPSStampede(Airavata.Client client) throws TException {
try {
- List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>();
- InputDataObjectType input = new InputDataObjectType();
- input.setName("Friction_Simulation_Input");
- input.setType(DataType.URI);
- input.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/LAMMPS_FILES/in.friction");
-
- exInputs.add(input);
-
- List<OutputDataObjectType> exOut = new ArrayList<OutputDataObjectType>();
- OutputDataObjectType output = new OutputDataObjectType();
- output.setName("LAMMPS_Simulation_Log");
- output.setType(DataType.URI);
- output.setValue("");
-
- OutputDataObjectType output1 = new OutputDataObjectType();
- output1.setName("LAMMPS.oJobID");
- output1.setType(DataType.URI);
- output1.setValue("");
-
- exOut.add(output);
- exOut.add(output1);
-
+ List<InputDataObjectType> exInputs = client.getApplicationInputs(lammpsAppId);
+ setLAMMPSInputs(exInputs);
+ List<OutputDataObjectType> exOut = client.getApplicationOutputs(lammpsAppId);
+
Experiment simpleExperiment =
ExperimentModelUtil.createSimpleExperiment("default", "admin", "LAMMPSExperiment", "Testing", lammpsAppId, exInputs);
simpleExperiment.setExperimentOutputs(exOut);
@@ -820,24 +651,18 @@ public class CreateLaunchExperiment {
}
return null;
}
-
+ private static void setLAMMPSInputs(List<InputDataObjectType> exInputs) {
+ for (InputDataObjectType inputDataObjectType : exInputs) {
+ if (inputDataObjectType.getName().equalsIgnoreCase("Friction_Simulation_Input")) {
+ inputDataObjectType.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/LAMMPS_FILES/in.friction");
+ }
+ }
+ }
public static String createExperimentNWCHEMStampede(Airavata.Client client) throws TException {
try {
- List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>();
- InputDataObjectType input = new InputDataObjectType();
- input.setName("Water_Molecule_Input");
- input.setType(DataType.URI);
- input.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/NWCHEM_FILES/water.nw");
-
- exInputs.add(input);
-
- List<OutputDataObjectType> exOut = new ArrayList<OutputDataObjectType>();
- OutputDataObjectType output = new OutputDataObjectType();
- output.setName("NWChem_Execution_Log");
- output.setType(DataType.URI);
- output.setValue("");
-
- exOut.add(output);
+ List<InputDataObjectType> exInputs = client.getApplicationInputs(nwchemAppId);
+ setNWCHEMInputs(exInputs);
+ List<OutputDataObjectType> exOut = client.getApplicationOutputs(nwchemAppId);
Experiment simpleExperiment =
ExperimentModelUtil.createSimpleExperiment("default", "admin", "NWchemExperiment", "Testing", nwchemAppId, exInputs);
@@ -873,96 +698,18 @@ public class CreateLaunchExperiment {
}
return null;
}
+ private static void setNWCHEMInputs(List<InputDataObjectType> exInputs) {
+ for (InputDataObjectType inputDataObjectType : exInputs) {
+ if (inputDataObjectType.getName().equalsIgnoreCase("Water_Molecule_Input")) {
+ inputDataObjectType.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/NWCHEM_FILES/water.nw");
+ }
+ }
+ }
public static String createExperimentAUTODOCKStampede(Airavata.Client client) throws TException {
try {
- List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>();
- InputDataObjectType input = new InputDataObjectType();
- input.setName("AD4_parameters.dat");
- input.setType(DataType.URI);
- input.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/AD4_parameters.dat");
-
- InputDataObjectType input1 = new InputDataObjectType();
- input1.setName("hsg1.A.map");
- input1.setType(DataType.URI);
- input1.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/hsg1.A.map");
-
- InputDataObjectType input2 = new InputDataObjectType();
- input2.setName("hsg1.C.map");
- input2.setType(DataType.URI);
- input2.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/hsg1.C.map");
-
- InputDataObjectType input3 = new InputDataObjectType();
- input3.setName("hsg1.d.map");
- input3.setType(DataType.URI);
- input3.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/hsg1.d.map");
-
- InputDataObjectType input4 = new InputDataObjectType();
- input4.setName("hsg1.e.map");
- input4.setType(DataType.URI);
- input4.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/hsg1.e.map");
-
- InputDataObjectType input5 = new InputDataObjectType();
- input5.setName("hsg1.HD.map");
- input5.setType(DataType.URI);
- input5.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/hsg1.HD.map");
-
- InputDataObjectType input6 = new InputDataObjectType();
- input6.setName("hsg1.maps.fld");
- input6.setType(DataType.URI);
- input6.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/hsg1.maps.fld");
-
- InputDataObjectType input7 = new InputDataObjectType();
- input7.setName("hsg1.NA.map");
- input7.setType(DataType.URI);
- input7.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/hsg1.NA.map");
-
- InputDataObjectType input8 = new InputDataObjectType();
- input8.setName("hsg1.N.map");
- input8.setType(DataType.URI);
- input8.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/hsg1.N.map");
-
- InputDataObjectType input9 = new InputDataObjectType();
- input9.setName("hsg1.OA.map");
- input9.setType(DataType.URI);
- input9.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/hsg1.OA.map");
-
- InputDataObjectType input10 = new InputDataObjectType();
- input10.setName("ind.dpf");
- input10.setType(DataType.URI);
- input10.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/ind.dpf");
-
- InputDataObjectType input11 = new InputDataObjectType();
- input11.setName("ind.pdbqt");
- input11.setType(DataType.URI);
- input11.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/ind.pdbqt");
-
-
- exInputs.add(input);
- exInputs.add(input1);
- exInputs.add(input2);
- exInputs.add(input3);
- exInputs.add(input4);
- exInputs.add(input5);
- exInputs.add(input6);
- exInputs.add(input7);
- exInputs.add(input8);
- exInputs.add(input9);
- exInputs.add(input10);
- exInputs.add(input11);
-
- List<OutputDataObjectType> exOut = new ArrayList<OutputDataObjectType>();
- OutputDataObjectType output = new OutputDataObjectType();
- output.setName("ind.dlg");
- output.setType(DataType.URI);
- output.setValue("");
-
- OutputDataObjectType output1 = new OutputDataObjectType();
- output1.setName("Autodock.oJobID");
- output1.setType(DataType.URI);
- output1.setValue("");
-
- exOut.add(output);
- exOut.add(output1);
+ List<InputDataObjectType> exInputs = client.getApplicationInputs(nwchemAppId);
+ setAUTODOCKInputs(exInputs);
+ List<OutputDataObjectType> exOut = client.getApplicationOutputs(nwchemAppId);
Experiment simpleExperiment =
ExperimentModelUtil.createSimpleExperiment("default", "admin", "AutoDockExperiment", "Testing", autodockAppId, exInputs);
@@ -998,47 +745,43 @@ public class CreateLaunchExperiment {
}
return null;
}
-
+ private static void setAUTODOCKInputs(List<InputDataObjectType> exInputs) {
+
+ for (InputDataObjectType inputDataObjectType : exInputs) {
+ if (inputDataObjectType.getName().equalsIgnoreCase("AD4_parameters.dat")) {
+ inputDataObjectType.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/AD4_parameters.dat");
+ } else if (inputDataObjectType.getName().equalsIgnoreCase("hsg1.A.map")) {
+ inputDataObjectType.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/hsg1.A.map");
+ } else if (inputDataObjectType.getName().equalsIgnoreCase("hsg1.C.map")) {
+ inputDataObjectType.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/hsg1.C.map");
+ } else if (inputDataObjectType.getName().equalsIgnoreCase("hsg1.d.map")) {
+ inputDataObjectType.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/hsg1.d.map");
+ } else if (inputDataObjectType.getName().equalsIgnoreCase("hsg1.e.map")) {
+ inputDataObjectType.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/hsg1.e.map");
+ } else if (inputDataObjectType.getName().equalsIgnoreCase("hsg1.HD.map")) {
+ inputDataObjectType.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/hsg1.HD.map");
+ } else if (inputDataObjectType.getName().equalsIgnoreCase("hsg1.maps.fld")) {
+ inputDataObjectType.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/hsg1.maps.fld");
+ } else if (inputDataObjectType.getName().equalsIgnoreCase("hsg1.NA.map")) {
+ inputDataObjectType.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/hsg1.NA.map");
+ } else if (inputDataObjectType.getName().equalsIgnoreCase("hsg1.N.map")) {
+ inputDataObjectType.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/hsg1.N.map");
+ } else if (inputDataObjectType.getName().equalsIgnoreCase("hsg1.OA.map")) {
+ inputDataObjectType.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/hsg1.OA.map");
+ } else if (inputDataObjectType.getName().equalsIgnoreCase("ind.dpf")) {
+ inputDataObjectType.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/ind.dpf");
+ } else if (inputDataObjectType.getName().equalsIgnoreCase("ind.pdbqt")) {
+ inputDataObjectType.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AUTODOCK_FILES/ind.pdbqt");
+ }
+ }
+ }
public static String createExperimentWRFTrestles(Airavata.Client client) throws TException {
try {
- List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>();
- InputDataObjectType input = new InputDataObjectType();
- input.setName("WRF_Namelist");
- input.setType(DataType.URI);
- input.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/WRF_FILES/namelist.input");
-
- InputDataObjectType input1 = new InputDataObjectType();
- input1.setName("WRF_Input_File");
- input1.setType(DataType.URI);
- input1.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/WRF_FILES/wrfinput_d01");
-
- InputDataObjectType input2 = new InputDataObjectType();
- input2.setName("WRF_Boundary_File");
- input2.setType(DataType.URI);
- input2.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/WRF_FILES/wrfbdy_d01");
-
- exInputs.add(input);
- exInputs.add(input1);
- exInputs.add(input2);
-
-
- List<OutputDataObjectType> exOut = new ArrayList<OutputDataObjectType>();
- OutputDataObjectType output = new OutputDataObjectType();
- output.setName("WRF_Output");
- output.setType(DataType.URI);
- output.setValue("");
-
- OutputDataObjectType output1 = new OutputDataObjectType();
- output1.setName("WRF_Execution_Log");
- output1.setType(DataType.URI);
- output1.setValue("");
-
-
- exOut.add(output);
- exOut.add(output1);
-
-
- Experiment simpleExperiment =
+ List<InputDataObjectType> exInputs = client.getApplicationInputs(wrfAppId);
+ setWRFInputs(exInputs);
+ List<OutputDataObjectType> exOut = client.getApplicationOutputs(wrfAppId);
+
+ Experiment simpleExperiment =
ExperimentModelUtil.createSimpleExperiment("default", "admin", "WRFExperiment", "Testing", wrfAppId, exInputs);
simpleExperiment.setExperimentOutputs(exOut);
@@ -1315,19 +1058,14 @@ public class CreateLaunchExperiment {
public static String createExperimentForBR2(Airavata.Client client) throws TException {
try {
- List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>();
- InputDataObjectType input = new InputDataObjectType();
- input.setName("Input_to_Echo");
- input.setType(DataType.STRING);
- input.setValue("Echoed_Output=Hello World");
- exInputs.add(input);
+ List<InputDataObjectType> exInputs = client.getApplicationInputs(echoAppId);
+ for (InputDataObjectType inputDataObjectType : exInputs) {
+ if (inputDataObjectType.getName().equalsIgnoreCase("Input_to_Echo")) {
+ inputDataObjectType.setValue("Hello World");
+ }
+ }
+ List<OutputDataObjectType> exOut = client.getApplicationOutputs(echoAppId);
- List<OutputDataObjectType> exOut = new ArrayList<OutputDataObjectType>();
- OutputDataObjectType output = new OutputDataObjectType();
- output.setName("Echoed_Output");
- output.setType(DataType.STRING);
- output.setValue("");
- exOut.add(output);
Project project = ProjectModelUtil.createProject("default", "lahiru", "test project");
String projectId = client.createProject(DEFAULT_GATEWAY, project);
@@ -1374,24 +1112,9 @@ public class CreateLaunchExperiment {
for (InputDataObjectType inputDataObjectType : exInputs) {
inputDataObjectType.setValue("Hello World");
}
- /*List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>();
- InputDataObjectType input = new InputDataObjectType();
- input.setName("Input_to_Echo");
- input.setType(DataType.STRING);
- input.setValue("Echoed_Output=Hello World");
- input.setRequiredToAddedToCommandLine(true);
- exInputs.add(input);*/
-
+
List<OutputDataObjectType> exOut = client.getApplicationOutputs(echoAppId);
- /*
- List<OutputDataObjectType> exOut = new ArrayList<OutputDataObjectType>();
- OutputDataObjectType output = new OutputDataObjectType();
- output.setName("output_file");
- output.setType(DataType.URI);
- output.setValue("");
-
- exOut.add(output);*/
-
+
Project project = ProjectModelUtil.createProject("default", "lg11w", "test project");
String projectId = client.createProject(DEFAULT_GATEWAY, project);
[42/50] [abbrv] airavata git commit: moved userdn part to the more
dynamic userconfiguration model
Posted by sh...@apache.org.
moved userdn part to the more dynamic userconfiguration model
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/a4fb4891
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/a4fb4891
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/a4fb4891
Branch: refs/heads/new-workflow-design
Commit: a4fb48915283c93af7d4a19076a6d81fec597f64
Parents: 73858d1
Author: msmemon <sh...@gmail.com>
Authored: Sun Mar 15 16:29:27 2015 +0100
Committer: msmemon <sh...@gmail.com>
Committed: Sun Mar 15 16:29:27 2015 +0100
----------------------------------------------------------------------
.../lib/airavata/computeResourceModel_types.cpp | 203 +++++++----------
.../lib/airavata/computeResourceModel_types.h | 38 +---
.../lib/airavata/experimentModel_types.cpp | 36 ++-
.../lib/airavata/experimentModel_types.h | 34 ++-
.../Model/AppCatalog/ComputeResource/Types.php | 49 -----
.../Model/Workspace/Experiment/Types.php | 40 ++++
.../computeresource/UnicoreJobSubmission.java | 220 +------------------
.../experiment/UserConfigurationData.java | 205 ++++++++++++++++-
.../computeResourceModel.thrift | 19 --
.../experimentModel.thrift | 8 +-
.../catalog/data/impl/ComputeResourceImpl.java | 1 -
.../data/model/UnicoreJobSubmission.java | 13 --
.../data/resources/AbstractResource.java | 2 +-
.../resources/UnicoreJobSubmissionResource.java | 27 +--
.../catalog/data/util/AppCatalogJPAUtils.java | 1 -
.../data/util/AppCatalogThriftConversion.java | 2 -
.../src/main/resources/appcatalog-derby.sql | 1 -
.../src/main/resources/appcatalog-mysql.sql | 1 -
.../gfac/bes/provider/impl/BESProvider.java | 10 +-
19 files changed, 403 insertions(+), 507 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4fb4891/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
index 4d52172..d54c519 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
@@ -137,16 +137,6 @@ const char* _kDataMovementProtocolNames[] = {
};
const std::map<int, const char*> _DataMovementProtocol_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kDataMovementProtocolValues, _kDataMovementProtocolNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
-int _kAuthenticationModeValues[] = {
- AuthenticationMode::SERVER_ISSUED,
- AuthenticationMode::MYPROXY_ISSUED
-};
-const char* _kAuthenticationModeNames[] = {
- "SERVER_ISSUED",
- "MYPROXY_ISSUED"
-};
-const std::map<int, const char*> _AuthenticationMode_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kAuthenticationModeValues, _kAuthenticationModeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
-
int _kProviderNameValues[] = {
ProviderName::EC2,
ProviderName::AWSEC2,
@@ -1190,8 +1180,8 @@ void swap(GlobusJobSubmission &a, GlobusJobSubmission &b) {
swap(a.__isset, b.__isset);
}
-const char* UnicoreJobSubmission::ascii_fingerprint = "06B870319715692996F28828C4AF836C";
-const uint8_t UnicoreJobSubmission::binary_fingerprint[16] = {0x06,0xB8,0x70,0x31,0x97,0x15,0x69,0x29,0x96,0xF2,0x88,0x28,0xC4,0xAF,0x83,0x6C};
+const char* UnicoreJobSubmission::ascii_fingerprint = "D9F4CFE2F293A8B1052FD3031DD2C847";
+const uint8_t UnicoreJobSubmission::binary_fingerprint[16] = {0xD9,0xF4,0xCF,0xE2,0xF2,0x93,0xA8,0xB1,0x05,0x2F,0xD3,0x03,0x1D,0xD2,0xC8,0x47};
uint32_t UnicoreJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
@@ -1207,7 +1197,6 @@ uint32_t UnicoreJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot
bool isset_jobSubmissionInterfaceId = false;
bool isset_securityProtocol = false;
bool isset_unicoreEndPointURL = false;
- bool isset_authenticationMode = false;
while (true)
{
@@ -1243,24 +1232,6 @@ uint32_t UnicoreJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot
xfer += iprot->skip(ftype);
}
break;
- case 4:
- if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast29;
- xfer += iprot->readI32(ecast29);
- this->authenticationMode = (AuthenticationMode::type)ecast29;
- isset_authenticationMode = true;
- } else {
- xfer += iprot->skip(ftype);
- }
- break;
- case 5:
- if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->userDN);
- this->__isset.userDN = true;
- } else {
- xfer += iprot->skip(ftype);
- }
- break;
default:
xfer += iprot->skip(ftype);
break;
@@ -1276,8 +1247,6 @@ uint32_t UnicoreJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_unicoreEndPointURL)
throw TProtocolException(TProtocolException::INVALID_DATA);
- if (!isset_authenticationMode)
- throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
@@ -1297,15 +1266,6 @@ uint32_t UnicoreJobSubmission::write(::apache::thrift::protocol::TProtocol* opro
xfer += oprot->writeString(this->unicoreEndPointURL);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("authenticationMode", ::apache::thrift::protocol::T_I32, 4);
- xfer += oprot->writeI32((int32_t)this->authenticationMode);
- xfer += oprot->writeFieldEnd();
-
- if (this->__isset.userDN) {
- xfer += oprot->writeFieldBegin("userDN", ::apache::thrift::protocol::T_STRING, 5);
- xfer += oprot->writeString(this->userDN);
- xfer += oprot->writeFieldEnd();
- }
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
@@ -1316,9 +1276,6 @@ void swap(UnicoreJobSubmission &a, UnicoreJobSubmission &b) {
swap(a.jobSubmissionInterfaceId, b.jobSubmissionInterfaceId);
swap(a.securityProtocol, b.securityProtocol);
swap(a.unicoreEndPointURL, b.unicoreEndPointURL);
- swap(a.authenticationMode, b.authenticationMode);
- swap(a.userDN, b.userDN);
- swap(a.__isset, b.__isset);
}
const char* CloudJobSubmission::ascii_fingerprint = "F98AE2E6E51F2426504F2566EB71B5CC";
@@ -1360,9 +1317,9 @@ uint32_t CloudJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast30;
- xfer += iprot->readI32(ecast30);
- this->securityProtocol = (SecurityProtocol::type)ecast30;
+ int32_t ecast29;
+ xfer += iprot->readI32(ecast29);
+ this->securityProtocol = (SecurityProtocol::type)ecast29;
isset_securityProtocol = true;
} else {
xfer += iprot->skip(ftype);
@@ -1386,9 +1343,9 @@ uint32_t CloudJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast31;
- xfer += iprot->readI32(ecast31);
- this->providerName = (ProviderName::type)ecast31;
+ int32_t ecast30;
+ xfer += iprot->readI32(ecast30);
+ this->providerName = (ProviderName::type)ecast30;
isset_providerName = true;
} else {
xfer += iprot->skip(ftype);
@@ -1505,9 +1462,9 @@ uint32_t JobSubmissionInterface::read(::apache::thrift::protocol::TProtocol* ipr
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast32;
- xfer += iprot->readI32(ecast32);
- this->jobSubmissionProtocol = (JobSubmissionProtocol::type)ecast32;
+ int32_t ecast31;
+ xfer += iprot->readI32(ecast31);
+ this->jobSubmissionProtocol = (JobSubmissionProtocol::type)ecast31;
isset_jobSubmissionProtocol = true;
} else {
xfer += iprot->skip(ftype);
@@ -1603,9 +1560,9 @@ uint32_t DataMovementInterface::read(::apache::thrift::protocol::TProtocol* ipro
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast33;
- xfer += iprot->readI32(ecast33);
- this->dataMovementProtocol = (DataMovementProtocol::type)ecast33;
+ int32_t ecast32;
+ xfer += iprot->readI32(ecast32);
+ this->dataMovementProtocol = (DataMovementProtocol::type)ecast32;
isset_dataMovementProtocol = true;
} else {
xfer += iprot->skip(ftype);
@@ -1710,14 +1667,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->hostAliases.clear();
- uint32_t _size34;
- ::apache::thrift::protocol::TType _etype37;
- xfer += iprot->readListBegin(_etype37, _size34);
- this->hostAliases.resize(_size34);
- uint32_t _i38;
- for (_i38 = 0; _i38 < _size34; ++_i38)
+ uint32_t _size33;
+ ::apache::thrift::protocol::TType _etype36;
+ xfer += iprot->readListBegin(_etype36, _size33);
+ this->hostAliases.resize(_size33);
+ uint32_t _i37;
+ for (_i37 = 0; _i37 < _size33; ++_i37)
{
- xfer += iprot->readString(this->hostAliases[_i38]);
+ xfer += iprot->readString(this->hostAliases[_i37]);
}
xfer += iprot->readListEnd();
}
@@ -1730,14 +1687,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->ipAddresses.clear();
- uint32_t _size39;
- ::apache::thrift::protocol::TType _etype42;
- xfer += iprot->readListBegin(_etype42, _size39);
- this->ipAddresses.resize(_size39);
- uint32_t _i43;
- for (_i43 = 0; _i43 < _size39; ++_i43)
+ uint32_t _size38;
+ ::apache::thrift::protocol::TType _etype41;
+ xfer += iprot->readListBegin(_etype41, _size38);
+ this->ipAddresses.resize(_size38);
+ uint32_t _i42;
+ for (_i42 = 0; _i42 < _size38; ++_i42)
{
- xfer += iprot->readString(this->ipAddresses[_i43]);
+ xfer += iprot->readString(this->ipAddresses[_i42]);
}
xfer += iprot->readListEnd();
}
@@ -1758,14 +1715,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->batchQueues.clear();
- uint32_t _size44;
- ::apache::thrift::protocol::TType _etype47;
- xfer += iprot->readListBegin(_etype47, _size44);
- this->batchQueues.resize(_size44);
- uint32_t _i48;
- for (_i48 = 0; _i48 < _size44; ++_i48)
+ uint32_t _size43;
+ ::apache::thrift::protocol::TType _etype46;
+ xfer += iprot->readListBegin(_etype46, _size43);
+ this->batchQueues.resize(_size43);
+ uint32_t _i47;
+ for (_i47 = 0; _i47 < _size43; ++_i47)
{
- xfer += this->batchQueues[_i48].read(iprot);
+ xfer += this->batchQueues[_i47].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -1778,19 +1735,19 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->fileSystems.clear();
- uint32_t _size49;
- ::apache::thrift::protocol::TType _ktype50;
- ::apache::thrift::protocol::TType _vtype51;
- xfer += iprot->readMapBegin(_ktype50, _vtype51, _size49);
- uint32_t _i53;
- for (_i53 = 0; _i53 < _size49; ++_i53)
+ uint32_t _size48;
+ ::apache::thrift::protocol::TType _ktype49;
+ ::apache::thrift::protocol::TType _vtype50;
+ xfer += iprot->readMapBegin(_ktype49, _vtype50, _size48);
+ uint32_t _i52;
+ for (_i52 = 0; _i52 < _size48; ++_i52)
{
- FileSystems::type _key54;
- int32_t ecast56;
- xfer += iprot->readI32(ecast56);
- _key54 = (FileSystems::type)ecast56;
- std::string& _val55 = this->fileSystems[_key54];
- xfer += iprot->readString(_val55);
+ FileSystems::type _key53;
+ int32_t ecast55;
+ xfer += iprot->readI32(ecast55);
+ _key53 = (FileSystems::type)ecast55;
+ std::string& _val54 = this->fileSystems[_key53];
+ xfer += iprot->readString(_val54);
}
xfer += iprot->readMapEnd();
}
@@ -1803,14 +1760,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->jobSubmissionInterfaces.clear();
- uint32_t _size57;
- ::apache::thrift::protocol::TType _etype60;
- xfer += iprot->readListBegin(_etype60, _size57);
- this->jobSubmissionInterfaces.resize(_size57);
- uint32_t _i61;
- for (_i61 = 0; _i61 < _size57; ++_i61)
+ uint32_t _size56;
+ ::apache::thrift::protocol::TType _etype59;
+ xfer += iprot->readListBegin(_etype59, _size56);
+ this->jobSubmissionInterfaces.resize(_size56);
+ uint32_t _i60;
+ for (_i60 = 0; _i60 < _size56; ++_i60)
{
- xfer += this->jobSubmissionInterfaces[_i61].read(iprot);
+ xfer += this->jobSubmissionInterfaces[_i60].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -1823,14 +1780,14 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->dataMovementInterfaces.clear();
- uint32_t _size62;
- ::apache::thrift::protocol::TType _etype65;
- xfer += iprot->readListBegin(_etype65, _size62);
- this->dataMovementInterfaces.resize(_size62);
- uint32_t _i66;
- for (_i66 = 0; _i66 < _size62; ++_i66)
+ uint32_t _size61;
+ ::apache::thrift::protocol::TType _etype64;
+ xfer += iprot->readListBegin(_etype64, _size61);
+ this->dataMovementInterfaces.resize(_size61);
+ uint32_t _i65;
+ for (_i65 = 0; _i65 < _size61; ++_i65)
{
- xfer += this->dataMovementInterfaces[_i66].read(iprot);
+ xfer += this->dataMovementInterfaces[_i65].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -1879,10 +1836,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("hostAliases", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->hostAliases.size()));
- std::vector<std::string> ::const_iterator _iter67;
- for (_iter67 = this->hostAliases.begin(); _iter67 != this->hostAliases.end(); ++_iter67)
+ std::vector<std::string> ::const_iterator _iter66;
+ for (_iter66 = this->hostAliases.begin(); _iter66 != this->hostAliases.end(); ++_iter66)
{
- xfer += oprot->writeString((*_iter67));
+ xfer += oprot->writeString((*_iter66));
}
xfer += oprot->writeListEnd();
}
@@ -1892,10 +1849,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("ipAddresses", ::apache::thrift::protocol::T_LIST, 4);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->ipAddresses.size()));
- std::vector<std::string> ::const_iterator _iter68;
- for (_iter68 = this->ipAddresses.begin(); _iter68 != this->ipAddresses.end(); ++_iter68)
+ std::vector<std::string> ::const_iterator _iter67;
+ for (_iter67 = this->ipAddresses.begin(); _iter67 != this->ipAddresses.end(); ++_iter67)
{
- xfer += oprot->writeString((*_iter68));
+ xfer += oprot->writeString((*_iter67));
}
xfer += oprot->writeListEnd();
}
@@ -1910,10 +1867,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("batchQueues", ::apache::thrift::protocol::T_LIST, 6);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->batchQueues.size()));
- std::vector<BatchQueue> ::const_iterator _iter69;
- for (_iter69 = this->batchQueues.begin(); _iter69 != this->batchQueues.end(); ++_iter69)
+ std::vector<BatchQueue> ::const_iterator _iter68;
+ for (_iter68 = this->batchQueues.begin(); _iter68 != this->batchQueues.end(); ++_iter68)
{
- xfer += (*_iter69).write(oprot);
+ xfer += (*_iter68).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -1923,11 +1880,11 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("fileSystems", ::apache::thrift::protocol::T_MAP, 7);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->fileSystems.size()));
- std::map<FileSystems::type, std::string> ::const_iterator _iter70;
- for (_iter70 = this->fileSystems.begin(); _iter70 != this->fileSystems.end(); ++_iter70)
+ std::map<FileSystems::type, std::string> ::const_iterator _iter69;
+ for (_iter69 = this->fileSystems.begin(); _iter69 != this->fileSystems.end(); ++_iter69)
{
- xfer += oprot->writeI32((int32_t)_iter70->first);
- xfer += oprot->writeString(_iter70->second);
+ xfer += oprot->writeI32((int32_t)_iter69->first);
+ xfer += oprot->writeString(_iter69->second);
}
xfer += oprot->writeMapEnd();
}
@@ -1937,10 +1894,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("jobSubmissionInterfaces", ::apache::thrift::protocol::T_LIST, 8);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->jobSubmissionInterfaces.size()));
- std::vector<JobSubmissionInterface> ::const_iterator _iter71;
- for (_iter71 = this->jobSubmissionInterfaces.begin(); _iter71 != this->jobSubmissionInterfaces.end(); ++_iter71)
+ std::vector<JobSubmissionInterface> ::const_iterator _iter70;
+ for (_iter70 = this->jobSubmissionInterfaces.begin(); _iter70 != this->jobSubmissionInterfaces.end(); ++_iter70)
{
- xfer += (*_iter71).write(oprot);
+ xfer += (*_iter70).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -1950,10 +1907,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("dataMovementInterfaces", ::apache::thrift::protocol::T_LIST, 9);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->dataMovementInterfaces.size()));
- std::vector<DataMovementInterface> ::const_iterator _iter72;
- for (_iter72 = this->dataMovementInterfaces.begin(); _iter72 != this->dataMovementInterfaces.end(); ++_iter72)
+ std::vector<DataMovementInterface> ::const_iterator _iter71;
+ for (_iter71 = this->dataMovementInterfaces.begin(); _iter71 != this->dataMovementInterfaces.end(); ++_iter71)
{
- xfer += (*_iter72).write(oprot);
+ xfer += (*_iter71).write(oprot);
}
xfer += oprot->writeListEnd();
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4fb4891/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
index b1b70d5..76037b2 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
@@ -117,15 +117,6 @@ struct DataMovementProtocol {
extern const std::map<int, const char*> _DataMovementProtocol_VALUES_TO_NAMES;
-struct AuthenticationMode {
- enum type {
- SERVER_ISSUED = 0,
- MYPROXY_ISSUED = 1
- };
-};
-
-extern const std::map<int, const char*> _AuthenticationMode_VALUES_TO_NAMES;
-
struct ProviderName {
enum type {
EC2 = 0,
@@ -729,18 +720,14 @@ class GlobusJobSubmission {
void swap(GlobusJobSubmission &a, GlobusJobSubmission &b);
-typedef struct _UnicoreJobSubmission__isset {
- _UnicoreJobSubmission__isset() : userDN(false) {}
- bool userDN;
-} _UnicoreJobSubmission__isset;
class UnicoreJobSubmission {
public:
- static const char* ascii_fingerprint; // = "06B870319715692996F28828C4AF836C";
- static const uint8_t binary_fingerprint[16]; // = {0x06,0xB8,0x70,0x31,0x97,0x15,0x69,0x29,0x96,0xF2,0x88,0x28,0xC4,0xAF,0x83,0x6C};
+ static const char* ascii_fingerprint; // = "D9F4CFE2F293A8B1052FD3031DD2C847";
+ static const uint8_t binary_fingerprint[16]; // = {0xD9,0xF4,0xCF,0xE2,0xF2,0x93,0xA8,0xB1,0x05,0x2F,0xD3,0x03,0x1D,0xD2,0xC8,0x47};
- UnicoreJobSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), unicoreEndPointURL(), authenticationMode((AuthenticationMode::type)0), userDN() {
+ UnicoreJobSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), unicoreEndPointURL() {
}
virtual ~UnicoreJobSubmission() throw() {}
@@ -748,10 +735,6 @@ class UnicoreJobSubmission {
std::string jobSubmissionInterfaceId;
SecurityProtocol::type securityProtocol;
std::string unicoreEndPointURL;
- AuthenticationMode::type authenticationMode;
- std::string userDN;
-
- _UnicoreJobSubmission__isset __isset;
void __set_jobSubmissionInterfaceId(const std::string& val) {
jobSubmissionInterfaceId = val;
@@ -765,15 +748,6 @@ class UnicoreJobSubmission {
unicoreEndPointURL = val;
}
- void __set_authenticationMode(const AuthenticationMode::type val) {
- authenticationMode = val;
- }
-
- void __set_userDN(const std::string& val) {
- userDN = val;
- __isset.userDN = true;
- }
-
bool operator == (const UnicoreJobSubmission & rhs) const
{
if (!(jobSubmissionInterfaceId == rhs.jobSubmissionInterfaceId))
@@ -782,12 +756,6 @@ class UnicoreJobSubmission {
return false;
if (!(unicoreEndPointURL == rhs.unicoreEndPointURL))
return false;
- if (!(authenticationMode == rhs.authenticationMode))
- return false;
- if (__isset.userDN != rhs.__isset.userDN)
- return false;
- else if (__isset.userDN && !(userDN == rhs.userDN))
- return false;
return true;
}
bool operator != (const UnicoreJobSubmission &rhs) const {
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4fb4891/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.cpp
index 2f1d21b..fe7890f 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.cpp
@@ -1195,8 +1195,8 @@ void swap(QualityOfServiceParams &a, QualityOfServiceParams &b) {
swap(a.__isset, b.__isset);
}
-const char* UserConfigurationData::ascii_fingerprint = "A39B8E6345C677771D939D170C65720F";
-const uint8_t UserConfigurationData::binary_fingerprint[16] = {0xA3,0x9B,0x8E,0x63,0x45,0xC6,0x77,0x77,0x1D,0x93,0x9D,0x17,0x0C,0x65,0x72,0x0F};
+const char* UserConfigurationData::ascii_fingerprint = "0EA9FCA690C445780E02BCAC89B1D820";
+const uint8_t UserConfigurationData::binary_fingerprint[16] = {0x0E,0xA9,0xFC,0xA6,0x90,0xC4,0x45,0x78,0x0E,0x02,0xBC,0xAC,0x89,0xB1,0xD8,0x20};
uint32_t UserConfigurationData::read(::apache::thrift::protocol::TProtocol* iprot) {
@@ -1284,6 +1284,22 @@ uint32_t UserConfigurationData::read(::apache::thrift::protocol::TProtocol* ipro
xfer += iprot->skip(ftype);
}
break;
+ case 9:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->userDN);
+ this->__isset.userDN = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 10:
+ if (ftype == ::apache::thrift::protocol::T_BOOL) {
+ xfer += iprot->readBool(this->generateCert);
+ this->__isset.generateCert = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
default:
xfer += iprot->skip(ftype);
break;
@@ -1342,6 +1358,16 @@ uint32_t UserConfigurationData::write(::apache::thrift::protocol::TProtocol* opr
xfer += oprot->writeBool(this->throttleResources);
xfer += oprot->writeFieldEnd();
}
+ if (this->__isset.userDN) {
+ xfer += oprot->writeFieldBegin("userDN", ::apache::thrift::protocol::T_STRING, 9);
+ xfer += oprot->writeString(this->userDN);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.generateCert) {
+ xfer += oprot->writeFieldBegin("generateCert", ::apache::thrift::protocol::T_BOOL, 10);
+ xfer += oprot->writeBool(this->generateCert);
+ xfer += oprot->writeFieldEnd();
+ }
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
@@ -1357,6 +1383,8 @@ void swap(UserConfigurationData &a, UserConfigurationData &b) {
swap(a.advanceOutputDataHandling, b.advanceOutputDataHandling);
swap(a.qosParams, b.qosParams);
swap(a.throttleResources, b.throttleResources);
+ swap(a.userDN, b.userDN);
+ swap(a.generateCert, b.generateCert);
swap(a.__isset, b.__isset);
}
@@ -2708,8 +2736,8 @@ void swap(ValidationResults &a, ValidationResults &b) {
swap(a.validationResultList, b.validationResultList);
}
-const char* Experiment::ascii_fingerprint = "C610216A34DE0B4389362B3D5236F6F6";
-const uint8_t Experiment::binary_fingerprint[16] = {0xC6,0x10,0x21,0x6A,0x34,0xDE,0x0B,0x43,0x89,0x36,0x2B,0x3D,0x52,0x36,0xF6,0xF6};
+const char* Experiment::ascii_fingerprint = "AAB7BCD0F1CB7A0198FEF5DB532788A8";
+const uint8_t Experiment::binary_fingerprint[16] = {0xAA,0xB7,0xBC,0xD0,0xF1,0xCB,0x7A,0x01,0x98,0xFE,0xF5,0xDB,0x53,0x27,0x88,0xA8};
uint32_t Experiment::read(::apache::thrift::protocol::TProtocol* iprot) {
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4fb4891/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.h
index 15c0d4c..b09c480 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.h
@@ -855,22 +855,24 @@ class QualityOfServiceParams {
void swap(QualityOfServiceParams &a, QualityOfServiceParams &b);
typedef struct _UserConfigurationData__isset {
- _UserConfigurationData__isset() : shareExperimentPublicly(true), computationalResourceScheduling(false), advanceInputDataHandling(false), advanceOutputDataHandling(false), qosParams(false), throttleResources(true) {}
+ _UserConfigurationData__isset() : shareExperimentPublicly(true), computationalResourceScheduling(false), advanceInputDataHandling(false), advanceOutputDataHandling(false), qosParams(false), throttleResources(true), userDN(false), generateCert(true) {}
bool shareExperimentPublicly;
bool computationalResourceScheduling;
bool advanceInputDataHandling;
bool advanceOutputDataHandling;
bool qosParams;
bool throttleResources;
+ bool userDN;
+ bool generateCert;
} _UserConfigurationData__isset;
class UserConfigurationData {
public:
- static const char* ascii_fingerprint; // = "A39B8E6345C677771D939D170C65720F";
- static const uint8_t binary_fingerprint[16]; // = {0xA3,0x9B,0x8E,0x63,0x45,0xC6,0x77,0x77,0x1D,0x93,0x9D,0x17,0x0C,0x65,0x72,0x0F};
+ static const char* ascii_fingerprint; // = "0EA9FCA690C445780E02BCAC89B1D820";
+ static const uint8_t binary_fingerprint[16]; // = {0x0E,0xA9,0xFC,0xA6,0x90,0xC4,0x45,0x78,0x0E,0x02,0xBC,0xAC,0x89,0xB1,0xD8,0x20};
- UserConfigurationData() : airavataAutoSchedule(false), overrideManualScheduledParams(false), shareExperimentPublicly(false), throttleResources(false) {
+ UserConfigurationData() : airavataAutoSchedule(false), overrideManualScheduledParams(false), shareExperimentPublicly(false), throttleResources(false), userDN(), generateCert(false) {
}
virtual ~UserConfigurationData() throw() {}
@@ -883,6 +885,8 @@ class UserConfigurationData {
AdvancedOutputDataHandling advanceOutputDataHandling;
QualityOfServiceParams qosParams;
bool throttleResources;
+ std::string userDN;
+ bool generateCert;
_UserConfigurationData__isset __isset;
@@ -924,6 +928,16 @@ class UserConfigurationData {
__isset.throttleResources = true;
}
+ void __set_userDN(const std::string& val) {
+ userDN = val;
+ __isset.userDN = true;
+ }
+
+ void __set_generateCert(const bool val) {
+ generateCert = val;
+ __isset.generateCert = true;
+ }
+
bool operator == (const UserConfigurationData & rhs) const
{
if (!(airavataAutoSchedule == rhs.airavataAutoSchedule))
@@ -954,6 +968,14 @@ class UserConfigurationData {
return false;
else if (__isset.throttleResources && !(throttleResources == rhs.throttleResources))
return false;
+ if (__isset.userDN != rhs.__isset.userDN)
+ return false;
+ else if (__isset.userDN && !(userDN == rhs.userDN))
+ return false;
+ if (__isset.generateCert != rhs.__isset.generateCert)
+ return false;
+ else if (__isset.generateCert && !(generateCert == rhs.generateCert))
+ return false;
return true;
}
bool operator != (const UserConfigurationData &rhs) const {
@@ -1747,8 +1769,8 @@ typedef struct _Experiment__isset {
class Experiment {
public:
- static const char* ascii_fingerprint; // = "C610216A34DE0B4389362B3D5236F6F6";
- static const uint8_t binary_fingerprint[16]; // = {0xC6,0x10,0x21,0x6A,0x34,0xDE,0x0B,0x43,0x89,0x36,0x2B,0x3D,0x52,0x36,0xF6,0xF6};
+ static const char* ascii_fingerprint; // = "AAB7BCD0F1CB7A0198FEF5DB532788A8";
+ static const uint8_t binary_fingerprint[16]; // = {0xAA,0xB7,0xBC,0xD0,0xF1,0xCB,0x7A,0x01,0x98,0xFE,0xF5,0xDB,0x53,0x27,0x88,0xA8};
Experiment() : experimentID("DO_NOT_SET_AT_CLIENTS"), projectID("DEFAULT"), creationTime(0), userName(), name(), description(), applicationId(), applicationVersion(), workflowTemplateId(), workflowTemplateVersion(), enableEmailNotification(0), workflowExecutionInstanceId() {
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4fb4891/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
index 9bfced0..2280d94 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
@@ -120,15 +120,6 @@ final class DataMovementProtocol {
);
}
-final class AuthenticationMode {
- const SERVER_ISSUED = 0;
- const MYPROXY_ISSUED = 1;
- static public $__names = array(
- 0 => 'SERVER_ISSUED',
- 1 => 'MYPROXY_ISSUED',
- );
-}
-
final class ProviderName {
const EC2 = 0;
const AWSEC2 = 1;
@@ -1390,8 +1381,6 @@ class UnicoreJobSubmission {
public $jobSubmissionInterfaceId = "DO_NOT_SET_AT_CLIENTS";
public $securityProtocol = null;
public $unicoreEndPointURL = null;
- public $authenticationMode = null;
- public $userDN = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
@@ -1408,14 +1397,6 @@ class UnicoreJobSubmission {
'var' => 'unicoreEndPointURL',
'type' => TType::STRING,
),
- 4 => array(
- 'var' => 'authenticationMode',
- 'type' => TType::I32,
- ),
- 5 => array(
- 'var' => 'userDN',
- 'type' => TType::STRING,
- ),
);
}
if (is_array($vals)) {
@@ -1428,12 +1409,6 @@ class UnicoreJobSubmission {
if (isset($vals['unicoreEndPointURL'])) {
$this->unicoreEndPointURL = $vals['unicoreEndPointURL'];
}
- if (isset($vals['authenticationMode'])) {
- $this->authenticationMode = $vals['authenticationMode'];
- }
- if (isset($vals['userDN'])) {
- $this->userDN = $vals['userDN'];
- }
}
}
@@ -1477,20 +1452,6 @@ class UnicoreJobSubmission {
$xfer += $input->skip($ftype);
}
break;
- case 4:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->authenticationMode);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 5:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->userDN);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
default:
$xfer += $input->skip($ftype);
break;
@@ -1519,16 +1480,6 @@ class UnicoreJobSubmission {
$xfer += $output->writeString($this->unicoreEndPointURL);
$xfer += $output->writeFieldEnd();
}
- if ($this->authenticationMode !== null) {
- $xfer += $output->writeFieldBegin('authenticationMode', TType::I32, 4);
- $xfer += $output->writeI32($this->authenticationMode);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->userDN !== null) {
- $xfer += $output->writeFieldBegin('userDN', TType::STRING, 5);
- $xfer += $output->writeString($this->userDN);
- $xfer += $output->writeFieldEnd();
- }
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4fb4891/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Experiment/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Experiment/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Experiment/Types.php
index ea7aa19..6ad1be0 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Experiment/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Experiment/Types.php
@@ -1387,6 +1387,8 @@ class UserConfigurationData {
public $advanceOutputDataHandling = null;
public $qosParams = null;
public $throttleResources = false;
+ public $userDN = null;
+ public $generateCert = false;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
@@ -1427,6 +1429,14 @@ class UserConfigurationData {
'var' => 'throttleResources',
'type' => TType::BOOL,
),
+ 9 => array(
+ 'var' => 'userDN',
+ 'type' => TType::STRING,
+ ),
+ 10 => array(
+ 'var' => 'generateCert',
+ 'type' => TType::BOOL,
+ ),
);
}
if (is_array($vals)) {
@@ -1454,6 +1464,12 @@ class UserConfigurationData {
if (isset($vals['throttleResources'])) {
$this->throttleResources = $vals['throttleResources'];
}
+ if (isset($vals['userDN'])) {
+ $this->userDN = $vals['userDN'];
+ }
+ if (isset($vals['generateCert'])) {
+ $this->generateCert = $vals['generateCert'];
+ }
}
}
@@ -1536,6 +1552,20 @@ class UserConfigurationData {
$xfer += $input->skip($ftype);
}
break;
+ case 9:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->userDN);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 10:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->generateCert);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
default:
$xfer += $input->skip($ftype);
break;
@@ -1601,6 +1631,16 @@ class UserConfigurationData {
$xfer += $output->writeBool($this->throttleResources);
$xfer += $output->writeFieldEnd();
}
+ if ($this->userDN !== null) {
+ $xfer += $output->writeFieldBegin('userDN', TType::STRING, 9);
+ $xfer += $output->writeString($this->userDN);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->generateCert !== null) {
+ $xfer += $output->writeFieldBegin('generateCert', TType::BOOL, 10);
+ $xfer += $output->writeBool($this->generateCert);
+ $xfer += $output->writeFieldEnd();
+ }
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4fb4891/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/UnicoreJobSubmission.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/UnicoreJobSubmission.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/UnicoreJobSubmission.java
index d65ec86..e1dc2d5 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/UnicoreJobSubmission.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/UnicoreJobSubmission.java
@@ -56,9 +56,6 @@ import org.slf4j.LoggerFactory;
* unicoreGateway End Point. The provider will query this service to fetch required service end points.
* authenticationMode
* The authenticationMode defines the way certificate is fetched.
- * userDN
- * This attribute captures the userDN used for launching jobs and create temporary storages. The attribute should be
- * provided if the authentication mode is set as SERVER_ISSUED.
*/
@SuppressWarnings("all") public class UnicoreJobSubmission implements org.apache.thrift.TBase<UnicoreJobSubmission, UnicoreJobSubmission._Fields>, java.io.Serializable, Cloneable, Comparable<UnicoreJobSubmission> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UnicoreJobSubmission");
@@ -66,8 +63,6 @@ import org.slf4j.LoggerFactory;
private static final org.apache.thrift.protocol.TField JOB_SUBMISSION_INTERFACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jobSubmissionInterfaceId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField SECURITY_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("securityProtocol", org.apache.thrift.protocol.TType.I32, (short)2);
private static final org.apache.thrift.protocol.TField UNICORE_END_POINT_URL_FIELD_DESC = new org.apache.thrift.protocol.TField("unicoreEndPointURL", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField AUTHENTICATION_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("authenticationMode", org.apache.thrift.protocol.TType.I32, (short)4);
- private static final org.apache.thrift.protocol.TField USER_DN_FIELD_DESC = new org.apache.thrift.protocol.TField("userDN", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -78,8 +73,6 @@ import org.slf4j.LoggerFactory;
private String jobSubmissionInterfaceId; // required
private SecurityProtocol securityProtocol; // required
private String unicoreEndPointURL; // required
- private AuthenticationMode authenticationMode; // required
- private String userDN; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -89,13 +82,7 @@ import org.slf4j.LoggerFactory;
* @see SecurityProtocol
*/
SECURITY_PROTOCOL((short)2, "securityProtocol"),
- UNICORE_END_POINT_URL((short)3, "unicoreEndPointURL"),
- /**
- *
- * @see AuthenticationMode
- */
- AUTHENTICATION_MODE((short)4, "authenticationMode"),
- USER_DN((short)5, "userDN");
+ UNICORE_END_POINT_URL((short)3, "unicoreEndPointURL");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -116,10 +103,6 @@ import org.slf4j.LoggerFactory;
return SECURITY_PROTOCOL;
case 3: // UNICORE_END_POINT_URL
return UNICORE_END_POINT_URL;
- case 4: // AUTHENTICATION_MODE
- return AUTHENTICATION_MODE;
- case 5: // USER_DN
- return USER_DN;
default:
return null;
}
@@ -160,7 +143,6 @@ import org.slf4j.LoggerFactory;
}
// isset id assignments
- private _Fields optionals[] = {_Fields.USER_DN};
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);
@@ -170,10 +152,6 @@ import org.slf4j.LoggerFactory;
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SecurityProtocol.class)));
tmpMap.put(_Fields.UNICORE_END_POINT_URL, new org.apache.thrift.meta_data.FieldMetaData("unicoreEndPointURL", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.AUTHENTICATION_MODE, new org.apache.thrift.meta_data.FieldMetaData("authenticationMode", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AuthenticationMode.class)));
- tmpMap.put(_Fields.USER_DN, new org.apache.thrift.meta_data.FieldMetaData("userDN", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UnicoreJobSubmission.class, metaDataMap);
}
@@ -186,14 +164,12 @@ import org.slf4j.LoggerFactory;
public UnicoreJobSubmission(
String jobSubmissionInterfaceId,
SecurityProtocol securityProtocol,
- String unicoreEndPointURL,
- AuthenticationMode authenticationMode)
+ String unicoreEndPointURL)
{
this();
this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
this.securityProtocol = securityProtocol;
this.unicoreEndPointURL = unicoreEndPointURL;
- this.authenticationMode = authenticationMode;
}
/**
@@ -209,12 +185,6 @@ import org.slf4j.LoggerFactory;
if (other.isSetUnicoreEndPointURL()) {
this.unicoreEndPointURL = other.unicoreEndPointURL;
}
- if (other.isSetAuthenticationMode()) {
- this.authenticationMode = other.authenticationMode;
- }
- if (other.isSetUserDN()) {
- this.userDN = other.userDN;
- }
}
public UnicoreJobSubmission deepCopy() {
@@ -227,8 +197,6 @@ import org.slf4j.LoggerFactory;
this.securityProtocol = null;
this.unicoreEndPointURL = null;
- this.authenticationMode = null;
- this.userDN = null;
}
public String getJobSubmissionInterfaceId() {
@@ -308,60 +276,6 @@ import org.slf4j.LoggerFactory;
}
}
- /**
- *
- * @see AuthenticationMode
- */
- public AuthenticationMode getAuthenticationMode() {
- return this.authenticationMode;
- }
-
- /**
- *
- * @see AuthenticationMode
- */
- public void setAuthenticationMode(AuthenticationMode authenticationMode) {
- this.authenticationMode = authenticationMode;
- }
-
- public void unsetAuthenticationMode() {
- this.authenticationMode = null;
- }
-
- /** Returns true if field authenticationMode is set (has been assigned a value) and false otherwise */
- public boolean isSetAuthenticationMode() {
- return this.authenticationMode != null;
- }
-
- public void setAuthenticationModeIsSet(boolean value) {
- if (!value) {
- this.authenticationMode = null;
- }
- }
-
- public String getUserDN() {
- return this.userDN;
- }
-
- public void setUserDN(String userDN) {
- this.userDN = userDN;
- }
-
- public void unsetUserDN() {
- this.userDN = null;
- }
-
- /** Returns true if field userDN is set (has been assigned a value) and false otherwise */
- public boolean isSetUserDN() {
- return this.userDN != null;
- }
-
- public void setUserDNIsSet(boolean value) {
- if (!value) {
- this.userDN = null;
- }
- }
-
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case JOB_SUBMISSION_INTERFACE_ID:
@@ -388,22 +302,6 @@ import org.slf4j.LoggerFactory;
}
break;
- case AUTHENTICATION_MODE:
- if (value == null) {
- unsetAuthenticationMode();
- } else {
- setAuthenticationMode((AuthenticationMode)value);
- }
- break;
-
- case USER_DN:
- if (value == null) {
- unsetUserDN();
- } else {
- setUserDN((String)value);
- }
- break;
-
}
}
@@ -418,12 +316,6 @@ import org.slf4j.LoggerFactory;
case UNICORE_END_POINT_URL:
return getUnicoreEndPointURL();
- case AUTHENTICATION_MODE:
- return getAuthenticationMode();
-
- case USER_DN:
- return getUserDN();
-
}
throw new IllegalStateException();
}
@@ -441,10 +333,6 @@ import org.slf4j.LoggerFactory;
return isSetSecurityProtocol();
case UNICORE_END_POINT_URL:
return isSetUnicoreEndPointURL();
- case AUTHENTICATION_MODE:
- return isSetAuthenticationMode();
- case USER_DN:
- return isSetUserDN();
}
throw new IllegalStateException();
}
@@ -489,24 +377,6 @@ import org.slf4j.LoggerFactory;
return false;
}
- boolean this_present_authenticationMode = true && this.isSetAuthenticationMode();
- boolean that_present_authenticationMode = true && that.isSetAuthenticationMode();
- if (this_present_authenticationMode || that_present_authenticationMode) {
- if (!(this_present_authenticationMode && that_present_authenticationMode))
- return false;
- if (!this.authenticationMode.equals(that.authenticationMode))
- return false;
- }
-
- boolean this_present_userDN = true && this.isSetUserDN();
- boolean that_present_userDN = true && that.isSetUserDN();
- if (this_present_userDN || that_present_userDN) {
- if (!(this_present_userDN && that_present_userDN))
- return false;
- if (!this.userDN.equals(that.userDN))
- return false;
- }
-
return true;
}
@@ -553,26 +423,6 @@ import org.slf4j.LoggerFactory;
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthenticationMode()).compareTo(other.isSetAuthenticationMode());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetAuthenticationMode()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authenticationMode, other.authenticationMode);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUserDN()).compareTo(other.isSetUserDN());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserDN()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userDN, other.userDN);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
return 0;
}
@@ -616,24 +466,6 @@ import org.slf4j.LoggerFactory;
sb.append(this.unicoreEndPointURL);
}
first = false;
- if (!first) sb.append(", ");
- sb.append("authenticationMode:");
- if (this.authenticationMode == null) {
- sb.append("null");
- } else {
- sb.append(this.authenticationMode);
- }
- first = false;
- if (isSetUserDN()) {
- if (!first) sb.append(", ");
- sb.append("userDN:");
- if (this.userDN == null) {
- sb.append("null");
- } else {
- sb.append(this.userDN);
- }
- first = false;
- }
sb.append(")");
return sb.toString();
}
@@ -652,10 +484,6 @@ import org.slf4j.LoggerFactory;
throw new org.apache.thrift.protocol.TProtocolException("Required field 'unicoreEndPointURL' is unset! Struct:" + toString());
}
- if (!isSetAuthenticationMode()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'authenticationMode' is unset! Struct:" + toString());
- }
-
// check for sub-struct validity
}
@@ -717,22 +545,6 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 4: // AUTHENTICATION_MODE
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.authenticationMode = AuthenticationMode.findByValue(iprot.readI32());
- struct.setAuthenticationModeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // USER_DN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userDN = iprot.readString();
- struct.setUserDNIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -761,18 +573,6 @@ import org.slf4j.LoggerFactory;
oprot.writeString(struct.unicoreEndPointURL);
oprot.writeFieldEnd();
}
- if (struct.authenticationMode != null) {
- oprot.writeFieldBegin(AUTHENTICATION_MODE_FIELD_DESC);
- oprot.writeI32(struct.authenticationMode.getValue());
- oprot.writeFieldEnd();
- }
- if (struct.userDN != null) {
- if (struct.isSetUserDN()) {
- oprot.writeFieldBegin(USER_DN_FIELD_DESC);
- oprot.writeString(struct.userDN);
- oprot.writeFieldEnd();
- }
- }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -793,15 +593,6 @@ import org.slf4j.LoggerFactory;
oprot.writeString(struct.jobSubmissionInterfaceId);
oprot.writeI32(struct.securityProtocol.getValue());
oprot.writeString(struct.unicoreEndPointURL);
- oprot.writeI32(struct.authenticationMode.getValue());
- BitSet optionals = new BitSet();
- if (struct.isSetUserDN()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetUserDN()) {
- oprot.writeString(struct.userDN);
- }
}
@Override
@@ -813,13 +604,6 @@ import org.slf4j.LoggerFactory;
struct.setSecurityProtocolIsSet(true);
struct.unicoreEndPointURL = iprot.readString();
struct.setUnicoreEndPointURLIsSet(true);
- struct.authenticationMode = AuthenticationMode.findByValue(iprot.readI32());
- struct.setAuthenticationModeIsSet(true);
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.userDN = iprot.readString();
- struct.setUserDNIsSet(true);
- }
}
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4fb4891/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/UserConfigurationData.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/UserConfigurationData.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/UserConfigurationData.java
index fecb4e8..c9531ea 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/UserConfigurationData.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/UserConfigurationData.java
@@ -65,6 +65,8 @@ import org.slf4j.LoggerFactory;
private static final org.apache.thrift.protocol.TField ADVANCE_OUTPUT_DATA_HANDLING_FIELD_DESC = new org.apache.thrift.protocol.TField("advanceOutputDataHandling", org.apache.thrift.protocol.TType.STRUCT, (short)6);
private static final org.apache.thrift.protocol.TField QOS_PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("qosParams", org.apache.thrift.protocol.TType.STRUCT, (short)7);
private static final org.apache.thrift.protocol.TField THROTTLE_RESOURCES_FIELD_DESC = new org.apache.thrift.protocol.TField("throttleResources", org.apache.thrift.protocol.TType.BOOL, (short)8);
+ private static final org.apache.thrift.protocol.TField USER_DN_FIELD_DESC = new org.apache.thrift.protocol.TField("userDN", org.apache.thrift.protocol.TType.STRING, (short)9);
+ private static final org.apache.thrift.protocol.TField GENERATE_CERT_FIELD_DESC = new org.apache.thrift.protocol.TField("generateCert", org.apache.thrift.protocol.TType.BOOL, (short)10);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -80,6 +82,8 @@ import org.slf4j.LoggerFactory;
private AdvancedOutputDataHandling advanceOutputDataHandling; // optional
private QualityOfServiceParams qosParams; // optional
private boolean throttleResources; // optional
+ private String userDN; // optional
+ private boolean generateCert; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -90,7 +94,9 @@ import org.slf4j.LoggerFactory;
ADVANCE_INPUT_DATA_HANDLING((short)5, "advanceInputDataHandling"),
ADVANCE_OUTPUT_DATA_HANDLING((short)6, "advanceOutputDataHandling"),
QOS_PARAMS((short)7, "qosParams"),
- THROTTLE_RESOURCES((short)8, "throttleResources");
+ THROTTLE_RESOURCES((short)8, "throttleResources"),
+ USER_DN((short)9, "userDN"),
+ GENERATE_CERT((short)10, "generateCert");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -121,6 +127,10 @@ import org.slf4j.LoggerFactory;
return QOS_PARAMS;
case 8: // THROTTLE_RESOURCES
return THROTTLE_RESOURCES;
+ case 9: // USER_DN
+ return USER_DN;
+ case 10: // GENERATE_CERT
+ return GENERATE_CERT;
default:
return null;
}
@@ -165,8 +175,9 @@ import org.slf4j.LoggerFactory;
private static final int __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID = 1;
private static final int __SHAREEXPERIMENTPUBLICLY_ISSET_ID = 2;
private static final int __THROTTLERESOURCES_ISSET_ID = 3;
+ private static final int __GENERATECERT_ISSET_ID = 4;
private byte __isset_bitfield = 0;
- private _Fields optionals[] = {_Fields.SHARE_EXPERIMENT_PUBLICLY,_Fields.COMPUTATIONAL_RESOURCE_SCHEDULING,_Fields.ADVANCE_INPUT_DATA_HANDLING,_Fields.ADVANCE_OUTPUT_DATA_HANDLING,_Fields.QOS_PARAMS,_Fields.THROTTLE_RESOURCES};
+ private _Fields optionals[] = {_Fields.SHARE_EXPERIMENT_PUBLICLY,_Fields.COMPUTATIONAL_RESOURCE_SCHEDULING,_Fields.ADVANCE_INPUT_DATA_HANDLING,_Fields.ADVANCE_OUTPUT_DATA_HANDLING,_Fields.QOS_PARAMS,_Fields.THROTTLE_RESOURCES,_Fields.USER_DN,_Fields.GENERATE_CERT};
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);
@@ -186,6 +197,10 @@ import org.slf4j.LoggerFactory;
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, QualityOfServiceParams.class)));
tmpMap.put(_Fields.THROTTLE_RESOURCES, new org.apache.thrift.meta_data.FieldMetaData("throttleResources", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.USER_DN, new org.apache.thrift.meta_data.FieldMetaData("userDN", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.GENERATE_CERT, new org.apache.thrift.meta_data.FieldMetaData("generateCert", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UserConfigurationData.class, metaDataMap);
}
@@ -199,6 +214,8 @@ import org.slf4j.LoggerFactory;
this.throttleResources = false;
+ this.generateCert = false;
+
}
public UserConfigurationData(
@@ -233,6 +250,10 @@ import org.slf4j.LoggerFactory;
this.qosParams = new QualityOfServiceParams(other.qosParams);
}
this.throttleResources = other.throttleResources;
+ if (other.isSetUserDN()) {
+ this.userDN = other.userDN;
+ }
+ this.generateCert = other.generateCert;
}
public UserConfigurationData deepCopy() {
@@ -253,6 +274,9 @@ import org.slf4j.LoggerFactory;
this.qosParams = null;
this.throttleResources = false;
+ this.userDN = null;
+ this.generateCert = false;
+
}
public boolean isAiravataAutoSchedule() {
@@ -435,6 +459,51 @@ import org.slf4j.LoggerFactory;
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __THROTTLERESOURCES_ISSET_ID, value);
}
+ public String getUserDN() {
+ return this.userDN;
+ }
+
+ public void setUserDN(String userDN) {
+ this.userDN = userDN;
+ }
+
+ public void unsetUserDN() {
+ this.userDN = null;
+ }
+
+ /** Returns true if field userDN is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserDN() {
+ return this.userDN != null;
+ }
+
+ public void setUserDNIsSet(boolean value) {
+ if (!value) {
+ this.userDN = null;
+ }
+ }
+
+ public boolean isGenerateCert() {
+ return this.generateCert;
+ }
+
+ public void setGenerateCert(boolean generateCert) {
+ this.generateCert = generateCert;
+ setGenerateCertIsSet(true);
+ }
+
+ public void unsetGenerateCert() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GENERATECERT_ISSET_ID);
+ }
+
+ /** Returns true if field generateCert is set (has been assigned a value) and false otherwise */
+ public boolean isSetGenerateCert() {
+ return EncodingUtils.testBit(__isset_bitfield, __GENERATECERT_ISSET_ID);
+ }
+
+ public void setGenerateCertIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GENERATECERT_ISSET_ID, value);
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case AIRAVATA_AUTO_SCHEDULE:
@@ -501,6 +570,22 @@ import org.slf4j.LoggerFactory;
}
break;
+ case USER_DN:
+ if (value == null) {
+ unsetUserDN();
+ } else {
+ setUserDN((String)value);
+ }
+ break;
+
+ case GENERATE_CERT:
+ if (value == null) {
+ unsetGenerateCert();
+ } else {
+ setGenerateCert((Boolean)value);
+ }
+ break;
+
}
}
@@ -530,6 +615,12 @@ import org.slf4j.LoggerFactory;
case THROTTLE_RESOURCES:
return Boolean.valueOf(isThrottleResources());
+ case USER_DN:
+ return getUserDN();
+
+ case GENERATE_CERT:
+ return Boolean.valueOf(isGenerateCert());
+
}
throw new IllegalStateException();
}
@@ -557,6 +648,10 @@ import org.slf4j.LoggerFactory;
return isSetQosParams();
case THROTTLE_RESOURCES:
return isSetThrottleResources();
+ case USER_DN:
+ return isSetUserDN();
+ case GENERATE_CERT:
+ return isSetGenerateCert();
}
throw new IllegalStateException();
}
@@ -646,6 +741,24 @@ import org.slf4j.LoggerFactory;
return false;
}
+ boolean this_present_userDN = true && this.isSetUserDN();
+ boolean that_present_userDN = true && that.isSetUserDN();
+ if (this_present_userDN || that_present_userDN) {
+ if (!(this_present_userDN && that_present_userDN))
+ return false;
+ if (!this.userDN.equals(that.userDN))
+ return false;
+ }
+
+ boolean this_present_generateCert = true && this.isSetGenerateCert();
+ boolean that_present_generateCert = true && that.isSetGenerateCert();
+ if (this_present_generateCert || that_present_generateCert) {
+ if (!(this_present_generateCert && that_present_generateCert))
+ return false;
+ if (this.generateCert != that.generateCert)
+ return false;
+ }
+
return true;
}
@@ -742,6 +855,26 @@ import org.slf4j.LoggerFactory;
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetUserDN()).compareTo(other.isSetUserDN());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserDN()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userDN, other.userDN);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetGenerateCert()).compareTo(other.isSetGenerateCert());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGenerateCert()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.generateCert, other.generateCert);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -821,6 +954,22 @@ import org.slf4j.LoggerFactory;
sb.append(this.throttleResources);
first = false;
}
+ if (isSetUserDN()) {
+ if (!first) sb.append(", ");
+ sb.append("userDN:");
+ if (this.userDN == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userDN);
+ }
+ first = false;
+ }
+ if (isSetGenerateCert()) {
+ if (!first) sb.append(", ");
+ sb.append("generateCert:");
+ sb.append(this.generateCert);
+ first = false;
+ }
sb.append(")");
return sb.toString();
}
@@ -954,6 +1103,22 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 9: // USER_DN
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.userDN = iprot.readString();
+ struct.setUserDNIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // GENERATE_CERT
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.generateCert = iprot.readBool();
+ struct.setGenerateCertIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -1011,6 +1176,18 @@ import org.slf4j.LoggerFactory;
oprot.writeBool(struct.throttleResources);
oprot.writeFieldEnd();
}
+ if (struct.userDN != null) {
+ if (struct.isSetUserDN()) {
+ oprot.writeFieldBegin(USER_DN_FIELD_DESC);
+ oprot.writeString(struct.userDN);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetGenerateCert()) {
+ oprot.writeFieldBegin(GENERATE_CERT_FIELD_DESC);
+ oprot.writeBool(struct.generateCert);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -1049,7 +1226,13 @@ import org.slf4j.LoggerFactory;
if (struct.isSetThrottleResources()) {
optionals.set(5);
}
- oprot.writeBitSet(optionals, 6);
+ if (struct.isSetUserDN()) {
+ optionals.set(6);
+ }
+ if (struct.isSetGenerateCert()) {
+ optionals.set(7);
+ }
+ oprot.writeBitSet(optionals, 8);
if (struct.isSetShareExperimentPublicly()) {
oprot.writeBool(struct.shareExperimentPublicly);
}
@@ -1068,6 +1251,12 @@ import org.slf4j.LoggerFactory;
if (struct.isSetThrottleResources()) {
oprot.writeBool(struct.throttleResources);
}
+ if (struct.isSetUserDN()) {
+ oprot.writeString(struct.userDN);
+ }
+ if (struct.isSetGenerateCert()) {
+ oprot.writeBool(struct.generateCert);
+ }
}
@Override
@@ -1077,7 +1266,7 @@ import org.slf4j.LoggerFactory;
struct.setAiravataAutoScheduleIsSet(true);
struct.overrideManualScheduledParams = iprot.readBool();
struct.setOverrideManualScheduledParamsIsSet(true);
- BitSet incoming = iprot.readBitSet(6);
+ BitSet incoming = iprot.readBitSet(8);
if (incoming.get(0)) {
struct.shareExperimentPublicly = iprot.readBool();
struct.setShareExperimentPubliclyIsSet(true);
@@ -1106,6 +1295,14 @@ import org.slf4j.LoggerFactory;
struct.throttleResources = iprot.readBool();
struct.setThrottleResourcesIsSet(true);
}
+ if (incoming.get(6)) {
+ struct.userDN = iprot.readString();
+ struct.setUserDNIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.generateCert = iprot.readBool();
+ struct.setGenerateCertIsSet(true);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4fb4891/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift b/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
index 9bf1b72..d91210c 100644
--- a/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
+++ b/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
@@ -329,36 +329,17 @@ struct GlobusJobSubmission {
}
/**
- * AuthenticationMode
- *
- * SERVER_ISSUED: use CA credentials to generate a certificate based on user name.
- * server properties.
- * MYPROXY_ISSUED: rely on GSI method implementation already provided
- * by Airavata security libs.
-*/
-enum AuthenticationMode {
- SERVER_ISSUED,
- MYPROXY_ISSUED
-}
-
-
-/**
* Unicore Job Submission
*
* unicoreEndPointURL:
* unicoreGateway End Point. The provider will query this service to fetch required service end points.
* authenticationMode
* The authenticationMode defines the way certificate is fetched.
- * userDN
- * This attribute captures the userDN used for launching jobs and create temporary storages. The attribute should be
- * provided if the authentication mode is set as SERVER_ISSUED.
*/
struct UnicoreJobSubmission {
1: required string jobSubmissionInterfaceId = DEFAULT_ID,
2: required SecurityProtocol securityProtocol,
3: required string unicoreEndPointURL,
- 4: required AuthenticationMode authenticationMode,
- 5: optional string userDN
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4fb4891/airavata-api/thrift-interface-descriptions/experimentModel.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/experimentModel.thrift b/airavata-api/thrift-interface-descriptions/experimentModel.thrift
index 0801695..7f76f90 100644
--- a/airavata-api/thrift-interface-descriptions/experimentModel.thrift
+++ b/airavata-api/thrift-interface-descriptions/experimentModel.thrift
@@ -232,6 +232,8 @@ struct QualityOfServiceParams {
3: optional i32 numberofRetries
}
+
+
/**
* A structure holding the experiment configuration.
*
@@ -244,8 +246,10 @@ struct UserConfigurationData {
4: optional ComputationalResourceScheduling computationalResourceScheduling,
5: optional AdvancedInputDataHandling advanceInputDataHandling,
6: optional AdvancedOutputDataHandling advanceOutputDataHandling,
- 7: optional QualityOfServiceParams qosParams
- 8: optional bool throttleResources = 0
+ 7: optional QualityOfServiceParams qosParams,
+ 8: optional bool throttleResources = 0,
+ 9: optional string userDN,
+ 10: optional bool generateCert = 0
}
struct ErrorDetails {
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4fb4891/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
index 4e6b7ae..75b0987 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
@@ -209,7 +209,6 @@ public class ComputeResourceImpl implements ComputeResource {
unicoreJobSubmission.setJobSubmissionInterfaceId(AppCatalogUtils.getID("UNICORE"));
UnicoreJobSubmissionResource resource = AppCatalogThriftConversion.getUnicoreJobSubmission(unicoreJobSubmission);
resource.setUnicoreEndpointUrl(unicoreJobSubmission.getUnicoreEndPointURL());
- resource.setAuthenticationMode(unicoreJobSubmission.getAuthenticationMode().toString());
if (unicoreJobSubmission.getSecurityProtocol() != null){
resource.setSecurityProtocol(unicoreJobSubmission.getSecurityProtocol().toString());
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4fb4891/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/UnicoreJobSubmission.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/UnicoreJobSubmission.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/UnicoreJobSubmission.java
index 626fee4..3655620 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/UnicoreJobSubmission.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/UnicoreJobSubmission.java
@@ -38,19 +38,6 @@ public class UnicoreJobSubmission {
@Column(name = "UNICORE_ENDPOINT_URL")
private String unicoreEndpointUrl;
- @Column(name = "AUTHENTICATION_MODE")
- private String authenticationMode;
-
-
- public String getAuthenticationMode() {
- return authenticationMode;
- }
-
- public void setAuthenticationMode(String authenticationMode) {
- this.authenticationMode = authenticationMode;
- }
-
-
public String getUnicoreEndpointUrl() {
return unicoreEndpointUrl;
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4fb4891/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java
index 5b8695a..6887f8a 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java
@@ -125,7 +125,7 @@ public abstract class AbstractResource implements Resource {
public static final String SUBMISSION_ID = "submissionID";
public static final String SECURITY_PROTOCAL = "securityProtocol";
public static final String UNICORE_ENDPOINT_URL = "unicoreEndpointUrl";
- public static final String AUTHENTICATION_MODE = "authenticationMode";
+
}
public final class UnicoreDataMovementConstants {
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4fb4891/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/UnicoreJobSubmissionResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/UnicoreJobSubmissionResource.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/UnicoreJobSubmissionResource.java
index df401ad..4c772e1 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/UnicoreJobSubmissionResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/UnicoreJobSubmissionResource.java
@@ -45,7 +45,6 @@ public class UnicoreJobSubmissionResource extends AbstractResource {
private String jobSubmissionInterfaceId;
private String securityProtocol;
private String unicoreEndpointUrl;
- private String authenticationMode;
public void remove(Object identifier) throws AppCatalogException {
EntityManager em = null;
@@ -137,19 +136,6 @@ public class UnicoreJobSubmissionResource extends AbstractResource {
unicoreSubmissionResourceList.add(unicoreJobSubmissionResource);
}
}
- } else if (fieldName.equals(UnicoreJobSubmissionConstants.AUTHENTICATION_MODE)) {
- generator.setParameter(UnicoreJobSubmissionConstants.AUTHENTICATION_MODE, value);
- q = generator.selectQuery(em);
- results = q.getResultList();
- if (results.size() != 0) {
- for (Object result : results) {
- UnicoreJobSubmission unicoreJobSubmission = (UnicoreJobSubmission) result;
- UnicoreJobSubmissionResource unicoreJobSubmissionResource =
- (UnicoreJobSubmissionResource) AppCatalogJPAUtils.getResource(
- AppCatalogResourceType.UNICORE_JOB_SUBMISSION, unicoreJobSubmission);
- unicoreSubmissionResourceList.add(unicoreJobSubmissionResource);
- }
- }
}
else {
em.getTransaction().commit();
@@ -270,14 +256,13 @@ public class UnicoreJobSubmissionResource extends AbstractResource {
existingUnicoreSubmission.setSubmissionID(jobSubmissionInterfaceId);;
existingUnicoreSubmission.setUnicoreEndpointUrl(unicoreEndpointUrl);
existingUnicoreSubmission.setSecurityProtocol(securityProtocol);
- existingUnicoreSubmission.setAuthenticationMode(authenticationMode);
+
em.merge(existingUnicoreSubmission);
} else {
UnicoreJobSubmission unicoreJobSubmission = new UnicoreJobSubmission();
unicoreJobSubmission.setSubmissionID(jobSubmissionInterfaceId);
unicoreJobSubmission.setUnicoreEndpointUrl(unicoreEndpointUrl);
unicoreJobSubmission.setSecurityProtocol(securityProtocol);
- unicoreJobSubmission.setAuthenticationMode(authenticationMode);
em.persist(unicoreJobSubmission);
}
em.getTransaction().commit();
@@ -339,15 +324,5 @@ public class UnicoreJobSubmissionResource extends AbstractResource {
public void setUnicoreEndpointUrl(String unicoreEndpointUrl) {
this.unicoreEndpointUrl = unicoreEndpointUrl;
}
-
-
- public String getAuthenticationMode() {
- return authenticationMode;
- }
-
- public void setAuthenticationMode(String authenticationMode) {
- this.authenticationMode = authenticationMode;
- }
-
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4fb4891/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
index 0ee1ad0..3a9b6ed 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
@@ -533,7 +533,6 @@ public class AppCatalogJPAUtils {
submissionResource.setjobSubmissionInterfaceId(o.getSubmissionID());
submissionResource.setUnicoreEndpointUrl(o.getUnicoreEndpointUrl());
submissionResource.setSecurityProtocol(o.getSecurityProtocol());
- submissionResource.setAuthenticationMode(o.getAuthenticationMode());
}
return submissionResource;
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4fb4891/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
index 941b844..cad9c95 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
@@ -237,7 +237,6 @@ public class AppCatalogThriftConversion {
resource.setSecurityProtocol(submission.getSecurityProtocol().toString());
}
resource.setUnicoreEndpointUrl(submission.getUnicoreEndPointURL());
- resource.setAuthenticationMode(submission.getAuthenticationMode().toString());
return resource;
}
@@ -338,7 +337,6 @@ public class AppCatalogThriftConversion {
UnicoreJobSubmission unicoreJobSubmission = new UnicoreJobSubmission();
unicoreJobSubmission.setUnicoreEndPointURL(submission.getUnicoreEndpointUrl());
unicoreJobSubmission.setJobSubmissionInterfaceId(submission.getjobSubmissionInterfaceId());
- unicoreJobSubmission.setAuthenticationMode(AuthenticationMode.valueOf(submission.getAuthenticationMode()));
if (submission.getSecurityProtocol() != null){
unicoreJobSubmission.setSecurityProtocol(SecurityProtocol.valueOf(submission.getSecurityProtocol()));
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4fb4891/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
index 5396541..4e28e04 100644
--- a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
+++ b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
@@ -79,7 +79,6 @@ CREATE TABLE UNICORE_SUBMISSION
SUBMISSION_ID VARCHAR(255),
SECURITY_PROTOCAL VARCHAR(255),
UNICORE_ENDPOINT_URL VARCHAR(255),
- AUTHENTICATION_MODE VARCHAR(255),
PRIMARY KEY(SUBMISSION_ID)
);
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4fb4891/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
index 98f27db..cfb8022 100644
--- a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
+++ b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
@@ -91,7 +91,6 @@ CREATE TABLE UNICORE_SUBMISSION
SUBMISSION_ID VARCHAR(255),
SECURITY_PROTOCAL VARCHAR(255),
UNICORE_ENDPOINT_URL VARCHAR(255),
- AUTHENTICATION_MODE VARCHAR(255),
PRIMARY KEY(SUBMISSION_ID)
);
http://git-wip-us.apache.org/repos/asf/airavata/blob/a4fb4891/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
index d490269..c75ea55 100644
--- a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
+++ b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
@@ -190,10 +190,17 @@ public class BESProvider extends AbstractProvider implements GFacProvider,
+ activityStatus.getFault().getFaultstring()
+ "\n EXITCODE: " + activityStatus.getExitCode();
log.info(error);
-
+
+ JobState applicationJobStatus = JobState.FAILED;
+ String jobStatusMessage = "Status of job " + jobId + "is "
+ + applicationJobStatus;
+ jobExecutionContext.getNotifier().publish(
+ new StatusChangeEvent(jobStatusMessage));
+ GFacUtils.updateJobStatus(jobExecutionContext, jobDetails, applicationJobStatus);
try {Thread.sleep(5000);} catch (InterruptedException e) {}
//What if job is failed before execution and there are not stdouts generated yet?
+ log.debug("Downloading any standard output and error files, if they were produced.");
dt.downloadStdOuts();
} else if (activityStatus.getState() == ActivityStateEnumeration.CANCELLED) {
@@ -236,6 +243,7 @@ public class BESProvider extends AbstractProvider implements GFacProvider,
}
}
+
private JobState getApplicationJobStatus(ActivityStatusType activityStatus) {
if (activityStatus == null) {
[18/50] [abbrv] airavata git commit: fixing AIRAVATA-1626
Posted by sh...@apache.org.
fixing AIRAVATA-1626
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/fd557d82
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/fd557d82
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/fd557d82
Branch: refs/heads/new-workflow-design
Commit: fd557d829f282bdb1ec084cf1e7b19b57a270932
Parents: 04cecb4
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Mon Mar 9 12:34:51 2015 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Mon Mar 9 12:34:51 2015 -0400
----------------------------------------------------------------------
.../server/handler/AiravataServerHandler.java | 43 ++++++++++++++++++++
.../data/impl/GwyResourceProfileImpl.java | 2 +-
.../integration/tools/DocumentCreatorNew.java | 7 +++-
3 files changed, 49 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/fd557d82/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index 264243a..c111a07 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -2680,6 +2680,17 @@ public class AiravataServerHandler implements Airavata.Iface {
@Override
public String registerGatewayResourceProfile(GatewayResourceProfile gatewayResourceProfile) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
try {
+ if (!validateString(gatewayResourceProfile.getGatewayID())){
+ logger.error("Cannot create gateway profile with empty gateway id");
+ AiravataSystemException exception = new AiravataSystemException();
+ exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+ exception.setMessage("Cannot create gateway profile with empty gateway id");
+ throw exception;
+ }
+ if (!isGatewayExist(gatewayResourceProfile.getGatewayID())){
+ logger.error("Gateway does not exist.Please provide a valid gateway id...");
+ throw new AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);
+ }
appCatalog = AppCatalogFactory.getAppCatalog();
GwyResourceProfile gatewayProfile = appCatalog.getGatewayProfile();
return gatewayProfile.addGatewayResourceProfile(gatewayResourceProfile);
@@ -2702,6 +2713,10 @@ public class AiravataServerHandler implements Airavata.Iface {
@Override
public GatewayResourceProfile getGatewayResourceProfile(String gatewayID) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
try {
+ if (!isGatewayExist(gatewayID)){
+ logger.error("Gateway does not exist.Please provide a valid gateway id...");
+ throw new AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);
+ }
appCatalog = AppCatalogFactory.getAppCatalog();
GwyResourceProfile gatewayProfile = appCatalog.getGatewayProfile();
return gatewayProfile.getGatewayProfile(gatewayID);
@@ -2725,6 +2740,10 @@ public class AiravataServerHandler implements Airavata.Iface {
@Override
public boolean updateGatewayResourceProfile(String gatewayID, GatewayResourceProfile gatewayResourceProfile) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
try {
+ if (!isGatewayExist(gatewayID)){
+ logger.error("Gateway does not exist.Please provide a valid gateway id...");
+ throw new AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);
+ }
appCatalog = AppCatalogFactory.getAppCatalog();
GwyResourceProfile gatewayProfile = appCatalog.getGatewayProfile();
gatewayProfile.updateGatewayResourceProfile(gatewayID, gatewayResourceProfile);
@@ -2748,6 +2767,10 @@ public class AiravataServerHandler implements Airavata.Iface {
@Override
public boolean deleteGatewayResourceProfile(String gatewayID) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
try {
+ if (!isGatewayExist(gatewayID)){
+ logger.error("Gateway does not exist.Please provide a valid gateway id...");
+ throw new AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);
+ }
appCatalog = AppCatalogFactory.getAppCatalog();
GwyResourceProfile gatewayProfile = appCatalog.getGatewayProfile();
gatewayProfile.removeGatewayResourceProfile(gatewayID);
@@ -2774,6 +2797,10 @@ public class AiravataServerHandler implements Airavata.Iface {
@Override
public boolean addGatewayComputeResourcePreference(String gatewayID, String computeResourceId, ComputeResourcePreference computeResourcePreference) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
try {
+ if (!isGatewayExist(gatewayID)){
+ logger.error("Gateway does not exist.Please provide a valid gateway id...");
+ throw new AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);
+ }
appCatalog = AppCatalogFactory.getAppCatalog();
GwyResourceProfile gatewayProfile = appCatalog.getGatewayProfile();
if (!gatewayProfile.isGatewayResourceProfileExists(gatewayID)){
@@ -2804,6 +2831,10 @@ public class AiravataServerHandler implements Airavata.Iface {
@Override
public ComputeResourcePreference getGatewayComputeResourcePreference(String gatewayID, String computeResourceId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
try {
+ if (!isGatewayExist(gatewayID)){
+ logger.error("Gateway does not exist.Please provide a valid gateway id...");
+ throw new AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);
+ }
appCatalog = AppCatalogFactory.getAppCatalog();
GwyResourceProfile gatewayProfile = appCatalog.getGatewayProfile();
ComputeResource computeResource = appCatalog.getComputeResource();
@@ -2841,6 +2872,10 @@ public class AiravataServerHandler implements Airavata.Iface {
@Override
public List<ComputeResourcePreference> getAllGatewayComputeResourcePreferences(String gatewayID) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
try {
+ if (!isGatewayExist(gatewayID)){
+ logger.error("Gateway does not exist.Please provide a valid gateway id...");
+ throw new AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);
+ }
appCatalog = AppCatalogFactory.getAppCatalog();
GwyResourceProfile gatewayProfile = appCatalog.getGatewayProfile();
return gatewayProfile.getGatewayProfile(gatewayID).getComputeResourcePreferences();
@@ -2879,6 +2914,10 @@ public class AiravataServerHandler implements Airavata.Iface {
@Override
public boolean updateGatewayComputeResourcePreference(String gatewayID, String computeResourceId, ComputeResourcePreference computeResourcePreference) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
try {
+ if (!isGatewayExist(gatewayID)){
+ logger.error("Gateway does not exist.Please provide a valid gateway id...");
+ throw new AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);
+ }
appCatalog = AppCatalogFactory.getAppCatalog();
GwyResourceProfile gatewayProfile = appCatalog.getGatewayProfile();
GatewayResourceProfile profile = gatewayProfile.getGatewayProfile(gatewayID);
@@ -2917,6 +2956,10 @@ public class AiravataServerHandler implements Airavata.Iface {
@Override
public boolean deleteGatewayComputeResourcePreference(String gatewayID, String computeResourceId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
try {
+ if (!isGatewayExist(gatewayID)){
+ logger.error("Gateway does not exist.Please provide a valid gateway id...");
+ throw new AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);
+ }
appCatalog = AppCatalogFactory.getAppCatalog();
GwyResourceProfile gatewayProfile = appCatalog.getGatewayProfile();
return gatewayProfile.removeComputeResourcePreferenceFromGateway(gatewayID, computeResourceId);
http://git-wip-us.apache.org/repos/asf/airavata/blob/fd557d82/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/GwyResourceProfileImpl.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/GwyResourceProfileImpl.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/GwyResourceProfileImpl.java
index d03ef2a..4537efd 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/GwyResourceProfileImpl.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/GwyResourceProfileImpl.java
@@ -46,7 +46,7 @@ public class GwyResourceProfileImpl implements GwyResourceProfile {
if (!gatewayProfile.getGatewayID().equals("") && !gatewayProfile.getGatewayID().equals(gatewayResourceProfileModelConstants.DEFAULT_ID)){
profileResource.setGatewayID(gatewayProfile.getGatewayID());
}
- profileResource.setGatewayID(gatewayProfile.getGatewayID());
+// profileResource.setGatewayID(gatewayProfile.getGatewayID());
profileResource.save();
List<ComputeResourcePreference> computeResourcePreferences = gatewayProfile.getComputeResourcePreferences();
if (computeResourcePreferences != null && !computeResourcePreferences.isEmpty()){
http://git-wip-us.apache.org/repos/asf/airavata/blob/fd557d82/modules/integration-tests/src/test/java/org/apache/airavata/integration/tools/DocumentCreatorNew.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/tools/DocumentCreatorNew.java b/modules/integration-tests/src/test/java/org/apache/airavata/integration/tools/DocumentCreatorNew.java
index 273efce..34786fe 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/tools/DocumentCreatorNew.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/tools/DocumentCreatorNew.java
@@ -44,11 +44,14 @@ import org.apache.airavata.model.error.AiravataClientException;
import org.apache.airavata.model.error.AiravataSystemException;
import org.apache.airavata.model.error.InvalidRequestException;
import org.apache.thrift.TException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.*;
public class DocumentCreatorNew {
+ private final static Logger log = LoggerFactory.getLogger(DocumentCreatorNew.class);
private static final String DEFAULT_GATEWAY = "php_reference_gateway";
private AppCatalog appcatalog = null;
@@ -115,7 +118,7 @@ public class DocumentCreatorNew {
null, null);
gatewayResourceProfile = new GatewayResourceProfile();
// gatewayResourceProfile.setGatewayID("default");
- gatewayResourceProfile.setGatewayID(ClientSettings.getSetting("default.registry.gateway", "php_reference_gateway"));
+ gatewayResourceProfile.setGatewayID(DEFAULT_GATEWAY);
gatewayResourceProfile.addToComputeResourcePreferences(computeResourcePreference);
String gatewayId = client.registerGatewayResourceProfile(gatewayResourceProfile);
gatewayResourceProfile.setGatewayID(gatewayId);
@@ -133,7 +136,7 @@ public class DocumentCreatorNew {
if (gatewayResourceProfile == null) {
gatewayResourceProfile = new GatewayResourceProfile();
// gatewayResourceProfile.setGatewayID("default");
- gatewayResourceProfile.setGatewayID("php_reference_gateway");
+ gatewayResourceProfile.setGatewayID(DEFAULT_GATEWAY);
gatewayResourceProfile.setGatewayID(client.registerGatewayResourceProfile(gatewayResourceProfile));
}
// }
[24/50] [abbrv] airavata git commit: continuation of authentication
mode implementation
Posted by sh...@apache.org.
continuation of authentication mode implementation
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/7ef88004
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/7ef88004
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/7ef88004
Branch: refs/heads/new-workflow-design
Commit: 7ef880044a2916adabe4f33d47e6349367a3a84c
Parents: 7883eb9
Author: msmemon <sh...@gmail.com>
Authored: Tue Mar 10 17:20:17 2015 +0100
Committer: msmemon <sh...@gmail.com>
Committed: Tue Mar 10 17:20:17 2015 +0100
----------------------------------------------------------------------
.../catalog/data/impl/ComputeResourceImpl.java | 1 +
.../data/model/UnicoreJobSubmission.java | 16 +++++++-
.../data/resources/AbstractResource.java | 1 +
.../resources/UnicoreJobSubmissionResource.java | 39 ++++++++++++++------
.../catalog/data/util/AppCatalogJPAUtils.java | 1 +
.../data/util/AppCatalogThriftConversion.java | 3 +-
.../src/main/resources/appcatalog-derby.sql | 1 +
.../src/main/resources/appcatalog-mysql.sql | 1 +
8 files changed, 50 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/7ef88004/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
index 75b0987..4e6b7ae 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/ComputeResourceImpl.java
@@ -209,6 +209,7 @@ public class ComputeResourceImpl implements ComputeResource {
unicoreJobSubmission.setJobSubmissionInterfaceId(AppCatalogUtils.getID("UNICORE"));
UnicoreJobSubmissionResource resource = AppCatalogThriftConversion.getUnicoreJobSubmission(unicoreJobSubmission);
resource.setUnicoreEndpointUrl(unicoreJobSubmission.getUnicoreEndPointURL());
+ resource.setAuthenticationMode(unicoreJobSubmission.getAuthenticationMode().toString());
if (unicoreJobSubmission.getSecurityProtocol() != null){
resource.setSecurityProtocol(unicoreJobSubmission.getSecurityProtocol().toString());
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/7ef88004/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/UnicoreJobSubmission.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/UnicoreJobSubmission.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/UnicoreJobSubmission.java
index d37fda4..626fee4 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/UnicoreJobSubmission.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/UnicoreJobSubmission.java
@@ -37,7 +37,20 @@ public class UnicoreJobSubmission {
@Column(name = "UNICORE_ENDPOINT_URL")
private String unicoreEndpointUrl;
+
+ @Column(name = "AUTHENTICATION_MODE")
+ private String authenticationMode;
+
+ public String getAuthenticationMode() {
+ return authenticationMode;
+ }
+
+ public void setAuthenticationMode(String authenticationMode) {
+ this.authenticationMode = authenticationMode;
+ }
+
+
public String getUnicoreEndpointUrl() {
return unicoreEndpointUrl;
}
@@ -45,7 +58,8 @@ public class UnicoreJobSubmission {
public void setUnicoreEndpointUrl(String unicoreEndpointUrl) {
this.unicoreEndpointUrl = unicoreEndpointUrl;
}
-
+
+
public String getSubmissionID() {
return submissionID;
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/7ef88004/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java
index 5f55069..5b8695a 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/AbstractResource.java
@@ -125,6 +125,7 @@ public abstract class AbstractResource implements Resource {
public static final String SUBMISSION_ID = "submissionID";
public static final String SECURITY_PROTOCAL = "securityProtocol";
public static final String UNICORE_ENDPOINT_URL = "unicoreEndpointUrl";
+ public static final String AUTHENTICATION_MODE = "authenticationMode";
}
public final class UnicoreDataMovementConstants {
http://git-wip-us.apache.org/repos/asf/airavata/blob/7ef88004/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/UnicoreJobSubmissionResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/UnicoreJobSubmissionResource.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/UnicoreJobSubmissionResource.java
index a43b300..df401ad 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/UnicoreJobSubmissionResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/UnicoreJobSubmissionResource.java
@@ -24,7 +24,6 @@ package org.apache.aiaravata.application.catalog.data.resources;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
-import java.util.Map;
import javax.persistence.EntityManager;
import javax.persistence.Query;
@@ -46,8 +45,9 @@ public class UnicoreJobSubmissionResource extends AbstractResource {
private String jobSubmissionInterfaceId;
private String securityProtocol;
private String unicoreEndpointUrl;
+ private String authenticationMode;
- public void remove(Object identifier) throws AppCatalogException {
+ public void remove(Object identifier) throws AppCatalogException {
EntityManager em = null;
try {
em = AppCatalogJPAUtils.getEntityManager();
@@ -72,21 +72,13 @@ public class UnicoreJobSubmissionResource extends AbstractResource {
}
public Resource get(Object identifier) throws AppCatalogException {
- // TODO: what? there is no sense to pass string and expect hashmap.. :(
HashMap<String, String> ids;
-// if (identifier instanceof Map) {
-// ids = (HashMap) identifier;
-// } else {
-// logger.error("Identifier should be a map with the field name and it's value");
-// throw new AppCatalogException("Identifier should be a map with the field name and it's value");
-// }
EntityManager em = null;
try {
em = AppCatalogJPAUtils.getEntityManager();
em.getTransaction().begin();
AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(UNICORE_JOB_SUBMISSION);
generator.setParameter(UnicoreJobSubmissionConstants.SUBMISSION_ID, identifier);
-// generator.setParameter(UnicoreJobSubmissionConstants.UNICORE_ENDPOINT_URL, ids.get(UnicoreJobSubmissionConstants.UNICORE_ENDPOINT_URL));
Query q = generator.selectQuery(em);
UnicoreJobSubmission unicoreJobSubmission = (UnicoreJobSubmission) q.getSingleResult();
UnicoreJobSubmissionResource unicoreSubmissionResource =
@@ -145,7 +137,21 @@ public class UnicoreJobSubmissionResource extends AbstractResource {
unicoreSubmissionResourceList.add(unicoreJobSubmissionResource);
}
}
- } else {
+ } else if (fieldName.equals(UnicoreJobSubmissionConstants.AUTHENTICATION_MODE)) {
+ generator.setParameter(UnicoreJobSubmissionConstants.AUTHENTICATION_MODE, value);
+ q = generator.selectQuery(em);
+ results = q.getResultList();
+ if (results.size() != 0) {
+ for (Object result : results) {
+ UnicoreJobSubmission unicoreJobSubmission = (UnicoreJobSubmission) result;
+ UnicoreJobSubmissionResource unicoreJobSubmissionResource =
+ (UnicoreJobSubmissionResource) AppCatalogJPAUtils.getResource(
+ AppCatalogResourceType.UNICORE_JOB_SUBMISSION, unicoreJobSubmission);
+ unicoreSubmissionResourceList.add(unicoreJobSubmissionResource);
+ }
+ }
+ }
+ else {
em.getTransaction().commit();
em.close();
logger.error("Unsupported field name for Unicore submission resource.", new IllegalArgumentException());
@@ -264,12 +270,14 @@ public class UnicoreJobSubmissionResource extends AbstractResource {
existingUnicoreSubmission.setSubmissionID(jobSubmissionInterfaceId);;
existingUnicoreSubmission.setUnicoreEndpointUrl(unicoreEndpointUrl);
existingUnicoreSubmission.setSecurityProtocol(securityProtocol);
+ existingUnicoreSubmission.setAuthenticationMode(authenticationMode);
em.merge(existingUnicoreSubmission);
} else {
UnicoreJobSubmission unicoreJobSubmission = new UnicoreJobSubmission();
unicoreJobSubmission.setSubmissionID(jobSubmissionInterfaceId);
unicoreJobSubmission.setUnicoreEndpointUrl(unicoreEndpointUrl);
unicoreJobSubmission.setSecurityProtocol(securityProtocol);
+ unicoreJobSubmission.setAuthenticationMode(authenticationMode);
em.persist(unicoreJobSubmission);
}
em.getTransaction().commit();
@@ -331,6 +339,15 @@ public class UnicoreJobSubmissionResource extends AbstractResource {
public void setUnicoreEndpointUrl(String unicoreEndpointUrl) {
this.unicoreEndpointUrl = unicoreEndpointUrl;
}
+
+ public String getAuthenticationMode() {
+ return authenticationMode;
+ }
+
+ public void setAuthenticationMode(String authenticationMode) {
+ this.authenticationMode = authenticationMode;
+ }
+
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/7ef88004/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
index 3a9b6ed..0ee1ad0 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
@@ -533,6 +533,7 @@ public class AppCatalogJPAUtils {
submissionResource.setjobSubmissionInterfaceId(o.getSubmissionID());
submissionResource.setUnicoreEndpointUrl(o.getUnicoreEndpointUrl());
submissionResource.setSecurityProtocol(o.getSecurityProtocol());
+ submissionResource.setAuthenticationMode(o.getAuthenticationMode());
}
return submissionResource;
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/7ef88004/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
index 1df6c24..941b844 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
@@ -237,6 +237,7 @@ public class AppCatalogThriftConversion {
resource.setSecurityProtocol(submission.getSecurityProtocol().toString());
}
resource.setUnicoreEndpointUrl(submission.getUnicoreEndPointURL());
+ resource.setAuthenticationMode(submission.getAuthenticationMode().toString());
return resource;
}
@@ -337,10 +338,10 @@ public class AppCatalogThriftConversion {
UnicoreJobSubmission unicoreJobSubmission = new UnicoreJobSubmission();
unicoreJobSubmission.setUnicoreEndPointURL(submission.getUnicoreEndpointUrl());
unicoreJobSubmission.setJobSubmissionInterfaceId(submission.getjobSubmissionInterfaceId());
+ unicoreJobSubmission.setAuthenticationMode(AuthenticationMode.valueOf(submission.getAuthenticationMode()));
if (submission.getSecurityProtocol() != null){
unicoreJobSubmission.setSecurityProtocol(SecurityProtocol.valueOf(submission.getSecurityProtocol()));
}
-
return unicoreJobSubmission;
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/7ef88004/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
index 4e28e04..5396541 100644
--- a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
+++ b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
@@ -79,6 +79,7 @@ CREATE TABLE UNICORE_SUBMISSION
SUBMISSION_ID VARCHAR(255),
SECURITY_PROTOCAL VARCHAR(255),
UNICORE_ENDPOINT_URL VARCHAR(255),
+ AUTHENTICATION_MODE VARCHAR(255),
PRIMARY KEY(SUBMISSION_ID)
);
http://git-wip-us.apache.org/repos/asf/airavata/blob/7ef88004/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
index cfb8022..98f27db 100644
--- a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
+++ b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
@@ -91,6 +91,7 @@ CREATE TABLE UNICORE_SUBMISSION
SUBMISSION_ID VARCHAR(255),
SECURITY_PROTOCAL VARCHAR(255),
UNICORE_ENDPOINT_URL VARCHAR(255),
+ AUTHENTICATION_MODE VARCHAR(255),
PRIMARY KEY(SUBMISSION_ID)
);