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