Add 'sdk/java-v2/' from commit '55f103e336ca9fb8bf1720d2ef4ee8dd4e221118'
[arvados.git] / sdk / cwl / tests / federation / framework / check_exist.py
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: Apache-2.0
4
5 from __future__ import print_function
6 import arvados
7 import json
8
9 api = arvados.api()
10
11 with open("config.json") as f:
12     config = json.load(f)
13
14 success = True
15 for c in config["check_collections"]:
16     try:
17         api.collections().get(uuid=c).execute()
18     except Exception as e:
19         print("Checking for %s got exception %s" % (c, e))
20         success = False
21
22 with open("success", "w") as f:
23     if success:
24         f.write("true")
25     else:
26         f.write("false")