lordgamez commented on a change in pull request #1253:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1253#discussion_r806585558



##########
File path: encrypt-config/tests/ConfigFileEncryptorTests.cpp
##########
@@ -76,13 +77,13 @@ TEST_CASE("ConfigFileEncryptor can encrypt the sensitive 
properties", "[encrypt-
 
   SECTION("default properties") {
     ConfigFile test_file{std::ifstream{"resources/minifi.properties"}};
-    std::string original_password = 
test_file.getValue("nifi.rest.api.password").value();
+    std::string original_password = 
test_file.getValue(org::apache::nifi::minifi::Configuration::nifi_rest_api_password).value();

Review comment:
       Updated in 107193764914b719074c45b1ce4b978c3d1292f4

##########
File path: encrypt-config/ConfigFile.cpp
##########
@@ -23,11 +23,10 @@
 #include <optional>
 
 #include "utils/StringUtils.h"
+#include "properties/Configuration.h"
 
 namespace {
-constexpr std::array<const char*, 2> 
DEFAULT_SENSITIVE_PROPERTIES{"nifi.security.client.pass.phrase",
-                                                                  
"nifi.rest.api.password"};
-constexpr const char* ADDITIONAL_SENSITIVE_PROPS_PROPERTY_NAME = 
"nifi.sensitive.props.additional.keys";
+

Review comment:
       Updated in 107193764914b719074c45b1ce4b978c3d1292f4

##########
File path: extensions/http-curl/protocols/RESTSender.cpp
##########
@@ -43,9 +44,9 @@ void 
RESTSender::initialize(core::controller::ControllerServiceProvider* control
   // base URL when one is not specified.
   if (nullptr != configure) {
     std::string update_str, ssl_context_service_str;
-    configure->get("nifi.c2.rest.url", "c2.rest.url", rest_uri_);
-    configure->get("nifi.c2.rest.url.ack", "c2.rest.url.ack", ack_uri_);
-    if (configure->get("nifi.c2.rest.ssl.context.service", 
"c2.rest.ssl.context.service", ssl_context_service_str)) {
+    configure->get(minifi::Configuration::nifi_c2_rest_url, "c2.rest.url", 
rest_uri_);
+    configure->get(minifi::Configuration::nifi_c2_rest_url_ack, 
"c2.rest.url.ack", ack_uri_);
+    if 
(configure->get(minifi::Configuration::nifi_c2_rest_ssl_context_service, 
"c2.rest.ssl.context.service", ssl_context_service_str)) {

Review comment:
       Updated in 107193764914b719074c45b1ce4b978c3d1292f4

##########
File path: extensions/http-curl/protocols/RESTSender.cpp
##########
@@ -74,8 +75,8 @@ C2Payload RESTSender::consumePayload(const C2Payload 
&payload, Direction directi
 
 void RESTSender::update(const std::shared_ptr<Configure> &configure) {
   std::string url;
-  configure->get("nifi.c2.rest.url", "c2.rest.url", url);
-  configure->get("nifi.c2.rest.url.ack", "c2.rest.url.ack", url);
+  configure->get(minifi::Configuration::nifi_c2_rest_url, "c2.rest.url", url);
+  configure->get(minifi::Configuration::nifi_c2_rest_url_ack, 
"c2.rest.url.ack", url);

Review comment:
       Updated in 107193764914b719074c45b1ce4b978c3d1292f4

##########
File path: libminifi/include/core/Property.h
##########
@@ -467,6 +468,16 @@ class ConstrainedProperty : public 
std::enable_shared_from_this<ConstrainedPrope
   friend class PropertyBuilder;
 };
 
+struct ConfigurationProperty {
+  explicit ConfigurationProperty(std::string_view name_, const 
gsl::not_null<std::shared_ptr<PropertyValidator>>& validator_ = 
StandardValidators::get().VALID_VALIDATOR)
+    : name(name_),
+      validator(validator_) {
+  }
+
+  std::string_view name;
+  gsl::not_null<std::shared_ptr<PropertyValidator>> validator;

Review comment:
       Updated in 107193764914b719074c45b1ce4b978c3d1292f4

##########
File path: libminifi/src/Configure.cpp
##########
@@ -68,15 +69,15 @@ bool Configure::isEncrypted(const std::string& key) const {
 
 std::optional<std::string> Configure::getAgentClass() const {
   std::string agent_class;
-  if (get("nifi.c2.agent.class", "c2.agent.class", agent_class) && 
!agent_class.empty()) {
+  if (get(minifi::Configuration::nifi_c2_agent_class, "c2.agent.class", 
agent_class) && !agent_class.empty()) {

Review comment:
       Updated in 107193764914b719074c45b1ce4b978c3d1292f4

##########
File path: libminifi/src/Configure.cpp
##########
@@ -68,15 +69,15 @@ bool Configure::isEncrypted(const std::string& key) const {
 
 std::optional<std::string> Configure::getAgentClass() const {
   std::string agent_class;
-  if (get("nifi.c2.agent.class", "c2.agent.class", agent_class) && 
!agent_class.empty()) {
+  if (get(minifi::Configuration::nifi_c2_agent_class, "c2.agent.class", 
agent_class) && !agent_class.empty()) {
     return agent_class;
   }
   return {};
 }
 
 std::string Configure::getAgentIdentifier() const {
   std::string agent_id;
-  if (!get("nifi.c2.agent.identifier", "c2.agent.identifier", agent_id) || 
agent_id.empty()) {
+  if (!get(minifi::Configuration::nifi_c2_agent_identifier, 
"c2.agent.identifier", agent_id) || agent_id.empty()) {

Review comment:
       Updated in 107193764914b719074c45b1ce4b978c3d1292f4

##########
File path: libminifi/src/c2/C2Agent.cpp
##########
@@ -138,7 +138,7 @@ void C2Agent::configure(const std::shared_ptr<Configure> 
&configure, bool reconf
   std::string clazz, heartbeat_period, device;
 
   if (!reconfigure) {
-    if (!configure->get("nifi.c2.agent.protocol.class", 
"c2.agent.protocol.class", clazz)) {
+    if (!configure->get(minifi::Configuration::nifi_c2_agent_protocol_class, 
"c2.agent.protocol.class", clazz)) {

Review comment:
       Updated in 107193764914b719074c45b1ce4b978c3d1292f4

##########
File path: libminifi/src/c2/C2Agent.cpp
##########
@@ -164,7 +164,7 @@ void C2Agent::configure(const std::shared_ptr<Configure> 
&configure, bool reconf
     protocol_.load()->update(configure);
   }
 
-  if (configure->get("nifi.c2.agent.heartbeat.period", 
"c2.agent.heartbeat.period", heartbeat_period)) {
+  if (configure->get(minifi::Configuration::nifi_c2_agent_heartbeat_period, 
"c2.agent.heartbeat.period", heartbeat_period)) {

Review comment:
       Updated in 107193764914b719074c45b1ce4b978c3d1292f4

##########
File path: libminifi/src/c2/C2Agent.cpp
##########
@@ -181,7 +181,7 @@ void C2Agent::configure(const std::shared_ptr<Configure> 
&configure, bool reconf
   }
 
   std::string heartbeat_reporters;
-  if (configure->get("nifi.c2.agent.heartbeat.reporter.classes", 
"c2.agent.heartbeat.reporter.classes", heartbeat_reporters)) {
+  if 
(configure->get(minifi::Configuration::nifi_c2_agent_heartbeat_reporter_classes,
 "c2.agent.heartbeat.reporter.classes", heartbeat_reporters)) {

Review comment:
       Updated in 107193764914b719074c45b1ce4b978c3d1292f4

##########
File path: libminifi/test/unit/SocketTests.cpp
##########
@@ -221,7 +222,7 @@ TEST_CASE("TestTLSContextCreation", "[TestSocket8]") {
  */
 TEST_CASE("TestTLSContextCreation2", "[TestSocket9]") {
   std::shared_ptr<minifi::Configure> configure = 
std::make_shared<minifi::Configure>();
-  configure->set("nifi.remote.input.secure", "false");
+  
configure->set(org::apache::nifi::minifi::Configuration::nifi_remote_input_secure,
 "false");

Review comment:
       Updated in 107193764914b719074c45b1ce4b978c3d1292f4




-- 
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: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to