- return hostnames instead of node_ids
[plcapi.git] / PLC / Methods / GetNetworkTypes.py
index 55af009..eab232b 100644 (file)
@@ -2,7 +2,7 @@ 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):
     """
@@ -12,10 +12,11 @@ class GetNetworkTypes(Method):
     roles = ['admin', 'pi', 'user', 'tech']
 
     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)]