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.AddressTypes import AddressType, AddressTypes
8 from PLC.Auth import Auth
10 class GetAddressTypes(Method):
12 Returns an array of structs containing details about address
13 types. If address_type_filter is specified and is an array of
14 address type identifiers, or a struct of address type attributes,
15 only address types matching the filter will be returned. If
16 return_fields is specified, only the specified details will be
20 roles = ['admin', 'pi', 'user', 'tech', 'node']
24 Mixed([Mixed(AddressType.fields['address_type_id'],
25 AddressType.fields['name'])],
26 Filter(AddressType.fields)),
27 Parameter([str], "List of fields to return", nullok = True)
30 returns = [AddressType.fields]
33 def call(self, auth, address_type_filter = None, return_fields = None):
34 return AddressTypes(self.api, address_type_filter, return_fields)