Browse Source

[1429] Use set_creator, not insert_creator

Just a naming convention
Michal 'vorner' Vaner 13 years ago
parent
commit
4db174c8f0

+ 1 - 1
src/bin/bind10/bind10_src.py.in

@@ -895,7 +895,7 @@ class BoB:
             # rare, though.
             pass
 
-    def insert_creator(self, creator):
+    def set_creator(self, creator):
         """
         Registeres a socket creator into the boss. The socket creator is not
         used directly, but through a cache. The cache is created in this

+ 4 - 4
src/bin/bind10/tests/bind10_test.py.in

@@ -339,20 +339,20 @@ class TestBoB(unittest.TestCase):
         self.assertEqual(bob.nocache, False)
         self.assertIsNone(bob._socket_cache)
 
-    def test_insert_creator(self):
+    def test_set_creator(self):
         """
-        Test the call to insert_creator. First time, the cache is created
+        Test the call to set_creator. First time, the cache is created
         with the passed creator. The next time, it throws an exception.
         """
         bob = BoB()
         # The cache doesn't use it at start, so just create an empty class
         class Creator: pass
         creator = Creator()
-        bob.insert_creator(creator)
+        bob.set_creator(creator)
         self.assertTrue(isinstance(bob._socket_cache,
                         isc.bind10.socket_cache.Cache))
         self.assertEqual(creator, bob._socket_cache._creator)
-        self.assertRaises(ValueError, bob.insert_creator, creator)
+        self.assertRaises(ValueError, bob.set_creator, creator)
 
     def test_init_alternate_socket(self):
         bob = BoB("alt_socket_file")

+ 1 - 1
src/lib/python/isc/bind10/special_component.py

@@ -42,7 +42,7 @@ class SockCreator(BaseComponent):
         self.__creator = isc.bind10.sockcreator.Creator(LIBEXECDIR + ':' +
                                                         os.environ['PATH'])
         self._boss.register_process(self.pid(), self)
-        self._boss.insert_creator(self.__creator)
+        self._boss.set_creator(self.__creator)
         self._boss.log_started(self.pid())
 
     def _stop_internal(self):