Skip to content
Snippets Groups Projects
Commit 4390e1a7 authored by Tim Kreuzer's avatar Tim Kreuzer
Browse files

add denbiCloud Check

parent a4830879
Branches
Tags
No related merge requests found
......@@ -9,6 +9,7 @@ from jupyterhub.handlers.pages import SpawnHandler
from jupyterhub.utils import url_path_join
from tornado import web
from ..misc import get_custom_config
from ..orm.share import UserOptionsShares
......@@ -160,8 +161,6 @@ class R2DHandler(SpawnHandler):
"urlpath"
)[0].decode("utf-8")
# https://jupyter-jsc-dev2.fz-juelich.de/hub/r2d/gh/FZJ-JSC/jupyter-jsc-notebooks
# Get System
auth_state = await user.get_auth_state()
if len(arguments_dict_lower.get("system", [])) > 0:
......@@ -169,6 +168,14 @@ class R2DHandler(SpawnHandler):
elif len(auth_state.get("outpost_flavors", {}).keys()) > 0:
system = list(auth_state.get("outpost_flavors", {}).keys())[0]
else:
try:
custom_config = get_custom_config()
if "deNBI-Cloud" in custom_config.get("systems", {}).keys():
system = "deNBI-Cloud"
else:
system = "JSC-Cloud"
except:
self.log.exception("Could not check for systems")
system = "JSC-Cloud"
user_options["system"] = system
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment