aboutsummaryrefslogtreecommitdiffstats
path: root/modules/buildsystem/templates/youri/submit.conf
diff options
context:
space:
mode:
Diffstat (limited to 'modules/buildsystem/templates/youri/submit.conf')
-rw-r--r--modules/buildsystem/templates/youri/submit.conf78
1 files changed, 39 insertions, 39 deletions
diff --git a/modules/buildsystem/templates/youri/submit.conf b/modules/buildsystem/templates/youri/submit.conf
index 233020ba..0d7cf927 100644
--- a/modules/buildsystem/templates/youri/submit.conf
+++ b/modules/buildsystem/templates/youri/submit.conf
@@ -1,4 +1,4 @@
-<%
+<%
Puppet::Parser::Functions.autoloader.loadall
sched_home_dir = scope.lookupvar('buildsystem::var::scheduler::homedir')
@@ -10,8 +10,8 @@ def line(text, indent)
res = ''
i = 0
while i < indent
- res += ' '
- i += 1
+ res += ' '
+ i += 1
end
res += text + "\n"
end
@@ -19,7 +19,7 @@ end
def array_text(array, indent)
res = ''
array.each{|a|
- res += line('- ' + a, indent)
+ res += line('- ' + a, indent)
}
return res
end
@@ -28,15 +28,15 @@ def hash_text(hash, indent)
res = ''
curindent = indent
hash.keys.sort.each{|key|
- if hash[key].instance_of? Hash
- res += line(key + ':', indent)
- res += hash_text(hash[key], indent + 4)
- elsif hash[key].instance_of? Array
- res += line(key + ':', indent)
- res += array_text(hash[key], indent + 4)
- elsif hash[key].instance_of? String
- res += line(key + ': ' + hash[key], indent)
- end
+ if hash[key].instance_of? Hash
+ res += line(key + ':', indent)
+ res += hash_text(hash[key], indent + 4)
+ elsif hash[key].instance_of? Array
+ res += line(key + ':', indent)
+ res += array_text(hash[key], indent + 4)
+ elsif hash[key].instance_of? String
+ res += line(key + ': ' + hash[key], indent)
+ end
}
return res
end
@@ -44,11 +44,11 @@ end
def class_hash(conf, conf_default)
res = {}
res['class'] = get_conf(conf, ['class']) == nil ?
- conf_default['class'] : conf['class']
- res['options'] = get_conf(conf_default, ['options']) == nil ? {} :
- conf_default['options'].dup
+ conf_default['class'] : conf['class']
+ res['options'] = get_conf(conf_default, ['options']) == nil ? {} :
+ conf_default['options'].dup
if get_conf(conf, ['options']) != nil
- res['options'].merge!(conf['options'])
+ res['options'].merge!(conf['options'])
end
return res
end
@@ -56,10 +56,10 @@ end
def get_conf(conf, path)
res = conf
path.each{|p|
- if res == nil
- return nil
- end
- res = res[p]
+ if res == nil
+ return nil
+ end
+ res = res[p]
}
return res
end
@@ -67,10 +67,10 @@ end
def get_distros_conf(distros, conf_name, path)
res = {}
distros.keys.each{|distro|
- t = get_conf(distros[distro], [ 'youri', conf_name ] + path)
- if t != nil
- res[distro] = t.dup
- end
+ t = get_conf(distros[distro], [ 'youri', conf_name ] + path)
+ if t != nil
+ res[distro] = t.dup
+ end
}
return res
end
@@ -80,14 +80,14 @@ def get_definitions(def_name, conf_name, conf, conf_default, distros)
res[def_name] = {}
def_list = conf_default[conf_name][def_name].keys
def_list += get_conf(conf, [ conf_name, def_name ]) != nil ? \
- conf[conf_name][def_name].keys : []
+ conf[conf_name][def_name].keys : []
def_list.uniq.each{|d|
- res[def_name][d] = class_hash(
- get_conf(conf, [ conf_name, def_name, d ]),
- get_conf(conf_default, [ conf_name, def_name, d ])
- )
- res[def_name][d]['options'].merge!(get_distros_conf(distros,
- conf_name, [ def_name, d ]))
+ res[def_name][d] = class_hash(
+ get_conf(conf, [ conf_name, def_name, d ]),
+ get_conf(conf_default, [ conf_name, def_name, d ])
+ )
+ res[def_name][d]['options'].merge!(get_distros_conf(distros,
+ conf_name, [ def_name, d ]))
}
return res
end
@@ -97,14 +97,14 @@ home: <%= sched_home_dir %>
<%-
repository = {
- 'repository' => class_hash(get_conf(conf[conf_name],
- ['repository']),
- conf_default[conf_name]['repository']),
+ 'repository' => class_hash(get_conf(conf[conf_name],
+ ['repository']),
+ conf_default[conf_name]['repository']),
}
distros.keys.each{|distro|
- repository['repository']['options'][distro] = {
- 'arch' => distros[distro]['arch'].join(' '),
- }
+ repository['repository']['options'][distro] = {
+ 'arch' => distros[distro]['arch'].join(' '),
+ }
}
-%>
# repository declaration
@@ -112,7 +112,7 @@ home: <%= sched_home_dir %>
<%-
targets = {
- 'targets' => get_distros_conf(distros, conf_name, [ 'targets' ]),
+ 'targets' => get_distros_conf(distros, conf_name, [ 'targets' ]),
}
-%>
# targets definition