MCPcopy Create free account
hub / github.com/ForgeRock/forgeops / printurls

Function printurls

lib/python/utils.py:281–300  ·  view source on GitHub ↗

Calculate and print relevant platform URLs. ns: target namespace. to_stdout: set to true to print URLs to stdout. If false, URLs will not be printed. return secrets: dictionary containing the URLs. URLs are returned even if to_stdout is set to False.

(ns, to_stdout=True)

Source from the content-addressed store, hash-verified

279 sys.exit(1)
280
281def printurls(ns, to_stdout=True):
282 """
283 Calculate and print relevant platform URLs.
284 ns: target namespace.
285 to_stdout: set to true to print URLs to stdout. If false, URLs will not be printed.
286 return secrets: dictionary containing the URLs. URLs are returned even if to_stdout is set to False.
287 """
288 fqdn = get_fqdn(ns)
289 urls = {
290 'platform': f'https://{fqdn}/platform',
291 'idm': f'https://{fqdn}/admin',
292 'am': f'https://{fqdn}/am',
293 'enduser': f'https://{fqdn}/enduser',
294 }
295 if to_stdout:
296 message('\nRelevant URLs:')
297 for url in urls:
298 print(urls[url])
299 warning('DEPRECATION WARNING: The IDM /admin endpoint (https://{}/admin) is deprecated in platform 8.1 and will be removed in a future ForgeOps release.'.format(fqdn))
300 return urls
301
302def secretagent(k8s_op, tag='latest'):
303 """Check if secret-agent is present in the cluster. If not, installs it."""

Callers

nothing calls this directly

Calls 4

get_fqdnFunction · 0.85
messageFunction · 0.85
warningFunction · 0.85
formatMethod · 0.45

Tested by

no test coverage detected