Skip to content

Commit ed2e197

Browse files
committed
chore: removed "auto" from apihost
removed "auto" from api host and duplicated extract_hostname code
1 parent ce7e4ff commit ed2e197

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

nuvolaris/apihost_util.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -161,17 +161,6 @@ def extract_port(url):
161161
parsed_url = urllib.parse.urlparse(url)
162162
return parsed_url.port
163163

164-
def extract_hostname(url):
165-
"""
166-
Parse a url and extract the hostname part
167-
>>> extract_hostname('http://localhost:8080')
168-
'localhost'
169-
>>> extract_hostname('https://nuvolaris.org')
170-
'nuvolaris.org'
171-
"""
172-
parsed_url = urllib.parse.urlparse(url)
173-
return parsed_url.hostname
174-
175164
def split_hostname_port(url):
176165
"""
177166
Parse a url and extract the port part
@@ -190,12 +179,6 @@ def get_user_static_hostname(runtime, username, apihost):
190179
inside the cm/config configMap prepending the user_namespace when needed.
191180
"""
192181

193-
if runtime == 'kind':
194-
return f"{username}.localhost"
195-
196-
if apihost not in ["auto"]:
197-
return apihost
198-
199182
apihost_url = util.get_apihost_from_config_map()
200183

201184
if apihost_url:

0 commit comments

Comments
 (0)