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
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"),
'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