Coverage for src/lib/python/isc/bind10/special_component : 96%
        
        
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
| 
 # Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC") # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SYSTEMS CONSORTIUM # DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL # INTERNET SYSTEMS CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING # FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 
 
 
 """ The socket creator component. Will start and stop the socket creator accordingly. 
 Note: _creator shouldn't be reset explicitly once created. The underlying Popen object would then wait() the child process internally, which breaks the assumption of the boss, who is expecting to see the process die in waitpid(). """ 
 os.environ['PATH']) 
 
 
 """ Pid of the socket creator. It is provided differently from a usual component. """ 
 # We don't really care about forceful here 
 """ The message queue. Starting is passed to boss, stopping is not supported and we leave the boss kill it by signal. """ boss.start_msgq) 
 """ We can't really stop the message queue, as many processes may need it for their shutdown and it doesn't have a shutdown command anyway. But as it is stateless, it's OK to kill it. 
 So we disable this method (as the only time it could be called is during shutdown) and wait for the boss to kill it in the next shutdown step. 
 This actually breaks the recommendation at Component we shouldn't override its methods one by one. This is a special case, because we don't provide a different implementation, we completely disable the method by providing an empty one. This can't hurt the internals. """ pass 
 None, boss.start_cfgmgr) 
 boss.start_auth) 
 boss.start_resolver) 
 boss.start_cmdctl) """ List of specially started components. Each one should be the class than can be created for that component. """ 'sockcreator': SockCreator, 'msgq': Msgq, 'cfgmgr': CfgMgr, # TODO: Should these be replaced by configuration in config manager only? # They should not have any parameters anyway 'auth': Auth, 'resolver': Resolver, 'cmdctl': CmdCtl }  |