Techs can view slices that are running on nodes at their site
[plcapi.git] / PLC / NodeTypes.py
index e3db781..896d7eb 100644 (file)
@@ -2,6 +2,7 @@
 # Functions for interacting with the node_types table in the database
 #
 # $Id$
+# $URL$
 #
 
 from PLC.Faults import *
@@ -22,16 +23,16 @@ class NodeType(Row):
         }
 
     def validate_node_type(self, name):
-       # Make sure name is not blank
+        # Make sure name is not blank
         if not len(name):
             raise PLCInvalidArgument, "Node type must be specified"
-       
-       # Make sure node type does not alredy exist
-       conflicts = NodeTypes(self.api, [name])
+
+        # Make sure node type does not alredy exist
+        conflicts = NodeTypes(self.api, [name])
         if conflicts:
             raise PLCInvalidArgument, "Node type name already in use"
 
-       return name
+        return name
 
 class NodeTypes(Table):
     """
@@ -43,7 +44,7 @@ class NodeTypes(Table):
 
         sql = "SELECT %s FROM node_types" % \
               ", ".join(NodeType.fields)
-        
+
         if node_types:
             sql += " WHERE node_type IN (%s)" % ", ".join(map(api.db.quote, node_types))