Commit 787609c2 authored by Ivan Tyagov's avatar Ivan Tyagov

Let us set username / password from SlapOS.

parent c7ad90d1
......@@ -3,7 +3,7 @@ filename = instance-modbus.cfg.in
md5sum = 8637c6b714a0bb9f27c86f3928049b98
filename = instance-opc-ua.cfg.in
md5sum = b6cf47dc85a0c1086cca5e3edcf969ab
md5sum = 38e19f425129df64066f34e5ac06f5dd
filename = instance-opc-ua-virtual.cfg.in
md5sum = 49f84a499d258771651983dec90e98c1
md5sum = 6277def85d4b602bba40c868e2daa779
......@@ -21,7 +21,7 @@ extends = {{ template_monitor }}
recipe = slapos.cookbook:wrapper
# start with defaults
command-line =
{{ buildout['bin-directory'] }}/server -d ${instance-parameter:configuration.coupler_block_device} -s ${instance-parameter:configuration.coupler_i2c_slave_list} -m 1 -p ${instance-parameter:configuration.opc_ua_port}
{{ buildout['bin-directory'] }}/server -d ${instance-parameter:configuration.coupler_block_device} -s ${instance-parameter:configuration.coupler_i2c_slave_list} -m 1 -p ${instance-parameter:configuration.opc_ua_port} -u ${instance-parameter:username} -w ${instance-parameter:password}
wrapper-path = ${directory:service}/coupler-opc-ua-virtual
......@@ -49,6 +49,8 @@ configuration.coupler_i2c_slave_list = 0x58
# In our use case, we are expecting from the user to specify one (optional) parameter: "name". We put the default value here if he doesn't specify it, so that it doesn't crash.
configuration.interface = 0.0.0.0
configuration.opc_ua_port = 4840
configuration.username =
configuration.password =
# If our use case requires that the user can specify a mail address so that his instance can mail to him (for example), we can do:
# configuration.mail-address =
# If the user doesn't specify it, it won't break and the recipe can handle it (i.e don't send any mail for example).
......
......@@ -21,7 +21,7 @@ extends = {{ template_monitor }}
recipe = slapos.cookbook:wrapper
# start with defaults
command-line =
{{ buildout['bin-directory'] }}/server -d ${instance-parameter:configuration.coupler_block_device} -s ${instance-parameter:configuration.coupler_i2c_slave_list} -p ${instance-parameter:configuration.opc_ua_port}
{{ buildout['bin-directory'] }}/server -d ${instance-parameter:configuration.coupler_block_device} -s ${instance-parameter:configuration.coupler_i2c_slave_list} -p ${instance-parameter:configuration.opc_ua_port} -u ${instance-parameter:username} -w ${instance-parameter:password}
wrapper-path = ${directory:service}/coupler-opc-ua
......@@ -42,6 +42,8 @@ cert = ${slap-connection:cert-file}
configuration.coupler_block_device = /dev/i2c-1
configuration.coupler_i2c_slave_list = 0x58
configuration.username =
configuration.password =
# Define default parameter(s) that will be used later, in case user didn't
# specify it.
......
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