gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] branch master updated: CLI lists facades


From: gnunet
Subject: [libeufin] branch master updated: CLI lists facades
Date: Wed, 13 Jan 2021 11:14:13 +0100

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new bfef891  CLI lists facades
bfef891 is described below

commit bfef891abfa8ac990963711a7ed38932a63b95ec
Author: MS <ms@taler.net>
AuthorDate: Wed Jan 13 11:14:07 2021 +0100

    CLI lists facades
---
 cli/bin/libeufin-cli | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/cli/bin/libeufin-cli b/cli/bin/libeufin-cli
index df65a42..099a9f1 100755
--- a/cli/bin/libeufin-cli
+++ b/cli/bin/libeufin-cli
@@ -39,7 +39,7 @@ def cli():
 
 @cli.group()
 @click.pass_context
-def taler_facade(ctx):
+def facades(ctx):
     ctx.obj = NexusAccess(*fetch_env())
     pass
 
@@ -393,15 +393,20 @@ def transactions(obj, account_name):
         exit(1)
     print(resp.content.decode("utf-8"))
 
-@taler_facade.command(help="List active facades in the Nexus")
+@facades.command(help="List active facades in the Nexus")
 @click.argument("connection-name")
-@click.argument("account-name")
 @click.pass_obj
-def list_facades(obj, connection_name, account_name):
-    pass
+def list_facades(obj, connection_name):
+    url = urljoin(obj.nexus_base_url, "/facades")
+    try:
+        resp = get(url, auth=auth.HTTPBasicAuth(obj.username, obj.password))
+    except Exception as e:
+        print(f"Could not reach nexus (at {obj.nexus_base_url}): {e}")
+        exit(1)
+    print(resp.content.decode("utf-8"))
 
-@taler_facade.command(help="create a new Taler facade")
-@click.option("--facade-name", help="Name of the Taler facade", required=True)
+@facades.command(help="create a new (Taler) facade")
+@click.option("--facade-name", help="Name of the facade", required=True)
 @click.argument("connection-name")
 @click.argument("account-name")
 @click.pass_obj

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]