File indexing completed on 2026-04-09 07:58:22
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 """
0013 Test client.
0014 """
0015
0016 import copy
0017
0018 from idds.client.clientmanager import ClientManager
0019 from idds.common.utils import json_dumps
0020 from idds.rest.v1.utils import convert_old_req_2_workflow_req
0021
0022
0023 def migrate():
0024
0025 dev_host = 'https://aipanda160.cern.ch:443/idds'
0026
0027 doma_host = 'https://aipanda015.cern.ch:443/idds'
0028
0029 cm1 = ClientManager(host=dev_host)
0030
0031
0032
0033 reqs = cm1.get_requests(request_id=38, with_metadata=True)
0034
0035
0036
0037 cm2 = ClientManager(host=dev_host)
0038 for req in reqs:
0039 req = convert_old_req_2_workflow_req(req)
0040 workflow = req['request_metadata']['workflow']
0041 workflow.clean_works()
0042
0043
0044 for i in range(1):
0045 wf = copy.deepcopy(workflow)
0046 req_id = cm2.submit(wf)
0047 print(req_id)
0048
0049
0050 if __name__ == '__main__':
0051 migrate()