ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/BOSS/BossPython/BossSession.py
Revision: 1.17
Committed: Tue Feb 20 09:57:08 2007 UTC (18 years, 2 months ago) by gcodispo
Content type: text/x-python
Branch: MAIN
Changes since 1.16: +3 -2 lines
Log Message:
Small changes in BOSS interface allowing timeout setting for plugins subprocesses
Interaction with plugins handled through new BossCommand class

File Contents

# User Rev Content
1 gcodispo 1.10 # This file was created automatically by SWIG.
2 yzhang 1.1 # Don't modify this file, modify the SWIG interface instead.
3     # This file is compatible with both classic and new-style classes.
4     import _BossSession
5 gcodispo 1.10 def _swig_setattr(self,class_type,name,value):
6 yzhang 1.1 if (name == "this"):
7 gcodispo 1.10 if isinstance(value, class_type):
8     self.__dict__[name] = value.this
9     if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
10     del value.thisown
11 yzhang 1.1 return
12     method = class_type.__swig_setmethods__.get(name,None)
13     if method: return method(self,value)
14 gcodispo 1.10 self.__dict__[name] = value
15 yzhang 1.1
16     def _swig_getattr(self,class_type,name):
17     method = class_type.__swig_getmethods__.get(name,None)
18     if method: return method(self)
19     raise AttributeError,name
20    
21     import types
22     try:
23     _object = types.ObjectType
24     _newclass = 1
25     except AttributeError:
26     class _object : pass
27     _newclass = 0
28 gcodispo 1.9
29 yzhang 1.1
30 gcodispo 1.3 class objectMap(_object):
31     __swig_setmethods__ = {}
32     __setattr__ = lambda self, name, value: _swig_setattr(self, objectMap, name, value)
33     __swig_getmethods__ = {}
34     __getattr__ = lambda self, name: _swig_getattr(self, objectMap, name)
35 gcodispo 1.10 def __init__(self,*args):
36     _swig_setattr(self, objectMap, 'this', apply(_BossSession.new_objectMap,args))
37     _swig_setattr(self, objectMap, 'thisown', 1)
38     def __len__(*args): return apply(_BossSession.objectMap___len__,args)
39     def clear(*args): return apply(_BossSession.objectMap_clear,args)
40     def __nonzero__(*args): return apply(_BossSession.objectMap___nonzero__,args)
41     def __getitem__(*args): return apply(_BossSession.objectMap___getitem__,args)
42     def __setitem__(*args): return apply(_BossSession.objectMap___setitem__,args)
43     def __delitem__(*args): return apply(_BossSession.objectMap___delitem__,args)
44     def has_key(*args): return apply(_BossSession.objectMap_has_key,args)
45     def keys(*args): return apply(_BossSession.objectMap_keys,args)
46     def values(*args): return apply(_BossSession.objectMap_values,args)
47     def items(*args): return apply(_BossSession.objectMap_items,args)
48     def __contains__(*args): return apply(_BossSession.objectMap___contains__,args)
49     def __iter__(*args): return apply(_BossSession.objectMap___iter__,args)
50     def __del__(self, destroy= _BossSession.delete_objectMap):
51     try:
52     if self.thisown: destroy(self)
53     except: pass
54     def __repr__(self):
55     return "<C objectMap instance at %s>" % (self.this,)
56    
57     class objectMapPtr(objectMap):
58     def __init__(self,this):
59     _swig_setattr(self, objectMap, 'this', this)
60     if not hasattr(self,"thisown"): _swig_setattr(self, objectMap, 'thisown', 0)
61     _swig_setattr(self, objectMap,self.__class__,objectMap)
62     _BossSession.objectMap_swigregister(objectMapPtr)
63 gcodispo 1.9
64     class vector_string(_object):
65     __swig_setmethods__ = {}
66     __setattr__ = lambda self, name, value: _swig_setattr(self, vector_string, name, value)
67     __swig_getmethods__ = {}
68     __getattr__ = lambda self, name: _swig_getattr(self, vector_string, name)
69 gcodispo 1.10 def __init__(self,*args):
70     _swig_setattr(self, vector_string, 'this', apply(_BossSession.new_vector_string,args))
71     _swig_setattr(self, vector_string, 'thisown', 1)
72     def __len__(*args): return apply(_BossSession.vector_string___len__,args)
73     def __nonzero__(*args): return apply(_BossSession.vector_string___nonzero__,args)
74     def clear(*args): return apply(_BossSession.vector_string_clear,args)
75     def append(*args): return apply(_BossSession.vector_string_append,args)
76     def pop(*args): return apply(_BossSession.vector_string_pop,args)
77     def __getitem__(*args): return apply(_BossSession.vector_string___getitem__,args)
78     def __getslice__(*args): return apply(_BossSession.vector_string___getslice__,args)
79     def __setitem__(*args): return apply(_BossSession.vector_string___setitem__,args)
80     def __setslice__(*args): return apply(_BossSession.vector_string___setslice__,args)
81     def __delitem__(*args): return apply(_BossSession.vector_string___delitem__,args)
82     def __delslice__(*args): return apply(_BossSession.vector_string___delslice__,args)
83     def __del__(self, destroy= _BossSession.delete_vector_string):
84     try:
85     if self.thisown: destroy(self)
86     except: pass
87     def __repr__(self):
88     return "<C vector_string instance at %s>" % (self.this,)
89    
90     class vector_stringPtr(vector_string):
91     def __init__(self,this):
92     _swig_setattr(self, vector_string, 'this', this)
93     if not hasattr(self,"thisown"): _swig_setattr(self, vector_string, 'thisown', 0)
94     _swig_setattr(self, vector_string,self.__class__,vector_string)
95     _BossSession.vector_string_swigregister(vector_stringPtr)
96 gcodispo 1.3
97     RUNNING = _BossSession.RUNNING
98     SCHEDULED = _BossSession.SCHEDULED
99     SUBMITTED = _BossSession.SUBMITTED
100     ALL = _BossSession.ALL
101     STATUS_ONLY = _BossSession.STATUS_ONLY
102     NORMAL = _BossSession.NORMAL
103     SPECIFIC = _BossSession.SPECIFIC
104     PROGRAMS = _BossSession.PROGRAMS
105     FULL = _BossSession.FULL
106 yzhang 1.1 class BossSession(_object):
107     __swig_setmethods__ = {}
108     __setattr__ = lambda self, name, value: _swig_setattr(self, BossSession, name, value)
109     __swig_getmethods__ = {}
110     __getattr__ = lambda self, name: _swig_getattr(self, BossSession, name)
111 gcodispo 1.16 def __init__(self,*args):
112     _swig_setattr(self, BossSession, 'this', apply(_BossSession.new_BossSession,args))
113     _swig_setattr(self, BossSession, 'thisown', 1)
114     def __del__(self, destroy= _BossSession.delete_BossSession):
115     try:
116     if self.thisown: destroy(self)
117     except: pass
118     def resetDB(*args): return apply(_BossSession.BossSession_resetDB,args)
119     def clear(*args): return apply(_BossSession.BossSession_clear,args)
120     def makeBossTask(*args): return apply(_BossSession.BossSession_makeBossTask,args)
121     def destroyBossTask(*args): return apply(_BossSession.BossSession_destroyBossTask,args)
122     def showCHTools(*args): return apply(_BossSession.BossSession_showCHTools,args)
123     def showProgramTypes(*args): return apply(_BossSession.BossSession_showProgramTypes,args)
124     def showRTMon(*args): return apply(_BossSession.BossSession_showRTMon,args)
125     def showSchedulers(*args): return apply(_BossSession.BossSession_showSchedulers,args)
126     def defaultCHTool(*args): return apply(_BossSession.BossSession_defaultCHTool,args)
127     def defaultProgramType(*args): return apply(_BossSession.BossSession_defaultProgramType,args)
128     def defaultRTMon(*args): return apply(_BossSession.BossSession_defaultRTMon,args)
129     def defaultScheduler(*args): return apply(_BossSession.BossSession_defaultScheduler,args)
130     def version(*args): return apply(_BossSession.BossSession_version,args)
131     def clientID(*args): return apply(_BossSession.BossSession_clientID,args)
132     def showConfigs(*args): return apply(_BossSession.BossSession_showConfigs,args)
133     def RTupdate(*args): return apply(_BossSession.BossSession_RTupdate,args)
134     def listMatch(*args): return apply(_BossSession.BossSession_listMatch,args)
135     def schedulerQuery(*args): return apply(_BossSession.BossSession_schedulerQuery,args)
136     def selectTasks(*args): return apply(_BossSession.BossSession_selectTasks,args)
137     def query(*args): return apply(_BossSession.BossSession_query,args)
138 gcodispo 1.10 def show(*args): return apply(_BossSession.BossSession_show,args)
139     def CHTools(*args): return apply(_BossSession.BossSession_CHTools,args)
140     def ProgramTypes(*args): return apply(_BossSession.BossSession_ProgramTypes,args)
141     def RTMons(*args): return apply(_BossSession.BossSession_RTMons,args)
142     def schedulers(*args): return apply(_BossSession.BossSession_schedulers,args)
143     def schedListMatch(*args): return apply(_BossSession.BossSession_schedListMatch,args)
144     def queryTasks(*args): return apply(_BossSession.BossSession_queryTasks,args)
145 gcodispo 1.3 def query( self, filter_opt = SCHEDULED,
146     taskRange = "all",
147     jobRange = "all",
148     subn = "",
149     type = "",
150     user = "",
151     after = "",
152     before = "",
153 gcodispo 1.17 timeout = 0,
154 gcodispo 1.3 avoidCheck = 0):
155 gcodispo 1.17 my = self.queryTasks( filter_opt, taskRange, jobRange, subn, type, user, after, before, int(timeout), avoidCheck )
156 gcodispo 1.3 ciao = {}
157     for i in my:
158     ciao[i] = self.makeBossTask(i)
159 gcodispo 1.17 ciao[i].query(filter_opt, jobRange, subn, type, user, after, before, 0, 1)
160 gcodispo 1.3 return ciao
161    
162 gcodispo 1.10
163     def __repr__(self):
164     return "<C BossSession instance at %s>" % (self.this,)
165    
166     class BossSessionPtr(BossSession):
167     def __init__(self,this):
168     _swig_setattr(self, BossSession, 'this', this)
169     if not hasattr(self,"thisown"): _swig_setattr(self, BossSession, 'thisown', 0)
170     _swig_setattr(self, BossSession,self.__class__,BossSession)
171     _BossSession.BossSession_swigregister(BossSessionPtr)
172 yzhang 1.1
173 gcodispo 1.3 class BossTaskException(_object):
174 yzhang 1.1 __swig_setmethods__ = {}
175 gcodispo 1.3 __setattr__ = lambda self, name, value: _swig_setattr(self, BossTaskException, name, value)
176 yzhang 1.1 __swig_getmethods__ = {}
177 gcodispo 1.3 __getattr__ = lambda self, name: _swig_getattr(self, BossTaskException, name)
178     __swig_setmethods__["key"] = _BossSession.BossTaskException_key_set
179     __swig_getmethods__["key"] = _BossSession.BossTaskException_key_get
180 gcodispo 1.10 if _newclass:key = property(_BossSession.BossTaskException_key_get,_BossSession.BossTaskException_key_set)
181     def __init__(self,*args):
182     _swig_setattr(self, BossTaskException, 'this', apply(_BossSession.new_BossTaskException,args))
183     _swig_setattr(self, BossTaskException, 'thisown', 1)
184     def what(*args): return apply(_BossSession.BossTaskException_what,args)
185     def __del__(self, destroy= _BossSession.delete_BossTaskException):
186     try:
187     if self.thisown: destroy(self)
188     except: pass
189     def __repr__(self):
190     return "<C BossTaskException instance at %s>" % (self.this,)
191    
192     class BossTaskExceptionPtr(BossTaskException):
193     def __init__(self,this):
194     _swig_setattr(self, BossTaskException, 'this', this)
195     if not hasattr(self,"thisown"): _swig_setattr(self, BossTaskException, 'thisown', 0)
196     _swig_setattr(self, BossTaskException,self.__class__,BossTaskException)
197     _BossSession.BossTaskException_swigregister(BossTaskExceptionPtr)
198 yzhang 1.1
199 gcodispo 1.3 class BossTask(_object):
200     __swig_setmethods__ = {}
201     __setattr__ = lambda self, name, value: _swig_setattr(self, BossTask, name, value)
202     __swig_getmethods__ = {}
203     __getattr__ = lambda self, name: _swig_getattr(self, BossTask, name)
204 gcodispo 1.10 def __del__(self, destroy= _BossSession.delete_BossTask):
205     try:
206     if self.thisown: destroy(self)
207     except: pass
208     def __init__(self,*args):
209     _swig_setattr(self, BossTask, 'this', apply(_BossSession.new_BossTask,args))
210     _swig_setattr(self, BossTask, 'thisown', 1)
211     def id(*args): return apply(_BossSession.BossTask_id,args)
212     def name(*args): return apply(_BossSession.BossTask_name,args)
213     def taskMap(*args): return apply(_BossSession.BossTask_taskMap,args)
214     def job_begin(*args): return apply(_BossSession.BossTask_job_begin,args)
215     def job_end(*args): return apply(_BossSession.BossTask_job_end,args)
216     def jobsMap(*args): return apply(_BossSession.BossTask_jobsMap,args)
217     def jobMap(*args): return apply(_BossSession.BossTask_jobMap,args)
218     def programsMap(*args): return apply(_BossSession.BossTask_programsMap,args)
219     def queryJobPrograms(*args): return apply(_BossSession.BossTask_queryJobPrograms,args)
220     def declare(*args): return apply(_BossSession.BossTask_declare,args)
221     def remove(*args): return apply(_BossSession.BossTask_remove,args)
222     def archive(*args): return apply(_BossSession.BossTask_archive,args)
223     def submit(*args): return apply(_BossSession.BossTask_submit,args)
224     def reSubmit(*args): return apply(_BossSession.BossTask_reSubmit,args)
225     def kill(*args): return apply(_BossSession.BossTask_kill,args)
226     def getOutput(*args): return apply(_BossSession.BossTask_getOutput,args)
227 gcodispo 1.12 def load(*args): return apply(_BossSession.BossTask_load,args)
228 gcodispo 1.10 def query(*args): return apply(_BossSession.BossTask_query,args)
229     def query_out(*args): return apply(_BossSession.BossTask_query_out,args)
230     def clear(*args): return apply(_BossSession.BossTask_clear,args)
231 gcodispo 1.16 def appendToPyDict(*args): return apply(_BossSession.BossTask_appendToPyDict,args)
232     def jobDict(*args): return apply(_BossSession.BossTask_jobDict,args)
233     def jobsDict(*args): return apply(_BossSession.BossTask_jobsDict,args)
234     def progDict(*args): return apply(_BossSession.BossTask_progDict,args)
235     def jobPrograms(*args): return apply(_BossSession.BossTask_jobPrograms,args)
236 gcodispo 1.10 def __repr__(self):
237     return "<C BossTask instance at %s>" % (self.this,)
238    
239     class BossTaskPtr(BossTask):
240     def __init__(self,this):
241     _swig_setattr(self, BossTask, 'this', this)
242     if not hasattr(self,"thisown"): _swig_setattr(self, BossTask, 'thisown', 0)
243     _swig_setattr(self, BossTask,self.__class__,BossTask)
244     _BossSession.BossTask_swigregister(BossTaskPtr)
245 gcodispo 1.3
246     class BossAdministratorSession(_object):
247 yzhang 1.1 __swig_setmethods__ = {}
248     __setattr__ = lambda self, name, value: _swig_setattr(self, BossAdministratorSession, name, value)
249     __swig_getmethods__ = {}
250     __getattr__ = lambda self, name: _swig_getattr(self, BossAdministratorSession, name)
251 gcodispo 1.10 def __init__(self,*args):
252     _swig_setattr(self, BossAdministratorSession, 'this', apply(_BossSession.new_BossAdministratorSession,args))
253     _swig_setattr(self, BossAdministratorSession, 'thisown', 1)
254     def __del__(self, destroy= _BossSession.delete_BossAdministratorSession):
255     try:
256     if self.thisown: destroy(self)
257     except: pass
258     def configureDB(*args): return apply(_BossSession.BossAdministratorSession_configureDB,args)
259     def configureRTMonDB(*args): return apply(_BossSession.BossAdministratorSession_configureRTMonDB,args)
260     def deleteCHTool(*args): return apply(_BossSession.BossAdministratorSession_deleteCHTool,args)
261     def deleteProgramType(*args): return apply(_BossSession.BossAdministratorSession_deleteProgramType,args)
262     def deleteRTMon(*args): return apply(_BossSession.BossAdministratorSession_deleteRTMon,args)
263     def deleteScheduler(*args): return apply(_BossSession.BossAdministratorSession_deleteScheduler,args)
264     def registerCHTool(*args): return apply(_BossSession.BossAdministratorSession_registerCHTool,args)
265     def registerProgram(*args): return apply(_BossSession.BossAdministratorSession_registerProgram,args)
266     def registerRTMon(*args): return apply(_BossSession.BossAdministratorSession_registerRTMon,args)
267     def registerScheduler(*args): return apply(_BossSession.BossAdministratorSession_registerScheduler,args)
268     def help(*args): return apply(_BossSession.BossAdministratorSession_help,args)
269     def SQL(*args): return apply(_BossSession.BossAdministratorSession_SQL,args)
270     def purge(*args): return apply(_BossSession.BossAdministratorSession_purge,args)
271 gcodispo 1.11 def registerPlugins(*args): return apply(_BossSession.BossAdministratorSession_registerPlugins,args)
272 gcodispo 1.10 def __repr__(self):
273     return "<C BossAdministratorSession instance at %s>" % (self.this,)
274    
275     class BossAdministratorSessionPtr(BossAdministratorSession):
276     def __init__(self,this):
277     _swig_setattr(self, BossAdministratorSession, 'this', this)
278     if not hasattr(self,"thisown"): _swig_setattr(self, BossAdministratorSession, 'thisown', 0)
279     _swig_setattr(self, BossAdministratorSession,self.__class__,BossAdministratorSession)
280     _BossSession.BossAdministratorSession_swigregister(BossAdministratorSessionPtr)
281 yzhang 1.1
282