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 2021/07/29 15:41:10 UTC
[airavata-django-portal-sdk] branch master updated (4ce71c9 ->
b67bb33)
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal-sdk.git.
from 4ce71c9 Version bump to 1.1.dev5
new 5087097 Pass name of file in remote API call when saving file
new bd420b8 AIRAVATA-3485 Use experiment owner user storage directory for listdir, get_file_metadata
new b67bb33 AIRAVATA-3485 Bump version to 1.1.dev6
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
airavata_django_portal_sdk/user_storage/api.py | 13 +++++++------
setup.py | 2 +-
2 files changed, 8 insertions(+), 7 deletions(-)
[airavata-django-portal-sdk] 01/03: Pass name of file in remote API
call when saving file
Posted by ma...@apache.org.
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-sdk.git
commit 5087097fc683b4453cf9a7e8189a7179f9f7ba5d
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Jul 29 11:34:48 2021 -0400
Pass name of file in remote API call when saving file
---
airavata_django_portal_sdk/user_storage/api.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/airavata_django_portal_sdk/user_storage/api.py b/airavata_django_portal_sdk/user_storage/api.py
index c226e08..413506e 100644
--- a/airavata_django_portal_sdk/user_storage/api.py
+++ b/airavata_django_portal_sdk/user_storage/api.py
@@ -80,7 +80,7 @@ def save(request, path, file, name=None, content_type=None, storage_resource_id=
if name is None and hasattr(file, 'name'):
name = os.path.basename(file.name)
files = {'file': (name, file, content_type)
- if content_type is not None else file, }
+ if content_type is not None else (name, file)}
resp = _call_remote_api(request,
"/user-storage/~/{path}",
path_params={"path": path},
@@ -107,7 +107,7 @@ def save_input_file(request, file, name=None, content_type=None, storage_resourc
if name is None and hasattr(file, 'name'):
name = os.path.basename(file.name)
files = {'file': (name, file, content_type)
- if content_type is not None else file, }
+ if content_type is not None else (name, file)}
resp = _call_remote_api(request,
"/upload",
method="post",
[airavata-django-portal-sdk] 02/03: AIRAVATA-3485 Use experiment
owner user storage directory for listdir, get_file_metadata
Posted by ma...@apache.org.
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-sdk.git
commit bd420b84b5d2dc0ddd13feb1d4486aee4855f78e
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Jul 29 11:36:00 2021 -0400
AIRAVATA-3485 Use experiment owner user storage directory for listdir, get_file_metadata
---
airavata_django_portal_sdk/user_storage/api.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/airavata_django_portal_sdk/user_storage/api.py b/airavata_django_portal_sdk/user_storage/api.py
index 413506e..c548d42 100644
--- a/airavata_django_portal_sdk/user_storage/api.py
+++ b/airavata_django_portal_sdk/user_storage/api.py
@@ -396,8 +396,8 @@ def get_file_metadata(request, path, storage_resource_id=None, experiment_id=Non
file['data-product-uri'] = file['dataProductURI']
return file
- backend = get_user_storage_provider(request, storage_resource_id=storage_resource_id)
- final_path = _get_final_path(request, path, experiment_id)
+ final_path, owner_username = _get_final_path_and_owner_username(request, path, experiment_id)
+ backend = get_user_storage_provider(request, storage_resource_id=storage_resource_id, owner_username=owner_username)
if backend.is_file(final_path):
_, files = backend.get_metadata(final_path)
file = files[0]
@@ -517,8 +517,9 @@ def listdir(request, path, storage_resource_id=None, experiment_id=None):
file['data-product-uri'] = file['dataProductURI']
return data['directories'], data['files']
- backend = get_user_storage_provider(request, storage_resource_id=storage_resource_id)
- final_path = _get_final_path(request, path, experiment_id)
+ final_path, owner_username = _get_final_path_and_owner_username(request, path, experiment_id)
+ backend = get_user_storage_provider(request, storage_resource_id=storage_resource_id,
+ owner_username=owner_username)
directories, files = backend.get_metadata(final_path)
# Mark the TMP_INPUT_FILE_UPLOAD_DIR directory as hidden in the UI
for directory in directories:
[airavata-django-portal-sdk] 03/03: AIRAVATA-3485 Bump version to
1.1.dev6
Posted by ma...@apache.org.
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-sdk.git
commit b67bb33f9ac22fd556058eb7fb5bd0288c27a2d7
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Jul 29 11:37:09 2021 -0400
AIRAVATA-3485 Bump version to 1.1.dev6
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index a88a579..39ffba9 100644
--- a/setup.py
+++ b/setup.py
@@ -10,7 +10,7 @@ def read(fname):
setup(
name="airavata-django-portal-sdk",
- version="1.1.dev5",
+ version="1.1.dev6",
url="https://github.com/apache/airavata-django-portal-sdk",
author="Apache Software Foundation",
author_email="dev@airavata.apache.org",