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.Routes import Route, Routes
8 from PLC.Auth import Auth
10 class GetRoutes(Method):
12 Returns an array of structs containing details about routes.
13 If interfaces_filter is specified and is an array of
14 interface identifiers, or a struct of interface fields and
15 values, only interfaces matching the filter will be
18 If return_fields is given, only the specified details will be returned.
21 roles = ['admin', 'pi', 'user', 'tech', 'node', 'anonymous']
25 Mixed([Mixed(Route.fields['route_id'])],
26 Parameter (int, "route id"),
27 Filter(Route.fields)),
28 Parameter([str], "List of fields to return", nullok = True)
31 returns = [Route.fields]
33 def call(self, auth, route_filter = None, return_fields = None):
34 return Routes(self.api, route_filter, return_fields)