You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2017/04/03 16:50:17 UTC

[44/50] airavata git commit: AIRAVATA-2347 Removing use of gatewayResource, GATEWAY_WORKER stuff

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/master
Commit: 053df2f03db57a8edbe136908ef697e7cc691b81
Parents: 9b4c968
Author: Marcus Christie <ma...@apache.org>
Authored: Tue Mar 28 10:19:40 2017 -0400
Committer: Marcus Christie <ma...@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(