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.Interfaces import Interface, Interfaces
7 from PLC.Auth import Auth
9 class GetInterfaces(Method):
11 Returns an array of structs containing details about node network
12 interfacess. If interfaces_filter is specified and is an array
13 of node network identifiers, or a struct of node network
14 fields and values, only node network interfaces matching the filter
17 If return_fields is given, only the specified details will be returned.
20 roles = ['admin', 'pi', 'user', 'tech', 'node', 'anonymous']
24 Mixed([Interface.fields['interface_id']],
25 Parameter (int, "interface id"),
26 Filter(Interface.fields)),
27 Parameter([str], "List of fields to return", nullok = True)
30 returns = [Interface.fields]
32 def call(self, auth, interface_filter = None, return_fields = None):
33 return Interfaces(self.api, interface_filter, return_fields)