Changeset 111

Show
Ignore:
Timestamp:
11/23/07 23:01:15 (1 year ago)
Author:
edsuom
Message:

Self-jellyable classes are registered, not just allowed

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • projects/AsynCluster/trunk/asyncluster/master/control.py

    r107 r111  
    301301        return d 
    302302 
    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. 
    308309         
    309310        The classes are specified by their string representations:: 
    310311         
    311312            <package(s).module.class> 
    312          
     313 
     314        Use judiciously! 
    313315        """ 
    314316        for stringRep in args: 
    315             # Load the class for the string representation 
    316317            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) 
    320320 
    321321    def remote_newJob(self, jobCode, niceness=0): 
  • projects/AsynCluster/trunk/asyncluster/master/jobs.py

    r107 r111  
    120120        raise Exception("No job registered!") 
    121121 
    122     def allowClasses(self, *args): 
     122    def registerClasses(self, *args): 
    123123        """ 
    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. 
    126127 
    127128        The classes are specified by their string representations:: 
    128129         
    129130            <package(s).module.class> 
    130          
     131 
     132        Use judiciously! 
    131133        """ 
    132         return self.root.callRemote('allowClasses', *args) 
     134        return self.root.callRemote('registerClasses', *args) 
    133135 
    134136    def run(self, cmd, *args, **kw):