summaryrefslogtreecommitdiffstats
path: root/lavalab-gen.py
diff options
context:
space:
mode:
authorCorentin LABBE <clabbe@baylibre.com>2018-01-11 16:56:25 +0100
committerCorentin LABBE <clabbe@baylibre.com>2018-02-02 14:27:37 +0100
commit4278e548edc710a4432d3badadb9ae3644937a9c (patch)
treefa34d9c73d7b74d69d942214b9253b9199856e45 /lavalab-gen.py
parent3017583fc45d5819f89e4b799502da44b930eb53 (diff)
Implement connection_command
connection_command is a generic way to get console from devices. It could ran telnet for accessin ser2net for example.
Diffstat (limited to 'lavalab-gen.py')
-rwxr-xr-xlavalab-gen.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lavalab-gen.py b/lavalab-gen.py
index b7b4356..0e6408f 100755
--- a/lavalab-gen.py
+++ b/lavalab-gen.py
@@ -28,6 +28,9 @@ template_device = string.Template("""{% extends '${devicetype}.jinja2' %}
template_device_conmux = string.Template("""
{% set connection_command = 'conmux-console ${board}' %}
""")
+template_device_connection_command = string.Template("""#
+{% set connection_command = '${connection_command}' %}
+""")
template_device_pdu_generic = string.Template("""
{% set hard_reset_command = '${hard_reset_command}' %}
{% set power_off_command = '${power_off_command}' %}
@@ -95,6 +98,9 @@ def main(args):
fp.write(line)
fp.close()
device_line += template_device_conmux.substitute(board=board_name)
+ elif b.has_key("connection_command"):
+ connection_command = b["connection_command"]
+ device_line += template_device_connection_command.substitute(connection_command=connection_command)
if b.has_key("fastboot_serial_number"):
fserial = b["fastboot_serial_number"]
device_line += "{%% set fastboot_serial_number = '%s' %%}" % fserial