Changeset 161 for trunk/src


Ignore:
Timestamp:
09/24/08 15:38:53 (16 years ago)
Author:
bas
Message:

src/PBSQuery.py:

  • _free function not needed any more. Destructors are now in SWIG code

new generated swig code:

  • src/pbs_ifl.h
  • src/pbs.py
  • src/pbs_python.h
  • src/pbs_wrap.c
Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/PBSQuery.py

    r143 r161  
    125125               
    126126        def _free(self, memory):
    127                 pbs.pbs_statfree(memory)
     127                # Not needed any more
     128                #pbs.pbs_statfree(memory)
     129                a = 1
    128130
    129131        def _statserver(self, attrib_list=None):
  • trunk/src/pbs.py

    r144 r161  
    1 # This file was created automatically by SWIG.
     1# This file was created automatically by SWIG 1.3.29.
    22# Don't modify this file, modify the SWIG interface instead.
    33# This file is compatible with both classic and new-style classes.
    44
    55import _pbs
    6 
     6import new
     7new_instancemethod = new.instancemethod
    78def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
     9    if (name == "thisown"): return self.this.own(value)
    810    if (name == "this"):
    9         if isinstance(value, class_type):
    10             self.__dict__[name] = value.this
    11             if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
    12             del value.thisown
     11        if type(value).__name__ == 'PySwigObject':
     12            self.__dict__[name] = value
    1313            return
    1414    method = class_type.__swig_setmethods__.get(name,None)
    1515    if method: return method(self,value)
    16     if (not static) or hasattr(self,name) or (name == "thisown"):
     16    if (not static) or hasattr(self,name):
    1717        self.__dict__[name] = value
    1818    else:
     
    2323
    2424def _swig_getattr(self,class_type,name):
     25    if (name == "thisown"): return self.this.own()
    2526    method = class_type.__swig_getmethods__.get(name,None)
    2627    if method: return method(self)
    2728    raise AttributeError,name
     29
     30def _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,)
    2834
    2935import types
     
    3743
    3844
    39 
    4045new_attrl = _pbs.new_attrl
    41 
    4246new_attropl = _pbs.new_attropl
    43 
    4447new_batch_status = _pbs.new_batch_status
    45 
    4648get_error = _pbs.get_error
    4749ATTR_a = _pbs.ATTR_a
     
    9395ATTR_altid = _pbs.ATTR_altid
    9496ATTR_etime = _pbs.ATTR_etime
     97ATTR_exitstat = _pbs.ATTR_exitstat
     98ATTR_forwardx11 = _pbs.ATTR_forwardx11
     99ATTR_submit_args = _pbs.ATTR_submit_args
     100ATTR_umask = _pbs.ATTR_umask
    95101ATTR_aclgren = _pbs.ATTR_aclgren
    96102ATTR_aclgroup = _pbs.ATTR_aclgroup
     
    123129ATTR_count = _pbs.ATTR_count
    124130ATTR_number = _pbs.ATTR_number
    125 ATTR_reqprop = _pbs.ATTR_reqprop
     131ATTR_acllogic = _pbs.ATTR_acllogic
     132ATTR_aclgrpslpy = _pbs.ATTR_aclgrpslpy
     133ATTR_keepcompleted = _pbs.ATTR_keepcompleted
     134ATTR_disallowedtypes = _pbs.ATTR_disallowedtypes
    126135ATTR_aclroot = _pbs.ATTR_aclroot
    127136ATTR_managers = _pbs.ATTR_managers
     
    131140ATTR_logevents = _pbs.ATTR_logevents
    132141ATTR_logfile = _pbs.ATTR_logfile
     142ATTR_loglevel = _pbs.ATTR_loglevel
    133143ATTR_mailfrom = _pbs.ATTR_mailfrom
    134144ATTR_nodepack = _pbs.ATTR_nodepack
     
    143153ATTR_pingrate = _pbs.ATTR_pingrate
    144154ATTR_ndchkrate = _pbs.ATTR_ndchkrate
    145 ATTR_procpack = _pbs.ATTR_procpack
     155ATTR_tcptimeout = _pbs.ATTR_tcptimeout
     156ATTR_jobstatrate = _pbs.ATTR_jobstatrate
     157ATTR_polljobs = _pbs.ATTR_polljobs
     158ATTR_downonerror = _pbs.ATTR_downonerror
     159ATTR_jobnanny = _pbs.ATTR_jobnanny
     160ATTR_ownerpurge = _pbs.ATTR_ownerpurge
     161ATTR_qcqlimits = _pbs.ATTR_qcqlimits
     162ATTR_momjobsync = _pbs.ATTR_momjobsync
     163ATTR_maildomain = _pbs.ATTR_maildomain
     164ATTR_pbsversion = _pbs.ATTR_pbsversion
     165ATTR_submithosts = _pbs.ATTR_submithosts
     166ATTR_allownodesubmit = _pbs.ATTR_allownodesubmit
     167ATTR_autonodenp = _pbs.ATTR_autonodenp
     168ATTR_servername = _pbs.ATTR_servername
     169ATTR_logfilemaxsize = _pbs.ATTR_logfilemaxsize
     170ATTR_logfilerolldepth = _pbs.ATTR_logfilerolldepth
     171ATTR_nextjobnum = _pbs.ATTR_nextjobnum
    146172ATTR_NODE_state = _pbs.ATTR_NODE_state
    147173ATTR_NODE_np = _pbs.ATTR_NODE_np
     
    149175ATTR_NODE_ntype = _pbs.ATTR_NODE_ntype
    150176ATTR_NODE_jobs = _pbs.ATTR_NODE_jobs
     177ATTR_NODE_status = _pbs.ATTR_NODE_status
     178ATTR_NODE_note = _pbs.ATTR_NODE_note
    151179CHECKPOINT_UNSPECIFIED = _pbs.CHECKPOINT_UNSPECIFIED
    152180NO_HOLD = _pbs.NO_HOLD
     
    155183MAIL_AT_ABORT = _pbs.MAIL_AT_ABORT
    156184DELDELAY = _pbs.DELDELAY
     185DELPURGE = _pbs.DELPURGE
     186EXECQUEONLY = _pbs.EXECQUEONLY
    157187USER_HOLD = _pbs.USER_HOLD
    158188OTHER_HOLD = _pbs.OTHER_HOLD
     
    168198ND_timeshared = _pbs.ND_timeshared
    169199ND_cluster = _pbs.ND_cluster
     200Q_DT_batch = _pbs.Q_DT_batch
     201Q_DT_interactive = _pbs.Q_DT_interactive
     202Q_DT_rerunable = _pbs.Q_DT_rerunable
     203Q_DT_nonrerunable = _pbs.Q_DT_nonrerunable
    170204MAX_ENCODE_BFR = _pbs.MAX_ENCODE_BFR
    171205MGR_CMD_CREATE = _pbs.MGR_CMD_CREATE
     
    192226MAXPATHLEN = _pbs.MAXPATHLEN
    193227MAXNAMLEN = _pbs.MAXNAMLEN
     228MAX_NOTE = _pbs.MAX_NOTE
     229MAX_NOTE_STR = _pbs.MAX_NOTE_STR
    194230PBS_MAXUSER = _pbs.PBS_MAXUSER
    195231PBS_MAXGRPN = _pbs.PBS_MAXGRPN
     
    232268    __swig_getmethods__ = {}
    233269    __getattr__ = lambda self, name: _swig_getattr(self, attrl, name)
    234     def __init__(self): raise RuntimeError, "No constructor defined"
    235     def __repr__(self):
    236         return "<%s.%s; proxy of C attrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
     270    def __init__(self): raise AttributeError, "No constructor defined"
     271    __repr__ = _swig_repr
    237272    __swig_setmethods__["name"] = _pbs.attrl_name_set
    238273    __swig_getmethods__["name"] = _pbs.attrl_name_get
     
    248283    if _newclass:op = property(_pbs.attrl_op_get, _pbs.attrl_op_set)
    249284    def __str__(*args): return _pbs.attrl___str__(*args)
    250 
    251 class attrlPtr(attrl):
    252     def __init__(self, this):
    253         _swig_setattr(self, attrl, 'this', this)
    254         if not hasattr(self,"thisown"): _swig_setattr(self, attrl, 'thisown', 0)
    255         _swig_setattr(self, attrl,self.__class__,attrl)
    256 _pbs.attrl_swigregister(attrlPtr)
     285    __swig_destroy__ = _pbs.delete_attrl
     286    __del__ = lambda self : None;
     287attrl_swigregister = _pbs.attrl_swigregister
     288attrl_swigregister(attrl)
    257289
    258290class attropl(_object):
     
    261293    __swig_getmethods__ = {}
    262294    __getattr__ = lambda self, name: _swig_getattr(self, attropl, name)
    263     def __init__(self): raise RuntimeError, "No constructor defined"
    264     def __repr__(self):
    265         return "<%s.%s; proxy of C attropl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
     295    def __init__(self): raise AttributeError, "No constructor defined"
     296    __repr__ = _swig_repr
    266297    __swig_setmethods__["name"] = _pbs.attropl_name_set
    267298    __swig_getmethods__["name"] = _pbs.attropl_name_get
     
    277308    if _newclass:op = property(_pbs.attropl_op_get, _pbs.attropl_op_set)
    278309    def __str__(*args): return _pbs.attropl___str__(*args)
    279 
    280 class attroplPtr(attropl):
    281     def __init__(self, this):
    282         _swig_setattr(self, attropl, 'this', this)
    283         if not hasattr(self,"thisown"): _swig_setattr(self, attropl, 'thisown', 0)
    284         _swig_setattr(self, attropl,self.__class__,attropl)
    285 _pbs.attropl_swigregister(attroplPtr)
     310    __swig_destroy__ = _pbs.delete_attropl
     311    __del__ = lambda self : None;
     312attropl_swigregister = _pbs.attropl_swigregister
     313attropl_swigregister(attropl)
    286314
    287315class batch_status(_object):
     
    290318    __swig_getmethods__ = {}
    291319    __getattr__ = lambda self, name: _swig_getattr(self, batch_status, name)
    292     def __init__(self): raise RuntimeError, "No constructor defined"
    293     def __repr__(self):
    294         return "<%s.%s; proxy of C batch_status instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
     320    def __init__(self): raise AttributeError, "No constructor defined"
     321    __repr__ = _swig_repr
    295322    __swig_setmethods__["name"] = _pbs.batch_status_name_set
    296323    __swig_getmethods__["name"] = _pbs.batch_status_name_get
     
    302329    __swig_getmethods__["text"] = _pbs.batch_status_text_get
    303330    if _newclass:text = property(_pbs.batch_status_text_get, _pbs.batch_status_text_set)
    304 
    305 class batch_statusPtr(batch_status):
    306     def __init__(self, this):
    307         _swig_setattr(self, batch_status, 'this', this)
    308         if not hasattr(self,"thisown"): _swig_setattr(self, batch_status, 'thisown', 0)
    309         _swig_setattr(self, batch_status,self.__class__,batch_status)
    310 _pbs.batch_status_swigregister(batch_statusPtr)
     331batch_status_swigregister = _pbs.batch_status_swigregister
     332batch_status_swigregister(batch_status)
    311333
    312334RESOURCE_T_NULL = _pbs.RESOURCE_T_NULL
    313335RESOURCE_T_ALL = _pbs.RESOURCE_T_ALL
    314 
    315336avail = _pbs.avail
    316 
    317337pbs_asyrunjob = _pbs.pbs_asyrunjob
    318 
    319338pbs_alterjob = _pbs.pbs_alterjob
    320 
    321339pbs_connect = _pbs.pbs_connect
    322 
    323340pbs_query_max_connections = _pbs.pbs_query_max_connections
    324 
    325341pbs_default = _pbs.pbs_default
    326 
    327342pbs_deljob = _pbs.pbs_deljob
    328 
    329343pbs_disconnect = _pbs.pbs_disconnect
    330 
    331344pbs_holdjob = _pbs.pbs_holdjob
    332 
    333345pbs_locjob = _pbs.pbs_locjob
    334 
    335346pbs_manager = _pbs.pbs_manager
    336 
    337347pbs_movejob = _pbs.pbs_movejob
    338 
    339348pbs_msgjob = _pbs.pbs_msgjob
    340 
    341349pbs_orderjob = _pbs.pbs_orderjob
    342 
    343350pbs_rescquery = _pbs.pbs_rescquery
    344 
    345351pbs_rescreserve = _pbs.pbs_rescreserve
    346 
    347352pbs_rescrelease = _pbs.pbs_rescrelease
    348 
    349353pbs_rerunjob = _pbs.pbs_rerunjob
    350 
    351354pbs_rlsjob = _pbs.pbs_rlsjob
    352 
    353355pbs_runjob = _pbs.pbs_runjob
    354 
    355356pbs_selectjob = _pbs.pbs_selectjob
    356 
    357357pbs_sigjob = _pbs.pbs_sigjob
    358 
    359358pbs_statfree = _pbs.pbs_statfree
    360 
    361359pbs_statjob = _pbs.pbs_statjob
    362 
    363360pbs_selstat = _pbs.pbs_selstat
    364 
    365361pbs_statque = _pbs.pbs_statque
    366 
    367362pbs_statserver = _pbs.pbs_statserver
    368 
    369363pbs_statnode = _pbs.pbs_statnode
    370 
    371364pbs_submit = _pbs.pbs_submit
    372 
    373365pbs_terminate = _pbs.pbs_terminate
    374 
    375366totpool = _pbs.totpool
    376 
    377367usepool = _pbs.usepool
    378 
    379368openrm = _pbs.openrm
    380 
    381369closerm = _pbs.closerm
    382 
    383370downrm = _pbs.downrm
    384 
    385371configrm = _pbs.configrm
    386 
    387372addreq = _pbs.addreq
    388 
    389373allreq = _pbs.allreq
    390 
    391374flushreq = _pbs.flushreq
    392 
    393375activereq = _pbs.activereq
    394 
    395376fullresp = _pbs.fullresp
    396 
    397377getreq = _pbs.getreq
    398378LOG_BUF_SIZE = _pbs.LOG_BUF_SIZE
    399 
    400379log_close = _pbs.log_close
    401 
    402380log_err = _pbs.log_err
    403 
    404381log_event = _pbs.log_event
    405 
    406382log_open = _pbs.log_open
    407 
    408383log_record = _pbs.log_record
    409 
     384log_roll = _pbs.log_roll
     385log_size = _pbs.log_size
    410386setup_env = _pbs.setup_env
    411 
    412387chk_file_sec = _pbs.chk_file_sec
    413388PBSEVENT_ERROR = _pbs.PBSEVENT_ERROR
     
    559534  Returns the pbs python interface version as a string.
    560535  """
    561   return '2.9.4'
     536  return '2.9.8'
    562537
    563538# A useful dict with error codes to text
     
    657632     return (e, "Could not find a text for this error, uhhh")
    658633
     634
    659635cvar = _pbs.cvar
    660636
  • trunk/src/pbs_ifl.h

    r160 r161  
    175175    - insert usage code in proper location
    176176*/
    177 
    178 /* HvB required */
    179 #define ATTR_reqprop    "required_property"
    180 
    181177
    182178#define ATTR_aclroot     "acl_roots"
  • trunk/src/pbs_python.h

    r160 r161  
    175175    - insert usage code in proper location
    176176*/
    177 
    178 /* HvB required */
    179 #define ATTR_reqprop    "required_property"
    180177
    181178#define ATTR_aclroot     "acl_roots"
  • trunk/src/pbs_wrap.c

    r159 r161  
    28602860  }
    28612861SWIGINTERN void delete_attrl(struct attrl *self){
     2862        if (SARA_DEBUG)
     2863                printf("Bas free attrl\n");
    28622864        free(self);
    28632865  }
     
    28702872  }
    28712873SWIGINTERN void delete_attropl(struct attropl *self){
     2874        if (SARA_DEBUG)
     2875                printf("Bas free attropl\n");
    28722876        free(self);
    28732877  }
Note: See TracChangeset for help on using the changeset viewer.