From 5abd67a87772bda415902bfd488496ed28bbcabf Mon Sep 17 00:00:00 2001
From: Nicolas Wavrant <nicolas.wavrant@tiolive.com>
Date: Fri, 21 Feb 2014 11:39:26 +0100
Subject: [PATCH] slaprunner: commit for deleting whitespaces

Conflicts:
	software/slaprunner/instance-runner.cfg
---
 slapos/recipe/zeroknown.py               | 14 +++++++-------
 software/slaprunner/common.cfg           |  6 +++---
 software/slaprunner/httpd_conf.in        |  2 +-
 software/slaprunner/instance-runner.cfg  | 19 ++++++++++---------
 stack/monitor/monitor.cfg.in             |  8 ++++----
 stack/monitor/monitor.py.in              | 10 +++++-----
 stack/monitor/webfiles/index.cgi.in      |  2 +-
 stack/monitor/webfiles/index.html.jinja2 |  2 +-
 8 files changed, 32 insertions(+), 31 deletions(-)

diff --git a/slapos/recipe/zeroknown.py b/slapos/recipe/zeroknown.py
index 9598c6b6b..69e9e4bd2 100644
--- a/slapos/recipe/zeroknown.py
+++ b/slapos/recipe/zeroknown.py
@@ -36,16 +36,16 @@ class WriteRecipe(GenericBaseRecipe):
   """
   """
   def __init__(self, buildout, name, options):
-    if not "filename" in options: 
+    if not "filename" in options:
       raise zc.buildout.UserError("You have to provide the parameter \"filename\"")
-    
+
     self.filename = options['filename'].strip()
     self.path = os.path.join(buildout['buildout']['directory'], self.filename)
     self.name = name
     self.options = options.copy()
     del self.options['filename']
     del self.options['recipe']
-    
+
     # Set up the parser, and write config file if needed
     self.parser = ConfigParser.ConfigParser()
     try:
@@ -63,7 +63,7 @@ class WriteRecipe(GenericBaseRecipe):
   install = update = lambda self: []
 
   def full_install(self):
