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