airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject airavata git commit: AIRAVATA-2347 Removing use of gatewayResource, GATEWAY_WORKER stuff
Date Tue, 28 Mar 2017 14:20:57 GMT
Repository: airavata
Updated Branches:
  refs/heads/develop 9b4c9682b -> 053df2f03


AIRAVATA-2347 Removing use of gatewayResource, GATEWAY_WORKER stuff

I don't think the GATEWAY_WORKER stuff is needed any longer. Also, the
ExperimentCatalog is instantiated in the RegistryServerHandler as a singleton
with reference to a gatewayId, so it has the incorrect gatewayId for this request and can't
be
trusted.  This shows up here where the gatewayResource actually references the
default gateway from the airavata-server.properties file instead of the gateway
in the request.


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

Branch: refs/heads/develop
Commit: 053df2f03db57a8edbe136908ef697e7cc691b81
Parents: 9b4c968
Author: Marcus Christie <machristie@apache.org>
Authored: Tue Mar 28 10:19:40 2017 -0400
Committer: Marcus Christie <machristie@apache.org>
Committed: Tue Mar 28 10:19:40 2017 -0400

----------------------------------------------------------------------
 .../core/experiment/catalog/impl/ProjectRegistry.java     | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/053df2f0/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ProjectRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ProjectRegistry.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ProjectRegistry.java
index 9e32ef3..fabc9f4 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ProjectRegistry.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ProjectRegistry.java
@@ -93,15 +93,7 @@ public class ProjectRegistry {
             ProjectResource existingProject = workerResource.getProject(projectId);
             existingProject.setDescription(project.getDescription());
             existingProject.setName(project.getName());
-//            existingProject.setGateway(gatewayResource);
-            UserResource user = (UserResource) ExpCatResourceUtils.getUser(project.getOwner(),gatewayResource.getGatewayId());
-            if (!gatewayResource.isExists(ResourceType.GATEWAY_WORKER, user.getUserName())){
-                workerResource = ExpCatResourceUtils.addGatewayWorker(gatewayResource, user);
-            }else {
-                workerResource = (WorkerResource) ExpCatResourceUtils.getWorker(
-                        gatewayResource.getGatewayId(), user.getUserName());
-            }
-            WorkerResource worker = new WorkerResource(project.getOwner(), gatewayResource.getGatewayId());
+            WorkerResource worker = new WorkerResource(project.getOwner(), project.getGatewayId());
             existingProject.setWorker(worker);
             existingProject.save();
             ProjectUserResource resource = (ProjectUserResource)existingProject.create(


Mime
View raw message