2 from PLC.Faults import *
3 from PLC.Method import Method
4 from PLC.Parameter import Parameter, Mixed
5 from PLC.Filter import Filter
6 from PLC.Messages import Message, Messages
7 from PLC.Auth import Auth
9 class GetMessages(Method):
11 Returns an array of structs containing details about message
12 templates. If message template_filter is specified and is an array
13 of message template identifiers, or a struct of message template
14 attributes, only message templates matching the filter will be
15 returned. If return_fields is specified, only the specified
16 details will be returned.
19 roles = ['admin', 'node']
23 Mixed([Message.fields['message_id']],
24 Filter(Message.fields)),
25 Parameter([str], "List of fields to return", nullok = True),
28 returns = [Message.fields]
31 def call(self, auth, message_filter = None, return_fields = None):
32 return Messages(self.api, message_filter, return_fields)