A new doc condor_config.html is being added showing the condor configuration
[burt-test.git] / factory / test_cm.py
blob9b2ef9c0147ff7a4890846894d27af8ad3560c3c
2 # Project:
3 # glideinWMS
5 # File Version:
6 # $Id: test_cm.py,v 1.2 2011/02/10 21:35:30 parag Exp $
9 import condorMonitor
11 condorMonitor.set_path("/home/sfiligoi/condor/dist/bin")
12 c=condorMonitor.CondorQ(schedd_name="schedd_glideins@cms-xen6.fnal.gov")
13 c.load()
14 d=c.fetchStored()
16 s=condorMonitor.CondorStatus()
17 s.load("GLIDEIN_CLUSTER=!=Undefined")
18 e=s.fetchStored()
20 def group_unclaimed(c_list):
21 out={"nr_els":0,"TotalDisk":0,"MyAddress":""}
22 for c in c_list:
23 out["nr_els"]+=1
24 out["TotalDisk"]+=c["TotalDisk"]
25 out["MyAddress"]+=c["MyAddress"]
26 return out
28 sg=condorMonitor.Group(s,lambda el:el["GLIDEIN_CLUSTER"],group_unclaimed)
29 sg.load()
30 f=sg.fetchStored()