commit 8fd2d57d52187fc280c40c9b2478c40605399907
parent 0d0a858cbdbb9d47e874e17efedd40caff62b20b
Author: MS <ms@taler.net>
Date: Mon, 5 Oct 2020 17:51:09 +0200
new command to the CLI
Diffstat:
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
@@ -2,5 +2,6 @@
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
+ <mapping directory="$PROJECT_DIR$/build-common" vcs="Git" />
</component>
</project>
\ No newline at end of file
diff --git a/cli/libeufin-cli b/cli/libeufin-cli
@@ -200,8 +200,20 @@ def download_bank_accounts(obj, connection_name, nexus_user_id, nexus_password,
return
print(resp.content.decode("utf-8"))
+@connections.command(help="list the connections")
+@click.option("--nexus-user-id", help="Nexus user ID", required=True)
+@click.option("--nexus-password", help="Nexus password", required=True)
+@click.argument("nexus-base-url")
+def list_connections(nexus_user_id, nexus_password, nexus_base_url):
+ url = urljoin(nexus_base_url, "/bank-connections/")
+ try:
+ resp = get(url, json=dict(), auth = auth.HTTPBasicAuth(nexus_user_id, nexus_password))
+ except Exception:
+ print("Could not reach nexus")
+ return
+ print(resp.content.decode("utf-8"))
-@connections.command(help="list offered (= downloaded) bank accounts")
+@connections.command(help="list bank accounts hosted at one connection")
@click.option("--connection-name", help="Connection ID", required=True)
@click.option("--nexus-user-id", help="Nexus user ID", required=True)
@click.option("--nexus-password", help="Nexus password", required=True)
@@ -260,7 +272,6 @@ def prepare_payment(obj, account_name, credit_iban, credit_bic, credit_name,
return
print(resp.content.decode("utf-8"))
-
@accounts.command(help="submit a prepared payment")
@click.option("--account-name", help="bank account name", required=True)
@click.option("--payment-uuid", help="payment unique identifier", required=True)