diff options
Diffstat (limited to 'bin/taler_urls.py')
-rw-r--r-- | bin/taler_urls.py | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/bin/taler_urls.py b/bin/taler_urls.py deleted file mode 100644 index 8c81e38..0000000 --- a/bin/taler_urls.py +++ /dev/null @@ -1,56 +0,0 @@ -from urllib.parse import urlparse - -taler_urls = dict( - online = dict( - donations = "https://donations.{}.taler.net/", - blog = "https://shop.{}.taler.net/", - bank = "https://bank.{}.taler.net/", - backoffice = "https://backoffice.{}.taler.net/", - exchange = "https://exchange.{}.taler.net/", - merchant_backend = "https://backend.{}.taler.net/", - landing = "https://{}.taler.net/", - survey = "https://survey.{}.taler.net/", - auditor = "https://auditor.{}.taler.net/", - sync = "https://sync.{}.taler.net/", - talerbank_payto = "payto://x-taler-bank/bank.{}.taler.net/" - ), - offline = dict( - donations = "http://localhost:5880/", - blog = "http://localhost:5881/", - bank = "http://localhost:5882/", - backoffice = "http://localhost:5883/", - exchange = "http://localhost:5884/", - merchant_backend = "http://localhost:5885/", - landing = "http://localhost:5886/", - survey = "http://localhost:5887/", - auditor = "http://localhost:5888/", - sync = "http://localhost:5889/", - talerbank_payto = "payto://x-taler-bank/localhost:5882/" - ) -) - -def get_urls(envname): - if envname == "tanker": - return dict( - donations = "https://donations.grumla.se/", - blog = "https://shop.grumla.se/", - auditor = "#", - bank = "https://bank.grumla.se/", - backoffice = "https://backoffice.grumla.se/", - exchange = "https://exchange.grumla.se/", - merchant_backend = "https://merchant-backend.grumla.se/", - landing = "https://grumla.se/", - survey = "https://survey.grumla.se/", - sync = "https://sync.grumla.se/", - talerbank_payto = "payto://x-taler-bank/bank.grumla.se/" - ) - if envname == "local": - return taler_urls["offline"] - return dict((k, v.format(envname)) - for k, v in taler_urls["online"].items() - ) - -def get_port(localhost_url): - parsed = urlparse(localhost_url) - assert(parsed.port) - return str(parsed.port) |