gnunet-svn
[Top][All Lists]
Advanced

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

[taler-deployment] branch master updated: tips configuration


From: gnunet
Subject: [taler-deployment] branch master updated: tips configuration
Date: Fri, 24 Jul 2020 14:15: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 b035f10  tips configuration
b035f10 is described below

commit b035f10697888c1f72c9eaf3bde8d3753b3df4c9
Author: MS <ms@taler.net>
AuthorDate: Fri Jul 24 14:14:58 2020 +0200

    tips configuration
---
 bin/taler-config-tips | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/bin/taler-config-tips b/bin/taler-config-tips
new file mode 100755
index 0000000..fd8a178
--- /dev/null
+++ b/bin/taler-config-tips
@@ -0,0 +1,33 @@
+#!/usr/bin/env python3
+
+import requests
+from os import environ
+from sys import exit
+from urllib.parse import urljoin
+
+def expectResponse(response, expected_status_codes):
+    if response.status_code not in expected_status_codes:
+        print("Configuration failed on URL: {}".format(response.url))
+        print(response.text)
+        exit(1)
+    # Allows for finer grained checks.
+    return response
+
+TALER_ENV_NAME = environ.get("TALER_ENV_NAME")
+if not MERCHANT_BACKEND_BASE_URL:
+    print("TALER_ENV_NAME not defined.  Please source the ~/activate file.")
+    exit(1)
+MERCHANT_BACKEND = f"https://backend.{TALER_ENV_NAME}.taler.net/";
+TALER_CONFIG_CURRENCY = environ.get("TALER_CONFIG_CURRENCY", "EUR")
+
+expectResponse(
+    post(
+        urljoin(MERCHANT_BACKEND, "instances/survey/private/reserves"),
+        json=dict(
+            initial_balance=f"{TALER_CONFIG_CURRENCY}:50",
+            exchange_url=f"https://exchange.{TALER_ENV_NAME}.taler.net/";,
+            wire_method="x-taler-bank"
+        )
+    ),
+    [200]
+)

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