7 def process_inputs (choice
, val
):
8 if choice
[val
] == "y":
13 request
= beagle
.DaemonInformationRequest()
15 get_version
= raw_input ("Get version (y/n)? ")
16 get_scheduler_status
= raw_input ("Get scheduler status (y/n)? ")
17 get_index_info
= raw_input ("Get index information (y/n)? ")
18 get_is_indexing
= raw_input ("Find out if currently indexing (y/n)? ")
21 'get_version': get_version
,
22 'get_scheduler_status': get_scheduler_status
,
23 'get_index_info': get_index_info
,
24 'get_is_indexing': get_is_indexing
}
26 process_inputs (choice
, 'get_version')
27 process_inputs (choice
, 'get_scheduler_status')
28 process_inputs (choice
, 'get_index_info')
29 process_inputs (choice
, 'get_is_indexing')
31 client
= beagle
.Client ()
33 request
= beagle
.DaemonInformationRequest (choice
['get_version'],
34 choice
['get_scheduler_status'],
35 choice
['get_index_info'],
36 choice
['get_is_indexing'])
37 response
= client
.send_request (request
)
41 if choice
['get_version']:
42 print "Version = %s" % response
.get_version ()
43 if choice
['get_scheduler_status']:
44 print "Scheduler status:\n %s" % response
.get_human_readable_status ()
45 if choice
['get_index_info']:
46 print "Index information:\n %s" % response
.get_index_information ()
47 if choice
['get_is_indexing']:
48 print "Is indexing ? %s" % response
.is_indexing ()