Browse Source

Merge branch 'trac213' of git+ssh://git.bind10.isc.org/var/bind10/git/bind10 into work/bossstart

Conflicts:
	src/lib/python/isc/bind10/component.py
Michal 'vorner' Vaner 13 years ago
parent
commit
13c03c7116

+ 1 - 1
src/bin/bind10/bind10_messages.mes

@@ -57,7 +57,7 @@ real work yet, it just does the planning what needs to be done.
 % BIND10_CONFIGURATOR_PLAN_INTERRUPTED configurator plan interrupted, only %1 of %2 done
 There was an exception during some planned task. The plan will not continue and
 only some tasks of the plan were completed. The rest is aborted. The exception
-will propagate.
+will be propagated.
 
 % BIND10_CONFIGURATOR_RECONFIGURE reconfiguring running components
 A different configuration of which components should be running is being

+ 11 - 11
src/lib/python/isc/bind10/component.py

@@ -13,6 +13,15 @@
 # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
 # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
+"""
+Module for managing components (abstraction of process). It allows starting
+them in given order, handling when they crash (what happens depends on kind
+of component) and shutting down. It also handles the configuration of this.
+
+Dependencies between them are not yet handled. It might turn out they are
+needed, in that case they will be added sometime in future.
+"""
+
 import isc.log
 from isc.log_messages.bind10_messages import *
 import time
@@ -20,7 +29,7 @@ import time
 logger = isc.log.Logger("boss")
 DBG_TRACE_DATA = 20
 DBG_TRACE_DETAILED = 80
-
+<<<<<<< HEAD
 START_CMD = 'start'
 STOP_CMD = 'stop'
 
@@ -30,15 +39,6 @@ STATE_DEAD = 'dead'
 STATE_STOPPED = 'stopped'
 STATE_RUNNING = 'running'
 
-"""
-Module for managing components (abstraction of process). It allows starting
-them in given order, handling when they crash (what happens depends on kind
-of component) and shutting down. It also handles the configuration of this.
-
-Dependencies between them are not yet handled. It might turn out they are
-needed, in that case they will be added sometime in future.
-"""
-
 class Component:
     """
     This represents a single component. It has some defaults of behaviour,
@@ -431,7 +431,7 @@ class Configurator:
                         component.stop()
                     del self._components[task['name']]
                 else:
-                    # Can Not Happen (as the plans are generated by ourself).
+                    # Can Not Happen (as the plans are generated by ourselves).
                     # Therefore not tested.
                     raise NotImplementedError("Command unknown: " + command)
                 done += 1

+ 7 - 7
src/lib/python/isc/bind10/tests/component_test.py

@@ -34,11 +34,11 @@ class TestError(Exception):
 class BossUtils:
     """
     A class that brings some utilities for pretending we're Boss.
-    This is expected to be inherited by the testcases themself.
+    This is expected to be inherited by the testcases themselves.
     """
     def setUp(self):
         """
-        Part of setup. Should be called by descendand's setUp.
+        Part of setup. Should be called by descendant's setUp.
         """
         self._shutdown = False
         self._exitcode = None
@@ -47,7 +47,7 @@ class BossUtils:
 
     def tearDown(self):
         """
-        Clean up after tests. If the descendand implements a tearDown, it
+        Clean up after tests. If the descendant implements a tearDown, it
         should call this method internally.
         """
         # Return the original time function
@@ -228,7 +228,7 @@ class ComponentTests(BossUtils, unittest.TestCase):
 
     def __do_start_stop(self, kind):
         """
-        This is a body of a test. It creates a componend of given kind,
+        This is a body of a test. It creates a component of given kind,
         then starts it and stops it. It checks correct functions are called
         and the component's status is correct.
 
@@ -300,7 +300,7 @@ class ComponentTests(BossUtils, unittest.TestCase):
         component.start()
         self.__check_started(component)
         self._timeskip()
-        # Pretend the componend died some time later
+        # Pretend the component died some time later
         component.failed()
         # Check the component is still dead
         self.__check_dead(component)
@@ -401,7 +401,7 @@ class ComponentTests(BossUtils, unittest.TestCase):
 
     def test_bad_kind(self):
         """
-        Test the component rejects nonsensual kinds. This includes bad
+        Test the component rejects nonsensical kinds. This includes bad
         capitalization.
         """
         for kind in ['Core', 'CORE', 'nonsense', 'need ed', 'required']:
@@ -654,7 +654,7 @@ class ConfiguratorTest(BossUtils, unittest.TestCase):
         self.assertEqual([1, 2], component._params)
         self.assertEqual('address', component._address)
         self.assertEqual('needed', component._kind)
-        # We don't use isinstance on purpose, it would allow a descendand
+        # We don't use isinstance on purpose, it would allow a descendant
         self.assertTrue(type(component) is Component)
         plan = configurator._build_plan({}, {
             'component': { }