You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2015/10/08 22:43:10 UTC
airavata git commit: if resource specific token not specified use
gateway profile token
Repository: airavata
Updated Branches:
refs/heads/master c5585979d -> 07adb3b12
if resource specific token not specified use gateway profile token
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/07adb3b1
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/07adb3b1
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/07adb3b1
Branch: refs/heads/master
Commit: 07adb3b1233521101d92e31590b6bc066ad6a019
Parents: c558597
Author: Chathuri Wimalasena <ch...@apache.org>
Authored: Thu Oct 8 16:43:02 2015 -0400
Committer: Chathuri Wimalasena <ch...@apache.org>
Committed: Thu Oct 8 16:43:02 2015 -0400
----------------------------------------------------------------------
.../orchestrator/server/OrchestratorServerHandler.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/07adb3b1/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java b/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
index 4aeebaa..4e8004b 100644
--- a/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
+++ b/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
@@ -40,6 +40,7 @@ import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentD
import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
import org.apache.airavata.model.appcatalog.computeresource.ComputeResourceDescription;
import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
+import org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile;
import org.apache.airavata.model.error.LaunchValidationException;
import org.apache.airavata.model.experiment.ExperimentModel;
import org.apache.airavata.model.experiment.ExperimentType;
@@ -144,7 +145,13 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface {
ComputeResourcePreference computeResourcePreference = appCatalog.getGatewayProfile().getComputeResourcePreference(gatewayId, experiment.getUserConfigurationData().getComputationalResourceScheduling().getResourceHostId());
String token = computeResourcePreference.getResourceSpecificCredentialStoreToken();
if (token == null || token.isEmpty()){
- log.error("You have not configured resource specific credential store token. Please provide the correct token at compute resource preference.");
+ // try with gateway profile level token
+ GatewayResourceProfile gatewayProfile = appCatalog.getGatewayProfile().getGatewayProfile(gatewayId);
+ token = gatewayProfile.getCredentialStoreToken();
+ }
+ // still the token is empty, then we fail the experiment
+ if (token == null || token.isEmpty()){
+ log.error("You have not configured credential store token at gateway profile or compute resource preference. Please provide the correct token at gateway profile or compute resource preference.");
return false;
}
String experimentNodePath = GFacUtils.getExperimentNodePath (experimentId);