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