1 from PLC.Faults import *
2 from PLC.Method import Method
3 from PLC.Parameter import Parameter, Mixed
4 from PLC.NetworkMethods import NetworkMethod, NetworkMethods
5 from PLC.Auth import Auth
7 class AddNetworkMethod(Method):
9 Adds a new network method.
11 Returns 1 if successful, faults otherwise.
18 NetworkMethod.fields['method']
21 returns = Parameter(int, '1 if successful')
24 object_type = 'NetworkMethod'
26 def call(self, auth, name):
27 network_method = NetworkMethod(self.api)
28 network_method['method'] = name