fgerlits commented on code in PR #1895:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1895#discussion_r1916893065
##########
libminifi/src/core/flow/StructuredConfiguration.cpp:
##########
@@ -191,23 +192,80 @@ void
StructuredConfiguration::parseParameterContexts(const Node& parameter_conte
uuid = id;
auto parameter_context = std::make_unique<ParameterContext>(name, uuid);
parameter_context->setDescription(getOptionalField(parameter_context_node,
schema_.description, ""));
+
parameter_context->setParameterProvider(getOptionalField(parameter_context_node,
schema_.parameter_provider, ""));
for (const auto& parameter_node :
parameter_context_node[schema_.parameters]) {
checkRequiredField(parameter_node, schema_.name);
checkRequiredField(parameter_node, schema_.value);
checkRequiredField(parameter_node, schema_.sensitive);
auto parameter_name = parameter_node[schema_.name].getString().value();
auto parameter_value = parameter_node[schema_.value].getString().value();
auto sensitive = parameter_node[schema_.sensitive].getBool().value();
+ auto provided =
parameter_node[schema_.provided].getBool().value_or(false);
auto parameter_description = getOptionalField(parameter_node,
schema_.description, "");
if (sensitive) {
parameter_value =
utils::crypto::property_encryption::decrypt(parameter_value,
sensitive_values_encryptor_);
}
- parameter_context->addParameter(Parameter{parameter_name,
parameter_description, sensitive, parameter_value});
+ parameter_context->addParameter(Parameter{
+ .name = parameter_name,
+ .description = parameter_description,
+ .sensitive = sensitive,
+ .provided = provided,
+ .value = parameter_value});
}
parameter_contexts_.emplace(name,
gsl::make_not_null(std::move(parameter_context)));
}
+}
+
+void StructuredConfiguration::parseParameterProvidersNode(const Node&
parameter_providers_node) {
+ if (!parameter_providers_node || !parameter_providers_node.isSequence()) {
Review Comment:
OK, we can revisit this later if there is a reason for it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]