taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

commit d8123fc6ac958c8a2dfab1999ffae1b4f2131a7f
parent d0a4669da76f32232c9c189eb7828843dea2b6d7
Author: MS <ms@taler.net>
Date:   Tue, 21 Jul 2020 18:47:27 +0200

prefer urljoin

Diffstat:
Mbin/taler-config-instances | 26++------------------------
1 file changed, 2 insertions(+), 24 deletions(-)

diff --git a/bin/taler-config-instances b/bin/taler-config-instances @@ -3,13 +3,14 @@ from requests import post from os import environ from sys import exit +from urllib.parse import urljoin MERCHANT_BACKEND_BASE_URL = environ.get("TALER_ENV_MERCHANT_BACKEND") if not MERCHANT_BACKEND_BASE_URL: print("TALER_ENV_MERCHANT_BACKEND not defined. Please source the ~/activate file.") exit(1) -INSTANCE_CONFIG_URL = "{}/private/instances".format(MERCHANT_BACKEND_BASE_URL) +INSTANCE_CONFIG_URL = urljoin(MERCHANT_BACKEND_BASE_URL, "/private/instances") def expectResponse(response, expected_status_code): if response.status_code != expected_status_code: @@ -38,26 +39,3 @@ expectResponse( post(INSTANCE_CONFIG_URL, json=blog_config, headers={"Authorization": "ApiKey sandbox"}), 204 ) - - -# configure donation shop -print("configuring Donations") -donations_config = dict( - payto_uris=["payto://x-taler-bank/"], - 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=donations_config, headers={"Authorization": "ApiKey sandbox"}), - 204 -) - -print("Blog and Donations got configured")