From: Tony Mack Date: Wed, 26 Mar 2008 00:29:02 +0000 (+0000) Subject: - removed some hardcoded values. modified start_xmlrpc_server to use popen instead... X-Git-Tag: tests-4.2-4~161 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=91c4438d3223f7284a8001a99f4a14d3a9b53982;p=tests.git - removed some hardcoded values. modified start_xmlrpc_server to use popen instead of commands. --- diff --git a/qaapi/qa/PLCs.py b/qaapi/qa/PLCs.py index dacee1b..149e3f5 100644 --- a/qaapi/qa/PLCs.py +++ b/qaapi/qa/PLCs.py @@ -1,6 +1,6 @@ import os import copy -import qa.utils +import utils from Remote import Remote from Table import Table @@ -9,10 +9,10 @@ class PLC(dict, Remote): 'name': 'TestPLC', # PLC Name 'host': 'localhost', # Node Hostname 'ip': '127.0.0.1', # IP - 'chroot': None, + 'chroot': None, # Path to the chroot 'vserver': None, # Vserver where this PLC lives - 'rootkey': '/home/tmack/.ssh/plc-root', # Root Key - 'api_path': '/PLCAPI/', # PLCAPI path + 'rootkey': None, # Root Key + 'api_path': '/PLCAPI/', # PLCAPI path 'port': '443' # PLCAPI port } @@ -34,9 +34,9 @@ class PLC(dict, Remote): standalone http server that listens on the specified port. This is useful for running multiple api servers on the same machine. """ - if 'host' in self and not 'host' in ['localhost', None]: + if 'port' in self and not self['port'] in ['443', None]: server_script = "/usr/share/plc_api/Server.py" - self.commands("%s -p %s" % (server_script, self['port'])) + self.popen3("%s -p %s &" % (server_script, self['port'])) if self.config.verbose: utils.header("Starting api server at %s on listening on port %s" % (self['host'], self['port']))