2 from PLC.Faults import *
3 from PLC.Method import Method
4 from PLC.Parameter import Parameter, Mixed
5 from PLC.NetworkTypes import NetworkType, NetworkTypes
6 from PLC.Auth import Auth
8 class DeleteNetworkType(Method):
10 Deletes a network type.
12 WARNING: This will cause the deletion of all network interfaces
15 Returns 1 if successful, faults otherwise.
22 NetworkType.fields['type']
25 returns = Parameter(int, '1 if successful')
28 def call(self, auth, name):
29 network_types = NetworkTypes(self.api, [name])
31 raise PLCInvalidArgument, "No such network type"
32 network_type = network_types[0]