X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FGetNetworkTypes.py;h=dbddd9fc1e1003d141720301881a71ee866bcdbc;hb=19d4a01ccf66af9e00914351b3eacd5fc880f988;hp=55af009c9061faf6087fe2d5f32f8e2e58adc481;hpb=aa5f09efe1aaeb31820c30e7258ef8d09008ba94;p=plcapi.git diff --git a/PLC/Methods/GetNetworkTypes.py b/PLC/Methods/GetNetworkTypes.py index 55af009..dbddd9f 100644 --- a/PLC/Methods/GetNetworkTypes.py +++ b/PLC/Methods/GetNetworkTypes.py @@ -2,20 +2,21 @@ from PLC.Faults import * from PLC.Method import Method from PLC.Parameter import Parameter, Mixed from PLC.NetworkTypes import NetworkType, NetworkTypes -from PLC.Auth import PasswordAuth +from PLC.Auth import Auth class GetNetworkTypes(Method): """ Returns a list of all valid network types. """ - roles = ['admin', 'pi', 'user', 'tech'] + roles = ['admin', 'pi', 'user', 'tech', 'node'] accepts = [ - PasswordAuth() + Auth() ] returns = [NetworkType.fields['type']] + def call(self, auth): - return [network_type['type'] for network_type in NetworkTypes(self.api).values()] + return [network_type['type'] for network_type in NetworkTypes(self.api)]