Commit dbbe322e authored by Martin Manchev's avatar Martin Manchev Committed by Ivan Tyagov

Revert "[Fix] URL None exception ..."

This reverts commit ec1c86b9.
parent 5ca48d3b
# OPCUA to HTTP Gateway
## When instantiating OPCUA you can use the following example config:
```
release="https://lab.nexedi.com/nexedi/osie/blob/master/slapos/software/opcua-to-http-gw/software.cfg"
supply(release, "COMP-****")
partition_parameter_kw = {
"erp5-url": "<URL>",
"erp5-username": "<USERNAME>",
"erp5-password": "<PASSWORD>",
"opcua-port": <PORT>
}
filter_kw = { "computer_guid": "COMP-****" }
request(software_release=release, partition_reference="****", partition_parameter_kw=partition_parameter_kw, filter_kw=filter_kw)
```
[instance-profile]
filename = instance.cfg.in
md5sum = 6fbae8f850e2c38b9b9990bf9c087505
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"description": "Parameters to instantiate OPCUA",
"type": "object",
"configuration": {
"erp5-url": {
"description": "The URL of the ERP5 server to connect to.",
"type": "string",
"default": ""
},
"erp5-username": {
"description": "The username for authentication to the ERP5 server.",
"type": "string",
"default": ""
},
"erp5-password": {
"description": "The password for authentication to the ERP5 server.",
"type": "string",
"default": ""
},
"opcua-port": {
"description": "The port for OPCUA server.",
"type": "int",
"default": "4840"
}
}
}
[buildout]
parts =
promises
directory
opcua-to-http-gw-service
publish-connection-parameter
eggs-directory = {{ buildout["eggs-directory"] }}
develop-eggs-directory = {{ buildout["develop-eggs-directory"] }}
offline = true
[check-port-listening-promise]
recipe = slapos.cookbook:check_port_listening
path = ${directory:promise}/${:_buildout_section_name_}
[directory]
recipe = slapos.cookbook:mkdirectory
home = ${buildout:directory}
etc = ${:home}/etc
var = ${:home}/var
script = ${:etc}/run/
service = ${:etc}/service
promise = ${:etc}/promise/
log = ${:var}/log
bin = ${:home}/bin
[instance-parameter]
recipe = slapos.cookbook:slapconfiguration
computer = ${slap-connection:computer-id}
partition = ${slap-connection:partition-id}
url = ${slap-connection:server-url}
key = ${slap-connection:key-file}
cert = ${slap-connection:cert-file}
configuration.opcua-port = 4840
[opcua-to-http-gw-service]
recipe = slapos.cookbook:wrapper
command-line = {{ interpreter_location }}/py {{ osie_repository_location }}/opcua-to-http-gw/opcua-to-http-gw.py --xml {{ osie_repository_location }}/opcua-to-http-gw/opcua-server-config.xml --erp5-url ${instance-parameter:configuration.erp5-url} --erp5-username ${instance-parameter:configuration.erp5-username} --erp5-password ${instance-parameter:configuration.erp5-password} --port ${instance-parameter:configuration.opcua-port} --ip ${instance-parameter:ipv4-random}
wrapper-path = ${directory:service}/opcua-to-http-gw-service
output = $${:wrapper-path}
[opcua-to-http-gw-listen-promise-ipv4]
<= check-port-listening-promise
hostname = ${instance-parameter:ipv4-random}
port = ${instance-parameter:configuration.opcua-port}
[promises]
recipe =
instance-promises =
${opcua-to-http-gw-listen-promise-ipv4:path}
[publish-connection-parameter]
recipe = slapos.cookbook:publish
ipv4 = ${instance-parameter:ipv4-random}
[buildout]
allow-picked-versions = true
extends =
buildout.hash.cfg
https://lab.nexedi.com/nexedi/slapos/raw/master/stack/monitor/buildout.cfg
https://lab.nexedi.com/nexedi/slapos/raw/master/stack/slapos.cfg
https://lab.nexedi.com/nexedi/slapos/raw/master/component/python3/buildout.cfg
https://lab.nexedi.com/nexedi/slapos/raw/master/component/git/buildout.cfg
parts =
interpreter
slapos-cookbook
osie-repository
instance-profile
[python]
part = python3
[interpreter]
recipe = zc.recipe.egg:scripts
interpreter = py
eggs =
requests
asyncua
[osie-repository]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
repository = https://lab.nexedi.com/nexedi/osie.git
location = ${buildout:parts-directory}/osie
[versions]
aiosqlite = 0.17.0
aiofiles = 23.1.0
[instance-profile]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg.in
rendered = ${buildout:directory}/instance.cfg
context =
section buildout buildout
key interpreter_location buildout:bin-directory
key osie_repository_location osie-repository:location
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