From 2d8c2bf14a080634b28c1329f80efe7bc311b2c4 Mon Sep 17 00:00:00 2001 From: leandrofars Date: Fri, 22 Sep 2023 16:36:52 -0300 Subject: [PATCH] fix: add oktopus agent file --- .gitignore | 1 - agent/oktopus-mqtt-obuspa.txt | 76 +++++++++++++++++++++++++++++++++++ devops/docker-compose.yaml | 4 +- 3 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 agent/oktopus-mqtt-obuspa.txt diff --git a/.gitignore b/.gitignore index 3f71b3a..34bee35 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,6 @@ go.work *.key *.csr *.db.new -*.txt *.pwd *.acl .idea diff --git a/agent/oktopus-mqtt-obuspa.txt b/agent/oktopus-mqtt-obuspa.txt new file mode 100644 index 0000000..7d5b29a --- /dev/null +++ b/agent/oktopus-mqtt-obuspa.txt @@ -0,0 +1,76 @@ + +# +# This file contains a factory reset database in text format +# +# If no USP database exists when OB-USP-AGENT starts, then OB-USP-AGENT will create a database containing +# the parameters specified in a text file located by the '-r' option. +# Example: +# obuspa -p -v 4 -r factory_reset_example.txt +# +# Each line of this file contains either a comment (denoted by '#' at the start of the line) +# or a USP data model parameter and its factory reset value. +# The parameter and value are separated by whitespace. +# The value may optionally be enclosed in speech marks "" (this is the only way to specify an empty string) +# +########################################################################################################## +# +# Adding MQTT parameters to test the datamodel interface +# + +Device.LocalAgent.EndpointID "oktopus-agent-test" + + +## Adding boot params +Device.LocalAgent.Controller.1.BootParameter.1.Enable true +Device.LocalAgent.Controller.1.BootParameter.1.ParameterName "Device.LocalAgent.EndpointID" +Device.LocalAgent.Subscription.1.Alias cpe-1 +Device.LocalAgent.Subscription.1.Enable true +Device.LocalAgent.Subscription.1.ID default-boot-event-ACS +Device.LocalAgent.Subscription.1.Recipient Device.LocalAgent.Controller.1 +Device.LocalAgent.Subscription.1.NotifType Event +Device.LocalAgent.Subscription.1.ReferenceList Device.Boot! +Device.LocalAgent.Subscription.1.Persistent true + +Device.LocalAgent.MTP.1.MQTT.ResponseTopicConfigured "oktopus/v1/controller" +Device.LocalAgent.MTP.1.MQTT.Reference "Device.MQTT.Client.1" +Device.MQTT.Client.1.BrokerAddress "localhost" +Device.MQTT.Client.1.ProtocolVersion "5.0" +Device.MQTT.Client.1.BrokerPort "1883" +Device.MQTT.Client.1.TransportProtocol "TCP/IP" +Device.MQTT.Client.1.Username "" +Device.MQTT.Client.1.Password "" +Device.MQTT.Client.1.Alias "cpe-1" +Device.MQTT.Client.1.Enable true +Device.MQTT.Client.1.ClientID "" +Device.MQTT.Client.1.KeepAliveTime "60" + +Device.MQTT.Client.1.ConnectRetryTime "5" +Device.MQTT.Client.1.ConnectRetryIntervalMultiplier "2000" +Device.MQTT.Client.1.ConnectRetryMaxInterval "60" + + +Device.LocalAgent.Controller.1.Alias "cpe-1" +Device.LocalAgent.Controller.1.Enable true +Device.LocalAgent.Controller.1.PeriodicNotifInterval "86400" +Device.LocalAgent.Controller.1.PeriodicNotifTime "0001-01-01T00:00:00Z" +Device.LocalAgent.Controller.1.ControllerCode "" +Device.LocalAgent.Controller.1.MTP.1.Alias "cpe-1" +Device.LocalAgent.Controller.1.MTP.1.Enable true +Device.LocalAgent.Controller.1.MTP.1.Protocol "MQTT" +Device.LocalAgent.Controller.1.EndpointID "oktopusController" +Device.LocalAgent.Controller.1.MTP.1.MQTT.Reference "Device.MQTT.Client.1" +Device.LocalAgent.Controller.1.MTP.1.MQTT.Topic "oktopus/v1/controller" + + + +# +# The following parameters may be modified +# +Device.LocalAgent.MTP.1.Alias "cpe-1" +Device.LocalAgent.MTP.1.Enable true +Device.LocalAgent.MTP.1.Protocol "MQTT" + +Internal.Reboot.Cause "LocalFactoryReset" + + + diff --git a/devops/docker-compose.yaml b/devops/docker-compose.yaml index 6b52c28..9fe802f 100644 --- a/devops/docker-compose.yaml +++ b/devops/docker-compose.yaml @@ -19,13 +19,13 @@ services: mongodb: image: mongo - container_name: mongodb + container_name: mongodb_usp networks: usp_network: ipv4_address: 172.16.235.2 redis: - image: redis + image: redis_usp container_name: redis networks: usp_network: