Commit c8ea88a4 authored by Pere Cortes's avatar Pere Cortes

erp5testnode: SlapOSControler's init issue fixed.

parent d8c7bf4e
...@@ -42,19 +42,20 @@ def createFolder(folder): ...@@ -42,19 +42,20 @@ def createFolder(folder):
class SlapOSControler(object): class SlapOSControler(object):
def __init__(self, working_directory, config, log, slapproxy_log=None, def __init__(self, working_directory, config):
process_manager=None, reset_software=False, software_path_list=None):
self.software_path_list = software_path_list
log('SlapOSControler, initialize, reset_software: %r' % reset_software)
self.log = log
self.config = config self.config = config
self.process_manager = process_manager
self.software_root = os.path.join(working_directory, 'soft') self.software_root = os.path.join(working_directory, 'soft')
self.instance_root = os.path.join(working_directory, 'inst') self.instance_root = os.path.join(working_directory, 'inst')
self.slapos_config = os.path.join(working_directory, 'slapos.cfg') self.slapos_config = os.path.join(working_directory, 'slapos.cfg')
self.proxy_database = os.path.join(working_directory, 'proxy.db') self.proxy_database = os.path.join(working_directory, 'proxy.db')
def initializeSlapOSControler(self): def initializeSlapOSControler(self, log, slapproxy_log=None, process_manager=None,
reset_software=False, software_path_list=None):
self.log = log
self.process_manager = process_manager
self.software_path_list = software_path_list
log('SlapOSControler, initialize, reset_software: %r' % reset_software)
config = self.config
slapos_config_dict = self.config.copy() slapos_config_dict = self.config.copy()
slapos_config_dict.update(software_root=self.software_root, slapos_config_dict.update(software_root=self.software_root,
instance_root=self.instance_root, instance_root=self.instance_root,
......
...@@ -230,10 +230,10 @@ branch = %(branch)s ...@@ -230,10 +230,10 @@ branch = %(branch)s
self.log('testnode, retry_software_count : %r' % \ self.log('testnode, retry_software_count : %r' % \
slapos_instance.retry_software_count) slapos_instance.retry_software_count)
self.slapos_controler = SlapOSControler.SlapOSControler( self.slapos_controler = SlapOSControler.SlapOSControler(
working_directory, self.config, log=self.log, slapproxy_log=slapproxy_log, working_directory, self.config)
self.slapos_controler.initializeSlapOSControler(log=self.log, slapproxy_log=slapproxy_log,
process_manager=self.process_manager, reset_software=reset_software, process_manager=self.process_manager, reset_software=reset_software,
software_path_list=software_path_list) software_path_list=software_path_list)
self.slapos_controler.initializeSlapOSControler()
self.process_manager.supervisord_pid_file = os.path.join(\ self.process_manager.supervisord_pid_file = os.path.join(\
self.slapos_controler.instance_root, 'var', 'run', 'supervisord.pid') self.slapos_controler.instance_root, 'var', 'run', 'supervisord.pid')
method_list= ["runSoftwareRelease"] method_list= ["runSoftwareRelease"]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment