svn keywords
[plcapi.git] / PLC / Events.py
index 836e8fb..a237657 100644 (file)
@@ -4,7 +4,8 @@
 # Tony Mack <tmack@cs.princeton.edu>
 # Copyright (C) 2006 The Trustees of Princeton University
 #
-# $Id: Events.py,v 1.11 2007/01/19 17:50:46 tmack Exp $
+# $Id$
+# $URL$
 #
 
 from PLC.Faults import *
@@ -24,6 +25,7 @@ class Event(Row):
         'event_id': Parameter(int, "Event identifier"),
         'person_id': Parameter(int, "Identifier of person responsible for event, if any"),
         'node_id': Parameter(int, "Identifier of node responsible for event, if any"),
+       'auth_type': Parameter(int, "Type of auth used. i.e. AuthMethod"),
         'fault_code': Parameter(int, "Event fault code"),
        'call_name': Parameter(str, "Call responsible for this event"),
        'call': Parameter(str, "Call responsible for this event, including paramters"),
@@ -72,6 +74,7 @@ class Events(Table):
                 event_filter = Filter(Event.fields, {'event_id': event_filter})
             elif isinstance(event_filter, dict):
                 event_filter = Filter(Event.fields, event_filter)
-            sql += " AND (%s)" % event_filter.sql(api)
-       sql += " ORDER BY %s" % Event.primary_key
+            sql += " AND (%s) %s" % event_filter.sql(api)
+# with new filtering, caller needs to set this explicitly
+#      sql += " ORDER BY %s" % Event.primary_key
         self.selectall(sql)