Commit e04c1116 authored by Philipp's avatar Philipp

WIP: Enhance software release with OPCUA support

- Add buildout.hash.cfg
- Include instance-input-schema.json describing (contains a description of the parameters) and instance-output-schema.json
- Introduce instance.cfg.in and instance-opcua.jinja.cfg.in
- Enable parameterized instance requests with nested JSON support
- software.cfg.json with software-type - default
- opcua-to-http-gw.py with OPCUA sever/client, login and data polling functionality.
- Note: Functionality incomplete due to missing asyncua dependency

This commit lays the groundwork for more flexible instance configuration. However, it's not yet
functional without the asyncua library.
parent 2f82470d
# 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>
"opcua-xml-url": "<opcua-server-config.xml>"
}
filter_kw = { "computer_guid": "COMP-****" }
request(software_release=release, partition_reference="****", partition_parameter_kw=partition_parameter_kw, filter_kw=filter_kw)
## Slapos Supply Guide
**Slapos Supply**
Supply the software either via
```
# CLI
slapos supply https://lab.nexedi.com/Demonkey/osie/-/raw/philipp_opcua/slapos/software/opcua-to-http-gw/software.cfg slaprunner
```
or
**Slapos Console**
Create the file:
```python
# request.py
release = "https://lab.nexedi.com/Demonkey/osie/-/raw/philipp_opcua/slapos/software/opcua-to-http-gw/software.cfg"
supply(release, "slaprunner")
```
Then run:
```
# CLI
slapos console request.py
```
## SlapOS Request Guide
Once the software is compiled, request the instance with parameters.
**Slapos Console**
Make sure to pass the parameters as:
```
# python
parameter_dict = {'_': json.dumps(parameter_dict)}
```
## Example for requesting an instance: When instantiating OPCUA you can use the following example config:
Then run (without the supply from above)
```
# request.py
release = "https://lab.nexedi.com/Demonkey/osie/-/raw/philipp_opcua/slapos/software/opcua-to-http-gw/software.cfg"
# supply(release, "COMP-****")
import yaml
import sys
import json
# Defines the name of the service
service_name = "opcua-client-fhi"
parameter_dict = {
"ipv6-enabled": True,
"ipv4-enabled" : False,
"opcua-server-bool": False,
"opcua-client-bool": True,
"instance-service-name": service_name,
"script-arguments": {
"opcua-to-http-gw-url": "https://lab.nexedi.com/Demonkey/osie/-/raw/781830164095da4ce6dd59b5509060f49cc3638b/opcua-to-http-gw/opcua-to-http-gw.py",
"erp5-url": "https://softinstxxxxxx.host.vifib.net",
"erp5-username": "zope",
"erp5-password": "",
"opcua-endpoint-url": {
"endpoint-for-opcua-client-ipv4": "",
"endpoint-for-opcua-client-ipv6": "2001:67c:1254:108:405c::9",
"endpoint-for-opcua-client-path": "PwDC",
"opcua-port": 4840
},
"erp5-site-arguments": {
"ERP5_REQUEST_API": "ERP5Site_handleOPCUARequest_data_stream"
},
"opcua-client-arguments": {
"opcua-server-credentials": {
"vialogin-bool": True,
"username": "user",
"password": "password"
},
"opcua-client-polling": {
"request-api-interval-bool": True,
"ERP5_REQUEST_API_INTERVAL": 30
},
"opcua-client-monitoring": {
"monitoring-bool": False
},
"opcua-interface-definition": {
"opcua-interface-definition-file-path": "/srv/slapgrid/slappart91/srv/project/learning_cfg/osie/slapos/software/opcua-to-http-gw/Powerfuse_Interface_definition_04.09.2023_import.csv"
}
},
"opcua-server-arguments": {
"read-backend-bool": False,
"opcua-xml-url": ""
}
}
}
software_type = "default"
request(release, service_name, software_type=software_type, partition_parameter_kw={'_': json.dumps(parameter_dict)})
```
[instance-profile]
filename = instance.cfg.in
md5sum = 255e139e47108b2007710d9d8cbf9b54
[instance]
_update_hash_filename_ = instance.cfg.in
md5sum = 8f821f09d4484131215e86c0675a6a1e
[instance-opcua]
_update_hash_filename_ = instance-opcua.cfg.jinja.in
md5sum = c83c4a11dac9b5afee98a6cf96bf952b
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"description": "Parameters to instantiate OPCUA",
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"configuration": {
"erp5-url": {
"description": "The URL of the ERP5 server to connect to.",
"type": "string",
"default": ""
"description": "Parameters to instantiate an OPCUA to HTTP Gateway",
"additionalProperties": false,
"properties": {
"ipv6-enabled": {
"title": "Enable IPv6",
"description": "Determines the IPv6 promise to be created if opcua-server-bool is set to True. Determines if an ipv4 or ipv6 endpoint is set in opcua-client-bool and opcua-server-bool mode.",
"type": "boolean",
"default": true
},
"erp5-username": {
"description": "The username for authentication to the ERP5 server.",
"type": "string",
"default": ""
"ipv4-enabled": {
"title": "Enable IPv4",
"description": "Determines the IPv4 promise to be created if opcua-server-bool is set to True. Determines if an ipv4 or ipv6 endpoint is set in opcua-client-bool and opcua-server-bool mode.",
"type": "boolean",
"default": false
},
"erp5-password": {
"description": "The password for authentication to the ERP5 server.",
"type": "string",
"default": ""
"opcua-server-bool": {
"title": "Enable OPCUA Server",
"description": "Enables OPCUA server functionality. If true, it creates IPv4 or IPv6 promise to the server",
"type": "boolean",
"default": false
},
"opcua-port": {
"description": "The port for OPCUA server.",
"type": "int",
"default": "4840"
"opcua-client-bool": {
"title": "Enable OPCUA Client",
"description": "Enables OPCUA client functionality. Either opcua-client-bool or opcua-server-bool must be True - cannot both be True or False",
"type": "boolean",
"default": true
},
"ipv6-enabled": {
"description": "The IPv6 Support variable for OPCUA server.",
"type": "int",
"default": "1"
},
"opcua-xml-url": {
"description": "The XML Schema URL for OPCUA server.",
"instance-service-name": {
"title": "Instance Service Name",
"description": "Defines the name of the requested instance",
"type": "string",
"default": ""
"default": "opcua-to-http-gw"
},
"script-arguments": {
"type": "object",
"properties": {
"opcua-to-http-gw-url": {
"title": "OPCUA to HTTP Gateway URL",
"description": "URL to the script being called",
"type": "string",
"default": ""
},
"erp5-url": {
"title": "ERP5 URL",
"description": "ERP5 instance the data will be sent to",
"type": "string",
"default": ""
},
"erp5-username": {
"title": "ERP5 Username",
"description": "Username for ERP5",
"type": "string",
"default": "zope"
},
"erp5-password": {
"title": "ERP5 Password",
"description": "Password for ERP5",
"type": "string",
"default": ""
},
"opcua-endpoint-url": {
"type": "object",
"properties": {
"endpoint-for-opcua-client-ipv4": {
"title": "OPCUA Client IPv4 Endpoint",
"description": "OPCUA endpoint for the OPCUA client (IPv4)",
"type": "string",
"default": ""
},
"endpoint-for-opcua-client-ipv6": {
"title": "OPCUA Client IPv6 Endpoint",
"description": "OPCUA endpoint for the OPCUA client (IPv6)",
"type": "string",
"default": ""
},
"endpoint_for_opcua_client_path": {
"title": "Path of the endpoint of the OPCUA server",
"description": "Path of the endpoint of the OPCUA server. (For example: freeopcua/server/ of the endpoint opc.tcp://0.0.0.0:4840/freeopcua/server/",
"type": "string",
"default": "Powerfuse_DataConnect"
},
"opcua-port": {
"title": "OPCUA Port",
"description": "Port for OPCUA",
"type": "integer",
"default": 4880,
"minimum": 0,
"maximum": 65535
}
}
},
"erp5-site-arguments": {
"type": "object",
"properties": {
"ERP5_REQUEST_API": {
"title": "ERP5 Request API",
"description": "Script being called on the ERP5 side",
"type": "string",
"default": "ERP5Site_handleOPCUARequest_data_stream"
}
}
},
"opcua-client-arguments": {
"type": "object",
"properties": {
"opcua-server-credentials": {
"type": "object",
"properties": {
"vialogin-bool": {
"title": "Via Login",
"description": "Credential used by the OPCUA client to connect to the OPCUA server",
"type": "boolean",
"default": true
},
"username": {
"title": "Username",
"description": "Username for OPCUA server",
"type": "string",
"default": ""
},
"password": {
"title": "Password",
"description": "Password for OPCUA server",
"type": "string",
"default": ""
}
}
},
"opcua-client-polling": {
"type": "object",
"properties": {
"request-api-interval-bool": {
"title": "Request API Interval",
"description": "Enables repeatedly reading values from an OPCUA server at regular intervals",
"type": "boolean",
"default": false
},
"ERP5_REQUEST_API_INTERVAL": {
"title": "ERP5 Request API Interval",
"description": "The interval in seconds to read data from an OPCUA server",
"type": "integer",
"default": 30,
"minimum": 0
}
}
},
"opcua-client-monitoring": {
"type": "object",
"properties": {
"monitoring-bool": {
"title": "Monitoring",
"description": "Enables monitoring of the server's subscribed data",
"type": "boolean",
"default": false
}
}
},
"opcua-interface-definition": {
"type": "object",
"properties": {
"opcua-interface-definition-file-path": {
"title": "OPCUA interface definition",
"description": "OPCUA interface definition in the form of a csv file. This describes the path to the file",
"type": "string",
"default": ""
}
}
}
}
},
"opcua-server-arguments": {
"type": "object",
"properties": {
"read-backend-bool": {
"title": "Read Backend",
"description": "Enables functionality to read the initial states from the ERP5 backend",
"type": "boolean",
"default": false
},
"opcua-xml-url": {
"title": "OPCUA XML URL",
"description": "Information model as an XML format used by the OPCUA Server",
"type": "string",
"default": ""
}
}
}
}
}
}
}
}
\ No newline at end of file
{%- set parameter_dict = dict(default_parameter_dict, **parameter_dict) %}
{%- set opcua_server_bool = parameter_dict['opcua-server-bool'] %}
{%- if opcua_server_bool == "True" %}
# opcua-to-http-gw-url must be specified
{% if parameter_dict.get('script-arguments').get('opcua-to-http-gw-url', '') == '' %}
{% set error_message = "Error: 'opcua-to-http-gw-url' is not defined in parameter_dict." %}
{{ error_message }}
{{ parameter_dict }}
{% endif %}
# If opcua_server_bool is set to True promises are created
{%- set opcua_server_bool = parameter_dict.get('opcua-server-bool', '') %}
# If opcua_client_bool is set to True the interface definition of the server provided as local csv is copied to the instance
{%- set opcua_client_bool = parameter_dict.get('opcua-client-bool', '') %}
# OPCUA server and OPCUA server must be mutually exclusive
{% if opcua_client_bool == opcua_server_bool %}
{% set error_message = "Error: 'opcua-server-bool' and 'opcua-client-bool' are either both True or both False. Change on parameter to True or False." %}
{{ error_message }}
{% endif %}
{%- set ipv6_enabled = parameter_dict.get('ipv6_enabled', '') %}
{%- set ipv4_enabled = parameter_dict.get('ipv4_enabled', '') %}
{%- if opcua_server_bool == True %}
{%- set promises_parts = 'promises' %}
{%- set publish_connection_parameter_parts = 'publish-connection-parameter' %}
{%- else %}
{%- set promises_parts = '' %}
{%- set publish_connection_parameter_parts = '' %}
{%- endif %}
{%- if opcua_client_bool == True %}
{%- set copy_interface_definition_parts = 'copy-interface-definition' %}
{%- else %}
{%- set copy_interface_definition_parts = '' %}
{%- endif %}
[buildout]
parts =
directory
......@@ -16,18 +41,36 @@ parts =
download-opcua-to-http-gw
{{ publish_connection_parameter_parts }}
{{ promises_parts }}
{{ copy_interface_definition_parts }}
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[instance-parameter]
ipv6-enabled = {{ parameter_dict['ipv6-enabled'] }}
opcua-port = {{ parameter_dict['opcua-port'] }}
opcua-xml-url = {{ parameter_dict['opcua-xml-url'] }}
erp5-url = {{ parameter_dict['erp5-url'] }}
erp5-username = {{ parameter_dict['erp5-username'] }}
erp5-password = {{ parameter_dict['erp5-password'] }}
ipv4-enabled = {{ parameter_dict['ipv4-enabled'] }}
opcua-port = {{ parameter_dict.get('opcua-port', '4840') }}
opcua-xml-url = {{ parameter_dict["script-arguments"].get("opcua-to-http-gw-url", "") }}
erp5-url = {{ parameter_dict["script-arguments"].get("erp5-url", "") }}
erp5-username = {{ parameter_dict["script-arguments"].get("erp5-username", "") }}
erp5-password = {{ parameter_dict["script-arguments"].get("erp5-password", "") }}
opcua_endpoint_url = parameter_dict["script-arguments"]["opcua-endpoint-url"] %}
endpoint-for-opcua-client-ipv4 = {{ parameter_dict["script-arguments"]["opcua-endpoint-url"].get("endpoint-for-opcua-client-ipv4", "") }}
endpoint-for-opcua-client-ipv6 = {{ parameter_dict["script-arguments"]["opcua-endpoint-url"].get("endpoint-for-opcua-client-ipv6", "") }}
endpoint-for-opcua-client-path = {{ parameter_dict["script-arguments"]["opcua-endpoint-url"].get("endpoint-for-opcua-client-path", "") }}
opcua-port = {{ parameter_dict["script-arguments"]["opcua-endpoint-url"].get("opcua-port", "") }}
ERP5_REQUEST_API = {{ parameter_dict["script-arguments"]["erp5-site-arguments"].get("ERP5_REQUEST_API", "") }}
vialogin-bool = {{ parameter_dict["script-arguments"]["opcua-client-arguments"]["opcua-server-credentials"].get("vialogin-bool", "") }}
username = {{ parameter_dict["script-arguments"]["opcua-client-arguments"]["opcua-server-credentials"].get("username", "") }}
password = {{ parameter_dict["script-arguments"]["opcua-client-arguments"]["opcua-server-credentials"].get("password", "") }}
request-api-interval-bool = {{ parameter_dict["script-arguments"]["opcua-client-arguments"]["opcua-client-polling"].get("request-api-interval-bool", "") }}
ERP5_REQUEST_API_INTERVAL = {{ parameter_dict["script-arguments"]["opcua-client-arguments"]["opcua-client-polling"].get("ERP5_REQUEST_API_INTERVAL", "") }}
monitoring-bool = {{ parameter_dict["script-arguments"]["opcua-client-arguments"]["opcua-client-monitoring"].get("monitoring-bool", "") }}
opcua-interface-definition-file-path = {{ parameter_dict["script-arguments"]["opcua-client-arguments"]["opcua-interface-definition"].get("opcua-interface-definition-file-path", "") }}
read-backend-bool = {{ parameter_dict["script-arguments"]["opcua-server-arguments"].get("read-backend-bool", "") }}
opcua-client-bool = {{ parameter_dict.get('opcua-client-bool') }}
opcua-server-bool = {{ opcua_server_bool }}
interpreter_location = {{ interpreter_location }}
[directory]
recipe = slapos.cookbook:mkdirectory
......@@ -46,39 +89,61 @@ offline = false
url = https://lab.nexedi.com/Demonkey/osie/raw/philipp_opcua/opcua-to-http-gw/opcua-server-config.xml
destination = $${directory:etc}/schema.xml
{% if opcua_client_bool == True %}
[copy-interface-definition]
recipe = slapos.recipe.template
url = $${instance-parameter:opcua-interface-definition-file-path}
output = $${directory:etc}/interface_definition.csv
{%- endif %}
[download-opcua-to-http-gw]
recipe = slapos.recipe.build:download
offline = false
# Currently the end of the of the url must match the end of the destination. Here it is /opcua-to-http-gw.py
url = {{ parameter_dict['opcua-to-http-gw-url'] or '' }}
url = {{ parameter_dict['script-arguments']['opcua-to-http-gw-url'] }}
destination = $${buildout:parts-directory}/opcua-to-http-gw.py
[opcua-to-http-gw-service]
recipe = slapos.cookbook:wrapper
{% set command_parts = [
"$${buildout:bin-directory}/py $${download-opcua-to-http-gw:destination}",
"$${instance-parameter:interpreter_location}/py $${download-opcua-to-http-gw:destination}",
"--xml $${opcua-xml-url:destination}",
"--erp5-url $${instance-parameter:erp5-url}",
"--erp5-username $${instance-parameter:erp5-username}",
"--erp5-password $${instance-parameter:erp5-password}",
"--port $${instance-parameter:opcua-port}",
"--ipv6 " ~ ipv6_random,
"--ipv6-enabled $${instance-parameter:ipv6-enabled}"
"--ipv4 " ~ ipv4_random,
"--ipv6-enabled $${instance-parameter:ipv6-enabled}",
"--ipv4-enabled $${instance-parameter:ipv4-enabled}",
"--endpoint-for-opcua-client-ipv4 $${instance-parameter:endpoint-for-opcua-client-ipv4}",
"--endpoint-for-opcua-client-ipv6 $${instance-parameter:endpoint-for-opcua-client-ipv6}",
"--endpoint-for-opcua-client-path $${instance-parameter:endpoint-for-opcua-client-path}",
"--ERP5_REQUEST_API $${instance-parameter:ERP5_REQUEST_API}",
"--ERP5_REQUEST_API_INTERVAL $${instance-parameter:ERP5_REQUEST_API_INTERVAL}",
"--vialogin-bool $${instance-parameter:vialogin-bool}",
"--username $${instance-parameter:username}",
"--password $${instance-parameter:password}",
"--request-api-interval-bool $${instance-parameter:request-api-interval-bool}",
"--monitoring-bool $${instance-parameter:monitoring-bool}",
"--read-backend-bool $${instance-parameter:read-backend-bool}",
"--opcua-client-bool $${instance-parameter:opcua-client-bool}",
"--opcua-server-bool $${instance-parameter:opcua-server-bool}",
"--opcua-interface-definition $${directory:etc}/interface_definition.csv"
] -%}
command-line = {{ command_parts|join(' ') }}
wrapper-path = $${directory:service}/{{ parameter_dict['instance-service-name'] }}
output = $${:wrapper-path}
{% if opcua_server_bool == "True" %}
{% if opcua_server_bool == True %}
[check-port-listening-promise]
recipe = slapos.cookbook:check_port_listening
path = $${directory:promise}/$${:_buildout_section_name_}
[opcua-to-http-gw-listen-promise]
<= check-port-listening-promise
{%- if ipv6_enabled == "1" %}
{%- if ipv6_enabled == True %}
hostname = {{ ipv6_random }}
{%- elif ipv4_enabled == "1" %}
{%- elif ipv4_enabled == True %}
hostname = {{ ipv4_random }}
{%- endif %}
port = $${instance-parameter:opcua-port}
......@@ -90,9 +155,9 @@ instance-promises =
[publish-connection-parameter]
recipe = slapos.cookbook:publish
{%- if ipv6_enabled == "1" %}
{%- if ipv6_enabled == True %}
ipv6 = {{ ipv6_random }}
{%- elif ipv4_enabled == "1" %}
{%- elif ipv4_enabled == True %}
ipv4 = {{ ipv4_random }}
{%- endif %}
{% endif %}
\ No newline at end of file
......@@ -8,19 +8,21 @@ develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration
recipe = slapos.cookbook:slapconfiguration.serialised
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}
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
default = opcua:output
RootSoftwareInstance = $${:default}
[instance]
interpreter_location = ${buildout:bin-directory}
[opcua]
recipe = slapos.recipe.template:jinja2
url = ${instance-opcua:output}
......@@ -32,35 +34,47 @@ context =
jsonkey default_parameter_dict :default-parameters
key ipv6_random slap-configuration:ipv6-random
key ipv4_random slap-configuration:ipv4-random
key interpreter_location instance:interpreter_location
import os os
import json json
# todo check variable names
# todo check logic of variable groupings
# todo check if variable names are accessed in nested version
# todo add missing variables as input for the opcua-to-http-gw.py
default-parameters =
{
"ipv6-enabled": "1",
"ipv4-enabled": "0",
# Parameter description can be found in instance-input-schema.json
default-parameters = {
"ipv6-enabled": "True",
"ipv4-enabled" : "False",
"opcua-server-bool": "False",
"opcua-client-bool": "True",
"instance-service-name": "opcua-to-http-gw",
"opcua-to-http-gw-url": "",
"erp5-url": "",
"erp5-username": "zope",
"erp5-password": "",
"endpoint-for-opcua-client-ipv4": "",
"endpoint-for-opcua-client-ipv6": "",
"application-uri": "Powerfuse_DataConnect",
"opcua-port}": "4880",
"erp5-site-arguments.ERP5_REQUEST_API": "ERP5Site_handleOPCUARequest_data_stream",
"vialogin-bool": "True",
"username": "",
"pasword": "",
"request-api-interval-bool": "False",
"ERP5_REQUEST_API_INTERVAL": "30",
"monitoring-bool": "False",
"read-backend-bool": "False",
"vialogin-bool": "True",
"opcua-xml-url": ""
}
\ No newline at end of file
"script-arguments": {
"opcua-to-http-gw-url": "",
"erp5-url": "",
"erp5-username": "zope",
"erp5-password": "",
"opcua-endpoint-url": {
"endpoint-for-opcua-client-ipv4": "",
"endpoint-for-opcua-client-ipv6": "",
"application-uri": "Powerfuse_DataConnect",
"opcua-port": "4880"
},
"erp5-site-arguments": {
"ERP5_REQUEST_API": "ERP5Site_handleOPCUARequest_data_stream"
},
"opcua-client-arguments": {
"opcua-server-credentials": {
"vialogin-bool": "True",
"username": "",
"password": ""
},
"opcua-client-polling": {
"request-api-interval-bool": "False",
"ERP5_REQUEST_API_INTERVAL": "30"
},
"opcua-client-monitoring": {
"monitoring-bool": "False"
}
},
"opcua-server-arguments": {
"read-backend-bool": "False",
"opcua-xml-url": ""
}
}
}
[buildout]
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
https://lab.nexedi.com/nexedi/slapos/raw/master/component/python-cryptography/buildout.cfg
https://lab.nexedi.com/nexedi/slapos/raw/master/component/lxml-python/buildout.cfg
./buildout.hash.cfg
https://lab.nexedi.com/nexedi/slapos/raw/8376de820734b2730c84c4bf0d613d0fce8c48a4/stack/monitor/buildout.cfg
https://lab.nexedi.com/nexedi/slapos/raw/8376de820734b2730c84c4bf0d613d0fce8c48a4/stack/slapos.cfg
https://lab.nexedi.com/nexedi/slapos/raw/8376de820734b2730c84c4bf0d613d0fce8c48a4/component/python3/buildout.cfg
https://lab.nexedi.com/nexedi/slapos/raw/8376de820734b2730c84c4bf0d613d0fce8c48a4/component/python-cryptography/buildout.cfg
https://lab.nexedi.com/nexedi/slapos/raw/8376de820734b2730c84c4bf0d613d0fce8c48a4/component/lxml-python/buildout.cfg
https://lab.nexedi.com/nexedi/slapos/raw/8376de820734b2730c84c4bf0d613d0fce8c48a4/component/git/buildout.cfg
parts =
slapos-cookbook
interpreter
osie-repository
instance-profile
instance
[python]
part = python3
......@@ -24,29 +23,30 @@ eggs =
${lxml-python:egg}
${python-cryptography:egg}
requests
asyncua
[osie-repository]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
repository = https://lab.nexedi.com/Demonkey/osie.git
location = ${buildout:parts-directory}/osie
branch = philipp_opcua
[versions]
aiosqlite = 0.17.0
aiofiles = 23.1.0
cryptography = 3.3.2
asyncua = 0.9.2
lxml = 4.9.1
[instance-profile]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg.in
rendered = ${buildout:directory}/instance.cfg
# Downloads and templates
# -----------------------
[template-base]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:_update_hash_filename_}
output = ${buildout:parts-directory}/${:_buildout_section_name_}
[instance]
<= template-base
output = ${buildout:directory}/instance.cfg
context =
section buildout buildout
key interpreter_location buildout:bin-directory
# todo: delete lines 47 48 and 39 40?
[instance-opcua]
<= template-base
output = ${buildout:directory}/instance-opcua.cfg.jinja
context =
section buildout buildout
key interpreter_location buildout:bin-directory
key osie_repository_location osie-repository:location
[opcua-to-http-gw.py]
<= download-base
destination = ${buildout:directory}/theia_common.py
{
"name": "opcua-to-http-gw",
"description": "opcua-to-http-gw",
"serialisation": "json-in-xml",
"software-type": {
"default": {
"title": "Default",
"software-type": "default",
"description": "Default",
"request": "instance-input-schema.json",
"response": "instance-output-schema.json",
"index": 0
},
"opcua-server": {
"title": "OPCUA-Server",
"description": "OPCUA-Server",
"request": "instance-opcua-server-input-schema.json",
"response": "instance-output-schema.json",
"index": 1
}
}
}
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