X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FGetEvents.py;h=2bc989c1795924b667de8f798b9ef02c545a80cd;hb=9ee0739de638548d01573cbff84a585dce9c6e05;hp=30f246ecdd3ea8eb46d3b80f3a6e5287611c3465;hpb=1e6d5da0a20fe4397171671ea9ff29dd2f2f6e27;p=plcapi.git diff --git a/PLC/Methods/GetEvents.py b/PLC/Methods/GetEvents.py index 30f246e..2bc989c 100644 --- a/PLC/Methods/GetEvents.py +++ b/PLC/Methods/GetEvents.py @@ -10,7 +10,8 @@ class GetEvents(Method): Returns an array of structs containing details about events and faults. If event_filter is specified and is an array of event identifiers, or a struct of event attributes, only events matching - the filter will be returned. + the filter will be returned. If return_fields is specified, only the + specified details will be returned. """ roles = ['admin'] @@ -18,10 +19,12 @@ class GetEvents(Method): accepts = [ Auth(), Mixed([Event.fields['event_id']], - Filter(Event.fields)) + Filter(Event.fields)), + Parameter([str], "List of fields to return", nullok = True) ] returns = [Event.fields] - def call(self, auth, event_filter = None): - return Events(self.api, event_filter).values() + def call(self, auth, event_filter = None, return_fields = None): + return Events(self.api, event_filter, return_fields) +