Browse Source

[213] Stopping of components

Michal 'vorner' Vaner 13 years ago
parent
commit
7d1e13b7fb
1 changed files with 10 additions and 1 deletions
  1. 10 1
      src/lib/python/isc/bind10/component.py

+ 10 - 1
src/lib/python/isc/bind10/component.py

@@ -219,9 +219,18 @@ class Configurator:
         Any configuration problems are expected to be handled here, so the
         plan is not yet run.
         """
-        plan_add = []
         plan = []
+        # Handle removals of old components
+        for cname in old.keys():
+            if cname not in new:
+                component = self._components[cname]
+                if component.running():
+                    plan.append({
+                        'command': 'stop',
+                        'component': component
+                    })
         # Handle introduction of new components
+        plan_add = []
         for cname in new.keys():
             if cname not in old:
                 params = new[cname]