7 from qa.PLCs import PLC, PLCs
11 Starts the myplc service
14 def call(self, plc_name = None):
16 # Get plc configuration from config
17 plc = PLC(self.config)
18 plcs = getattr(self.config, 'plcs', [])
20 if p['name'] in [plc_name]:
23 command = "/sbin/service plc start "
24 if self.config.verbose:
26 (status, output) = plc.commands(command)
28 if self.config.verbose:
31 # Some plcs may fail when trying to start the http/xmlrpc server
32 # because the port is already in use. We must start a server on
34 plc.start_xmlrpc_server()
39 if __name__ == '__main__':
40 args = tuple(sys.argv[1:])