airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject [49/50] [abbrv] airavata git commit: fixing AIRAVATA-1638
Date Thu, 19 Mar 2015 19:12:07 GMT
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 <kamalasini@gmail.com>
Authored: Thu Mar 19 10:03:28 2015 -0400
Committer: Chathuri Wimalasena <kamalasini@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)
 );
 


Mime
View raw message