from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
returns = Parameter(int, '1 if successful')
def call(self, auth, conf_file_id, node_id_or_hostname):
returns = Parameter(int, '1 if successful')
def call(self, auth, conf_file_id, node_id_or_hostname):
- nodes = Nodes(self.api, [node_id_or_hostname])
- if not nodes:
- raise PLCInvalidArgument, "No such node"
- node = nodes[0]
+ nodes = Nodes(self.api, [node_id_or_hostname])
+ if not nodes:
+ raise PLCInvalidArgument("No such node")
+ node = nodes[0]
- raise PLCInvalidArgument, "Not a local node"
-
- # Link configuration file to node
+ raise PLCInvalidArgument("Not a local node")
+
+ # Link configuration file to node
- self.event_objects = {'ConfFile': [conf_file_id],
- 'Node': [node['node_id']] }
+ self.event_objects = {'ConfFile': [conf_file_id],
+ 'Node': [node['node_id']] }