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