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)
| 279 | sys.exit(1) |
| 280 | |
| 281 | def 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 | |
| 302 | def secretagent(k8s_op, tag='latest'): |
| 303 | """Check if secret-agent is present in the cluster. If not, installs it.""" |