-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhera_mc.py
30 lines (26 loc) · 949 Bytes
/
hera_mc.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Python binding of M&C RPCs
# DEPRECATED
import hera_rpc
# create an observation
#
def create_observation(julian_date, polarization, length):
config = get_config('.hera_mc')
req = {'operation': 'create_observation',
'authenticator': config['authenticator'],
'name': name,
'size': size,
'md5': md5,
'store_name': store_name}
return do_http_post(req, config['server'])
def create_status(observation_id, status, current_pid, still_host, still_path, output_host, output_path):
config = get_config('.hera_mc')
req = {'operation': 'create_status',
'authenticator': config['authenticator'],
'observation_id': observation_id,
'status': status,
'current_pid': current_pid,
'still_host': still_host,
'still_path': still_path,
'output_host': output_host,
'output_path': output_path }
return do_http_post(req, config['server'])