gnunet-svn
[Top][All Lists]
Advanced

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

[taler-deployment] branch master updated: config script for instances


From: gnunet
Subject: [taler-deployment] branch master updated: config script for instances
Date: Wed, 15 Jul 2020 18:25:05 +0200

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

ms pushed a commit to branch master
in repository deployment.

The following commit(s) were added to refs/heads/master by this push:
     new 8e3c01a  config script for instances
8e3c01a is described below

commit 8e3c01af035a8fe1be8035969551fb4a2bc1d475
Author: MS <ms@taler.net>
AuthorDate: Wed Jul 15 18:24:59 2020 +0200

    config script for instances
---
 bin/taler-config-instances | 57 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/bin/taler-config-instances b/bin/taler-config-instances
new file mode 100755
index 0000000..7a1ff8b
--- /dev/null
+++ b/bin/taler-config-instances
@@ -0,0 +1,57 @@
+#!/usr/bin/env python3
+
+import requests
+
+MERCHANT_BACKEND_BASE_URL = "http://localhost:9966";
+INSTANCE_CONFIG_URL = "{}/private/instances".format(MERCHANT_BACKEND_BASE_URL)
+def expectResponse(response, expected_status_code):
+    if response.status_code != expected_status_code:
+        print("Configuration failed on URL: {}".format(response.url))
+        # stdout/stderr from both services is A LOT of text.
+        # Confusing to dump all that to console.
+        exit(1)
+    # Allows for finer grained checks.
+    return response
+
+# configure blog
+print("configuring Blog")
+blog_config = dict(
+    payto_uris=list("payto://x-taler-bank/blog"),
+    id="blog",
+    name="Blog",
+    address=dict(),
+    jurisdiction=dict(),
+    default_max_wire_fee="EUR:1",
+    default_wire_fee_amortization=3,
+    default_max_deposit_fee="EUR:1",
+    default_wire_transfer_delay=dict(d_ms="forever"),
+    default_pay_delay=dict(d_ms="forever")
+)
+
+expectResponse(
+    post(INSTANCE_CONFIG_URL, json=blog_config),
+    204
+)
+
+
+# configure donation shop
+print("configuring Donations")
+donations_config = dict(
+    payto_uris=list("payto://x-taler-bank/donations"),
+    id="donations",
+    name="Donations",
+    address=dict(),
+    jurisdiction=dict(),
+    default_max_wire_fee="EUR:1",
+    default_wire_fee_amortization=3,
+    default_max_deposit_fee="EUR:1",
+    default_wire_transfer_delay=dict(d_ms="forever"),
+    default_pay_delay=dict(d_ms="forever")
+)
+
+expectResponse(
+    post(INSTANCE_CONFIG_URL, json=blog_config),
+    204
+)
+
+print("Blog and Donations got configured")

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