gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated (c6cbdfe -> 91748a2)


From: gnunet
Subject: [libeufin] branch master updated (c6cbdfe -> 91748a2)
Date: Tue, 26 Jan 2021 17:19:25 +0100

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

ms pushed a change to branch master
in repository libeufin.

    from c6cbdfe  test connection deletion
     new 58181b7  test CLI password change
     new 91748a2  cli

The 2 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:
 cli/bin/libeufin-cli  | 15 +++++++--------
 cli/setup-template.sh |  4 ++--
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/cli/bin/libeufin-cli b/cli/bin/libeufin-cli
index 7ae7237..86b51d4 100755
--- a/cli/bin/libeufin-cli
+++ b/cli/bin/libeufin-cli
@@ -13,10 +13,11 @@ from getpass import getpass
 
 
 def tell_user(resp, withsuccess=False):
-    if resp.status_code == 200 and not withsuccess:
+    if resp.status_code != 200:
+        print(resp.content.decode("utf-8"))
         return
-    print(resp.content.decode("utf-8"))
-
+    if withsuccess:
+        print(resp.content.decode("utf-8"))
 
 # FIXME: deprecate this in favor of NexusContext
 def fetch_env():
@@ -83,11 +84,9 @@ def list_users(obj):
         print("Could not reach nexus at " + url)
         exit(1)
 
-    print(resp.content.decode("utf-8"))
-
+    tell_user(resp, withsuccess=True)
 
 @users.command(help="Change user's password")
-@click.argument("username")
 @click.option(
     "--new-password",
     help="New password",
@@ -96,7 +95,7 @@ def list_users(obj):
     confirmation_prompt=True,
 )
 @click.pass_obj
-def change_password(obj, username, new_password):
+def change_password(obj, new_password):
     url = urljoin(obj.nexus_base_url, f"/users/password")
     try:
         body = dict(newPassword=new_password)
@@ -110,7 +109,7 @@ def change_password(obj, username, new_password):
         print("Could not reach nexus at " + url)
         exit(1)
 
-    tell_user(resp)
+    tell_user(resp, withsuccess=True)
 
 
 @users.command("create", help="Create a new user")
diff --git a/cli/setup-template.sh b/cli/setup-template.sh
index 09e93b0..511850f 100755
--- a/cli/setup-template.sh
+++ b/cli/setup-template.sh
@@ -105,7 +105,7 @@ libeufin-cli \
 # Bootstrapping such connection.
 echo Bootstrapping the bank connection
 libeufin-cli \
-  connections sync $NEXUS_BANK_CONNECTION_NAME
+  connections connect $NEXUS_BANK_CONNECTION_NAME
 
 # Download bank accounts.
 echo Download bank accounts
@@ -125,7 +125,7 @@ cat << EOF
 Bank connection name: $(tput bold)$NEXUS_BANK_CONNECTION_NAME$(tput sgr0)
 Bank account, imported name: $(tput bold)$ACCOUNT_NAME_AT_NEXUS$(tput sgr0)
 Bank account, native name: $(tput bold)$ACCOUNT_NAME$(tput sgr0)
-env-setter: $(tput bold)export NEXUS_BASE_URL=http://localhost:5001/ 
NEXUS_USERNAME=$NEXUS_USER NEXUS_PASSWORD=$NEXUS_PASSWORD 
LIBEUFIN_SANDBOX_URL=$SANDBOX_URL$(tput sgr0)
+env-setter: $(tput bold)export LIBEUFIN_NEXUS_URL=http://localhost:5001/ 
LIBEUFIN_NEXUS_USERNAME=$NEXUS_USER LIBEUFIN_NEXUS_PASSWORD=$NEXUS_PASSWORD 
LIBEUFIN_SANDBOX_URL=$SANDBOX_URL$(tput sgr0)
 
 EOF
 

-- 
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]