You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2019/06/03 20:27:50 UTC
[airavata-django-portal] branch master updated: AIRAVATA-3016 Some
small fixes to how experiment data dir gets created
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
The following commit(s) were added to refs/heads/master by this push:
new 02a8995 AIRAVATA-3016 Some small fixes to how experiment data dir gets created
02a8995 is described below
commit 02a8995b12a4de4e685f3d85eb86b930b3419c2b
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Mon Jun 3 16:23:00 2019 -0400
AIRAVATA-3016 Some small fixes to how experiment data dir gets created
---
django_airavata/apps/api/views.py | 22 +++++++---------------
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/django_airavata/apps/api/views.py b/django_airavata/apps/api/views.py
index d3f1393..7d8caf7 100644
--- a/django_airavata/apps/api/views.py
+++ b/django_airavata/apps/api/views.py
@@ -40,14 +40,7 @@ from django_airavata.apps.api.view_utils import (
)
from django_airavata.apps.auth import iam_admin_client
-from . import (
- data_products_helper,
- datastore,
- helpers,
- models,
- serializers,
- thrift_utils
-)
+from . import data_products_helper, helpers, models, serializers, thrift_utils
READ_PERMISSION_TYPE = '{}:READ'
@@ -196,18 +189,17 @@ class ExperimentViewSet(APIBackedViewSet):
experiment.userConfigurationData.storageId = \
settings.GATEWAY_DATA_STORE_RESOURCE_ID
# Create experiment dir and set it on model
- project = self.request.airavata_client.getProject(
- self.authz_token, experiment.projectId)
if not experiment.userConfigurationData.experimentDataDir:
- exp_dir = datastore.get_experiment_dir(self.username,
- project.name,
- experiment.experimentName)
+ project = self.request.airavata_client.getProject(
+ self.authz_token, experiment.projectId)
+ exp_dir = data_products_helper.get_experiment_dir(
+ self.request, project.name, experiment.experimentName)
experiment.userConfigurationData.experimentDataDir = exp_dir
else:
# get_experiment_dir will also validate that absolute paths are
# inside the user's storage directory
- exp_dir = datastore.get_experiment_dir(
- self.username,
+ exp_dir = data_products_helper.get_experiment_dir(
+ self.request,
path=experiment.userConfigurationData.experimentDataDir)
experiment.userConfigurationData.experimentDataDir = exp_dir