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

fix default system for r2d

parent df6acb05
No related branches found
No related tags found
No related merge requests found
...@@ -166,17 +166,20 @@ class R2DHandler(SpawnHandler): ...@@ -166,17 +166,20 @@ class R2DHandler(SpawnHandler):
if len(arguments_dict_lower.get("system", [])) > 0: if len(arguments_dict_lower.get("system", [])) > 0:
system = arguments_dict_lower.get("system")[0].decode("utf-8") system = arguments_dict_lower.get("system")[0].decode("utf-8")
elif len(auth_state.get("outpost_flavors", {}).keys()) > 0: elif len(auth_state.get("outpost_flavors", {}).keys()) > 0:
system = list(auth_state.get("outpost_flavors", {}).keys())[0]
else:
try: try:
custom_config = get_custom_config() custom_config = get_custom_config()
if "deNBI-Cloud" in custom_config.get("systems", {}).keys(): if (
"deNBI-Cloud" in custom_config.get("systems", {}).keys()
and "deNBI-Cloud" in auth_state.get("outpost_flavors", {}).keys()
):
system = "deNBI-Cloud" system = "deNBI-Cloud"
else: else:
system = "JSC-Cloud" system = list(auth_state.get("outpost_flavors", {}).keys())[0]
except: except:
self.log.exception("Could not check for systems") self.log.exception("Could not check for systems")
system = "JSC-Cloud" system = "JSC-Cloud"
else:
system = "JSC-Cloud"
user_options["system"] = system user_options["system"] = system
# Get Flavor # Get Flavor
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment