airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject airavata git commit: make passphrase as optional
Date Tue, 24 Nov 2015 20:32:53 GMT
Repository: airavata
Updated Branches:
  refs/heads/develop 5e636cb88 -> 42f071cab


make passphrase as optional


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

Branch: refs/heads/develop
Commit: 42f071cabfcf9ab95b5d6b9322dbb87b05c35aeb
Parents: 5e636cb
Author: Chathuri Wimalasena <chathuri@apache.org>
Authored: Tue Nov 24 15:32:47 2015 -0500
Committer: Chathuri Wimalasena <chathuri@apache.org>
Committed: Tue Nov 24 15:32:47 2015 -0500

----------------------------------------------------------------------
 .../store/cpi/CredentialStoreService.java       |  2 +-
 .../store/datamodel/CertificateCredential.java  |  2 +-
 .../store/datamodel/CommunityUser.java          |  2 +-
 .../store/datamodel/PasswordCredential.java     |  2 +-
 .../store/datamodel/SSHCredential.java          | 70 +++++++++++---------
 .../exception/CredentialStoreException.java     |  2 +-
 .../credentialStoreDataModel.thrift             |  2 +-
 7 files changed, 44 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/42f071ca/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
index 87742be..78d634b 100644
--- a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
+++ b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java
@@ -50,7 +50,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-8-25")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-11-24")
 public class CredentialStoreService {
 
   public interface Iface {

http://git-wip-us.apache.org/repos/asf/airavata/blob/42f071ca/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/CertificateCredential.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/CertificateCredential.java
b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/CertificateCredential.java
index 067382d..b628778 100644
--- a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/CertificateCredential.java
+++ b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/CertificateCredential.java
@@ -50,7 +50,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-8-25")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-11-24")
 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");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/42f071ca/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/CommunityUser.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/CommunityUser.java
b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/CommunityUser.java
index 8325b4d..b5c319f 100644
--- a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/CommunityUser.java
+++ b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/CommunityUser.java
@@ -50,7 +50,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-8-25")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-11-24")
 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");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/42f071ca/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/PasswordCredential.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/PasswordCredential.java
b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/PasswordCredential.java
index a2b814f..6e1b740 100644
--- a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/PasswordCredential.java
+++ b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/PasswordCredential.java
@@ -50,7 +50,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-8-25")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-11-24")
 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");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/42f071ca/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredential.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredential.java
b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredential.java
index 36eed76..115aaa7 100644
--- a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredential.java
+++ b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/SSHCredential.java
@@ -50,7 +50,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-8-25")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-11-24")
 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");
 
@@ -70,7 +70,7 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential,
SSH
 
   public String gatewayId; // required
   public String username; // required
-  public String passphrase; // required
+  public String passphrase; // optional
   public String publicKey; // optional
   public String privateKey; // optional
   public long persistedTime; // optional
@@ -155,7 +155,7 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential,
SSH
   // isset id assignments
   private static final int __PERSISTEDTIME_ISSET_ID = 0;
   private byte __isset_bitfield = 0;
-  private static final _Fields optionals[] = {_Fields.PUBLIC_KEY,_Fields.PRIVATE_KEY,_Fields.PERSISTED_TIME,_Fields.TOKEN};
+  private static final _Fields optionals[] = {_Fields.PASSPHRASE,_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);
@@ -163,7 +163,7 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential,
SSH
         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, 
+    tmpMap.put(_Fields.PASSPHRASE, new org.apache.thrift.meta_data.FieldMetaData("passphrase",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         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)));
@@ -182,13 +182,11 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential,
SSH
 
   public SSHCredential(
     String gatewayId,
-    String username,
-    String passphrase)
+    String username)
   {
     this();
     this.gatewayId = gatewayId;
     this.username = username;
-    this.passphrase = passphrase;
   }
 
   /**
@@ -747,14 +745,16 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential,
SSH
       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);
+    if (isSetPassphrase()) {
+      if (!first) sb.append(", ");
+      sb.append("passphrase:");
+      if (this.passphrase == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.passphrase);
+      }
+      first = false;
     }
-    first = false;
     if (isSetPublicKey()) {
       if (!first) sb.append(", ");
       sb.append("publicKey:");
@@ -803,9 +803,6 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential,
SSH
     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
   }
 
@@ -927,9 +924,11 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential,
SSH
         oprot.writeFieldEnd();
       }
       if (struct.passphrase != null) {
-        oprot.writeFieldBegin(PASSPHRASE_FIELD_DESC);
-        oprot.writeString(struct.passphrase);
-        oprot.writeFieldEnd();
+        if (struct.isSetPassphrase()) {
+          oprot.writeFieldBegin(PASSPHRASE_FIELD_DESC);
+          oprot.writeString(struct.passphrase);
+          oprot.writeFieldEnd();
+        }
       }
       if (struct.publicKey != null) {
         if (struct.isSetPublicKey()) {
@@ -976,21 +975,26 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential,
SSH
       TTupleProtocol oprot = (TTupleProtocol) prot;
       oprot.writeString(struct.gatewayId);
       oprot.writeString(struct.username);
-      oprot.writeString(struct.passphrase);
       BitSet optionals = new BitSet();
-      if (struct.isSetPublicKey()) {
+      if (struct.isSetPassphrase()) {
         optionals.set(0);
       }
-      if (struct.isSetPrivateKey()) {
+      if (struct.isSetPublicKey()) {
         optionals.set(1);
       }
-      if (struct.isSetPersistedTime()) {
+      if (struct.isSetPrivateKey()) {
         optionals.set(2);
       }
-      if (struct.isSetToken()) {
+      if (struct.isSetPersistedTime()) {
         optionals.set(3);
       }
-      oprot.writeBitSet(optionals, 4);
+      if (struct.isSetToken()) {
+        optionals.set(4);
+      }
+      oprot.writeBitSet(optionals, 5);
+      if (struct.isSetPassphrase()) {
+        oprot.writeString(struct.passphrase);
+      }
       if (struct.isSetPublicKey()) {
         oprot.writeString(struct.publicKey);
       }
@@ -1012,22 +1016,24 @@ public class SSHCredential implements org.apache.thrift.TBase<SSHCredential,
SSH
       struct.setGatewayIdIsSet(true);
       struct.username = iprot.readString();
       struct.setUsernameIsSet(true);
-      struct.passphrase = iprot.readString();
-      struct.setPassphraseIsSet(true);
-      BitSet incoming = iprot.readBitSet(4);
+      BitSet incoming = iprot.readBitSet(5);
       if (incoming.get(0)) {
+        struct.passphrase = iprot.readString();
+        struct.setPassphraseIsSet(true);
+      }
+      if (incoming.get(1)) {
         struct.publicKey = iprot.readString();
         struct.setPublicKeyIsSet(true);
       }
-      if (incoming.get(1)) {
+      if (incoming.get(2)) {
         struct.privateKey = iprot.readString();
         struct.setPrivateKeyIsSet(true);
       }
-      if (incoming.get(2)) {
+      if (incoming.get(3)) {
         struct.persistedTime = iprot.readI64();
         struct.setPersistedTimeIsSet(true);
       }
-      if (incoming.get(3)) {
+      if (incoming.get(4)) {
         struct.token = iprot.readString();
         struct.setTokenIsSet(true);
       }

http://git-wip-us.apache.org/repos/asf/airavata/blob/42f071ca/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/exception/CredentialStoreException.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/exception/CredentialStoreException.java
b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/exception/CredentialStoreException.java
index 69ca582..eec387a 100644
--- a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/exception/CredentialStoreException.java
+++ b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/exception/CredentialStoreException.java
@@ -50,7 +50,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-8-25")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-11-24")
 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");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/42f071ca/modules/credential-store/cs-thrift-descriptions/credentialStoreDataModel.thrift
----------------------------------------------------------------------
diff --git a/modules/credential-store/cs-thrift-descriptions/credentialStoreDataModel.thrift
b/modules/credential-store/cs-thrift-descriptions/credentialStoreDataModel.thrift
index ce4dc46..0f52833 100644
--- a/modules/credential-store/cs-thrift-descriptions/credentialStoreDataModel.thrift
+++ b/modules/credential-store/cs-thrift-descriptions/credentialStoreDataModel.thrift
@@ -29,7 +29,7 @@ const string DEFAULT_ID = "DO_NOT_SET_AT_CLIENTS"
 struct SSHCredential {
     1: required string gatewayId,
     2: required string username,
-    3: required string passphrase,
+    3: optional string passphrase,
     4: optional string publicKey,
     5: optional string privateKey,
     6: optional i64 persistedTime,


Mime
View raw message