-    """XXX-Nicolas : when some parameter's value is changed in 
+    """XXX-Nicolas : when some parameter's value is changed in
     buildout profile, this will override custom user defined values"""
     self.parser.read(self.path)
     if self.parser.has_section(self.name):
@@ -74,14 +74,14 @@ class WriteRecipe(GenericBaseRecipe):
     with open(self.path, 'w') as file:
       self.parser.write(file)
 
-    
+
 class ReadRecipe(GenericBaseRecipe):
   """
   """
   def __init__(self, buildout, name, options):
-    if not "filename" in options: 
+    if not "filename" in options:
       raise zc.buildout.UserError("You have to provide the parameter \"filename\"")
-    
+
     self.filename = options['filename'].strip()
     self.path = os.path.join(buildout['buildout']['directory'], self.filename)
 
diff --git a/software/slaprunner/common.cfg b/software/slaprunner/common.cfg
index a3dd3c7b2..6efa2bc35 100644
--- a/software/slaprunner/common.cfg
+++ b/software/slaprunner/common.cfg
@@ -28,7 +28,7 @@ parts =
   instance-runner-import
   instance-runner-export
   slapos-cookbook
-  slapos-cfg-template 
+  slapos-cfg-template
 # XXX: we have to manually add this for resilience
   rdiff-backup
   collective.recipe.template-egg
@@ -105,7 +105,7 @@ recipe = hexagonit.recipe.download
 url = ${:_profile_base_location_}/template/${:filename}
 md5sum = d31d1c51a51bc4b2b8dda197777a4bcb
 location = ${buildout:parts-directory}/${:_buildout_section_name_}
-filename = slapos.cfg.in 
+filename = slapos.cfg.in
 download-only = true
 mode = 0644
 
@@ -114,7 +114,7 @@ recipe = hexagonit.recipe.download
 url = ${:_profile_base_location_}/${:filename}
 md5sum = f8446fcf254b4929eb828a9a1d7e5f62
 location = ${buildout:parts-directory}/${:_buildout_section_name_}
-filename = parameters.xml.in 
+filename = parameters.xml.in
 download-only = true
 mode = 0644
 
diff --git a/software/slaprunner/httpd_conf.in b/software/slaprunner/httpd_conf.in
index 2e2273462..d466dc0d0 100644
--- a/software/slaprunner/httpd_conf.in
+++ b/software/slaprunner/httpd_conf.in
@@ -73,4 +73,4 @@ RewriteRule ^/git-public/ - [E=AUTHREQUIRED:yes]
         Require valid-user
 </LocationMatch>
 
-include {{ parameters.cgi_httpd_conf }} 
+include {{ parameters.cgi_httpd_conf }}
diff --git a/software/slaprunner/instance-runner.cfg b/software/slaprunner/instance-runner.cfg
index 4cac25498..578a2b832 100644
--- a/software/slaprunner/instance-runner.cfg
+++ b/software/slaprunner/instance-runner.cfg
@@ -163,7 +163,7 @@ runner_port = 50005
 partition-amount = $${slap-parameter:instance-amount}
 wrapper = $${directory:services}/slaprunner
 debug = $${slap-parameter:debug}
-access-url = https://[$${:ipv6}]:$${:runner_port} 
+access-url = https://[$${:ipv6}]:$${:runner_port}
 supd-temp-var = $${directory:etc}/supervisord.conf
 prox-db-var = $${slaprunner:working-directory}/proxy.db
 console = False
@@ -305,13 +305,13 @@ cgi_httpd_conf = $${cgi-httpd-configuration-file:output}
 recipe = slapos.recipe.template:jinja2
 template = ${template_httpd_conf:location}/${template_httpd_conf:filename}
 rendered = $${directory:etc}/httpd.conf
-context = 
+context =
     section parameters httpd-parameters
 
 [cgi-httpd-wrapper]
-recipe = slapos.cookbook:wrapper                                                    
-apache-executable = ${apache:location}/bin/httpd                                    
-wrapper-path = $${ca-httpd:executable}  
+recipe = slapos.cookbook:wrapper
+apache-executable = ${apache:location}/bin/httpd
+wrapper-path = $${ca-httpd:executable}
 command-line = $${:apache-executable} -f $${httpd-conf:rendered} -DFOREGROUND
 
 #--------------------
@@ -503,8 +503,9 @@ context =
   key runner_port slaprunner:runner_port
   key runner_workdir slaprunner:working-directory
   key slapgrid_cp slaprunner:slapgrid_cp
-  key slapgrid_sr slaprunner:slapgrid_sr 
-  key slapproxy slaprunner:slapproxy 
+  key slapgrid_sr slaprunner:slapgrid_sr
+  key slapproxy slaprunner:slapproxy
+  key software_root runnerdirectory:software-root
   key ssh_client slaprunner:ssh_client
   key supervisor slaprunner:supervisor
   key supervisord_config slaprunner:supd-temp-var
@@ -516,7 +517,7 @@ ipv6 = $${slap-network-information:global-ipv6}
 port = 8080
 shell = $${shell:wrapper}
 wrapper = $${directory:bin}/shellinaboxd
-shellinabox-binary = ${shellinabox:location}/bin/shellinaboxd 
+shellinabox-binary = ${shellinabox:location}/bin/shellinaboxd
 password = $${zero-parameters:shell-password}
 directory = $${runnerdirectory:home}
 login-shell = $${directory:bin}/login
@@ -571,7 +572,7 @@ extensions = jinja2.ext.do
 template = ${parameters-template:location}/${parameters-template:filename}
 rendered = $${directory:etc}/.parameter.xml.default
 mode = 0644
-context = 
+context =
   key slapparameter_dict slap-configuration:configuration
 
 [deploy-instance-parameters]
diff --git a/stack/monitor/monitor.cfg.in b/stack/monitor/monitor.cfg.in
index 0b3b443de..2d174ef1f 100644
--- a/stack/monitor/monitor.cfg.in
+++ b/stack/monitor/monitor.cfg.in
@@ -108,7 +108,7 @@ url = ${index-template:location}/$${:filename}
 destination = $${directory:www}
 filename = ${index-template:filename}
 download-only = true
-#md5sum = 
+#md5sum =
 mode = 0644
 
 [deploy-status-cgi]
@@ -144,7 +144,7 @@ context =
   key monitoring_file_json monitor-parameters:json-path
   key monitoring_folder_bool monitor-parameters:result-dir
   raw python_executable ${buildout:executable}
-  
+
 [deploy-rss-script]
 recipe = hexagonit.recipe.download
 url = ${rss-bin:destination}/${rss-bin:filename}
@@ -158,7 +158,7 @@ download-only = true
 recipe = slapos.recipe.template
 url = ${make-rss-script:output}
 output = $${directory:bin}/make-rss.sh
-#md5sum = 
+#md5sum =
 mode = 0744
 
 [cadirectory]
@@ -235,7 +235,7 @@ input = inline:
   SSLProtocol -ALL +SSLv3 +TLSv1
   SSLHonorCipherOrder On
   SSLCipherSuite RC4-SHA:HIGH:!ADH
-  </IfDefine> 
+  </IfDefine>
   SSLEngine   On
   ScriptSock $${:cgid-pid-file}
   <Directory $${:document-root}>
diff --git a/stack/monitor/monitor.py.in b/stack/monitor/monitor.py.in
index 358e3e6c6..6497f7bec 100644
--- a/stack/monitor/monitor.py.in
+++ b/stack/monitor/monitor.py.in
@@ -67,7 +67,7 @@ def runScripts(directory):
     command = [os.path.join(promise_dir, script)]
     script = os.path.basename(command[0])
     result[script] = ''
-    
+
     process_handler = subprocess.Popen(command,
                                        cwd=instance_path,
                                        env=None if sys.platform == 'cygwin' else {},
@@ -110,18 +110,18 @@ if __name__ == "__main__":
   parser = OptionParser(option_list=option_list)
   monitors = {}
   (options, args) = parser.parse_args()
-  
+
   if not (options.monitor or options.promise
          or options.service or options.all):
     exit("Please provide at list one arg in : -a, -m, -p, -s")
-  
+
   if options.monitor or options.all:
     monitors.update(runScripts(monitor_dir))
   if options.promise or options.all:
     monitors.update(runScripts(promise_dir))
   if options.service or options.all:
     monitors.update(runServices(pid_dir))
-    
+
   if options.only_stdout:
     print json.dumps(monitors)
   else:
@@ -130,4 +130,4 @@ if __name__ == "__main__":
     exit(0)
   else:
     exit(1)
-    
+
diff --git a/stack/monitor/webfiles/index.cgi.in b/stack/monitor/webfiles/index.cgi.in
index 1679b2c2b..5c5ada939 100755
--- a/stack/monitor/webfiles/index.cgi.in
+++ b/stack/monitor/webfiles/index.cgi.in
@@ -51,7 +51,7 @@ def return_document():
 
 def make_menu():
   # Transform deep-2 tree in json
-  folder_list = {} 
+  folder_list = {}
   for folder in os.listdir(cgi_path):
     if os.path.isdir(os.path.join(cgi_path, folder)):
       folder_list[folder] = []
diff --git a/stack/monitor/webfiles/index.html.jinja2 b/stack/monitor/webfiles/index.html.jinja2
index b97fdc836..4977ae82f 100644
--- a/stack/monitor/webfiles/index.html.jinja2
+++ b/stack/monitor/webfiles/index.html.jinja2
@@ -20,7 +20,7 @@
   </ul>
  </div>
  </div>
- <div id="content"> 
+ <div id="content">
  <iframe src="{{ default_page }}">
  </iframe>
  </div>
-- 
2.30.9