bug fixes
[plcapi.git] / PLC / NodeGroups.py
index bbe20a8..01a28d3 100644 (file)
@@ -11,7 +11,7 @@ from PLC.Debug import profile
 from PLC.Storage.AlchemyObject import AlchemyObj
 from PLC.Nodes import Node, Nodes
 
-class NodeGroup(Row):
+class NodeGroup(AlchemyObj):
     """
     Representation of a row in the nodegroups table. To use, optionally
     instantiate with a dict of values. Update as you would a
@@ -21,7 +21,7 @@ class NodeGroup(Row):
     tablename = 'nodegroups'
     join_tables = ['conf_file_nodegroup']
     fields = {
-        'nodegroup_id': Parameter(int, "Node group identifier", primary_key),
+        'nodegroup_id': Parameter(int, "Node group identifier", primary_key=True),
         'groupname': Parameter(str, "Node group name", max = 50),
         'tag_type_id': Parameter (int, "Node tag type id"),
         'value' : Parameter(str, "value that the nodegroup definition is based upon"),
@@ -29,8 +29,6 @@ class NodeGroup(Row):
         'conf_file_ids': Parameter([int], "List of configuration files specific to this node group", joined=True),
         'node_ids' : Parameter([int], "List of node_ids that belong to this nodegroup", joined=True),
         }
-    related_fields = {
-        }
 
     def validate_name(self, name):
         # Make sure name is not blank