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

commit c3784404192c9ac01bcdb83de82d2e411f93a6ab
Author: DImuthuUpe <[email protected]>
AuthorDate: Thu Oct 12 01:42:35 2023 -0400

    Support to describe storage from cli
---
 python-cli/mft_cli/airavata_mft_cli/base.py       | 6 ++++++
 python-cli/mft_cli/airavata_mft_cli/operations.py | 5 +++++
 2 files changed, 11 insertions(+)

diff --git a/python-cli/mft_cli/airavata_mft_cli/base.py 
b/python-cli/mft_cli/airavata_mft_cli/base.py
index 553747f..924cca5 100644
--- a/python-cli/mft_cli/airavata_mft_cli/base.py
+++ b/python-cli/mft_cli/airavata_mft_cli/base.py
@@ -44,6 +44,12 @@ def copy_list(source_storage_id, dest_storage_id, list_file):
   except Exception as e:
     exception_handler(e)
 
[email protected]("describe")
+def describe(storage_name):
+  try:
+    operations.describe_storage(storage_name)
+  except Exception as e:
+    exception_handler(e)
 @app.command("init")
 def init_mft():
   bootstrap.start_mft()
diff --git a/python-cli/mft_cli/airavata_mft_cli/operations.py 
b/python-cli/mft_cli/airavata_mft_cli/operations.py
index 8ed867d..50276ba 100644
--- a/python-cli/mft_cli/airavata_mft_cli/operations.py
+++ b/python-cli/mft_cli/airavata_mft_cli/operations.py
@@ -61,6 +61,11 @@ def fetch_storage_and_secret_ids(storage_name):
 
   return sec_resp.storageId, sec_resp.secretId
 
+def describe_storage(storage_name):
+    storage_id, secret_id = fetch_storage_and_secret_ids(storage_name)
+    print("Storage id: " + storage_id)
+    print("Secret id: " + secret_id)
+
 def get_resource_metadata(storage_path, recursive_search = False):
   storage_name = storage_path.split("/")[0]
   resource_path = storage_path[len(storage_name) +1 :]

Reply via email to