svn keywords
[plcapi.git] / PLC / Nodes.py
index f25a617..46fb99a 100644 (file)
@@ -5,6 +5,7 @@
 # Copyright (C) 2006 The Trustees of Princeton University
 #
 # $Id$
+# $URL$
 #
 
 from types import StringTypes
@@ -49,7 +50,6 @@ class Node(Row):
         'site_id': Parameter(int, "Site at which this node is located"),
         'boot_state': Parameter(str, "Boot state", max = 20),
         'run_level': Parameter(str, "Run level", max = 20),
-        'extrainfo': Parameter(str, "Extra information about the host", max = 256),
         'model': Parameter(str, "Make and model of the actual machine", max = 255, nullok = True),
         'boot_nonce': Parameter(str, "(Admin only) Random value generated by the node at last boot", max = 128),
         'version': Parameter(str, "Apparent Boot CD version", max = 64),
@@ -248,11 +248,15 @@ class Node(Row):
         """
 
         assert 'node_id' in self
-       assert 'interface_ids' in self
 
        # we need to clean up InterfaceTags, so handling interfaces as part of join_tables does not work
-       for interface in Interfaces(self.api,self['interface_ids']):
-           interface.delete()
+        # federated nodes don't have interfaces though so for smooth transition from 4.2 to 4.3
+        if 'peer_id' in self and self['peer_id']:
+            pass
+        else:
+            assert 'interface_ids' in self
+            for interface in Interfaces(self.api,self['interface_ids']):
+                interface.delete()
 
         # Clean up miscellaneous join tables
         for table in self.join_tables: