From a03ffec705c328aefc8251dd7bae0d6b26b0d66d Mon Sep 17 00:00:00 2001
From: Benjamin Blanc <benjamin.blanc@tiolive.com>
Date: Fri, 7 Jun 2013 13:04:32 +0000
Subject: [PATCH] Add computer_id and server_url to erp5testnode.cfg

---
 slapos/recipe/erp5testnode/__init__.py                  | 7 ++++---
 slapos/recipe/erp5testnode/template/erp5testnode.cfg.in | 2 ++
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/slapos/recipe/erp5testnode/__init__.py b/slapos/recipe/erp5testnode/__init__.py
index 95fa1da52..d39a87a6e 100644
--- a/slapos/recipe/erp5testnode/__init__.py
+++ b/slapos/recipe/erp5testnode/__init__.py
@@ -54,8 +54,9 @@ class Recipe(GenericBaseRecipe):
     if software_path_list:
       CONFIG["software_path_list"] = "[software_list]"
       CONFIG["software_path_list"] += \
-          "\npath_list = %s" % ",".join(software_path_list)
-
+          "\npath_list = %s" % ",".join(software_path_list) 
+    CONFIG['computer_id'] = self.buildout['slap-connection']['computer-id']
+    CONFIG['server_url'] = self.buildout['slap-connection']['server-url']
     configuration_file = self.createFile(
       self.options['configuration-file'],
       self.substituteTemplate(
@@ -107,4 +108,4 @@ class Recipe(GenericBaseRecipe):
     # create empty html page to not allow listing of /
     page = open(os.path.join(self.options['log-directory'], "index.html"), "w")
     page.write("<html/>")
-    page.close()
\ No newline at end of file
+    page.close()
diff --git a/slapos/recipe/erp5testnode/template/erp5testnode.cfg.in b/slapos/recipe/erp5testnode/template/erp5testnode.cfg.in
index ab38d44c7..7e8589a85 100644
--- a/slapos/recipe/erp5testnode/template/erp5testnode.cfg.in
+++ b/slapos/recipe/erp5testnode/template/erp5testnode.cfg.in
@@ -13,6 +13,8 @@ ipv6_address = %(ipv6_address)s
 test_suite_master_url = %(test_suite_master_url)s
 httpd_ip = %(httpd_ip)s
 httpd_port = %(httpd_port)s
+computer_id = %(computer_id)s
+server_url = %(server_url)s
 
 # Binaries
 git_binary = %(git_binary)s
-- 
2.30.9