summaryrefslogtreecommitdiff
path: root/bonafide/src/leap
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2016-04-30 15:46:29 -0300
committerRuben Pollan <meskio@sindominio.net>2016-05-19 14:00:44 +0200
commit1206c054753e25d2c3d542cefdb2adca823c09a1 (patch)
tree43cedbfcb956c699d947d3bf44d628e92f7bd9fa /bonafide/src/leap
parenta2adce4619f9cc946301deede86871a4fada6143 (diff)
[feat] use netloc instead of an extra api_uri in Discovery
Diffstat (limited to 'bonafide/src/leap')
-rw-r--r--bonafide/src/leap/bonafide/config.py2
-rw-r--r--bonafide/src/leap/bonafide/provider.py13
2 files changed, 2 insertions, 13 deletions
diff --git a/bonafide/src/leap/bonafide/config.py b/bonafide/src/leap/bonafide/config.py
index 8c34bc12..9da05579 100644
--- a/bonafide/src/leap/bonafide/config.py
+++ b/bonafide/src/leap/bonafide/config.py
@@ -452,7 +452,7 @@ class Provider(object):
api_uri = self._provider_config.api_uri
if api_uri:
parsed = urlparse(api_uri)
- self._disco.api_uri = parsed.netloc
+ self._disco.netloc = parsed.netloc
def _get_config_for_all_services(self, session):
services_dict = self._load_provider_configs()
diff --git a/bonafide/src/leap/bonafide/provider.py b/bonafide/src/leap/bonafide/provider.py
index 82824e9f..b44dae2e 100644
--- a/bonafide/src/leap/bonafide/provider.py
+++ b/bonafide/src/leap/bonafide/provider.py
@@ -160,19 +160,8 @@ class Discovery(BaseProvider):
'configs': ('1/configs.json', 'GET'),
}
- api_uri = None
- api_port = None
-
def _get_base_url(self):
- if self.api_uri:
- base = self.api_uri
- else:
- base = self.netloc
-
- uri = "https://{0}".format(base)
- if self.api_port:
- uri = uri + ':%s' % self.api_port
- return uri
+ return "https://{0}".format(self.netloc)
def get_base_uri(self):
return self._get_base_url()