[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: fix missing db table
From: |
gnunet |
Subject: |
[libeufin] branch master updated: fix missing db table |
Date: |
Thu, 25 Jun 2020 07:22:51 +0200 |
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 011c5f1 fix missing db table
011c5f1 is described below
commit 011c5f16fa75fba2df729e4717b308ceaecfebd7
Author: MS <ms@taler.net>
AuthorDate: Thu Jun 25 07:21:26 2020 +0200
fix missing db table
---
cli/libeufin-cli-new | 52 +++++++++----------------
cli/setup-template.sh | 9 ++---
nexus/src/main/kotlin/tech/libeufin/nexus/DB.kt | 3 +-
3 files changed, 25 insertions(+), 39 deletions(-)
diff --git a/cli/libeufin-cli-new b/cli/libeufin-cli-new
index 43bab5b..c517ec5 100755
--- a/cli/libeufin-cli-new
+++ b/cli/libeufin-cli-new
@@ -142,16 +142,21 @@ def bootstrap_bank_connection(obj, connection_name,
nexus_user_id, nexus_passwor
@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)
-@click.option("--account-id", help="Name of the account to import",
required=True)
-@click.option("--local-name", help="Name to give to the imported account",
required=True)
+@click.option("--offered-account-id", help="Name of the account to import",
required=True)
+@click.option("--nexus-bank-account-id", help="Name to give to the imported
account", required=True)
@click.argument("nexus-base-url")
@click.pass_obj
-def import_bank_account(obj, connection_name, nexus_user_id, nexus_password,
nexus_base_url, account_id, local_name):
- # FIXME/NOTE: the 'ebics' part will soon go away.
- url = urljoin(nexus_base_url,
"/bank-connections/{}/ebics/accounts/import".format(connection_name))
- print("going {}".format(url))
+def import_bank_account(obj, connection_name, nexus_user_id, nexus_password,
nexus_base_url, offered_account_id, nexus_bank_account_id):
+ url = urljoin(nexus_base_url,
"/bank-connections/{}/import-account".format(connection_name))
try:
- resp = post(url, json=dict(accountId=account_id,
localName=local_name), auth = auth.HTTPBasicAuth(nexus_user_id, nexus_password))
+ resp = post(
+ url,
+ json=dict(
+ offeredAccountId=offered_account_id,
+ nexusBankAccountId=nexus_bank_account_id
+ ),
+ auth = auth.HTTPBasicAuth(nexus_user_id, nexus_password)
+ )
except Exception as ee:
print(ee)
print("Could not reach nexus")
@@ -166,7 +171,7 @@ def import_bank_account(obj, connection_name,
nexus_user_id, nexus_password, nex
@click.pass_obj
def download_bank_accounts(obj, connection_name, nexus_user_id,
nexus_password, nexus_base_url):
# FIXME/NOTE: the 'ebics' part will soon go away.
- url = urljoin(nexus_base_url,
"/bank-connections/{}/ebics/accounts/fetch".format(connection_name))
+ url = urljoin(nexus_base_url,
"/bank-connections/{}/fetch-accounts".format(connection_name))
try:
resp = post(url, json=dict(), auth = auth.HTTPBasicAuth(nexus_user_id,
nexus_password))
except Exception:
@@ -175,15 +180,15 @@ def download_bank_accounts(obj, connection_name,
nexus_user_id, nexus_password,
print(resp.content.decode("utf-8"))
-@bank_connection.command(help="list imported bank accounts")
+@bank_connection.command(help="list offered (= downloaded) bank accounts")
@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)
@click.argument("nexus-base-url")
@click.pass_obj
-def list_imported_bank_accounts(obj, connection_name, nexus_user_id,
nexus_password, nexus_base_url):
+def list_offered_bank_accounts(obj, connection_name, nexus_user_id,
nexus_password, nexus_base_url):
# FIXME/NOTE: the 'ebics' part will soon go away.
- url = urljoin(nexus_base_url,
"/bank-connections/{}/ebics/accounts/imported".format(connection_name))
+ url = urljoin(nexus_base_url,
"/bank-connections/{}/accounts".format(connection_name))
try:
resp = get(url, json=dict(), auth = auth.HTTPBasicAuth(nexus_user_id,
nexus_password))
except Exception:
@@ -191,15 +196,13 @@ def list_imported_bank_accounts(obj, connection_name,
nexus_user_id, nexus_passw
return
print(resp.content.decode("utf-8"))
-@bank_connection.command(help="list raw bank account information locally
stored")
-@click.option("--connection-name", help="Connection ID", required=True)
+@bank_accounts.command(help="list imported bank accounts")
@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")
@click.pass_obj
-def list_bank_accounts(obj, connection_name, nexus_user_id, nexus_password,
nexus_base_url):
- # FIXME/NOTE: the 'ebics' part will soon go away.
- url = urljoin(nexus_base_url,
"/bank-connections/{}/ebics/accounts".format(connection_name))
+def list_bank_accounts(obj, nexus_user_id, nexus_password, nexus_base_url):
+ url = urljoin(nexus_base_url, "/bank-accounts")
try:
resp = get(url, json=dict(), auth = auth.HTTPBasicAuth(nexus_user_id,
nexus_password))
except Exception:
@@ -207,23 +210,6 @@ def list_bank_accounts(obj, connection_name,
nexus_user_id, nexus_password, nexu
return
print(resp.content.decode("utf-8"))
-@bank_connection.command(help="import related bank accounts of
'connection-name'")
-@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)
-@click.argument("nexus-base-url")
-@click.pass_obj
-def import_bank_accounts(obj, connection_name, nexus_user_id, nexus_password,
nexus_base_url):
- # FIXME/NOTE: the 'ebics' part will soon go away.
- url = urljoin(nexus_base_url,
"/bank-connections/{}/ebics/import-accounts".format(connection_name))
- try:
- resp = post(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"))
-
-
@bank_accounts.command(help="prepare payment debiting 'account-name'")
@click.option("--account-name", help="bank account name", required=True)
@click.option("--credit-iban", help="IBAN that will receive the payment",
required=True)
diff --git a/cli/setup-template.sh b/cli/setup-template.sh
index 632032f..4e8f95d 100755
--- a/cli/setup-template.sh
+++ b/cli/setup-template.sh
@@ -1,9 +1,9 @@
#!/bin/bash
# Such template sets an env up using the Python CLI.
+# The setup goes until exchanging keys with the sandbox.
-# set -eu
-set -u
+set -eu
EBICS_HOST_ID=ebicshost
EBICS_PARTNER_ID=ebicspartner
@@ -19,8 +19,7 @@ NEXUS_USER=u
NEXUS_PASSWORD=p
NEXUS_BANK_CONNECTION_NAME=b
-NEXUS_DB=/tmp/n.sqlite3
-SANDBOX_DB=/tmp/s.sqlite3
+echo Nexus DB: $1
########## setup sandbox #############
@@ -63,7 +62,7 @@ sleep 2
# create a user
echo "Creating a nexus user (giving time to settle)"
-nexus superuser --db-name=$NEXUS_DB --password $NEXUS_PASSWORD $NEXUS_USER
+nexus superuser --db-name $1 --password $NEXUS_PASSWORD $NEXUS_USER
sleep 2
# create a bank connection
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/DB.kt
b/nexus/src/main/kotlin/tech/libeufin/nexus/DB.kt
index b8d04d1..5fcbc41 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/DB.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/DB.kt
@@ -415,7 +415,8 @@ fun dbCreateTables(dbName: String) {
FacadesTable,
TalerFacadeStateTable,
NexusScheduledTasksTable,
- OfferedBankAccountsTable
+ OfferedBankAccountsTable,
+ AvailableConnectionsForAccountsTable
)
}
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: fix missing db table,
gnunet <=