|
1 | 1 | import os
|
2 |
| -from pyhpcc.auth import auth |
3 |
| -from pyhpcc.models import hpcc |
4 |
| -from pyhpcc.models import workunit_submit as ws |
| 2 | + |
| 3 | +from pyhpcc.auth import Auth |
| 4 | +from pyhpcc.models import HPCC |
| 5 | +from pyhpcc.models import WorkunitSubmit as ws |
5 | 6 |
|
6 | 7 | # Configurations
|
7 | 8 | environment = "<Your environment url>" # Eg: myuniversity.hpccsystems.io
|
|
17 | 18 | working_folder = os.getcwd() # Folder to generate .ecl, .eclxml, .eclxml.xml
|
18 | 19 |
|
19 | 20 | try:
|
20 |
| - auth_object = auth( |
| 21 | + auth_object = Auth( |
21 | 22 | environment,
|
22 | 23 | port,
|
23 | 24 | user_name,
|
24 | 25 | password,
|
25 | 26 | require_auth=required_auth,
|
26 | 27 | protocol=protocol,
|
27 | 28 | )
|
28 |
| - hpcc_object = hpcc(auth=auth_object) |
| 29 | + hpcc_object = HPCC(auth=auth_object) |
29 | 30 | work_s = ws(hpcc_object, cluster, cluster)
|
30 |
| - file_name = work_s.create_filename( |
31 |
| - QueryText=ecl_query, working_folder=working_folder, Jobname=job_name |
| 31 | + file_name = work_s.create_file_name( |
| 32 | + query_text=ecl_query, working_folder=working_folder, Jobname=job_name |
32 | 33 | )
|
33 |
| - output, output_file = work_s.bash_compile(filename=file_name, gitrepository="") |
| 34 | + output, output_file = work_s.bash_compile(file_name=file_name, git_repository="") |
34 | 35 | if str(output).find("error") == -1:
|
35 | 36 | output, error = work_s.bash_run(output_file, cluster=cluster)
|
36 | 37 | index = str(output).find("running")
|
37 | 38 | wuid = str(output)[: index - 1]
|
38 |
| - _ = work_s.WUWaitComplete(wuid) |
| 39 | + _ = work_s.wu_wait_complete(wuid) |
39 | 40 | else:
|
40 | 41 | print(str(output))
|
41 | 42 | print(f"{wuid} submitted successfully")
|
|
0 commit comments