# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: Nodes.py,v 1.25 2006/11/28 10:25:03 thierry Exp $
+# $Id: Nodes.py,v 1.28 2006/12/05 16:45:03 thierry Exp $
#
from types import StringTypes
# for Cache
class_key = 'hostname'
- foreign_fields = ['boot_state','model','version','date_created','last_updated']
+ foreign_fields = ['boot_state','model','version']
+ # forget about these ones, they are read-only anyway
+ # handling them causes Cache to re-sync all over again
+ # 'date_created','last_updated'
foreign_xrefs = [
# in this case, we dont need the 'table' but Cache will look it up, so...
{'field' : 'site_id' , 'class' : 'Site' , 'table' : 'unused-on-direct-refs' } ,
return boot_state
+ # timestamps
+ def validate_date_created (self, timestamp):
+ return self.validate_timestamp (timestamp)
+ def validate_last_updated (self, timestamp):
+ return self.validate_timestamp (timestamp)
+
def delete(self, commit = True):
"""
Delete existing node.