lordgamez commented on code in PR #1589:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1589#discussion_r1259300239


##########
extensions/azure/processors/ListAzureDataLakeStorage.h:
##########
@@ -25,36 +25,53 @@
 #include <memory>
 
 #include "AzureDataLakeStorageProcessorBase.h"
+#include "core/PropertyDefinitionBuilder.h"
+#include "core/PropertyType.h"
 #include "utils/ArrayUtils.h"
 
 class ListAzureDataLakeStorageTestsFixture;
 
 namespace org::apache::nifi::minifi::azure::processors {
 
+namespace azure {
+SMART_ENUM(EntityTracking,
+  (NONE, "none"),
+  (TIMESTAMPS, "timestamps")
+)
+}  // namespace azure

Review Comment:
   This should also be moved to `org::apache::nifi::minifi::azure` namespace



##########
extensions/azure/processors/PutAzureDataLakeStorage.h:
##########
@@ -35,18 +37,29 @@ class AzureDataLakeStorageTestsFixture;
 
 namespace org::apache::nifi::minifi::azure::processors {
 
+namespace azure {
+SMART_ENUM(FileExistsResolutionStrategy,
+  (FAIL_FLOW, "fail"),
+  (REPLACE_FILE, "replace"),
+  (IGNORE_REQUEST, "ignore")
+)
+}  // namespace azure

Review Comment:
   Same namespace issue here



##########
extensions/standard-processors/tests/unit/ReplaceTextTests.cpp:
##########
@@ -93,7 +93,7 @@ TEST_CASE("Regex Replace works correctly in ReplaceText", 
"[applyReplacements][R
   replace_text.setSearchRegex("a\\w+e");
   replace_text.setReplacementValue("orange");
 
-  CHECK(replace_text.applyReplacements("") == "");

Review Comment:
   Maybe it would be better to create a NOLINT block for this issue with `// 
NOLINTBEGIN(readability-container-size-empty)`



##########
libminifi/include/controllers/UpdatePolicyControllerService.h:
##########
@@ -50,18 +53,32 @@ class UpdatePolicyControllerService : public 
core::controller::ControllerService
   MINIFIAPI static constexpr const char* Description = 
"UpdatePolicyControllerService allows a flow specific policy on allowing or 
disallowing updates. "
       "Since the flow dictates the purpose of a device it will also be used to 
dictate updates to specific components.";
 
-  MINIFIAPI static const core::Property AllowAllProperties;
-  MINIFIAPI static const core::Property PersistUpdates;
-  MINIFIAPI static const core::Property AllowedProperties;
-  MINIFIAPI static const core::Property DisallowedProperties;
-  static auto properties() {
-    return std::array{
+  MINIFIAPI static constexpr auto AllowAllProperties = 
core::PropertyDefinitionBuilder<>::createProperty("Allow All Properties")
+      .withDescription("Allows all properties, which are also not disallowed, 
to be updated")
+      .withPropertyType(core::StandardPropertyTypes::BOOLEAN_TYPE)
+      .withDefaultValue("false")
+      .build();
+  MINIFIAPI static constexpr auto PersistUpdates = 
core::PropertyDefinitionBuilder<>::createProperty("Persist Updates")
+      .withDescription("Property that dictates whether updates should persist 
after a restart")
+      .isRequired(false)
+      .withPropertyType(core::StandardPropertyTypes::BOOLEAN_TYPE)
+      .withDefaultValue("false")
+      .build();
+  MINIFIAPI static constexpr auto AllowedProperties = 
core::PropertyDefinitionBuilder<>::createProperty("Allowed Properties")
+      .withDescription("Properties for which we will allow updates")
+      .isRequired(false)
+      .build();
+  MINIFIAPI static constexpr auto DisallowedProperties = 
core::PropertyDefinitionBuilder<>::createProperty("Disallowed Properties")
+      .withDescription("Properties for which we will not allow updates")
+      .isRequired(false)
+      .build();
+  MINIFIAPI static constexpr auto Properties = 
std::array<core::PropertyReference, 4>{
       AllowAllProperties,
       PersistUpdates,
       AllowedProperties,
       DisallowedProperties
-    };
-  }
+  };
+

Review Comment:
   Nitpick: Added unnecessary newline



-- 
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]

Reply via email to