2 # Functions for interacting with the node_bootstates table in the database
4 # Mark Huang <mlhuang@cs.princeton.edu>
5 # Copyright (C) 2006 The Trustees of Princeton University
7 # $Id: BootStates.py,v 1.1 2006/09/06 15:36:06 mlhuang Exp $
10 from PLC.Parameter import Parameter
12 class BootStates(list):
14 Representation of the node_bootstates table in the database.
18 'boot_state': Parameter(int, "Node boot state"),
21 def __init__(self, api):
22 sql = "SELECT * FROM boot_states"
24 for row in api.db.selectall(sql):
25 self.append(row['boot_state'])