source: trunk/src/pbs_2.4.py @ 215

Last change on this file since 215 was 215, checked in by bas, 14 years ago

Added new generated swig files for torque 2.1 and 2.4

File size: 24.9 KB
Line 
1# This file was automatically generated by SWIG (http://www.swig.org).
2# Version 1.3.36
3#
4# Don't modify this file, modify the SWIG interface instead.
5# This file is compatible with both classic and new-style classes.
6
7import _pbs
8import new
9new_instancemethod = new.instancemethod
10try:
11    _swig_property = property
12except NameError:
13    pass # Python < 2.2 doesn't have 'property'.
14def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
15    if (name == "thisown"): return self.this.own(value)
16    if (name == "this"):
17        if type(value).__name__ == 'PySwigObject':
18            self.__dict__[name] = value
19            return
20    method = class_type.__swig_setmethods__.get(name,None)
21    if method: return method(self,value)
22    if (not static) or hasattr(self,name):
23        self.__dict__[name] = value
24    else:
25        raise AttributeError("You cannot add attributes to %s" % self)
26
27def _swig_setattr(self,class_type,name,value):
28    return _swig_setattr_nondynamic(self,class_type,name,value,0)
29
30def _swig_getattr(self,class_type,name):
31    if (name == "thisown"): return self.this.own()
32    method = class_type.__swig_getmethods__.get(name,None)
33    if method: return method(self)
34    raise AttributeError,name
35
36def _swig_repr(self):
37    try: strthis = "proxy of " + self.this.__repr__()
38    except: strthis = ""
39    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
40
41import types
42try:
43    _object = types.ObjectType
44    _newclass = 1
45except AttributeError:
46    class _object : pass
47    _newclass = 0
48del types
49
50
51new_attrl = _pbs.new_attrl
52new_attropl = _pbs.new_attropl
53new_batch_status = _pbs.new_batch_status
54get_error = _pbs.get_error
55ATTR_a = _pbs.ATTR_a
56ATTR_c = _pbs.ATTR_c
57ATTR_e = _pbs.ATTR_e
58ATTR_f = _pbs.ATTR_f
59ATTR_g = _pbs.ATTR_g
60ATTR_h = _pbs.ATTR_h
61ATTR_j = _pbs.ATTR_j
62ATTR_k = _pbs.ATTR_k
63ATTR_l = _pbs.ATTR_l
64ATTR_m = _pbs.ATTR_m
65ATTR_o = _pbs.ATTR_o
66ATTR_p = _pbs.ATTR_p
67ATTR_q = _pbs.ATTR_q
68ATTR_r = _pbs.ATTR_r
69ATTR_t = _pbs.ATTR_t
70ATTR_array_id = _pbs.ATTR_array_id
71ATTR_u = _pbs.ATTR_u
72ATTR_v = _pbs.ATTR_v
73ATTR_A = _pbs.ATTR_A
74ATTR_M = _pbs.ATTR_M
75ATTR_N = _pbs.ATTR_N
76ATTR_S = _pbs.ATTR_S
77ATTR_depend = _pbs.ATTR_depend
78ATTR_inter = _pbs.ATTR_inter
79ATTR_stagein = _pbs.ATTR_stagein
80ATTR_stageout = _pbs.ATTR_stageout
81ATTR_jobtype = _pbs.ATTR_jobtype
82ATTR_ctime = _pbs.ATTR_ctime
83ATTR_exechost = _pbs.ATTR_exechost
84ATTR_mtime = _pbs.ATTR_mtime
85ATTR_qtime = _pbs.ATTR_qtime
86ATTR_session = _pbs.ATTR_session
87ATTR_euser = _pbs.ATTR_euser
88ATTR_egroup = _pbs.ATTR_egroup
89ATTR_hashname = _pbs.ATTR_hashname
90ATTR_hopcount = _pbs.ATTR_hopcount
91ATTR_security = _pbs.ATTR_security
92ATTR_sched_hint = _pbs.ATTR_sched_hint
93ATTR_substate = _pbs.ATTR_substate
94ATTR_name = _pbs.ATTR_name
95ATTR_owner = _pbs.ATTR_owner
96ATTR_used = _pbs.ATTR_used
97ATTR_state = _pbs.ATTR_state
98ATTR_queue = _pbs.ATTR_queue
99ATTR_server = _pbs.ATTR_server
100ATTR_maxrun = _pbs.ATTR_maxrun
101ATTR_maxreport = _pbs.ATTR_maxreport
102ATTR_total = _pbs.ATTR_total
103ATTR_comment = _pbs.ATTR_comment
104ATTR_cookie = _pbs.ATTR_cookie
105ATTR_qrank = _pbs.ATTR_qrank
106ATTR_altid = _pbs.ATTR_altid
107ATTR_etime = _pbs.ATTR_etime
108ATTR_exitstat = _pbs.ATTR_exitstat
109ATTR_forwardx11 = _pbs.ATTR_forwardx11
110ATTR_submit_args = _pbs.ATTR_submit_args
111ATTR_tokens = _pbs.ATTR_tokens
112ATTR_netcounter = _pbs.ATTR_netcounter
113ATTR_umask = _pbs.ATTR_umask
114ATTR_start_time = _pbs.ATTR_start_time
115ATTR_start_count = _pbs.ATTR_start_count
116ATTR_checkpoint_dir = _pbs.ATTR_checkpoint_dir
117ATTR_checkpoint_name = _pbs.ATTR_checkpoint_name
118ATTR_checkpoint_time = _pbs.ATTR_checkpoint_time
119ATTR_checkpoint_restart_status = _pbs.ATTR_checkpoint_restart_status
120ATTR_restart_name = _pbs.ATTR_restart_name
121ATTR_comp_time = _pbs.ATTR_comp_time
122ATTR_reported = _pbs.ATTR_reported
123ATTR_intcmd = _pbs.ATTR_intcmd
124ATTR_aclgren = _pbs.ATTR_aclgren
125ATTR_aclgroup = _pbs.ATTR_aclgroup
126ATTR_aclhten = _pbs.ATTR_aclhten
127ATTR_aclhost = _pbs.ATTR_aclhost
128ATTR_acluren = _pbs.ATTR_acluren
129ATTR_acluser = _pbs.ATTR_acluser
130ATTR_altrouter = _pbs.ATTR_altrouter
131ATTR_checkpoint_min = _pbs.ATTR_checkpoint_min
132ATTR_enable = _pbs.ATTR_enable
133ATTR_fromroute = _pbs.ATTR_fromroute
134ATTR_hostlist = _pbs.ATTR_hostlist
135ATTR_killdelay = _pbs.ATTR_killdelay
136ATTR_maxgrprun = _pbs.ATTR_maxgrprun
137ATTR_maxque = _pbs.ATTR_maxque
138ATTR_maxuserque = _pbs.ATTR_maxuserque
139ATTR_maxuserrun = _pbs.ATTR_maxuserrun
140ATTR_qtype = _pbs.ATTR_qtype
141ATTR_rescassn = _pbs.ATTR_rescassn
142ATTR_rescdflt = _pbs.ATTR_rescdflt
143ATTR_rescmax = _pbs.ATTR_rescmax
144ATTR_rescmin = _pbs.ATTR_rescmin
145ATTR_rerunnable = _pbs.ATTR_rerunnable
146ATTR_rndzretry = _pbs.ATTR_rndzretry
147ATTR_routedest = _pbs.ATTR_routedest
148ATTR_routeheld = _pbs.ATTR_routeheld
149ATTR_routewait = _pbs.ATTR_routewait
150ATTR_routeretry = _pbs.ATTR_routeretry
151ATTR_routelife = _pbs.ATTR_routelife
152ATTR_rsvexpdt = _pbs.ATTR_rsvexpdt
153ATTR_rsvsync = _pbs.ATTR_rsvsync
154ATTR_start = _pbs.ATTR_start
155ATTR_count = _pbs.ATTR_count
156ATTR_number = _pbs.ATTR_number
157ATTR_acllogic = _pbs.ATTR_acllogic
158ATTR_aclgrpslpy = _pbs.ATTR_aclgrpslpy
159ATTR_keepcompleted = _pbs.ATTR_keepcompleted
160ATTR_disallowedtypes = _pbs.ATTR_disallowedtypes
161ATTR_is_transit = _pbs.ATTR_is_transit
162ATTR_aclroot = _pbs.ATTR_aclroot
163ATTR_managers = _pbs.ATTR_managers
164ATTR_dfltque = _pbs.ATTR_dfltque
165ATTR_dispsvrsuffix = _pbs.ATTR_dispsvrsuffix
166ATTR_jobsuffixalias = _pbs.ATTR_jobsuffixalias
167ATTR_defnode = _pbs.ATTR_defnode
168ATTR_locsvrs = _pbs.ATTR_locsvrs
169ATTR_logevents = _pbs.ATTR_logevents
170ATTR_logfile = _pbs.ATTR_logfile
171ATTR_loglevel = _pbs.ATTR_loglevel
172ATTR_mailfrom = _pbs.ATTR_mailfrom
173ATTR_nodepack = _pbs.ATTR_nodepack
174ATTR_nodesuffix = _pbs.ATTR_nodesuffix
175ATTR_operators = _pbs.ATTR_operators
176ATTR_queryother = _pbs.ATTR_queryother
177ATTR_resccost = _pbs.ATTR_resccost
178ATTR_rescavail = _pbs.ATTR_rescavail
179ATTR_schedit = _pbs.ATTR_schedit
180ATTR_scheduling = _pbs.ATTR_scheduling
181ATTR_status = _pbs.ATTR_status
182ATTR_syscost = _pbs.ATTR_syscost
183ATTR_pingrate = _pbs.ATTR_pingrate
184ATTR_ndchkrate = _pbs.ATTR_ndchkrate
185ATTR_tcptimeout = _pbs.ATTR_tcptimeout
186ATTR_jobstatrate = _pbs.ATTR_jobstatrate
187ATTR_polljobs = _pbs.ATTR_polljobs
188ATTR_downonerror = _pbs.ATTR_downonerror
189ATTR_disableserveridcheck = _pbs.ATTR_disableserveridcheck
190ATTR_jobnanny = _pbs.ATTR_jobnanny
191ATTR_ownerpurge = _pbs.ATTR_ownerpurge
192ATTR_qcqlimits = _pbs.ATTR_qcqlimits
193ATTR_momjobsync = _pbs.ATTR_momjobsync
194ATTR_maildomain = _pbs.ATTR_maildomain
195ATTR_pbsversion = _pbs.ATTR_pbsversion
196ATTR_submithosts = _pbs.ATTR_submithosts
197ATTR_allownodesubmit = _pbs.ATTR_allownodesubmit
198ATTR_allowproxyuser = _pbs.ATTR_allowproxyuser
199ATTR_autonodenp = _pbs.ATTR_autonodenp
200ATTR_servername = _pbs.ATTR_servername
201ATTR_logfilemaxsize = _pbs.ATTR_logfilemaxsize
202ATTR_logfilerolldepth = _pbs.ATTR_logfilerolldepth
203ATTR_logkeepdays = _pbs.ATTR_logkeepdays
204ATTR_nextjobnum = _pbs.ATTR_nextjobnum
205ATTR_extraresc = _pbs.ATTR_extraresc
206ATTR_schedversion = _pbs.ATTR_schedversion
207ATTR_acctkeepdays = _pbs.ATTR_acctkeepdays
208ATTR_lockfile = _pbs.ATTR_lockfile
209ATTR_credentiallifetime = _pbs.ATTR_credentiallifetime
210ATTR_jobmustreport = _pbs.ATTR_jobmustreport
211ATTR_LockfileUpdateTime = _pbs.ATTR_LockfileUpdateTime
212ATTR_LockfileCheckTime = _pbs.ATTR_LockfileCheckTime
213ATTR_npdefault = _pbs.ATTR_npdefault
214ATTR_jobstarttimeout = _pbs.ATTR_jobstarttimeout
215ATTR_NODE_state = _pbs.ATTR_NODE_state
216ATTR_NODE_np = _pbs.ATTR_NODE_np
217ATTR_NODE_properties = _pbs.ATTR_NODE_properties
218ATTR_NODE_ntype = _pbs.ATTR_NODE_ntype
219ATTR_NODE_jobs = _pbs.ATTR_NODE_jobs
220ATTR_NODE_status = _pbs.ATTR_NODE_status
221ATTR_NODE_note = _pbs.ATTR_NODE_note
222ATTR_mailsubjectfmt = _pbs.ATTR_mailsubjectfmt
223ATTR_mailbodyfmt = _pbs.ATTR_mailbodyfmt
224CHECKPOINT_UNSPECIFIED = _pbs.CHECKPOINT_UNSPECIFIED
225NO_HOLD = _pbs.NO_HOLD
226NO_JOIN = _pbs.NO_JOIN
227NO_KEEP = _pbs.NO_KEEP
228MAIL_AT_ABORT = _pbs.MAIL_AT_ABORT
229DELDELAY = _pbs.DELDELAY
230DELPURGE = _pbs.DELPURGE
231PURGECOMP = _pbs.PURGECOMP
232EXECQUEONLY = _pbs.EXECQUEONLY
233RERUNFORCE = _pbs.RERUNFORCE
234USER_HOLD = _pbs.USER_HOLD
235OTHER_HOLD = _pbs.OTHER_HOLD
236SYSTEM_HOLD = _pbs.SYSTEM_HOLD
237ND_free = _pbs.ND_free
238ND_offline = _pbs.ND_offline
239ND_down = _pbs.ND_down
240ND_reserve = _pbs.ND_reserve
241ND_job_exclusive = _pbs.ND_job_exclusive
242ND_job_sharing = _pbs.ND_job_sharing
243ND_busy = _pbs.ND_busy
244ND_state_unknown = _pbs.ND_state_unknown
245ND_timeshared = _pbs.ND_timeshared
246ND_cluster = _pbs.ND_cluster
247Q_DT_batch = _pbs.Q_DT_batch
248Q_DT_interactive = _pbs.Q_DT_interactive
249Q_DT_rerunable = _pbs.Q_DT_rerunable
250Q_DT_nonrerunable = _pbs.Q_DT_nonrerunable
251Q_DT_fault_tolerant = _pbs.Q_DT_fault_tolerant
252Q_DT_fault_intolerant = _pbs.Q_DT_fault_intolerant
253Q_DT_job_array = _pbs.Q_DT_job_array
254MAX_ENCODE_BFR = _pbs.MAX_ENCODE_BFR
255MGR_CMD_CREATE = _pbs.MGR_CMD_CREATE
256MGR_CMD_DELETE = _pbs.MGR_CMD_DELETE
257MGR_CMD_SET = _pbs.MGR_CMD_SET
258MGR_CMD_UNSET = _pbs.MGR_CMD_UNSET
259MGR_CMD_LIST = _pbs.MGR_CMD_LIST
260MGR_CMD_PRINT = _pbs.MGR_CMD_PRINT
261MGR_CMD_ACTIVE = _pbs.MGR_CMD_ACTIVE
262MGR_OBJ_NONE = _pbs.MGR_OBJ_NONE
263MGR_OBJ_SERVER = _pbs.MGR_OBJ_SERVER
264MGR_OBJ_QUEUE = _pbs.MGR_OBJ_QUEUE
265MGR_OBJ_JOB = _pbs.MGR_OBJ_JOB
266MGR_OBJ_NODE = _pbs.MGR_OBJ_NODE
267MSG_OUT = _pbs.MSG_OUT
268MSG_ERR = _pbs.MSG_ERR
269SHUT_SIG = _pbs.SHUT_SIG
270SHUT_IMMEDIATE = _pbs.SHUT_IMMEDIATE
271SHUT_DELAY = _pbs.SHUT_DELAY
272SHUT_QUICK = _pbs.SHUT_QUICK
273SIG_RESUME = _pbs.SIG_RESUME
274SIG_SUSPEND = _pbs.SIG_SUSPEND
275PBS_MAXHOSTNAME = _pbs.PBS_MAXHOSTNAME
276MAXPATHLEN = _pbs.MAXPATHLEN
277MAXNAMLEN = _pbs.MAXNAMLEN
278MAX_NOTE = _pbs.MAX_NOTE
279MAX_NOTE_STR = _pbs.MAX_NOTE_STR
280PBS_MAXUSER = _pbs.PBS_MAXUSER
281PBS_MAXGRPN = _pbs.PBS_MAXGRPN
282PBS_MAXQUEUENAME = _pbs.PBS_MAXQUEUENAME
283PBS_MAXSERVERNAME = _pbs.PBS_MAXSERVERNAME
284PBS_MAXJOBARRAYLEN = _pbs.PBS_MAXJOBARRAYLEN
285PBS_MAXSEQNUM = _pbs.PBS_MAXSEQNUM
286PBS_MAXPORTNUM = _pbs.PBS_MAXPORTNUM
287PBS_MAXJOBARRAY = _pbs.PBS_MAXJOBARRAY
288PBS_MAXSVRJOBID = _pbs.PBS_MAXSVRJOBID
289PBS_MAXCLTJOBID = _pbs.PBS_MAXCLTJOBID
290PBS_MAXDEST = _pbs.PBS_MAXDEST
291PBS_MAXROUTEDEST = _pbs.PBS_MAXROUTEDEST
292PBS_USE_IFF = _pbs.PBS_USE_IFF
293PBS_INTERACTIVE = _pbs.PBS_INTERACTIVE
294PBS_TERM_BUF_SZ = _pbs.PBS_TERM_BUF_SZ
295PBS_TERM_CCA = _pbs.PBS_TERM_CCA
296PBS_QS_VERSION_BASE = _pbs.PBS_QS_VERSION_BASE
297PBS_QS_VERSION_INT = _pbs.PBS_QS_VERSION_INT
298PBS_QS_VERSION = _pbs.PBS_QS_VERSION
299PBS_BATCH_SERVICE_NAME = _pbs.PBS_BATCH_SERVICE_NAME
300PBS_BATCH_SERVICE_PORT = _pbs.PBS_BATCH_SERVICE_PORT
301PBS_BATCH_SERVICE_NAME_DIS = _pbs.PBS_BATCH_SERVICE_NAME_DIS
302PBS_BATCH_SERVICE_PORT_DIS = _pbs.PBS_BATCH_SERVICE_PORT_DIS
303PBS_MOM_SERVICE_NAME = _pbs.PBS_MOM_SERVICE_NAME
304PBS_MOM_SERVICE_PORT = _pbs.PBS_MOM_SERVICE_PORT
305PBS_MANAGER_SERVICE_NAME = _pbs.PBS_MANAGER_SERVICE_NAME
306PBS_MANAGER_SERVICE_PORT = _pbs.PBS_MANAGER_SERVICE_PORT
307PBS_SCHEDULER_SERVICE_NAME = _pbs.PBS_SCHEDULER_SERVICE_NAME
308PBS_SCHEDULER_SERVICE_PORT = _pbs.PBS_SCHEDULER_SERVICE_PORT
309CHECKPOINTHOLD = _pbs.CHECKPOINTHOLD
310CHECKPOINTCONT = _pbs.CHECKPOINTCONT
311MOM_DEFAULT_CHECKPOINT_DIR = _pbs.MOM_DEFAULT_CHECKPOINT_DIR
312SET = _pbs.SET
313UNSET = _pbs.UNSET
314INCR = _pbs.INCR
315DECR = _pbs.DECR
316EQ = _pbs.EQ
317NE = _pbs.NE
318GE = _pbs.GE
319GT = _pbs.GT
320LE = _pbs.LE
321LT = _pbs.LT
322DFLT = _pbs.DFLT
323MERGE = _pbs.MERGE
324class attrl(_object):
325    __swig_setmethods__ = {}
326    __setattr__ = lambda self, name, value: _swig_setattr(self, attrl, name, value)
327    __swig_getmethods__ = {}
328    __getattr__ = lambda self, name: _swig_getattr(self, attrl, name)
329    def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined"
330    __repr__ = _swig_repr
331    __swig_setmethods__["next"] = _pbs.attrl_next_set
332    __swig_getmethods__["next"] = _pbs.attrl_next_get
333    if _newclass:next = _swig_property(_pbs.attrl_next_get, _pbs.attrl_next_set)
334    __swig_setmethods__["name"] = _pbs.attrl_name_set
335    __swig_getmethods__["name"] = _pbs.attrl_name_get
336    if _newclass:name = _swig_property(_pbs.attrl_name_get, _pbs.attrl_name_set)
337    __swig_setmethods__["resource"] = _pbs.attrl_resource_set
338    __swig_getmethods__["resource"] = _pbs.attrl_resource_get
339    if _newclass:resource = _swig_property(_pbs.attrl_resource_get, _pbs.attrl_resource_set)
340    __swig_setmethods__["value"] = _pbs.attrl_value_set
341    __swig_getmethods__["value"] = _pbs.attrl_value_get
342    if _newclass:value = _swig_property(_pbs.attrl_value_get, _pbs.attrl_value_set)
343    __swig_setmethods__["op"] = _pbs.attrl_op_set
344    __swig_getmethods__["op"] = _pbs.attrl_op_get
345    if _newclass:op = _swig_property(_pbs.attrl_op_get, _pbs.attrl_op_set)
346    def __str__(*args): return _pbs.attrl___str__(*args)
347    __swig_destroy__ = _pbs.delete_attrl
348    __del__ = lambda self : None;
349attrl_swigregister = _pbs.attrl_swigregister
350attrl_swigregister(attrl)
351
352class attropl(_object):
353    __swig_setmethods__ = {}
354    __setattr__ = lambda self, name, value: _swig_setattr(self, attropl, name, value)
355    __swig_getmethods__ = {}
356    __getattr__ = lambda self, name: _swig_getattr(self, attropl, name)
357    def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined"
358    __repr__ = _swig_repr
359    __swig_setmethods__["next"] = _pbs.attropl_next_set
360    __swig_getmethods__["next"] = _pbs.attropl_next_get
361    if _newclass:next = _swig_property(_pbs.attropl_next_get, _pbs.attropl_next_set)
362    __swig_setmethods__["name"] = _pbs.attropl_name_set
363    __swig_getmethods__["name"] = _pbs.attropl_name_get
364    if _newclass:name = _swig_property(_pbs.attropl_name_get, _pbs.attropl_name_set)
365    __swig_setmethods__["resource"] = _pbs.attropl_resource_set
366    __swig_getmethods__["resource"] = _pbs.attropl_resource_get
367    if _newclass:resource = _swig_property(_pbs.attropl_resource_get, _pbs.attropl_resource_set)
368    __swig_setmethods__["value"] = _pbs.attropl_value_set
369    __swig_getmethods__["value"] = _pbs.attropl_value_get
370    if _newclass:value = _swig_property(_pbs.attropl_value_get, _pbs.attropl_value_set)
371    __swig_setmethods__["op"] = _pbs.attropl_op_set
372    __swig_getmethods__["op"] = _pbs.attropl_op_get
373    if _newclass:op = _swig_property(_pbs.attropl_op_get, _pbs.attropl_op_set)
374    def __str__(*args): return _pbs.attropl___str__(*args)
375    __swig_destroy__ = _pbs.delete_attropl
376    __del__ = lambda self : None;
377attropl_swigregister = _pbs.attropl_swigregister
378attropl_swigregister(attropl)
379
380class batch_status(_object):
381    __swig_setmethods__ = {}
382    __setattr__ = lambda self, name, value: _swig_setattr(self, batch_status, name, value)
383    __swig_getmethods__ = {}
384    __getattr__ = lambda self, name: _swig_getattr(self, batch_status, name)
385    def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined"
386    __repr__ = _swig_repr
387    __swig_setmethods__["next"] = _pbs.batch_status_next_set
388    __swig_getmethods__["next"] = _pbs.batch_status_next_get
389    if _newclass:next = _swig_property(_pbs.batch_status_next_get, _pbs.batch_status_next_set)
390    __swig_setmethods__["name"] = _pbs.batch_status_name_set
391    __swig_getmethods__["name"] = _pbs.batch_status_name_get
392    if _newclass:name = _swig_property(_pbs.batch_status_name_get, _pbs.batch_status_name_set)
393    __swig_setmethods__["attribs"] = _pbs.batch_status_attribs_set
394    __swig_getmethods__["attribs"] = _pbs.batch_status_attribs_get
395    if _newclass:attribs = _swig_property(_pbs.batch_status_attribs_get, _pbs.batch_status_attribs_set)
396    __swig_setmethods__["text"] = _pbs.batch_status_text_set
397    __swig_getmethods__["text"] = _pbs.batch_status_text_get
398    if _newclass:text = _swig_property(_pbs.batch_status_text_get, _pbs.batch_status_text_set)
399batch_status_swigregister = _pbs.batch_status_swigregister
400batch_status_swigregister(batch_status)
401
402avail = _pbs.avail
403pbs_asyrunjob = _pbs.pbs_asyrunjob
404pbs_alterjob = _pbs.pbs_alterjob
405pbs_connect = _pbs.pbs_connect
406pbs_query_max_connections = _pbs.pbs_query_max_connections
407pbs_default = _pbs.pbs_default
408pbs_deljob = _pbs.pbs_deljob
409pbs_disconnect = _pbs.pbs_disconnect
410pbs_geterrmsg = _pbs.pbs_geterrmsg
411pbs_holdjob = _pbs.pbs_holdjob
412pbs_locjob = _pbs.pbs_locjob
413pbs_manager = _pbs.pbs_manager
414pbs_movejob = _pbs.pbs_movejob
415pbs_msgjob = _pbs.pbs_msgjob
416pbs_orderjob = _pbs.pbs_orderjob
417pbs_rescquery = _pbs.pbs_rescquery
418pbs_rescreserve = _pbs.pbs_rescreserve
419pbs_rescrelease = _pbs.pbs_rescrelease
420pbs_rerunjob = _pbs.pbs_rerunjob
421pbs_rlsjob = _pbs.pbs_rlsjob
422pbs_runjob = _pbs.pbs_runjob
423pbs_selectjob = _pbs.pbs_selectjob
424pbs_sigjob = _pbs.pbs_sigjob
425pbs_statfree = _pbs.pbs_statfree
426pbs_statjob = _pbs.pbs_statjob
427pbs_selstat = _pbs.pbs_selstat
428pbs_statque = _pbs.pbs_statque
429pbs_statserver = _pbs.pbs_statserver
430pbs_statnode = _pbs.pbs_statnode
431pbs_submit = _pbs.pbs_submit
432pbs_terminate = _pbs.pbs_terminate
433totpool = _pbs.totpool
434usepool = _pbs.usepool
435pbs_fbserver = _pbs.pbs_fbserver
436pbs_get_server_list = _pbs.pbs_get_server_list
437pbs_sigjobasync = _pbs.pbs_sigjobasync
438pbs_alterjob_async = _pbs.pbs_alterjob_async
439pbs_checkpointjob = _pbs.pbs_checkpointjob
440openrm = _pbs.openrm
441closerm = _pbs.closerm
442downrm = _pbs.downrm
443configrm = _pbs.configrm
444addreq = _pbs.addreq
445allreq = _pbs.allreq
446getreq = _pbs.getreq
447flushreq = _pbs.flushreq
448activereq = _pbs.activereq
449fullresp = _pbs.fullresp
450LOG_BUF_SIZE = _pbs.LOG_BUF_SIZE
451LOG_EMERG = _pbs.LOG_EMERG
452LOG_ALERT = _pbs.LOG_ALERT
453LOG_CRIT = _pbs.LOG_CRIT
454LOG_ERR = _pbs.LOG_ERR
455LOG_WARNING = _pbs.LOG_WARNING
456LOG_NOTICE = _pbs.LOG_NOTICE
457LOG_INFO = _pbs.LOG_INFO
458LOG_DEBUG = _pbs.LOG_DEBUG
459log_close = _pbs.log_close
460log_err = _pbs.log_err
461log_event = _pbs.log_event
462log_open = _pbs.log_open
463log_record = _pbs.log_record
464log_roll = _pbs.log_roll
465log_size = _pbs.log_size
466chk_file_sec = _pbs.chk_file_sec
467setup_env = _pbs.setup_env
468log_ext = _pbs.log_ext
469log_init = _pbs.log_init
470log_remove_old = _pbs.log_remove_old
471PBSEVENT_ERROR = _pbs.PBSEVENT_ERROR
472PBSEVENT_SYSTEM = _pbs.PBSEVENT_SYSTEM
473PBSEVENT_ADMIN = _pbs.PBSEVENT_ADMIN
474PBSEVENT_JOB = _pbs.PBSEVENT_JOB
475PBSEVENT_JOB_USAGE = _pbs.PBSEVENT_JOB_USAGE
476PBSEVENT_SECURITY = _pbs.PBSEVENT_SECURITY
477PBSEVENT_SCHED = _pbs.PBSEVENT_SCHED
478PBSEVENT_DEBUG = _pbs.PBSEVENT_DEBUG
479PBSEVENT_DEBUG2 = _pbs.PBSEVENT_DEBUG2
480PBSEVENT_FORCE = _pbs.PBSEVENT_FORCE
481PBS_EVENTCLASS_SERVER = _pbs.PBS_EVENTCLASS_SERVER
482PBS_EVENTCLASS_QUEUE = _pbs.PBS_EVENTCLASS_QUEUE
483PBS_EVENTCLASS_JOB = _pbs.PBS_EVENTCLASS_JOB
484PBS_EVENTCLASS_REQUEST = _pbs.PBS_EVENTCLASS_REQUEST
485PBS_EVENTCLASS_FILE = _pbs.PBS_EVENTCLASS_FILE
486PBS_EVENTCLASS_ACCT = _pbs.PBS_EVENTCLASS_ACCT
487PBS_EVENTCLASS_NODE = _pbs.PBS_EVENTCLASS_NODE
488PBSEVENT_MASK = _pbs.PBSEVENT_MASK
489MAX_PATH_LEN = _pbs.MAX_PATH_LEN
490SECS_PER_DAY = _pbs.SECS_PER_DAY
491TRUE = _pbs.TRUE
492FALSE = _pbs.FALSE
493#  PBS python interface
494#  Author: Bas van der Vlies <basv@sara.nl>
495#  Date  : 27 Feb 2002
496#  Desc. : This is python wrapper class for getting the resource
497#          mom values.
498#
499# CVS info
500# $Id: resmom.py,v 1.6 2002/10/21 14:14:47 sscpbas Exp $
501# $Date: 2002/10/21 14:14:47 $
502# $Revision: 1.6 $
503#
504import string
505import types
506
507# Default linux resources to get from the mom
508#
509default_linux_res = [   
510        "availmem",     # available memory size in KB
511        "ideal_load",   # static ideal_load value
512        "loadave",      # the current load average
513        "max_load",     # static max_load value
514        "ncpus",        # number of cpus
515        "physmem",      # physical memory size in KB
516        "resi",         # resident memory size for a pid or session in KB
517        "totmem",       # total memory size in KB
518        "walltime",     # wall clock time for a pid
519]
520
521# Default irix6 resources to get from the mom
522#
523default_irix6_res = [   
524        "availmem",     # available memory size in KB
525        "loadave",      # the current load average
526        "ncpus",        # number of cpus
527        "physmem",      # physical memory size in KB
528        "resi",         # resident memory size for a pid or session in KB
529        "walltime",     # wall clock time for a pid
530        "quota",        # quota information (sizes in KB)
531]
532
533default_mom_res = [   
534        "arch",         # the architecture of the machine
535        "uname",        # the architecture of the machine
536        "cput",         # cpu time for a pid or session
537        "idletime",     # seconds of idle time
538        "mem",          # memory size for a pid or session in KB
539        "sessions",     # list of sessions in the system
540        "pids",         # list of pids in a session
541        "nsessions",    # number of sessions in the system
542        "nusers",       # number of users in the system
543        "size",         # size of a file or filesystem
544        "host",         # Name  of host on which job should be run
545        "nodes",        # Number and/or type of nodes to be reserved for exclusive use by the job
546        "other",        # Allows a  user  to  specify  site  specific  information
547        "software",     # Allows a user to specify software required by the job
548]
549
550def check_resp(dict, str):
551  """
552  Check the daemon response. If we have no permission to
553  query the values then we got a 'None' response. Else
554  if we supplied a keyword that does not exits we get a
555  '?' response
556  """
557  if not str:
558    return
559 
560  ## Value can contain the '=' char :-(
561 
562  l =  string.split(str, '=')
563  key = string.strip(l[0])
564  if len(l) > 2:
565        val = string.strip( '='.join(l[1:]) )
566  else:
567        val = string.strip(l[1])
568
569  key = string.strip(key)
570  val = string.strip(val)
571
572  # Did we got a valid response
573  #
574  if not val[0] == '?':
575    dict[key] = val
576
577def use_default_keywords(id, d):
578  """
579  Get the default values from the mom daemon
580  """
581  for res in default_mom_res:
582    addreq(id, res)
583    resp = getreq(id)
584    check_resp(d, resp)
585
586  # Do not proceed if we have an empty dictionary
587  #
588  if not d:
589    return
590
591  if d['arch' ] == 'linux':
592    for res in default_linux_res:
593      addreq(id, res)
594      resp = getreq(id)
595      check_resp(d, resp)
596
597def use_user_keywords(id, d, l):
598  for res in l:
599    if type(res) is types.StringType:
600      addreq(id, res)
601      resp = getreq(id)
602      check_resp(d, resp)
603    else:
604      raise TypeError, 'Expected a string got %s :%s' %(type(res), res) 
605
606def get_mom_values(id, list = None):
607  """
608  This function will query the mom with a default resmon keywords
609  and 'arch' depended keywords. Supported archs are:
610    linux
611    irix6
612  User can also supply their own list of keywords as second parameter.
613  arguments:
614    id   : connection number with mom daemon on a node
615    list : optional parameter. If supplied then use this. A list
616           of mom keywords.
617  """
618
619  d = {}
620  if not list:
621    use_default_keywords(id, d)
622  else:
623    use_user_keywords(id, d , list)
624     
625  return d
626
627def version():
628  """
629  Returns the pbs python interface version as a string.
630  """
631  return '3.8.0'
632
633# A useful dict with error codes to text
634#
635# SVN Info:
636#       $Id: errors.py 429 2005-11-04 13:59:06Z bas $
637#
638errors_txt = { 
639        0 : 'no error',
640        15001 :  'Unknown Job Identifier',
641        15002 : 'Undefined Attribute',
642        15003 : 'attempt to set READ ONLY attribute',
643        15004 : 'Invalid request',
644        15005 : 'Unknown batch request',
645        15006 : 'Too many submit retries',
646        15007 : 'No permission',
647        15008 : 'access from host not allowed',
648        15009 : 'job already exists',
649        15010 : 'system error occurred',
650        15011 : 'internal server error occurred',
651        15012 : 'parent job of dependent in rte que',
652        15013 : 'unknown signal name',
653        15014 : 'bad attribute value',
654        15015 : 'Cannot modify attrib in run state',
655        15016 : 'request invalid for job state',
656        15018 : 'Unknown queue name',
657        15019 : 'Invalid Credential in request',
658        15020 : 'Expired Credential in request',
659        15021 : 'Queue not enabled',
660        15022 : 'No access permission for queue',
661        15023 : 'Bad user - no password entry',
662        15024 : 'Max hop count exceeded',
663        15025 : 'Queue already exists',
664        15026 : 'incompatable queue attribute type',
665        15027 : 'Queue Busy (not empty)',
666        15028 : 'Queue name too long',
667        15029 : 'Feature',
668        15030 : 'Cannot enable queue,needs add def',
669        15031 : 'Protocol (ASN.1) error',
670        15032 : 'Bad attribute list structure',
671        15033 : 'No free connections',
672        15034 : 'No server to connect to',
673        15035 : 'Unknown resource',
674        15036 : 'Job exceeds Queue resource limits',
675        15037 : 'No Default Queue Defined',
676        15038 : 'Job Not Rerunnable',
677        15039 : 'Route rejected by all destinations',
678        15040 : 'Time in Route Queue Expired',
679        15041 : 'Request to MOM failed',
680        15042 : '(qsub) cannot access script file',
681        15043 : 'Stage In of files failed',
682        15044 : 'Resources temporarily unavailable',
683        15045 : 'Bad Group specified',
684        15046 : 'Max number of jobs in queue',
685        15047 : 'Checkpoint Busy, may be retries',
686        15048 : 'Limit exceeds allowable',
687        15049 : 'Bad Account attribute value',
688        15050 : 'Job already in exit state',
689        15051 : 'Job files not copied',
690        15052 : 'unknown job id after clean init',
691        15053 : 'No Master in Sync Set',
692        15054 : 'Invalid dependency',
693        15055 : 'Duplicate entry in List',
694        15056 : 'Bad DIS based Request Protocol',
695        15057 : 'cannot execute there',
696        15058 : 'sister rejected',
697        15059 : 'sister could not communicate',
698        15060 : 'req rejected -server shutting down',
699        15061 : 'not all tasks could checkpoint',
700        15062 : 'Named node is not in the list',
701        15063 : 'node-attribute not recognized',
702        15064 : 'Server has no node list',
703        15065 : 'Node name is too big',
704        15066 : 'Node name already exists',
705        15067 : 'Bad node-attribute value',
706        15068 : 'State values are mutually exclusive',
707        15069 : 'Error(s) during global modification of nodes',
708        15070 : 'could not contact Mom',
709        15071 : 'no time-shared nodes',
710        15201 : 'resource unknown',
711        15202 : 'parameter could not be used',
712        15203 : 'a parameter needed did not exist',
713        15204 : "something specified didn't exist",
714        15205 : 'a system error occured',
715        15206 : 'only part of reservation made'
716}
717
718def error():
719  """
720  Check if there is an error, if so fetch the error message string.
721  It says more then a number!
722  """
723  e = get_error()
724  if errors_txt.has_key(e):
725     return (e, errors_txt[e])
726  else:
727     return (e, "Could not find a text for this error, uhhh")
728
729
730cvar = _pbs.cvar
731
Note: See TracBrowser for help on using the repository browser.