Merge branch '16169-cwl-hints' refs #16169
[arvados.git] / sdk / python / arvados / util.py
index fd29a3dc1d46938d2ea9e5c661bea2cbf20659be..9e0a3178305068c4edec716c57467221f98af562 100644 (file)
@@ -419,3 +419,11 @@ def new_request_id():
             rid += chr(c+ord('a')-10)
         n = n // 36
     return rid
+
+def get_config_once(svc):
+    if not svc._rootDesc.get('resources')['configs']:
+        # Old API server version, no config export endpoint
+        return {}
+    if not hasattr(svc, '_cached_config'):
+        svc._cached_config = svc.configs().get().execute()
+    return svc._cached_config