gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated (91aeb34 -> 49469ce)


From: gnunet
Subject: [libeufin] branch master updated (91aeb34 -> 49469ce)
Date: Wed, 13 Jan 2021 17:16:19 +0100

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

dold pushed a change to branch master
in repository libeufin.

    from 91aeb34  sandbox cli
     new bdd8291  cli
     new 49469ce  remove deprecated endpoint

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                               | 14 ++++++++++-
 integration-tests/start-testenv.py                 |  8 +++----
 integration-tests/tests.py                         |  2 +-
 .../src/main/kotlin/tech/libeufin/sandbox/Main.kt  | 27 ----------------------
 4 files changed, 18 insertions(+), 33 deletions(-)

diff --git a/cli/bin/libeufin-cli b/cli/bin/libeufin-cli
index 0fd355d..ed79436 100755
--- a/cli/bin/libeufin-cli
+++ b/cli/bin/libeufin-cli
@@ -499,12 +499,24 @@ def create_ebics_subscriber(obj, host_id, partner_id, 
user_id):
         exit(1)
     print(resp.content.decode("utf-8"))
 
+@sandbox_ebicssubscriber.command("list", help="List EBICS subscribers.")
+@click.pass_obj
+def create_ebics_subscriber(obj):
+    sandbox_base_url = obj.require_sandbox_base_url()
+    url = urljoin(sandbox_base_url, "/admin/ebics/subscribers")
+    try:
+        resp = get(url)
+    except Exception:
+        print("Could not reach sandbox")
+        exit(1)
+    print(resp.content.decode("utf-8"))
+
 @sandbox.group("ebicsbankaccount", help="manage EBICS bank accounts")
 @click.pass_context
 def sandbox_ebicsbankaccount(ctx):
     pass
 
-@sandbox_ebicsbankaccount.command("create", help="associate a bank account to 
a Ebics subscriber")
+@sandbox_ebicsbankaccount.command("create", help="Create a bank account 
associated to an EBICS subscriber.")
 @click.option("--iban", help="IBAN", required=True)
 @click.option("--bic", help="BIC", required=True)
 @click.option("--person-name", help="bank account owner name", required=True)
diff --git a/integration-tests/start-testenv.py 
b/integration-tests/start-testenv.py
index 634b93e..24833c1 100755
--- a/integration-tests/start-testenv.py
+++ b/integration-tests/start-testenv.py
@@ -99,25 +99,25 @@ startSandbox()
 # 0.a Create EBICS hosts
 assertResponse(
     post(
-        "http://localhost:5000/admin/ebics/host";,
+        "http://localhost:5000/admin/ebics/hosts";,
         json=dict(hostID=BC1_HOST_ID, ebicsVersion=EBICS_VERSION),
     )
 )
 assertResponse(
     post(
-        "http://localhost:5000/admin/ebics/host";,
+        "http://localhost:5000/admin/ebics/hosts";,
         json=dict(hostID=BC2_HOST_ID, ebicsVersion=EBICS_VERSION),
     )
 )
 assertResponse(
     post(
-        "http://localhost:5000/admin/ebics/host";,
+        "http://localhost:5000/admin/ebics/hosts";,
         json=dict(hostID=BC3_HOST_ID, ebicsVersion=EBICS_VERSION),
     )
 )
 assertResponse(
     post(
-        "http://localhost:5000/admin/ebics/host";,
+        "http://localhost:5000/admin/ebics/hosts";,
         json=dict(hostID=BC4_HOST_ID, ebicsVersion=EBICS_VERSION),
     )
 )
diff --git a/integration-tests/tests.py b/integration-tests/tests.py
index 0d3bf0e..4faf676 100755
--- a/integration-tests/tests.py
+++ b/integration-tests/tests.py
@@ -35,7 +35,7 @@ def prepareSandbox():
     # make ebics host at sandbox
     assertResponse(
         post(
-            f"{PERSONA.banking.bank_base_url}/admin/ebics/host",
+            f"{PERSONA.banking.bank_base_url}/admin/ebics/hosts",
             json=dict(hostID=PERSONA.ebics.host, 
ebicsVersion=PERSONA.ebics.version),
         )
     )
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index b030eeb..7152169 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -387,33 +387,6 @@ fun serverMain(dbName: String, port: Int) {
                 call.respond(ret)
                 return@get
             }
-            /**
-             * Creates a new EBICS host.
-             *
-             * FIXME: This endpoint is deprecated.  /hosts should be used 
instead.
-             */
-            post("/admin/ebics/host") {
-                val req = call.receive<EbicsHostCreateRequest>()
-                val pairA = CryptoUtil.generateRsaKeyPair(2048)
-                val pairB = CryptoUtil.generateRsaKeyPair(2048)
-                val pairC = CryptoUtil.generateRsaKeyPair(2048)
-                transaction {
-                    EbicsHostEntity.new {
-                        this.ebicsVersion = req.ebicsVersion
-                        this.hostId = req.hostID
-                        this.authenticationPrivateKey = 
ExposedBlob(pairA.private.encoded)
-                        this.encryptionPrivateKey = 
ExposedBlob(pairB.private.encoded)
-                        this.signaturePrivateKey = 
ExposedBlob(pairC.private.encoded)
-                    }
-                }
-                call.respondText(
-                    "Host '${req.hostID}' created.",
-                    ContentType.Text.Plain,
-                    HttpStatusCode.OK
-                )
-                return@post
-            }
-
             /**
              * Creates a new EBICS host.
              */

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