This is an automated email from the ASF dual-hosted git repository.

dimuthuupe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-mft.git


The following commit(s) were added to refs/heads/master by this push:
     new e0581fa  Directory browser python example
e0581fa is described below

commit e0581fa120faaee1da98e06c80ca8f61a9e929f5
Author: Dimuthu Wannipurage <[email protected]>
AuthorDate: Wed Jan 20 00:21:47 2021 -0500

    Directory browser python example
---
 examples/src/main/python/directory_browse.py | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/examples/src/main/python/directory_browse.py 
b/examples/src/main/python/directory_browse.py
new file mode 100644
index 0000000..d4a648a
--- /dev/null
+++ b/examples/src/main/python/directory_browse.py
@@ -0,0 +1,18 @@
+import grpc
+import MFTApi_pb2
+import MFTApi_pb2_grpc
+
+channel = grpc.insecure_channel('localhost:7004')
+stub = MFTApi_pb2_grpc.MFTApiServiceStub(channel)
+
+request = MFTApi_pb2.FetchResourceMetadataRequest(resourceId= 
"remote-ssh-dir-resource",
+                                        resourceType = "SCP",
+                                        resourceToken = "local-ssh-cred",
+                                        resourceBackend = "FILE",
+                                        resourceCredentialBackend= "FILE",
+                                        targetAgentId = "agent0",
+                                        childPath= "",
+                                        mftAuthorizationToken = "user token")
+
+response = stub.getDirectoryResourceMetadata(request)
+print(response)
\ No newline at end of file

Reply via email to