2 from PLC.Faults import *
3 from PLC.Method import Method
4 from PLC.Parameter import Parameter, Mixed
5 from PLC.NetworkMethods import NetworkMethod, NetworkMethods
6 from PLC.Auth import Auth
8 class AddNetworkMethod(Method):
10 Adds a new network method.
12 Returns 1 if successful, faults otherwise.
19 NetworkMethod.fields['method']
22 returns = Parameter(int, '1 if successful')
25 def call(self, auth, name):
26 network_method = NetworkMethod(self.api)
27 network_method['method'] = name
28 network_method.sync(insert = True)