source: devel/C/pbs_2.4.py @ 318

Last change on this file since 318 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: 30.2 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 pbs_fbserver():
596  return _pbs.pbs_fbserver()
597pbs_fbserver = _pbs.pbs_fbserver
598
599def pbs_get_server_list():
600  return _pbs.pbs_get_server_list()
601pbs_get_server_list = _pbs.pbs_get_server_list
602
603def pbs_sigjobasync(*args):
604  return _pbs.pbs_sigjobasync(*args)
605pbs_sigjobasync = _pbs.pbs_sigjobasync
606
607def pbs_alterjob_async(*args):
608  return _pbs.pbs_alterjob_async(*args)
609pbs_alterjob_async = _pbs.pbs_alterjob_async
610
611def pbs_checkpointjob(*args):
612  return _pbs.pbs_checkpointjob(*args)
613pbs_checkpointjob = _pbs.pbs_checkpointjob
614
615def openrm(*args):
616  return _pbs.openrm(*args)
617openrm = _pbs.openrm
618
619def closerm(*args):
620  return _pbs.closerm(*args)
621closerm = _pbs.closerm
622
623def downrm(*args):
624  return _pbs.downrm(*args)
625downrm = _pbs.downrm
626
627def configrm(*args):
628  return _pbs.configrm(*args)
629configrm = _pbs.configrm
630
631def addreq(*args):
632  return _pbs.addreq(*args)
633addreq = _pbs.addreq
634
635def allreq(*args):
636  return _pbs.allreq(*args)
637allreq = _pbs.allreq
638
639def getreq(*args):
640  return _pbs.getreq(*args)
641getreq = _pbs.getreq
642
643def flushreq():
644  return _pbs.flushreq()
645flushreq = _pbs.flushreq
646
647def activereq():
648  return _pbs.activereq()
649activereq = _pbs.activereq
650
651def fullresp(*args):
652  return _pbs.fullresp(*args)
653fullresp = _pbs.fullresp
654LOG_BUF_SIZE = _pbs.LOG_BUF_SIZE
655LOG_EMERG = _pbs.LOG_EMERG
656LOG_ALERT = _pbs.LOG_ALERT
657LOG_CRIT = _pbs.LOG_CRIT
658LOG_ERR = _pbs.LOG_ERR
659LOG_WARNING = _pbs.LOG_WARNING
660LOG_NOTICE = _pbs.LOG_NOTICE
661LOG_INFO = _pbs.LOG_INFO
662LOG_DEBUG = _pbs.LOG_DEBUG
663
664def log_close(*args):
665  return _pbs.log_close(*args)
666log_close = _pbs.log_close
667
668def log_err(*args):
669  return _pbs.log_err(*args)
670log_err = _pbs.log_err
671
672def log_event(*args):
673  return _pbs.log_event(*args)
674log_event = _pbs.log_event
675
676def log_open(*args):
677  return _pbs.log_open(*args)
678log_open = _pbs.log_open
679
680def log_record(*args):
681  return _pbs.log_record(*args)
682log_record = _pbs.log_record
683
684def log_roll(*args):
685  return _pbs.log_roll(*args)
686log_roll = _pbs.log_roll
687
688def log_size():
689  return _pbs.log_size()
690log_size = _pbs.log_size
691
692def chk_file_sec(*args):
693  return _pbs.chk_file_sec(*args)
694chk_file_sec = _pbs.chk_file_sec
695
696def setup_env(*args):
697  return _pbs.setup_env(*args)
698setup_env = _pbs.setup_env
699
700def log_ext(*args):
701  return _pbs.log_ext(*args)
702log_ext = _pbs.log_ext
703
704def log_init(*args):
705  return _pbs.log_init(*args)
706log_init = _pbs.log_init
707
708def log_remove_old(*args):
709  return _pbs.log_remove_old(*args)
710log_remove_old = _pbs.log_remove_old
711PBSEVENT_ERROR = _pbs.PBSEVENT_ERROR
712PBSEVENT_SYSTEM = _pbs.PBSEVENT_SYSTEM
713PBSEVENT_ADMIN = _pbs.PBSEVENT_ADMIN
714PBSEVENT_JOB = _pbs.PBSEVENT_JOB
715PBSEVENT_JOB_USAGE = _pbs.PBSEVENT_JOB_USAGE
716PBSEVENT_SECURITY = _pbs.PBSEVENT_SECURITY
717PBSEVENT_SCHED = _pbs.PBSEVENT_SCHED
718PBSEVENT_DEBUG = _pbs.PBSEVENT_DEBUG
719PBSEVENT_DEBUG2 = _pbs.PBSEVENT_DEBUG2
720PBSEVENT_FORCE = _pbs.PBSEVENT_FORCE
721PBS_EVENTCLASS_SERVER = _pbs.PBS_EVENTCLASS_SERVER
722PBS_EVENTCLASS_QUEUE = _pbs.PBS_EVENTCLASS_QUEUE
723PBS_EVENTCLASS_JOB = _pbs.PBS_EVENTCLASS_JOB
724PBS_EVENTCLASS_REQUEST = _pbs.PBS_EVENTCLASS_REQUEST
725PBS_EVENTCLASS_FILE = _pbs.PBS_EVENTCLASS_FILE
726PBS_EVENTCLASS_ACCT = _pbs.PBS_EVENTCLASS_ACCT
727PBS_EVENTCLASS_NODE = _pbs.PBS_EVENTCLASS_NODE
728PBSEVENT_MASK = _pbs.PBSEVENT_MASK
729MAX_PATH_LEN = _pbs.MAX_PATH_LEN
730SECS_PER_DAY = _pbs.SECS_PER_DAY
731TRUE = _pbs.TRUE
732FALSE = _pbs.FALSE
733#  PBS python interface
734#  Author: Bas van der Vlies <bas.vandervlies@surfsara.nl>
735#  Date  : 27 Feb 2002
736#  Desc. : This is python wrapper class for getting the resource
737#          mom values.
738#
739# CVS info
740# $Id: resmom.py,v 1.6 2002/10/21 14:14:47 sscpbas Exp $
741# $Date: 2002/10/21 14:14:47 $
742# $Revision: 1.6 $
743#
744import string
745import types
746
747# Default linux resources to get from the mom
748#
749default_linux_res = [   
750    "availmem",     # available memory size in KB
751    "ideal_load",       # static ideal_load value
752    "loadave",      # the current load average
753    "max_load",     # static max_load value
754    "ncpus",        # number of cpus
755    "physmem",      # physical memory size in KB
756    "resi",                 # resident memory size for a pid or session in KB
757    "totmem",       # total memory size in KB
758    "walltime",     # wall clock time for a pid
759]
760
761# Default irix6 resources to get from the mom
762#
763default_irix6_res = [   
764    "availmem", # available memory size in KB
765    "loadave",      # the current load average
766    "ncpus",        # number of cpus
767    "physmem",      # physical memory size in KB
768    "resi",             # resident memory size for a pid or session in KB
769    "walltime", # wall clock time for a pid
770    "quota",    # quota information (sizes in KB)
771]
772
773default_mom_res = [   
774    "arch",             # the architecture of the machine
775    "uname",    # the architecture of the machine
776    "cput",             # cpu time for a pid or session
777    "idletime", # seconds of idle time
778    "mem",              # memory size for a pid or session in KB
779    "sessions", # list of sessions in the system
780    "pids",         # list of pids in a session
781    "nsessions",        # number of sessions in the system
782    "nusers",   # number of users in the system
783    "size",             # size of a file or filesystem
784    "host",             # Name  of host on which job should be run
785    "nodes",    # Number and/or type of nodes to be reserved for exclusive use by the job
786    "other",    # Allows a  user  to  specify  site  specific  information
787    "software", # Allows a user to specify software required by the job
788]
789
790def check_resp(dict, str):
791  """
792  Check the daemon response. If we have no permission to
793  query the values then we got a 'None' response. Else
794  if we supplied a keyword that does not exits we get a
795  '?' response
796  """
797  if not str:
798    return
799 
800  ## Value can contain the '=' char :-(
801 
802  l =  string.split(str, '=')
803  key = string.strip(l[0])
804  if len(l) > 2:
805    val = string.strip( '='.join(l[1:]) )
806  else:
807    val = string.strip(l[1])
808
809  key = string.strip(key)
810  val = string.strip(val)
811
812  # Did we got a valid response
813  #
814  if not val[0] == '?':
815    dict[key] = val
816
817def use_default_keywords(id, d):
818  """
819  Get the default values from the mom daemon
820  """
821  for res in default_mom_res:
822    addreq(id, res)
823    resp = getreq(id)
824    check_resp(d, resp)
825
826  # Do not proceed if we have an empty dictionary
827  #
828  if not d:
829    return
830
831  if d['arch' ] == 'linux':
832    for res in default_linux_res:
833      addreq(id, res)
834      resp = getreq(id)
835      check_resp(d, resp)
836
837def use_user_keywords(id, d, l):
838  for res in l:
839    if type(res) is types.StringType:
840      addreq(id, res)
841      resp = getreq(id)
842      check_resp(d, resp)
843    else:
844      raise TypeError, 'Expected a string got %s :%s' %(type(res), res) 
845
846def get_mom_values(id, list = None):
847  """
848  This function will query the mom with a default resmon keywords
849  and 'arch' depended keywords. Supported archs are:
850    linux
851    irix6
852  User can also supply their own list of keywords as second parameter.
853  arguments:
854    id   : connection number with mom daemon on a node
855    list : optional parameter. If supplied then use this. A list
856           of mom keywords.
857  """
858
859  d = {}
860  if not list:
861    use_default_keywords(id, d)
862  else:
863    use_user_keywords(id, d , list)
864     
865  return d
866
867version_info = ( 4, 4, 0 )
868version = 'SARA pbs_python version 4.4.0'
869
870## A useful dict with error codes to text
871# Author: Bas van der Vlies <bas.vandervlies@surfsara.nl>
872#
873# SVN Info:
874#       $Id: errors.py 429 2005-11-04 13:59:06Z bas $
875#
876errors_txt = { 
877        0 : 'no error',
878        15001 :  'Unknown Job Identifier',
879        15002 : 'Undefined Attribute',
880        15003 : 'attempt to set READ ONLY attribute',
881        15004 : 'Invalid request',
882        15005 : 'Unknown batch request',
883        15006 : 'Too many submit retries',
884        15007 : 'No permission',
885        15008 : 'access from host not allowed',
886        15009 : 'job already exists',
887        15010 : 'system error occurred',
888        15011 : 'internal server error occurred',
889        15012 : 'parent job of dependent in rte que',
890        15013 : 'unknown signal name',
891        15014 : 'bad attribute value',
892        15015 : 'Cannot modify attrib in run state',
893        15016 : 'request invalid for job state',
894        15018 : 'Unknown queue name',
895        15019 : 'Invalid Credential in request',
896        15020 : 'Expired Credential in request',
897        15021 : 'Queue not enabled',
898        15022 : 'No access permission for queue',
899        15023 : 'Bad user - no password entry',
900        15024 : 'Max hop count exceeded',
901        15025 : 'Queue already exists',
902        15026 : 'incompatable queue attribute type',
903        15027 : 'Queue Busy (not empty)',
904        15028 : 'Queue name too long',
905        15029 : 'Feature',
906        15030 : 'Cannot enable queue,needs add def',
907        15031 : 'Protocol (ASN.1) error',
908        15032 : 'Bad attribute list structure',
909        15033 : 'No free connections',
910        15034 : 'No server to connect to',
911        15035 : 'Unknown resource',
912        15036 : 'Job exceeds Queue resource limits',
913        15037 : 'No Default Queue Defined',
914        15038 : 'Job Not Rerunnable',
915        15039 : 'Route rejected by all destinations',
916        15040 : 'Time in Route Queue Expired',
917        15041 : 'Request to MOM failed',
918        15042 : '(qsub) cannot access script file',
919        15043 : 'Stage In of files failed',
920        15044 : 'Resources temporarily unavailable',
921        15045 : 'Bad Group specified',
922        15046 : 'Max number of jobs in queue',
923        15047 : 'Checkpoint Busy, may be retries',
924        15048 : 'Limit exceeds allowable',
925        15049 : 'Bad Account attribute value',
926        15050 : 'Job already in exit state',
927        15051 : 'Job files not copied',
928        15052 : 'unknown job id after clean init',
929        15053 : 'No Master in Sync Set',
930        15054 : 'Invalid dependency',
931        15055 : 'Duplicate entry in List',
932        15056 : 'Bad DIS based Request Protocol',
933        15057 : 'cannot execute there',
934        15058 : 'sister rejected',
935        15059 : 'sister could not communicate',
936        15060 : 'req rejected -server shutting down',
937        15061 : 'not all tasks could checkpoint',
938        15062 : 'Named node is not in the list',
939        15063 : 'node-attribute not recognized',
940        15064 : 'Server has no node list',
941        15065 : 'Node name is too big',
942        15066 : 'Node name already exists',
943        15067 : 'Bad node-attribute value',
944        15068 : 'State values are mutually exclusive',
945        15069 : 'Error(s) during global modification of nodes',
946        15070 : 'could not contact Mom',
947        15071 : 'no time-shared nodes',
948        15201 : 'resource unknown',
949        15202 : 'parameter could not be used',
950        15203 : 'a parameter needed did not exist',
951        15204 : "something specified didn't exist",
952        15205 : 'a system error occured',
953        15206 : 'only part of reservation made'
954}
955
956def error():
957  """
958  Check if there is an error, if so fetch the error message string.
959  It says more then a number!
960  """
961  e = get_error()
962  if errors_txt.has_key(e):
963     return (e, errors_txt[e])
964  else:
965     return (e, "Could not find a text for this error, uhhh")
966
967# This file is compatible with both classic and new-style classes.
968
969cvar = _pbs.cvar
970
Note: See TracBrowser for help on using the repository browser.