Changeset 111
- Timestamp:
- 11/23/07 23:01:15 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
projects/AsynCluster/trunk/asyncluster/master/control.py
r107 r111 301 301 return d 302 302 303 def remote_allowClasses(self, *args): 304 """ 305 Instructs my broker to allow the classes specified by the argument(s), 306 and instructs the jobber to have all current and future nodes do the 307 same with their brokers. 303 def remote_registerClasses(self, *args): 304 """ 305 Instructs my broker to register the classes specified by the 306 argument(s) as self-unjellyable and allowable past PB security, and 307 instructs the jobber to have all current and future nodes do the same 308 with their brokers. 308 309 309 310 The classes are specified by their string representations:: 310 311 311 312 <package(s).module.class> 312 313 314 Use judiciously! 313 315 """ 314 316 for stringRep in args: 315 # Load the class for the string representation316 317 cls = namedObject(stringRep) 317 # Allow instances of the class, including its type and module 318 pb.globalSecurity.allowInstancesOf(cls) 319 return self.ctl.jobber.allowClasses(*args) 318 pb.setUnjellyableForClass(stringRep, cls) 319 return self.ctl.jobber.registerClasses(*args) 320 320 321 321 def remote_newJob(self, jobCode, niceness=0): projects/AsynCluster/trunk/asyncluster/master/jobs.py
r107 r111 120 120 raise Exception("No job registered!") 121 121 122 def allowClasses(self, *args):122 def registerClasses(self, *args): 123 123 """ 124 Instructs the controller to allow the classes specified by the 125 argument(s) and arrange and update to have its nodes do the same. 124 Instructs the controller to register the classes specified by the 125 argument(s) as self-unjellyable and allowable past PB security, and to 126 arrange an update to have its nodes do the same. 126 127 127 128 The classes are specified by their string representations:: 128 129 129 130 <package(s).module.class> 130 131 132 Use judiciously! 131 133 """ 132 return self.root.callRemote(' allowClasses', *args)134 return self.root.callRemote('registerClasses', *args) 133 135 134 136 def run(self, cmd, *args, **kw):
