move package imports out of __init__()
[plcapi.git] / PLC / Methods / DeleteNode.py
index e89d879..c97f20a 100644 (file)
@@ -1,9 +1,11 @@
 # $Id$
+# $URL$
 from PLC.Faults import *
 from PLC.Method import Method
 from PLC.Parameter import Parameter, Mixed
 from PLC.Auth import Auth
 from PLC.Nodes import Node, Nodes
+from PLC.SFA import SFA
 
 class DeleteNode(Method):
     """
@@ -48,9 +50,12 @@ class DeleteNode(Method):
         site_id=node['site_id']
         node.delete()
 
-       # Logging variables
+        # Logging variables
         # it's not much use to attach to the node as it's going to vanish...
-       self.event_objects = {'Node': [node_id], 'Site': [site_id] }
-       self.message = "Node %d deleted" % node['node_id']
+        self.event_objects = {'Node': [node_id], 'Site': [site_id] }
+        self.message = "Node %d deleted" % node['node_id']
+
+        sfa = SFA()
+        sfa.delete_record(node, 'node')       
 
         return 1