svn keywords
[plcapi.git] / PLC / Methods / DeleteNetworkType.py
index 22a90ae..424628e 100644 (file)
@@ -1,8 +1,10 @@
+# $Id$
+# $URL$
 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 DeleteNetworkType(Method):
     """
@@ -17,17 +19,18 @@ class DeleteNetworkType(Method):
     roles = ['admin']
 
     accepts = [
-        PasswordAuth(),
+        Auth(),
         NetworkType.fields['type']
         ]
 
     returns = Parameter(int, '1 if successful')
+    
 
     def call(self, auth, name):
         network_types = NetworkTypes(self.api, [name])
         if not network_types:
             raise PLCInvalidArgument, "No such network type"
-        network_type = network_types.values()[0]
+        network_type = network_types[0]
 
         network_type.delete()