You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by lo...@apache.org on 2024/09/11 07:25:40 UTC
(nifi-minifi-cpp) branch main updated (e796c7f97 -> 10911ecdc)
This is an automated email from the ASF dual-hosted git repository.
lordgamez pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
from e796c7f97 MINIFICPP-2451 Upgrade aws-sdk-cpp from 1.11.219 to 1.11.396
new 3e9911409 MINIFICPP-2437 Include allowable_values in the manifest for python processors
new 10911ecdc MINIFICPP-2452 Modbus, Elasticsearch and OPC docker tests not running in CI
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.github/workflows/ci.yml | 2 +-
PROCESSORS.md | 2 +-
.../integration/features/fetch_modbus_tcp.feature | 4 +--
docker/test/integration/features/opcua.feature | 2 +-
.../minifi/controllers/JsonRecordSetWriter.py | 2 +-
extensions/python/ExecutePythonProcessor.cpp | 19 ++++++-----
extensions/python/ExecutePythonProcessor.h | 7 ++--
extensions/python/PYTHON.md | 1 -
extensions/python/PythonProcessor.cpp | 9 +++--
extensions/python/PythonProcessor.h | 6 ++--
.../pythonprocessors/nifiapi/processorbase.py | 2 +-
extensions/python/tests/PythonManifestTests.cpp | 13 +++++++-
extensions/python/types/PyProcessor.cpp | 39 ++++++++++++++--------
extensions/python/types/Types.h | 8 ++++-
.../standard-processors/modbus/FetchModbusTcp.h | 4 +--
libminifi/include/core/Property.h | 12 ++-----
libminifi/src/core/Property.cpp | 4 +++
17 files changed, 82 insertions(+), 54 deletions(-)
(nifi-minifi-cpp) 01/02: MINIFICPP-2437 Include allowable_values in the manifest for python processors
Posted by lo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lordgamez pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 3e9911409963a53c43494d5ff0bbafbfe8d40a47
Author: Ferenc Gerlits <fg...@gmail.com>
AuthorDate: Thu Aug 15 14:39:28 2024 +0200
MINIFICPP-2437 Include allowable_values in the manifest for python processors
Signed-off-by: Gabor Gyimesi <ga...@gmail.com>
This closes #1858
---
extensions/python/ExecutePythonProcessor.cpp | 19 ++++++-----
extensions/python/ExecutePythonProcessor.h | 7 ++--
extensions/python/PYTHON.md | 1 -
extensions/python/PythonProcessor.cpp | 9 +++--
extensions/python/PythonProcessor.h | 6 ++--
.../pythonprocessors/nifiapi/processorbase.py | 2 +-
extensions/python/tests/PythonManifestTests.cpp | 13 +++++++-
extensions/python/types/PyProcessor.cpp | 39 ++++++++++++++--------
extensions/python/types/Types.h | 8 ++++-
libminifi/include/core/Property.h | 12 ++-----
libminifi/src/core/Property.cpp | 4 +++
11 files changed, 74 insertions(+), 46 deletions(-)
diff --git a/extensions/python/ExecutePythonProcessor.cpp b/extensions/python/ExecutePythonProcessor.cpp
index a1541498a..7beca34d4 100644
--- a/extensions/python/ExecutePythonProcessor.cpp
+++ b/extensions/python/ExecutePythonProcessor.cpp
@@ -165,22 +165,25 @@ std::unique_ptr<PythonScriptEngine> ExecutePythonProcessor::createScriptEngine()
return engine;
}
-void ExecutePythonProcessor::addProperty(const std::string &name, const std::string &description, const std::optional<std::string> &defaultvalue, bool required, bool el,
- bool sensitive, const std::optional<int64_t>& property_type_code, const std::optional<std::string>& controller_service_type_name) {
- auto property = core::PropertyDefinitionBuilder<>::createProperty(name).withDescription(description).isRequired(required).supportsExpressionLanguage(el).isSensitive(sensitive);
+void ExecutePythonProcessor::addProperty(const std::string &name, const std::string &description, const std::optional<std::string> &defaultvalue, bool required, bool el, bool sensitive,
+ const std::optional<int64_t>& property_type_code, gsl::span<const std::string_view> allowable_values, const std::optional<std::string>& controller_service_type_name) {
+ auto builder = core::PropertyDefinitionBuilder<>::createProperty(name).withDescription(description).isRequired(required).supportsExpressionLanguage(el).isSensitive(sensitive);
if (defaultvalue) {
- property.withDefaultValue(*defaultvalue);
+ builder.withDefaultValue(*defaultvalue);
}
if (property_type_code) {
- property.withPropertyType(core::StandardPropertyTypes::translateCodeToPropertyType(static_cast<core::StandardPropertyTypes::PropertyTypeCode>(*property_type_code)));
+ builder.withPropertyType(core::StandardPropertyTypes::translateCodeToPropertyType(static_cast<core::StandardPropertyTypes::PropertyTypeCode>(*property_type_code)));
}
-
if (controller_service_type_name && *controller_service_type_name == "SSLContextService") {
- property.withAllowedTypes<controllers::SSLContextService>();
+ builder.withAllowedTypes<controllers::SSLContextService>();
}
+ const auto property_definition = builder.build();
+
+ core::Property property{property_definition};
+ property.setAllowedValues(allowable_values, *property_definition.type);
std::lock_guard<std::mutex> lock(python_properties_mutex_);
- python_properties_.emplace_back(property.build());
+ python_properties_.emplace_back(property);
}
const core::Property* ExecutePythonProcessor::findProperty(const std::string& name) const {
diff --git a/extensions/python/ExecutePythonProcessor.h b/extensions/python/ExecutePythonProcessor.h
index b87a5ee47..f344f35af 100644
--- a/extensions/python/ExecutePythonProcessor.h
+++ b/extensions/python/ExecutePythonProcessor.h
@@ -22,6 +22,7 @@
#include <memory>
#include <string>
+#include <string_view>
#include <utility>
#include <vector>
#include <filesystem>
@@ -33,7 +34,7 @@
#include "core/PropertyType.h"
#include "core/RelationshipDefinition.h"
#include "PythonScriptEngine.h"
-#include "PythonScriptEngine.h"
+#include "utils/gsl.h"
namespace org::apache::nifi::minifi::extensions::python::processors {
@@ -95,8 +96,8 @@ class ExecutePythonProcessor : public core::Processor {
python_dynamic_ = true;
}
- void addProperty(const std::string &name, const std::string &description, const std::optional<std::string> &defaultvalue, bool required, bool el,
- bool sensitive, const std::optional<int64_t>& property_type_code, const std::optional<std::string>& controller_service_type_name);
+ void addProperty(const std::string &name, const std::string &description, const std::optional<std::string> &defaultvalue, bool required, bool el, bool sensitive,
+ const std::optional<int64_t>& property_type_code, gsl::span<const std::string_view> allowable_values, const std::optional<std::string>& controller_service_type_name);
std::vector<core::Property> getPythonProperties() const {
std::lock_guard<std::mutex> lock(python_properties_mutex_);
diff --git a/extensions/python/PYTHON.md b/extensions/python/PYTHON.md
index e0482709f..2b0f7c076 100644
--- a/extensions/python/PYTHON.md
+++ b/extensions/python/PYTHON.md
@@ -164,7 +164,6 @@ In the flow configuration these Python processors can be referenced by their ful
Due to some differences between the NiFi and MiNiFi C++ processors and implementation, there are some limitations using the NiFi Python processors:
- Record based processors are not yet supported in MiNiFi C++, so the NiFi Python processors inherited from RecordTransform are not supported.
- There are some validators in NiFi that are not present in MiNiFi C++, so some property validations will be missing using the NiFi Python processors.
-- Allowable values specified in NiFi Python processors are ignored in MiNiFi C++ (due to MiNiFi C++ requiring them to be specified at compile time), so the property values are not pre-verified.
- MiNiFi C++ only supports expression language with flow file attributes, so only FLOWFILE_ATTRIBUTES expression language scope is supported, otherwise the expression language will not be evaluated.
- MiNiFi C++ does not support property dependencies, so the property dependencies will be ignored. If a property depends on another property, the property will not be required.
- MiNiFi C++ does not support the use of self.jvm member in Python processors that provides JVM bindings in NiFi, it is set to None in MiNiFi C++.
diff --git a/extensions/python/PythonProcessor.cpp b/extensions/python/PythonProcessor.cpp
index f7097a5b4..021c1e268 100644
--- a/extensions/python/PythonProcessor.cpp
+++ b/extensions/python/PythonProcessor.cpp
@@ -16,10 +16,9 @@
* limitations under the License.
*/
-#include <string>
+#include "PythonProcessor.h"
#include "ExecutePythonProcessor.h"
-#include "PythonProcessor.h"
namespace org::apache::nifi::minifi::extensions::python {
@@ -38,9 +37,9 @@ void PythonProcessor::setDescription(const std::string& desc) {
processor_->setDescription(desc);
}
-void PythonProcessor::addProperty(const std::string& name, const std::string& description, const std::optional<std::string>& defaultvalue,
- bool required, bool el, bool sensitive, const std::optional<int64_t>& property_type_code, const std::optional<std::string>& controller_service_type_name) {
- processor_->addProperty(name, description, defaultvalue, required, el, sensitive, property_type_code, controller_service_type_name);
+void PythonProcessor::addProperty(const std::string& name, const std::string& description, const std::optional<std::string>& defaultvalue, bool required, bool el, bool sensitive,
+ const std::optional<int64_t>& property_type_code, gsl::span<const std::string_view> allowable_values, const std::optional<std::string>& controller_service_type_name) {
+ processor_->addProperty(name, description, defaultvalue, required, el, sensitive, property_type_code, allowable_values, controller_service_type_name);
}
} // namespace org::apache::nifi::minifi::extensions::python
diff --git a/extensions/python/PythonProcessor.h b/extensions/python/PythonProcessor.h
index 135effbd2..52a7b2a8b 100644
--- a/extensions/python/PythonProcessor.h
+++ b/extensions/python/PythonProcessor.h
@@ -19,10 +19,12 @@
#pragma once
#include <string>
+#include <string_view>
#include <memory>
#include <optional>
#include "core/Processor.h"
+#include "utils/gsl.h"
namespace org::apache::nifi::minifi::extensions::python {
@@ -38,8 +40,8 @@ class PythonProcessor {
void setDescription(const std::string& desc);
- void addProperty(const std::string& name, const std::string& description, const std::optional<std::string>& defaultvalue,
- bool required, bool el, bool sensitive, const std::optional<int64_t>& property_type_code, const std::optional<std::string>& controller_service_type_name);
+ void addProperty(const std::string& name, const std::string& description, const std::optional<std::string>& defaultvalue, bool required, bool el, bool sensitive,
+ const std::optional<int64_t>& property_type_code, gsl::span<const std::string_view> allowable_values, const std::optional<std::string>& controller_service_type_name);
private:
python::processors::ExecutePythonProcessor* processor_;
diff --git a/extensions/python/pythonprocessors/nifiapi/processorbase.py b/extensions/python/pythonprocessors/nifiapi/processorbase.py
index a343a4cb9..ee1034e7c 100644
--- a/extensions/python/pythonprocessors/nifiapi/processorbase.py
+++ b/extensions/python/pythonprocessors/nifiapi/processorbase.py
@@ -51,7 +51,7 @@ class ProcessorBase(ABC):
# MiNiFi C++ does not support dependant properties, so if a property depends on another property, it should not be required
is_required = True if property.required and not property.dependencies else False
processor.addProperty(property.name, property.description, property.defaultValue, is_required, expression_language_supported,
- property.sensitive, property_type_code, property.controllerServiceDefinition)
+ property.sensitive, property_type_code, property.allowableValues, property.controllerServiceDefinition)
def onScheduled(self, context_proxy: ProcessContextProxy):
pass
diff --git a/extensions/python/tests/PythonManifestTests.cpp b/extensions/python/tests/PythonManifestTests.cpp
index 61b76e43b..b0e58619a 100644
--- a/extensions/python/tests/PythonManifestTests.cpp
+++ b/extensions/python/tests/PythonManifestTests.cpp
@@ -27,6 +27,7 @@
#include "utils/gsl.h"
using minifi::state::response::SerializedResponseNode;
+using minifi::state::response::ValueNode;
template<typename F>
const SerializedResponseNode* findNode(const std::vector<SerializedResponseNode>& nodes, F&& filter) {
@@ -43,6 +44,10 @@ const SerializedResponseNode& getNode(const std::vector<SerializedResponseNode>&
gsl_FailFast();
}
+ValueNode getNthAllowableValue(const SerializedResponseNode& node, size_t n) {
+ return getNode(node.children[n].children, "value").value;
+}
+
TEST_CASE("Python processor's description is part of the manifest") {
TestControllerWithFlow controller(empty_flow, false /* DEFER FLOW SETUP */);
@@ -56,7 +61,7 @@ TEST_CASE("Python processor's description is part of the manifest") {
"def describe(proc):\n"
" proc.setDescription('Another amazing processor')\n"
" proc.setSupportsDynamicProperties()\n"
- " proc.addProperty('Prop1', 'A great property', 'banana', True, False)\n";
+ " proc.addProperty('Prop1', 'A great property', 'banana', True, False, False, None, ['apple', 'orange', 'banana', 'durian'], None)\n";
controller.configuration_->set(minifi::Configuration::nifi_python_processor_dir, python_dir.string());
controller.configuration_->set(minifi::Configuration::nifi_extension_path, "*minifi-python-script*");
@@ -130,6 +135,12 @@ TEST_CASE("Python processor's description is part of the manifest") {
REQUIRE(getNode(properties[0].children, "required").value == true);
REQUIRE(getNode(properties[0].children, "expressionLanguageScope").value == "NONE");
REQUIRE(getNode(properties[0].children, "defaultValue").value == "banana");
+ auto& allowable_values = getNode(properties[0].children, "allowableValues");
+ REQUIRE(allowable_values.children.size() == 4);
+ CHECK(getNthAllowableValue(allowable_values, 0) == "apple");
+ CHECK(getNthAllowableValue(allowable_values, 1) == "orange");
+ CHECK(getNthAllowableValue(allowable_values, 2) == "banana");
+ CHECK(getNthAllowableValue(allowable_values, 3) == "durian");
auto& rels = getNode(MyPyProc2->children, "supportedRelationships").children;
REQUIRE(rels.size() == 3);
diff --git a/extensions/python/types/PyProcessor.cpp b/extensions/python/types/PyProcessor.cpp
index e951731d4..dd8ad17b2 100644
--- a/extensions/python/types/PyProcessor.cpp
+++ b/extensions/python/types/PyProcessor.cpp
@@ -110,6 +110,13 @@ PyObject* PyProcessor::addProperty(PyProcessor* self, PyObject* args) {
return nullptr;
}
+ static constexpr Py_ssize_t ExpectedNumArgs = 9;
+ auto arg_size = PyTuple_Size(args);
+ if (arg_size < ExpectedNumArgs) {
+ PyErr_SetString(PyExc_AttributeError, fmt::format("addProperty was called with too few arguments: need {}, got {}", ExpectedNumArgs, arg_size).c_str());
+ return nullptr;
+ }
+
BorrowedStr name = BorrowedStr::fromTuple(args, 0);
BorrowedStr description = BorrowedStr::fromTuple(args, 1);
std::optional<std::string> default_value;
@@ -121,36 +128,40 @@ PyObject* PyProcessor::addProperty(PyProcessor* self, PyObject* args) {
bool is_required = false;
bool supports_expression_language = false;
bool sensitive = false;
- auto arg_size = PyTuple_Size(args);
try {
is_required = getBoolFromTuple(args, 3);
supports_expression_language = getBoolFromTuple(args, 4);
- if (arg_size > 5) {
- sensitive = getBoolFromTuple(args, 5);
- }
+ sensitive = getBoolFromTuple(args, 5);
} catch (const PyException&) {
return nullptr;
}
std::optional<int64_t> validator_value;
- if (arg_size > 6) {
- auto validator_value_pyint = BorrowedLong::fromTuple(args, 6);
- if (validator_value_pyint.get() && validator_value_pyint.get() != Py_None) {
- validator_value = validator_value_pyint.asInt64();
+ auto validator_value_pyint = BorrowedLong::fromTuple(args, 6);
+ if (validator_value_pyint.get() && validator_value_pyint.get() != Py_None) {
+ validator_value = validator_value_pyint.asInt64();
+ }
+
+ std::vector<std::string> allowable_values_str;
+ auto allowable_values_pylist = BorrowedList::fromTuple(args, 7);
+ if (allowable_values_pylist.get() && allowable_values_pylist.get() != Py_None) {
+ for (size_t i = 0; i < allowable_values_pylist.length(); ++i) {
+ auto value = BorrowedStr{allowable_values_pylist[i]};
+ allowable_values_str.push_back(value.toUtf8String());
}
}
+ std::vector<std::string_view> allowable_values(begin(allowable_values_str), end(allowable_values_str));
std::optional<std::string> controller_service_type_name;
- if (arg_size > 7) {
- auto controller_service_type_name_pystr = BorrowedStr::fromTuple(args, 7);
- if (controller_service_type_name_pystr.get() && controller_service_type_name_pystr.get() != Py_None) {
- controller_service_type_name = controller_service_type_name_pystr.toUtf8String();
- }
+ auto controller_service_type_name_pystr = BorrowedStr::fromTuple(args, 8);
+ if (controller_service_type_name_pystr.get() && controller_service_type_name_pystr.get() != Py_None) {
+ controller_service_type_name = controller_service_type_name_pystr.toUtf8String();
}
- processor->addProperty(name.toUtf8String(), description.toUtf8String(), default_value, is_required, supports_expression_language, sensitive, validator_value, controller_service_type_name);
+ processor->addProperty(name.toUtf8String(), description.toUtf8String(), default_value, is_required, supports_expression_language, sensitive,
+ validator_value, allowable_values, controller_service_type_name);
Py_RETURN_NONE;
}
diff --git a/extensions/python/types/Types.h b/extensions/python/types/Types.h
index 2aebadd1b..0c14039f2 100644
--- a/extensions/python/types/Types.h
+++ b/extensions/python/types/Types.h
@@ -254,8 +254,14 @@ class List : public ReferenceHolder<reference_type> {
}
return BorrowedReference(item);
}
-};
+ static BorrowedList fromTuple(PyObject* tuple, Py_ssize_t location) requires(reference_type == ReferenceType::BORROWED) {
+ BorrowedList list_from_tuple{PyTuple_GetItem(tuple, location)};
+ if (list_from_tuple.get() == nullptr)
+ throw PyException();
+ return list_from_tuple;
+ }
+};
template<ReferenceType reference_type>
class Dict : public ReferenceHolder<reference_type> {
diff --git a/libminifi/include/core/Property.h b/libminifi/include/core/Property.h
index 56c01587f..ba3001655 100644
--- a/libminifi/include/core/Property.h
+++ b/libminifi/include/core/Property.h
@@ -145,18 +145,10 @@ class Property {
return allowed_values_;
}
- void addAllowedValue(const PropertyValue &value) {
- allowed_values_.push_back(value);
- }
-
- void clearAllowedValues() {
- allowed_values_.clear();
- }
+ void setAllowedValues(gsl::span<const std::string_view> allowed_values, const core::PropertyParser& property_parser);
- /**
- * Add value to the collection of values.
- */
void addValue(const std::string &value);
+
Property &operator=(const Property &other) = default;
Property &operator=(Property &&other) = default;
// Compare
diff --git a/libminifi/src/core/Property.cpp b/libminifi/src/core/Property.cpp
index 1b49469d1..4b5186a40 100644
--- a/libminifi/src/core/Property.cpp
+++ b/libminifi/src/core/Property.cpp
@@ -131,4 +131,8 @@ Property::Property(const PropertyReference& compile_time_property)
}
}
+void Property::setAllowedValues(gsl::span<const std::string_view> allowed_values, const core::PropertyParser& property_parser) {
+ allowed_values_ = createPropertyValues(allowed_values, property_parser);
+}
+
} // namespace org::apache::nifi::minifi::core
(nifi-minifi-cpp) 02/02: MINIFICPP-2452 Modbus, Elasticsearch and OPC docker tests not running in CI
Posted by lo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lordgamez pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 10911ecdcd5a8ceba399cf19da5351dd29a2dde8
Author: Martin Zink <ma...@apache.org>
AuthorDate: Thu Sep 5 11:22:44 2024 +0200
MINIFICPP-2452 Modbus, Elasticsearch and OPC docker tests not running in CI
Signed-off-by: Gabor Gyimesi <ga...@gmail.com>
This closes #1864
---
.github/workflows/ci.yml | 2 +-
PROCESSORS.md | 2 +-
docker/test/integration/features/fetch_modbus_tcp.feature | 4 ++--
docker/test/integration/features/opcua.feature | 2 +-
docker/test/integration/minifi/controllers/JsonRecordSetWriter.py | 2 +-
extensions/standard-processors/modbus/FetchModbusTcp.h | 4 ++--
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 859dcb0e0..142b040d4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -3,7 +3,7 @@ on: [push, pull_request, workflow_dispatch]
env:
DOCKER_CMAKE_FLAGS: -DDOCKER_VERIFY_THREAD=3 -DUSE_SHARED_LIBS= -DSTRICT_GSL_CHECKS=AUDIT -DCI_BUILD=ON -DENABLE_AWS=ON -DENABLE_LIBRDKAFKA=ON -DENABLE_MQTT=ON -DENABLE_AZURE=ON -DENABLE_SQL=ON \
-DENABLE_SPLUNK=ON -DENABLE_GCP=ON -DENABLE_OPC=ON -DENABLE_PYTHON_SCRIPTING=ON -DENABLE_LUA_SCRIPTING=ON -DENABLE_KUBERNETES=ON -DENABLE_TEST_PROCESSORS=ON -DENABLE_PROMETHEUS=ON \
- -DENABLE_ELASTICSEARCH=OFF -DENABLE_GRAFANA_LOKI=ON -DDOCKER_BUILD_ONLY=ON
+ -DENABLE_ELASTICSEARCH=ON -DENABLE_GRAFANA_LOKI=ON -DDOCKER_BUILD_ONLY=ON
SCCACHE_GHA_ENABLE: true
CCACHE_DIR: ${{ GITHUB.WORKSPACE }}/.ccache
jobs:
diff --git a/PROCESSORS.md b/PROCESSORS.md
index b1ea31cb3..293c317e4 100644
--- a/PROCESSORS.md
+++ b/PROCESSORS.md
@@ -887,7 +887,7 @@ In the list below, the names of required properties appear in bold. Any other pr
|--------------------------------|---------------|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Hostname** | | | The ip address or hostname of the destination.<br/>**Supports Expression Language: true** |
| **Port** | 502 | | The port or service on the destination.<br/>**Supports Expression Language: true** |
-| **Unit Identifier** | 0 | | The port or service on the destination.<br/>**Supports Expression Language: true** |
+| **Unit Identifier** | 0 | | Unit identifier<br/>**Supports Expression Language: true** |
| **Idle Connection Expiration** | 15 seconds | | The amount of time a connection should be held open without being used before closing the connection. A value of 0 seconds will disable this feature. |
| **Connection Per FlowFile** | false | true<br/>false | Specifies whether to send each FlowFile's content on an individual connection. |
| **Timeout** | 15 seconds | | The timeout for connecting to and communicating with the destination. |
diff --git a/docker/test/integration/features/fetch_modbus_tcp.feature b/docker/test/integration/features/fetch_modbus_tcp.feature
index 6c1eab84e..0ecb56b10 100644
--- a/docker/test/integration/features/fetch_modbus_tcp.feature
+++ b/docker/test/integration/features/fetch_modbus_tcp.feature
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-@MODBUS
+@CORE
Feature: Minifi C++ can act as a modbus tcp master
Background:
@@ -23,7 +23,7 @@ Feature: Minifi C++ can act as a modbus tcp master
Given a FetchModbusTcp processor
And a JsonRecordSetWriter controller service is set up for FetchModbusTcp
And a PutFile processor with the "Directory" property set to "/tmp/output"
- And the "Unit identifier" property of the FetchModbusTcp processor is set to "255"
+ And the "Unit Identifier" property of the FetchModbusTcp processor is set to "255"
And there is an accessible PLC with modbus enabled
And PLC register has been set with h@52=123 command
And PLC register has been set with h@5678/f=1.75 command
diff --git a/docker/test/integration/features/opcua.feature b/docker/test/integration/features/opcua.feature
index b75d39b95..e4217a53d 100644
--- a/docker/test/integration/features/opcua.feature
+++ b/docker/test/integration/features/opcua.feature
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-@ENABLE_OPCUA
+@ENABLE_OPC
Feature: Putting and fetching data to OPC UA server
In order to send and fetch data from an OPC UA server
As a user of MiNiFi
diff --git a/docker/test/integration/minifi/controllers/JsonRecordSetWriter.py b/docker/test/integration/minifi/controllers/JsonRecordSetWriter.py
index cfb15cfd1..9708c6cb6 100644
--- a/docker/test/integration/minifi/controllers/JsonRecordSetWriter.py
+++ b/docker/test/integration/minifi/controllers/JsonRecordSetWriter.py
@@ -21,4 +21,4 @@ class JsonRecordSetWriter(ControllerService):
def __init__(self, name=None, cert=None, key=None, ca_cert=None, passphrase=None, use_system_cert_store=None):
super(JsonRecordSetWriter, self).__init__(name=name)
self.service_class = 'JsonRecordSetWriter'
- self.properties['Output Grouping'] = 'OneLinePerObject'
+ self.properties['Output Grouping'] = 'One Line Per Object'
diff --git a/extensions/standard-processors/modbus/FetchModbusTcp.h b/extensions/standard-processors/modbus/FetchModbusTcp.h
index 847cb885a..229bac411 100644
--- a/extensions/standard-processors/modbus/FetchModbusTcp.h
+++ b/extensions/standard-processors/modbus/FetchModbusTcp.h
@@ -49,9 +49,9 @@ class FetchModbusTcp final : public core::Processor {
.supportsExpressionLanguage(true)
.build();
EXTENSIONAPI static constexpr auto UnitIdentifier = core::PropertyDefinitionBuilder<>::createProperty("Unit Identifier")
- .withDescription("The port or service on the destination.")
+ .withDescription("Unit identifier")
.isRequired(true)
- .withDefaultValue("0")
+ .withDefaultValue("1")
.supportsExpressionLanguage(true)
.build();
EXTENSIONAPI static constexpr auto IdleConnectionExpiration = core::PropertyDefinitionBuilder<>::createProperty("Idle Connection Expiration")