get rid of svn keywords once and for good
[plcapi.git] / PLC / Methods / GetNetworkTypes.py
1 from PLC.Faults import *
2 from PLC.Method import Method
3 from PLC.Parameter import Parameter, Mixed
4 from PLC.NetworkTypes import NetworkType, NetworkTypes
5 from PLC.Auth import Auth
6
7 class GetNetworkTypes(Method):
8     """
9     Returns a list of all valid network types.
10     """
11
12     roles = ['admin', 'pi', 'user', 'tech', 'node']
13
14     accepts = [
15         Auth()
16         ]
17
18     returns = [NetworkType.fields['type']]
19
20
21     def call(self, auth):
22         return [network_type['type'] for network_type in NetworkTypes(self.api)]