from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.NetworkMethods import NetworkMethod, NetworkMethods
-from PLC.Auth import PasswordAuth
+from PLC.Auth import Auth
class GetNetworkMethods(Method):
"""
Returns a list of all valid network methods.
"""
- roles = ['admin', 'pi', 'user', 'tech']
+ roles = ['admin', 'pi', 'user', 'tech', 'node']
accepts = [
- PasswordAuth()
+ Auth()
]
returns = [NetworkMethod.fields['method']]
+
def call(self, auth):
- return [network_method['method'] for network_method in NetworkMethods(self.api).values()]
+ return [network_method['method'] for network_method in NetworkMethods(self.api)]