get_record.py 873 Bytes
Newer Older
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
# An example client for the Radboud Radio Lab VLBI Monitor
# 
# Copyright (c) 2016 Pim Schellart
# 
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.

import vlbi
import pprint 

import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-f", "--facility", nargs='*')
parser.add_argument("-U", "--admin-username", default="admin", help="Username of server admin")
parser.add_argument("-P", "--admin-password", default="admin", help="Password of server admin")
parser.add_argument("--server", help="Server address", default="http://localhost:8000/rpc")

args = parser.parse_args()

client = vlbi.Client(args.server, "RU", args.admin_username, args.admin_password)


result = client.getCurrentRecord(args.facility)

pp = pprint.PrettyPrinter(indent=4)
for r in result:
    pp.pprint(r)