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