source: devel/C/pbs_2.1.py

Last change on this file was 318, checked in by bas, 10 years ago

Updated all pbs files so we are in sync with the 2.4/2.5 features of torque

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