This is an automated email from the ASF dual-hosted git repository. martinzink pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 76c33cb73cec61d0a3010fc715b889393d437c1c Author: james94 <[email protected]> AuthorDate: Wed Aug 21 13:36:31 2024 +0200 MINIFICPP-2441: Refactored Creating Properties via to_array to Auto Determine Number of Properties Closes #1859 Signed-off-by: Martin Zink <[email protected]> --- .../aws/controllerservices/AWSCredentialsService.h | 4 ++-- extensions/aws/processors/DeleteS3Object.h | 4 ++-- extensions/aws/processors/FetchS3Object.h | 4 ++-- extensions/aws/processors/ListS3.h | 4 ++-- extensions/aws/processors/PutS3Object.h | 4 ++-- extensions/aws/processors/S3Processor.h | 4 ++-- .../AzureStorageCredentialsService.h | 4 ++-- .../azure/processors/AzureBlobStorageProcessorBase.h | 4 ++-- .../AzureBlobStorageSingleBlobProcessorBase.h | 2 +- .../processors/AzureDataLakeStorageFileProcessorBase.h | 2 +- .../processors/AzureDataLakeStorageProcessorBase.h | 4 ++-- .../azure/processors/AzureStorageProcessorBase.h | 2 +- extensions/azure/processors/DeleteAzureBlobStorage.h | 2 +- extensions/azure/processors/FetchAzureBlobStorage.h | 4 ++-- .../azure/processors/FetchAzureDataLakeStorage.h | 4 ++-- extensions/azure/processors/ListAzureBlobStorage.h | 4 ++-- extensions/azure/processors/ListAzureDataLakeStorage.h | 4 ++-- extensions/azure/processors/PutAzureBlobStorage.h | 2 +- extensions/azure/processors/PutAzureDataLakeStorage.h | 2 +- extensions/bustache/ApplyTemplate.h | 2 +- extensions/civetweb/processors/ListenHTTP.h | 4 ++-- .../ElasticsearchCredentialsControllerService.h | 4 ++-- extensions/elasticsearch/PostElasticsearch.h | 4 ++-- extensions/execute-process/ExecuteProcess.h | 4 ++-- .../tests/ProcessContextExprTests.cpp | 2 +- .../GCPCredentialsControllerService.h | 5 +++-- extensions/gcp/processors/DeleteGCSObject.h | 4 ++-- extensions/gcp/processors/FetchGCSObject.h | 4 ++-- extensions/gcp/processors/GCSProcessor.h | 4 ++-- extensions/gcp/processors/ListGCSBucket.h | 4 ++-- extensions/gcp/processors/PutGCSObject.h | 4 ++-- extensions/gps/GetGPS.h | 4 ++-- extensions/grafana-loki/PushGrafanaLoki.h | 4 ++-- extensions/grafana-loki/PushGrafanaLokiGrpc.h | 4 ++-- extensions/grafana-loki/PushGrafanaLokiREST.h | 4 ++-- .../controllerservice/KubernetesControllerService.h | 4 ++-- .../processors/CollectKubernetesPodMetrics.h | 2 +- extensions/libarchive/BinFiles.h | 4 ++-- extensions/libarchive/CompressContent.h | 4 ++-- extensions/libarchive/FocusArchiveEntry.h | 2 +- extensions/libarchive/ManipulateArchive.h | 4 ++-- extensions/libarchive/MergeContent.h | 4 ++-- extensions/librdkafka/ConsumeKafka.h | 4 ++-- extensions/librdkafka/KafkaProcessorBase.h | 4 ++-- extensions/librdkafka/PublishKafka.h | 4 ++-- extensions/mqtt/processors/AbstractMQTTProcessor.h | 8 ++++---- extensions/mqtt/processors/ConsumeMQTT.h | 4 ++-- extensions/mqtt/processors/PublishMQTT.h | 4 ++-- extensions/opc/include/fetchopc.h | 4 ++-- extensions/opc/include/opcbase.h | 4 ++-- extensions/opc/include/putopc.h | 4 ++-- extensions/opencv/CaptureRTSPFrame.h | 4 ++-- extensions/opencv/MotionDetector.h | 4 ++-- extensions/pdh/PerformanceDataMonitor.h | 4 ++-- extensions/procfs/processors/ProcFsMonitor.h | 4 ++-- extensions/python/ExecutePythonProcessor.h | 4 ++-- .../rocksdb-repos/controllers/RocksDbStateStorage.h | 4 ++-- extensions/script/ExecuteScript.h | 4 ++-- extensions/sftp/processors/FetchSFTP.h | 4 ++-- extensions/sftp/processors/ListSFTP.h | 4 ++-- extensions/sftp/processors/PutSFTP.h | 4 ++-- extensions/sftp/processors/SFTPProcessorBase.h | 4 ++-- extensions/smb/FetchSmb.h | 4 ++-- extensions/smb/ListSmb.h | 4 ++-- extensions/smb/PutSmb.h | 2 +- extensions/smb/SmbConnectionControllerService.h | 4 ++-- extensions/splunk/PutSplunkHTTP.h | 4 ++-- extensions/splunk/QuerySplunkIndexingStatus.h | 4 ++-- extensions/splunk/SplunkHECProcessor.h | 4 ++-- extensions/sql/processors/ExecuteSQL.h | 2 +- extensions/sql/processors/FlowFileSource.h | 2 +- extensions/sql/processors/PutSQL.h | 2 +- extensions/sql/processors/QueryDatabaseTable.h | 4 ++-- extensions/sql/processors/SQLProcessor.h | 2 +- extensions/sql/services/DatabaseService.h | 2 +- .../controllers/JsonRecordSetWriter.h | 4 ++-- .../controllers/PersistentMapStateStorage.h | 4 ++-- .../controllers/VolatileMapStateStorage.h | 2 +- extensions/standard-processors/modbus/FetchModbusTcp.h | 4 ++-- .../standard-processors/processors/AppendHostInfo.h | 4 ++-- .../processors/AttributeRollingWindow.h | 4 ++-- .../standard-processors/processors/AttributesToJSON.h | 4 ++-- .../standard-processors/processors/DefragmentText.h | 4 ++-- .../standard-processors/processors/ExtractText.h | 4 ++-- extensions/standard-processors/processors/FetchFile.h | 4 ++-- .../standard-processors/processors/GenerateFlowFile.h | 4 ++-- extensions/standard-processors/processors/GetFile.h | 4 ++-- extensions/standard-processors/processors/GetTCP.h | 4 ++-- .../standard-processors/processors/HashContent.h | 4 ++-- extensions/standard-processors/processors/InvokeHTTP.h | 4 ++-- .../standard-processors/processors/JoltTransformJSON.h | 4 ++-- extensions/standard-processors/processors/ListFile.h | 4 ++-- .../standard-processors/processors/ListenSyslog.h | 4 ++-- extensions/standard-processors/processors/ListenTCP.h | 4 ++-- extensions/standard-processors/processors/ListenUDP.h | 4 ++-- .../standard-processors/processors/LogAttribute.h | 4 ++-- extensions/standard-processors/processors/PutFile.h | 8 +++++--- extensions/standard-processors/processors/PutTCP.h | 4 ++-- extensions/standard-processors/processors/PutUDP.h | 2 +- .../standard-processors/processors/ReplaceText.h | 4 ++-- .../standard-processors/processors/RetryFlowFile.h | 4 ++-- extensions/standard-processors/processors/RouteText.h | 4 ++-- extensions/standard-processors/processors/SplitText.h | 4 ++-- extensions/standard-processors/processors/TailFile.h | 4 ++-- .../standard-processors/tests/unit/FlowJsonTests.cpp | 2 +- .../tests/unit/YamlConfigurationTests.cpp | 18 +++++++++--------- extensions/systemd/ConsumeJournald.h | 4 ++-- extensions/test-processors/KamikazeProcessor.h | 4 ++-- extensions/windows-event-log/ConsumeWindowsEventLog.h | 4 ++-- extensions/windows-event-log/TailEventLog.h | 4 ++-- .../tests/ConsumeWindowsEventLogTests.cpp | 8 ++++---- libminifi/include/RemoteProcessorGroupPort.h | 4 ++-- .../include/controllers/LinuxPowerManagementService.h | 4 ++-- .../include/controllers/NetworkPrioritizerService.h | 4 ++-- libminifi/include/controllers/SSLContextService.h | 6 +++--- .../controllers/UpdatePolicyControllerService.h | 4 ++-- libminifi/test/flow-tests/CustomProcessors.h | 2 +- libminifi/test/unit/AbstractProcessorTest.cpp | 4 ++-- libminifi/test/unit/ComponentManifestTests.cpp | 2 +- libminifi/test/unit/ProcessorConfigUtilsTests.cpp | 2 +- 120 files changed, 234 insertions(+), 231 deletions(-) diff --git a/extensions/aws/controllerservices/AWSCredentialsService.h b/extensions/aws/controllerservices/AWSCredentialsService.h index 61412b9d3..42002a9fe 100644 --- a/extensions/aws/controllerservices/AWSCredentialsService.h +++ b/extensions/aws/controllerservices/AWSCredentialsService.h @@ -67,12 +67,12 @@ class AWSCredentialsService : public core::controller::ControllerService { EXTENSIONAPI static constexpr auto CredentialsFile = core::PropertyDefinitionBuilder<>::createProperty("Credentials File") .withDescription("Path to a file containing AWS access key and secret key in properties file format. Properties used: accessKey and secretKey") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 4>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ UseDefaultCredentials, AccessKey, SecretKey, CredentialsFile - }; + }); EXTENSIONAPI static constexpr bool SupportsDynamicProperties = false; diff --git a/extensions/aws/processors/DeleteS3Object.h b/extensions/aws/processors/DeleteS3Object.h index c09c0aaf3..5949d4e67 100644 --- a/extensions/aws/processors/DeleteS3Object.h +++ b/extensions/aws/processors/DeleteS3Object.h @@ -47,10 +47,10 @@ class DeleteS3Object : public S3Processor { .withDescription("The Version of the Object to delete") .supportsExpressionLanguage(true) .build(); - EXTENSIONAPI static constexpr auto Properties = minifi::utils::array_cat(S3Processor::Properties, std::array<core::PropertyReference, 2>{ + EXTENSIONAPI static constexpr auto Properties = minifi::utils::array_cat(S3Processor::Properties, std::to_array<core::PropertyReference>({ ObjectKey, Version - }); + })); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "FlowFiles are routed to success relationship"}; diff --git a/extensions/aws/processors/FetchS3Object.h b/extensions/aws/processors/FetchS3Object.h index 8950ce42a..06e934220 100644 --- a/extensions/aws/processors/FetchS3Object.h +++ b/extensions/aws/processors/FetchS3Object.h @@ -56,11 +56,11 @@ class FetchS3Object : public S3Processor { .withDescription("If true, indicates that the requester consents to pay any charges associated with retrieving " "objects from the S3 bucket. This sets the 'x-amz-request-payer' header to 'requester'.") .build(); - EXTENSIONAPI static constexpr auto Properties = minifi::utils::array_cat(S3Processor::Properties, std::array<core::PropertyReference, 3>{ + EXTENSIONAPI static constexpr auto Properties = minifi::utils::array_cat(S3Processor::Properties, std::to_array<core::PropertyReference>({ ObjectKey, Version, RequesterPays - }); + })); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "FlowFiles are routed to success relationship"}; diff --git a/extensions/aws/processors/ListS3.h b/extensions/aws/processors/ListS3.h index ce19a0c89..fd69fe754 100644 --- a/extensions/aws/processors/ListS3.h +++ b/extensions/aws/processors/ListS3.h @@ -73,7 +73,7 @@ class ListS3 : public S3Processor { .withDescription("If true, indicates that the requester consents to pay any charges associated with listing the S3 bucket. This sets the 'x-amz-request-payer' header to 'requester'. " "Note that this setting is only used if Write User Metadata is true.") .build(); - EXTENSIONAPI static constexpr auto Properties = minifi::utils::array_cat(S3Processor::Properties, std::array<core::PropertyReference, 7>{ + EXTENSIONAPI static constexpr auto Properties = minifi::utils::array_cat(S3Processor::Properties, std::to_array<core::PropertyReference>({ Delimiter, Prefix, UseVersions, @@ -81,7 +81,7 @@ class ListS3 : public S3Processor { WriteObjectTags, WriteUserMetadata, RequesterPays - }); + })); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "FlowFiles are routed to success relationship"}; diff --git a/extensions/aws/processors/PutS3Object.h b/extensions/aws/processors/PutS3Object.h index 1c353eb4e..07b0fdfa3 100644 --- a/extensions/aws/processors/PutS3Object.h +++ b/extensions/aws/processors/PutS3Object.h @@ -138,7 +138,7 @@ class PutS3Object : public S3Processor { .withDefaultValue("7 days") .isRequired(true) .build(); - EXTENSIONAPI static constexpr auto Properties = minifi::utils::array_cat(S3Processor::Properties, std::array<core::PropertyReference, 14>{ + EXTENSIONAPI static constexpr auto Properties = minifi::utils::array_cat(S3Processor::Properties, std::to_array<core::PropertyReference>({ ObjectKey, ContentType, StorageClass, @@ -153,7 +153,7 @@ class PutS3Object : public S3Processor { MultipartPartSize, MultipartUploadAgeOffInterval, MultipartUploadMaxAgeThreshold - }); + })); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "FlowFiles are routed to success relationship"}; diff --git a/extensions/aws/processors/S3Processor.h b/extensions/aws/processors/S3Processor.h index bbf61287e..3bfb8998e 100644 --- a/extensions/aws/processors/S3Processor.h +++ b/extensions/aws/processors/S3Processor.h @@ -158,7 +158,7 @@ class S3Processor : public core::Processor { .withDefaultValue("false") .isRequired(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 13>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ Bucket, AccessKey, SecretKey, @@ -172,7 +172,7 @@ class S3Processor : public core::Processor { ProxyUsername, ProxyPassword, UseDefaultCredentials - }; + }); explicit S3Processor(std::string_view name, const minifi::utils::Identifier& uuid, std::shared_ptr<core::logging::Logger> logger); diff --git a/extensions/azure/controllerservices/AzureStorageCredentialsService.h b/extensions/azure/controllerservices/AzureStorageCredentialsService.h index bf2a23717..cb0a0b048 100644 --- a/extensions/azure/controllerservices/AzureStorageCredentialsService.h +++ b/extensions/azure/controllerservices/AzureStorageCredentialsService.h @@ -62,14 +62,14 @@ class AzureStorageCredentialsService : public core::controller::ControllerServic .withPropertyType(core::StandardPropertyTypes::BOOLEAN_TYPE) .withDefaultValue("false") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 6>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ StorageAccountName, StorageAccountKey, SASToken, CommonStorageAccountEndpointSuffix, ConnectionString, UseManagedIdentityCredentials - }; + }); EXTENSIONAPI static constexpr bool SupportsDynamicProperties = false; diff --git a/extensions/azure/processors/AzureBlobStorageProcessorBase.h b/extensions/azure/processors/AzureBlobStorageProcessorBase.h index b53dc305d..822f2bac0 100644 --- a/extensions/azure/processors/AzureBlobStorageProcessorBase.h +++ b/extensions/azure/processors/AzureBlobStorageProcessorBase.h @@ -73,7 +73,7 @@ class AzureBlobStorageProcessorBase : public AzureStorageProcessorBase { .withPropertyType(core::StandardPropertyTypes::BOOLEAN_TYPE) .withDefaultValue("false") .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AzureStorageProcessorBase::Properties, std::array<core::PropertyReference, 7>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AzureStorageProcessorBase::Properties, std::to_array<core::PropertyReference>({ ContainerName, StorageAccountName, StorageAccountKey, @@ -81,7 +81,7 @@ class AzureBlobStorageProcessorBase : public AzureStorageProcessorBase { CommonStorageAccountEndpointSuffix, ConnectionString, UseManagedIdentityCredentials - }); + })); void onSchedule(core::ProcessContext& context, core::ProcessSessionFactory& session_factory) override; diff --git a/extensions/azure/processors/AzureBlobStorageSingleBlobProcessorBase.h b/extensions/azure/processors/AzureBlobStorageSingleBlobProcessorBase.h index 189fc81dc..aff7f501d 100644 --- a/extensions/azure/processors/AzureBlobStorageSingleBlobProcessorBase.h +++ b/extensions/azure/processors/AzureBlobStorageSingleBlobProcessorBase.h @@ -37,7 +37,7 @@ class AzureBlobStorageSingleBlobProcessorBase : public AzureBlobStorageProcessor .withDescription("The filename of the blob. If left empty the filename attribute will be used by default.") .supportsExpressionLanguage(true) .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AzureBlobStorageProcessorBase::Properties, std::array<core::PropertyReference, 1>{Blob}); + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AzureBlobStorageProcessorBase::Properties, std::to_array<core::PropertyReference>({Blob})); protected: explicit AzureBlobStorageSingleBlobProcessorBase( diff --git a/extensions/azure/processors/AzureDataLakeStorageFileProcessorBase.h b/extensions/azure/processors/AzureDataLakeStorageFileProcessorBase.h index ef6318071..2b45b61bd 100644 --- a/extensions/azure/processors/AzureDataLakeStorageFileProcessorBase.h +++ b/extensions/azure/processors/AzureDataLakeStorageFileProcessorBase.h @@ -34,7 +34,7 @@ class AzureDataLakeStorageFileProcessorBase : public AzureDataLakeStorageProcess .withDescription("The filename in Azure Storage. If left empty the filename attribute will be used by default.") .supportsExpressionLanguage(true) .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AzureDataLakeStorageProcessorBase::Properties, std::array<core::PropertyReference, 1>{FileName}); + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AzureDataLakeStorageProcessorBase::Properties, std::to_array<core::PropertyReference>({FileName})); explicit AzureDataLakeStorageFileProcessorBase(std::string_view name, const minifi::utils::Identifier& uuid, const std::shared_ptr<core::logging::Logger> &logger) : AzureDataLakeStorageProcessorBase(name, uuid, logger) { diff --git a/extensions/azure/processors/AzureDataLakeStorageProcessorBase.h b/extensions/azure/processors/AzureDataLakeStorageProcessorBase.h index 9e67ef837..a5a5030d7 100644 --- a/extensions/azure/processors/AzureDataLakeStorageProcessorBase.h +++ b/extensions/azure/processors/AzureDataLakeStorageProcessorBase.h @@ -47,10 +47,10 @@ class AzureDataLakeStorageProcessorBase : public AzureStorageProcessorBase { "If left empty it designates the root directory. The directory will be created if not already existing.") .supportsExpressionLanguage(true) .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AzureStorageProcessorBase::Properties, std::array<core::PropertyReference, 2>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AzureStorageProcessorBase::Properties, std::to_array<core::PropertyReference>({ FilesystemName, DirectoryName - }); + })); explicit AzureDataLakeStorageProcessorBase(std::string_view name, const minifi::utils::Identifier& uuid, const std::shared_ptr<core::logging::Logger> &logger) diff --git a/extensions/azure/processors/AzureStorageProcessorBase.h b/extensions/azure/processors/AzureStorageProcessorBase.h index 0143f1407..1f2a1ce63 100644 --- a/extensions/azure/processors/AzureStorageProcessorBase.h +++ b/extensions/azure/processors/AzureStorageProcessorBase.h @@ -40,7 +40,7 @@ class AzureStorageProcessorBase : public core::Processor { EXTENSIONAPI static constexpr auto AzureStorageCredentialsService = core::PropertyDefinitionBuilder<>::createProperty("Azure Storage Credentials Service") .withDescription("Name of the Azure Storage Credentials Service used to retrieve the connection string from.") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 1>{AzureStorageCredentialsService}; + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({AzureStorageCredentialsService}); AzureStorageProcessorBase(std::string_view name, const minifi::utils::Identifier& uuid, const std::shared_ptr<core::logging::Logger>& logger) : core::Processor(name, uuid), diff --git a/extensions/azure/processors/DeleteAzureBlobStorage.h b/extensions/azure/processors/DeleteAzureBlobStorage.h index b0453fc19..e08c55b1a 100644 --- a/extensions/azure/processors/DeleteAzureBlobStorage.h +++ b/extensions/azure/processors/DeleteAzureBlobStorage.h @@ -49,7 +49,7 @@ class DeleteAzureBlobStorage final : public AzureBlobStorageSingleBlobProcessorB .withDefaultValue(magic_enum::enum_name(storage::OptionalDeletion::NONE)) .withAllowedValues(magic_enum::enum_names<storage::OptionalDeletion>()) .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AzureBlobStorageSingleBlobProcessorBase::Properties, std::array<core::PropertyReference, 1>{DeleteSnapshotsOption}); + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AzureBlobStorageSingleBlobProcessorBase::Properties, std::to_array<core::PropertyReference>({DeleteSnapshotsOption})); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "All successfully processed FlowFiles are routed to this relationship"}; EXTENSIONAPI static constexpr auto Failure = core::RelationshipDefinition{"failure", "Unsuccessful operations will be transferred to the failure relationship"}; diff --git a/extensions/azure/processors/FetchAzureBlobStorage.h b/extensions/azure/processors/FetchAzureBlobStorage.h index ac1566bb0..9a0808407 100644 --- a/extensions/azure/processors/FetchAzureBlobStorage.h +++ b/extensions/azure/processors/FetchAzureBlobStorage.h @@ -51,10 +51,10 @@ class FetchAzureBlobStorage final : public AzureBlobStorageSingleBlobProcessorBa "An empty value or a value that extends beyond the end of the blob will read to the end of the blob.") .supportsExpressionLanguage(true) .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AzureBlobStorageSingleBlobProcessorBase::Properties, std::array<core::PropertyReference, 2>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AzureBlobStorageSingleBlobProcessorBase::Properties, std::to_array<core::PropertyReference>({ RangeStart, RangeLength - }); + })); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "All successfully processed FlowFiles are routed to this relationship"}; diff --git a/extensions/azure/processors/FetchAzureDataLakeStorage.h b/extensions/azure/processors/FetchAzureDataLakeStorage.h index c145a27f2..0002cfb42 100644 --- a/extensions/azure/processors/FetchAzureDataLakeStorage.h +++ b/extensions/azure/processors/FetchAzureDataLakeStorage.h @@ -51,11 +51,11 @@ class FetchAzureDataLakeStorage final : public AzureDataLakeStorageFileProcessor .withDefaultValue("0") .supportsExpressionLanguage(true) .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AzureDataLakeStorageFileProcessorBase::Properties, std::array<core::PropertyReference, 3>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AzureDataLakeStorageFileProcessorBase::Properties, std::to_array<core::PropertyReference>({ RangeStart, RangeLength, NumberOfRetries - }); + })); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "Files that have been successfully fetched from Azure storage are transferred to this relationship"}; diff --git a/extensions/azure/processors/ListAzureBlobStorage.h b/extensions/azure/processors/ListAzureBlobStorage.h index 3be4b4f0e..dd1a35067 100644 --- a/extensions/azure/processors/ListAzureBlobStorage.h +++ b/extensions/azure/processors/ListAzureBlobStorage.h @@ -49,10 +49,10 @@ class ListAzureBlobStorage final : public AzureBlobStorageProcessorBase { .withDescription("Search prefix for listing") .supportsExpressionLanguage(true) .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AzureBlobStorageProcessorBase::Properties, std::array<core::PropertyReference, 2>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AzureBlobStorageProcessorBase::Properties, std::to_array<core::PropertyReference>({ ListingStrategy, Prefix - }); + })); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "All FlowFiles that are received are routed to success"}; EXTENSIONAPI static constexpr auto Relationships = std::array{Success}; diff --git a/extensions/azure/processors/ListAzureDataLakeStorage.h b/extensions/azure/processors/ListAzureDataLakeStorage.h index 89f27ef93..67d194b50 100644 --- a/extensions/azure/processors/ListAzureDataLakeStorage.h +++ b/extensions/azure/processors/ListAzureDataLakeStorage.h @@ -56,12 +56,12 @@ class ListAzureDataLakeStorage final : public AzureDataLakeStorageProcessorBase .withDefaultValue(magic_enum::enum_name(azure::EntityTracking::timestamps)) .withAllowedValues(magic_enum::enum_names<azure::EntityTracking>()) .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AzureDataLakeStorageProcessorBase::Properties, std::array<core::PropertyReference, 4>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AzureDataLakeStorageProcessorBase::Properties, std::to_array<core::PropertyReference>({ RecurseSubdirectories, FileFilter, PathFilter, ListingStrategy - }); + })); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "All FlowFiles that are received are routed to success"}; EXTENSIONAPI static constexpr auto Relationships = std::array{Success}; diff --git a/extensions/azure/processors/PutAzureBlobStorage.h b/extensions/azure/processors/PutAzureBlobStorage.h index db448b8ba..60dfd964c 100644 --- a/extensions/azure/processors/PutAzureBlobStorage.h +++ b/extensions/azure/processors/PutAzureBlobStorage.h @@ -52,7 +52,7 @@ class PutAzureBlobStorage final : public AzureBlobStorageSingleBlobProcessorBase .withPropertyType(core::StandardPropertyTypes::BOOLEAN_TYPE) .withDefaultValue("false") .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AzureBlobStorageSingleBlobProcessorBase::Properties, std::array<core::PropertyReference, 1>{CreateContainer}); + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AzureBlobStorageSingleBlobProcessorBase::Properties, std::to_array<core::PropertyReference>({CreateContainer})); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "All successfully processed FlowFiles are routed to this relationship"}; EXTENSIONAPI static constexpr auto Failure = core::RelationshipDefinition{"failure", "Unsuccessful operations will be transferred to the failure relationship"}; diff --git a/extensions/azure/processors/PutAzureDataLakeStorage.h b/extensions/azure/processors/PutAzureDataLakeStorage.h index f85c060eb..a89aaeaf8 100644 --- a/extensions/azure/processors/PutAzureDataLakeStorage.h +++ b/extensions/azure/processors/PutAzureDataLakeStorage.h @@ -56,7 +56,7 @@ class PutAzureDataLakeStorage final : public AzureDataLakeStorageFileProcessorBa .withDefaultValue(magic_enum::enum_name(azure::FileExistsResolutionStrategy::fail)) .withAllowedValues(magic_enum::enum_names<azure::FileExistsResolutionStrategy>()) .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AzureDataLakeStorageFileProcessorBase::Properties, std::array<core::PropertyReference, 1>{ConflictResolutionStrategy}); + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AzureDataLakeStorageFileProcessorBase::Properties, std::to_array<core::PropertyReference>({ConflictResolutionStrategy})); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "Files that have been successfully written to Azure storage are transferred to this relationship"}; EXTENSIONAPI static constexpr auto Failure = core::RelationshipDefinition{"failure", "Files that could not be written to Azure storage for some reason are transferred to this relationship"}; diff --git a/extensions/bustache/ApplyTemplate.h b/extensions/bustache/ApplyTemplate.h index 918a31542..f2afa7145 100644 --- a/extensions/bustache/ApplyTemplate.h +++ b/extensions/bustache/ApplyTemplate.h @@ -45,7 +45,7 @@ class ApplyTemplate : public core::Processor { EXTENSIONAPI static constexpr core::PropertyDefinition Template = core::PropertyDefinitionBuilder<>::createProperty("Template") .withDescription("Path to the input mustache template file") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 1>{Template}; + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({Template}); EXTENSIONAPI static constexpr core::RelationshipDefinition Success{"success", "success operational on the flow record"}; EXTENSIONAPI static constexpr auto Relationships = std::array{Success}; diff --git a/extensions/civetweb/processors/ListenHTTP.h b/extensions/civetweb/processors/ListenHTTP.h index b860a3314..4d149fac3 100644 --- a/extensions/civetweb/processors/ListenHTTP.h +++ b/extensions/civetweb/processors/ListenHTTP.h @@ -112,7 +112,7 @@ class ListenHTTP : public core::Processor { .withPropertyType(core::StandardPropertyTypes::UNSIGNED_LONG_TYPE) .withDefaultValue(ListenHTTP::DEFAULT_BUFFER_SIZE_STR) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 10>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ BasePath, Port, AuthorizedDNPattern, @@ -123,7 +123,7 @@ class ListenHTTP : public core::Processor { HeadersAsAttributesRegex, BatchSize, BufferSize - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "All files are routed to success"}; diff --git a/extensions/elasticsearch/ElasticsearchCredentialsControllerService.h b/extensions/elasticsearch/ElasticsearchCredentialsControllerService.h index 1069aa840..e9a854011 100644 --- a/extensions/elasticsearch/ElasticsearchCredentialsControllerService.h +++ b/extensions/elasticsearch/ElasticsearchCredentialsControllerService.h @@ -47,11 +47,11 @@ class ElasticsearchCredentialsControllerService : public core::controller::Contr .withDescription("The API Key to use") .isSensitive(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 3>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ Username, Password, ApiKey - }; + }); EXTENSIONAPI static constexpr bool SupportsDynamicProperties = false; diff --git a/extensions/elasticsearch/PostElasticsearch.h b/extensions/elasticsearch/PostElasticsearch.h index 1c0b85720..7306640a6 100644 --- a/extensions/elasticsearch/PostElasticsearch.h +++ b/extensions/elasticsearch/PostElasticsearch.h @@ -80,7 +80,7 @@ class PostElasticsearch : public core::Processor { "For all other Actions, the attribute must evaluate to a non-empty value.") .supportsExpressionLanguage(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 7>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ Action, MaxBatchSize, ElasticCredentials, @@ -88,7 +88,7 @@ class PostElasticsearch : public core::Processor { Hosts, Index, Identifier - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "All flowfiles that succeed in being transferred into Elasticsearch go here."}; EXTENSIONAPI static constexpr auto Failure = core::RelationshipDefinition{"failure", "All flowfiles that fail for reasons unrelated to server availability go to this relationship."}; diff --git a/extensions/execute-process/ExecuteProcess.h b/extensions/execute-process/ExecuteProcess.h index b5b606a29..44d2b59ab 100644 --- a/extensions/execute-process/ExecuteProcess.h +++ b/extensions/execute-process/ExecuteProcess.h @@ -82,13 +82,13 @@ class ExecuteProcess : public core::Processor { .withPropertyType(core::StandardPropertyTypes::BOOLEAN_TYPE) .withDefaultValue("false") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 5>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ Command, CommandArguments, WorkingDir, BatchDuration, RedirectErrorStream - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "All created FlowFiles are routed to this relationship."}; diff --git a/extensions/expression-language/tests/ProcessContextExprTests.cpp b/extensions/expression-language/tests/ProcessContextExprTests.cpp index bf8435080..bcd285e59 100644 --- a/extensions/expression-language/tests/ProcessContextExprTests.cpp +++ b/extensions/expression-language/tests/ProcessContextExprTests.cpp @@ -42,7 +42,7 @@ class DummyProcessor : public core::Processor { .withDescription("A property which supports expression language") .supportsExpressionLanguage(true) .build(); - static constexpr auto Properties = std::array<core::PropertyReference, 2>{SimpleProperty, ExpressionLanguageProperty}; + static constexpr auto Properties = std::to_array<core::PropertyReference>({SimpleProperty, ExpressionLanguageProperty}); static constexpr auto Relationships = std::array<core::RelationshipDefinition, 0>{}; static constexpr bool SupportsDynamicProperties = true; static constexpr bool SupportsDynamicRelationships = true; diff --git a/extensions/gcp/controllerservices/GCPCredentialsControllerService.h b/extensions/gcp/controllerservices/GCPCredentialsControllerService.h index 289f504b4..ded5f184d 100644 --- a/extensions/gcp/controllerservices/GCPCredentialsControllerService.h +++ b/extensions/gcp/controllerservices/GCPCredentialsControllerService.h @@ -16,6 +16,7 @@ */ #pragma once + #include <filesystem> #include <string> #include <memory> @@ -82,11 +83,11 @@ class GCPCredentialsControllerService : public core::controller::ControllerServi .isRequired(false) .isSensitive(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 3>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ CredentialsLoc, JsonFilePath, JsonContents - }; + }); EXTENSIONAPI static constexpr bool SupportsDynamicProperties = false; diff --git a/extensions/gcp/processors/DeleteGCSObject.h b/extensions/gcp/processors/DeleteGCSObject.h index 401e4d326..93e56ccb7 100644 --- a/extensions/gcp/processors/DeleteGCSObject.h +++ b/extensions/gcp/processors/DeleteGCSObject.h @@ -59,12 +59,12 @@ class DeleteGCSObject : public GCSProcessor { .withDescription("The generation of the Object to download. If left empty, then it will download the latest generation.") .supportsExpressionLanguage(true) .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(GCSProcessor::Properties, std::array<core::PropertyReference, 4>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(GCSProcessor::Properties, std::to_array<core::PropertyReference>({ Bucket, Key, EncryptionKey, ObjectGeneration - }); + })); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "FlowFiles are routed to this relationship after a successful Google Cloud Storage operation."}; diff --git a/extensions/gcp/processors/FetchGCSObject.h b/extensions/gcp/processors/FetchGCSObject.h index 67f142853..ab51ae5d2 100644 --- a/extensions/gcp/processors/FetchGCSObject.h +++ b/extensions/gcp/processors/FetchGCSObject.h @@ -61,12 +61,12 @@ class FetchGCSObject : public GCSProcessor { .withDescription("The generation of the Object to download. If left empty, then it will download the latest generation.") .supportsExpressionLanguage(true) .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(GCSProcessor::Properties, std::array<core::PropertyReference, 4>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(GCSProcessor::Properties, std::to_array<core::PropertyReference>({ Bucket, Key, EncryptionKey, ObjectGeneration - }); + })); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "FlowFiles are routed to this relationship after a successful Google Cloud Storage operation."}; diff --git a/extensions/gcp/processors/GCSProcessor.h b/extensions/gcp/processors/GCSProcessor.h index 543a98074..fae3bf547 100644 --- a/extensions/gcp/processors/GCSProcessor.h +++ b/extensions/gcp/processors/GCSProcessor.h @@ -56,11 +56,11 @@ class GCSProcessor : public core::Processor { .isRequired(false) .supportsExpressionLanguage(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 3>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ GCPCredentials, NumberOfRetries, EndpointOverrideURL - }; + }); void onSchedule(core::ProcessContext& context, core::ProcessSessionFactory& session_factory) override; diff --git a/extensions/gcp/processors/ListGCSBucket.h b/extensions/gcp/processors/ListGCSBucket.h index 97085408a..229385aa6 100644 --- a/extensions/gcp/processors/ListGCSBucket.h +++ b/extensions/gcp/processors/ListGCSBucket.h @@ -61,10 +61,10 @@ class ListGCSBucket : public GCSProcessor { .withPropertyType(core::StandardPropertyTypes::BOOLEAN_TYPE) .withDefaultValue("false") .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(GCSProcessor::Properties, std::array<core::PropertyReference, 2>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(GCSProcessor::Properties, std::to_array<core::PropertyReference>({ Bucket, ListAllVersions - }); + })); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "FlowFiles are routed to this relationship after a successful Google Cloud Storage operation."}; diff --git a/extensions/gcp/processors/PutGCSObject.h b/extensions/gcp/processors/PutGCSObject.h index 42a154150..dae546b94 100644 --- a/extensions/gcp/processors/PutGCSObject.h +++ b/extensions/gcp/processors/PutGCSObject.h @@ -122,7 +122,7 @@ class PutGCSObject : public GCSProcessor { .withPropertyType(core::StandardPropertyTypes::BOOLEAN_TYPE) .withDefaultValue("true") .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(GCSProcessor::Properties, std::array<core::PropertyReference, 8>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(GCSProcessor::Properties, std::to_array<core::PropertyReference>({ Bucket, Key, ContentType, @@ -131,7 +131,7 @@ class PutGCSObject : public GCSProcessor { EncryptionKey, ObjectACL, OverwriteObject - }); + })); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "Files that have been successfully written to Google Cloud Storage are transferred to this relationship"}; diff --git a/extensions/gps/GetGPS.h b/extensions/gps/GetGPS.h index 02ff09a69..12ddb30e4 100644 --- a/extensions/gps/GetGPS.h +++ b/extensions/gps/GetGPS.h @@ -59,11 +59,11 @@ class GetGPS : public core::Processor { .withPropertyType(core::StandardPropertyTypes::UNSIGNED_LONG_TYPE) .withDefaultValue("50000000") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 3>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ GPSDHost, GPSDPort, GPSDWaitTime - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "All files are routed to success"}; diff --git a/extensions/grafana-loki/PushGrafanaLoki.h b/extensions/grafana-loki/PushGrafanaLoki.h index d0d4a4972..5e6597cdd 100644 --- a/extensions/grafana-loki/PushGrafanaLoki.h +++ b/extensions/grafana-loki/PushGrafanaLoki.h @@ -80,7 +80,7 @@ class PushGrafanaLoki : public core::Processor { .withDescription("The SSL Context Service used to provide client certificate information for TLS/SSL (https) connections.") .withAllowedTypes<minifi::controllers::SSLContextService>() .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(std::array<core::PropertyReference, 9>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(std::to_array<core::PropertyReference>({ Url, StreamLabels, LogLineMetadataAttributes, @@ -90,7 +90,7 @@ class PushGrafanaLoki : public core::Processor { LogLineBatchSize, ConnectTimeout, SSLContextService - }); + })); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "All flowfiles that succeed in being transferred into Grafana Loki go here."}; EXTENSIONAPI static constexpr auto Failure = core::RelationshipDefinition{"failure", "If a submitted request fails all flow files in the batch are transferred to this relationship."}; diff --git a/extensions/grafana-loki/PushGrafanaLokiGrpc.h b/extensions/grafana-loki/PushGrafanaLokiGrpc.h index ec4b854f3..1817c0614 100644 --- a/extensions/grafana-loki/PushGrafanaLokiGrpc.h +++ b/extensions/grafana-loki/PushGrafanaLokiGrpc.h @@ -49,11 +49,11 @@ class PushGrafanaLokiGrpc : public PushGrafanaLoki { "if we run over the limit. Setting it to 0 allows sending pings without such a restriction. If not set, then the default value 2 is used.") .withPropertyType(core::StandardPropertyTypes::UNSIGNED_LONG_TYPE) .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(PushGrafanaLoki::Properties, std::array<core::PropertyReference, 3>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(PushGrafanaLoki::Properties, std::to_array<core::PropertyReference>({ KeepAliveTime, KeepAliveTimeout, MaxPingsWithoutData, - }); + })); void initialize() override; void onSchedule(core::ProcessContext& context, core::ProcessSessionFactory& session_factory) override; diff --git a/extensions/grafana-loki/PushGrafanaLokiREST.h b/extensions/grafana-loki/PushGrafanaLokiREST.h index eb8414a65..21757d804 100644 --- a/extensions/grafana-loki/PushGrafanaLokiREST.h +++ b/extensions/grafana-loki/PushGrafanaLokiREST.h @@ -48,12 +48,12 @@ class PushGrafanaLokiREST : public PushGrafanaLoki { EXTENSIONAPI static constexpr auto BearerTokenFile = core::PropertyDefinitionBuilder<>::createProperty("Bearer Token File") .withDescription("Path of file containing bearer token for bearer token authentication.") .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(PushGrafanaLoki::Properties, std::array<core::PropertyReference, 4>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(PushGrafanaLoki::Properties, std::to_array<core::PropertyReference>({ ReadTimeout, Username, Password, BearerTokenFile - }); + })); void initialize() override; void onSchedule(core::ProcessContext& context, core::ProcessSessionFactory& session_factory) override; diff --git a/extensions/kubernetes/controllerservice/KubernetesControllerService.h b/extensions/kubernetes/controllerservice/KubernetesControllerService.h index 64266b57d..ffe1f5046 100644 --- a/extensions/kubernetes/controllerservice/KubernetesControllerService.h +++ b/extensions/kubernetes/controllerservice/KubernetesControllerService.h @@ -48,11 +48,11 @@ class KubernetesControllerService : public AttributeProviderService { EXTENSIONAPI static constexpr auto ContainerNameFilter = core::PropertyDefinitionBuilder<>::createProperty("Container Name Filter") .withDescription("If present, limit the output to containers the name of which matches this regular expression") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 3>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ NamespaceFilter, PodNameFilter, ContainerNameFilter - }; + }); EXTENSIONAPI static constexpr bool SupportsDynamicProperties = false; diff --git a/extensions/kubernetes/processors/CollectKubernetesPodMetrics.h b/extensions/kubernetes/processors/CollectKubernetesPodMetrics.h index e9bc83018..37ebcf41b 100644 --- a/extensions/kubernetes/processors/CollectKubernetesPodMetrics.h +++ b/extensions/kubernetes/processors/CollectKubernetesPodMetrics.h @@ -39,7 +39,7 @@ class CollectKubernetesPodMetrics : public core::Processor { .withDescription("Controller service which provides Kubernetes functionality") .isRequired(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 1>{KubernetesControllerService}; + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({KubernetesControllerService}); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "All flow files produced are routed to Success."}; EXTENSIONAPI static constexpr auto Relationships = std::array{Success}; diff --git a/extensions/libarchive/BinFiles.h b/extensions/libarchive/BinFiles.h index 3dbb8fe86..ad2638254 100644 --- a/extensions/libarchive/BinFiles.h +++ b/extensions/libarchive/BinFiles.h @@ -219,7 +219,7 @@ class BinFiles : public core::Processor { .withPropertyType(core::StandardPropertyTypes::UNSIGNED_INT_TYPE) .withDefaultValue("1") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 7>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ MinSize, MaxSize, MinEntries, @@ -227,7 +227,7 @@ class BinFiles : public core::Processor { MaxBinCount, MaxBinAge, BatchSize - }; + }); EXTENSIONAPI static constexpr auto Failure = core::RelationshipDefinition{"failure", diff --git a/extensions/libarchive/CompressContent.h b/extensions/libarchive/CompressContent.h index a8d387a0d..99f6d792b 100644 --- a/extensions/libarchive/CompressContent.h +++ b/extensions/libarchive/CompressContent.h @@ -131,14 +131,14 @@ class CompressContent : public core::Processor { .withPropertyType(core::StandardPropertyTypes::UNSIGNED_INT_TYPE) .withDefaultValue("1") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 6>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ CompressMode, CompressLevel, CompressFormat, UpdateFileName, EncapsulateInTar, BatchSize - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "FlowFiles will be transferred to the success relationship after successfully being compressed or decompressed"}; diff --git a/extensions/libarchive/FocusArchiveEntry.h b/extensions/libarchive/FocusArchiveEntry.h index f08256ed7..09d54e06f 100644 --- a/extensions/libarchive/FocusArchiveEntry.h +++ b/extensions/libarchive/FocusArchiveEntry.h @@ -50,7 +50,7 @@ class FocusArchiveEntry : public core::Processor { EXTENSIONAPI static constexpr auto Path = core::PropertyDefinitionBuilder<>::createProperty("Path") .withDescription("The path within the archive to focus (\"/\" to focus the total archive)") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 1>{Path}; + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({Path}); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "success operational on the flow record"}; EXTENSIONAPI static constexpr auto Relationships = std::array{Success}; diff --git a/extensions/libarchive/ManipulateArchive.h b/extensions/libarchive/ManipulateArchive.h index 797295b45..ce6c0e5c3 100644 --- a/extensions/libarchive/ManipulateArchive.h +++ b/extensions/libarchive/ManipulateArchive.h @@ -60,13 +60,13 @@ class ManipulateArchive : public core::Processor { EXTENSIONAPI static constexpr auto After = core::PropertyDefinitionBuilder<>::createProperty("After") .withDescription("For operations which result in new entries, places the new entry after the entry specified by this property.") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 5>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ Operation, Target, Destination, Before, After - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "FlowFiles will be transferred to the success relationship if the operation succeeds."}; diff --git a/extensions/libarchive/MergeContent.h b/extensions/libarchive/MergeContent.h index af6f1c9c1..e1e7c6273 100644 --- a/extensions/libarchive/MergeContent.h +++ b/extensions/libarchive/MergeContent.h @@ -358,7 +358,7 @@ class MergeContent : public processors::BinFiles { .withAllowedValues({merge_content_options::ATTRIBUTE_STRATEGY_KEEP_COMMON, merge_content_options::ATTRIBUTE_STRATEGY_KEEP_ALL_UNIQUE}) .withDefaultValue(merge_content_options::ATTRIBUTE_STRATEGY_KEEP_COMMON) .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(BinFiles::Properties, std::array<core::PropertyReference, 9>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(BinFiles::Properties, std::to_array<core::PropertyReference>({ MergeStrategy, MergeFormat, CorrelationAttributeName, @@ -368,7 +368,7 @@ class MergeContent : public processors::BinFiles { Footer, Demarcator, AttributeStrategy - }); + })); EXTENSIONAPI static constexpr auto Merge = core::RelationshipDefinition{"merged", "The FlowFile containing the merged content"}; diff --git a/extensions/librdkafka/ConsumeKafka.h b/extensions/librdkafka/ConsumeKafka.h index 11c63ee7f..a8c820c36 100644 --- a/extensions/librdkafka/ConsumeKafka.h +++ b/extensions/librdkafka/ConsumeKafka.h @@ -190,7 +190,7 @@ class ConsumeKafka : public KafkaProcessorBase { .withPropertyType(core::StandardPropertyTypes::TIME_PERIOD_TYPE) .withDefaultValue("60 seconds") .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(KafkaProcessorBase::Properties, std::array<core::PropertyReference, 14>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(KafkaProcessorBase::Properties, std::to_array<core::PropertyReference>({ KafkaBrokers, TopicNames, TopicNameFormat, @@ -205,7 +205,7 @@ class ConsumeKafka : public KafkaProcessorBase { MaxPollRecords, MaxPollTime, SessionTimeout - }); + })); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", diff --git a/extensions/librdkafka/KafkaProcessorBase.h b/extensions/librdkafka/KafkaProcessorBase.h index 9d0994022..952865554 100644 --- a/extensions/librdkafka/KafkaProcessorBase.h +++ b/extensions/librdkafka/KafkaProcessorBase.h @@ -79,7 +79,7 @@ class KafkaProcessorBase : public core::Processor { .withDescription("The password for the given username when the SASL Mechanism is sasl_plaintext") .isSensitive(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 8>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ SSLContextService, SecurityProtocol, KerberosServiceName, @@ -88,7 +88,7 @@ class KafkaProcessorBase : public core::Processor { SASLMechanism, Username, Password - }; + }); KafkaProcessorBase(std::string_view name, const utils::Identifier& uuid, std::shared_ptr<core::logging::Logger> logger) diff --git a/extensions/librdkafka/PublishKafka.h b/extensions/librdkafka/PublishKafka.h index 3a8c156fd..df38820ec 100644 --- a/extensions/librdkafka/PublishKafka.h +++ b/extensions/librdkafka/PublishKafka.h @@ -179,7 +179,7 @@ class PublishKafka : public KafkaProcessorBase { .withPropertyType(core::StandardPropertyTypes::BOOLEAN_TYPE) .withDefaultValue("true") .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(KafkaProcessorBase::Properties, std::array<core::PropertyReference, 23>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(KafkaProcessorBase::Properties, std::to_array<core::PropertyReference>({ SeedBrokers, Topic, DeliveryGuarantee, @@ -203,7 +203,7 @@ class PublishKafka : public KafkaProcessorBase { MessageKeyField, DebugContexts, FailEmptyFlowFiles - }); + })); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "Any FlowFile that is successfully sent to Kafka will be routed to this Relationship"}; diff --git a/extensions/mqtt/processors/AbstractMQTTProcessor.h b/extensions/mqtt/processors/AbstractMQTTProcessor.h index 18d9d508a..4b957a23b 100644 --- a/extensions/mqtt/processors/AbstractMQTTProcessor.h +++ b/extensions/mqtt/processors/AbstractMQTTProcessor.h @@ -166,12 +166,12 @@ class AbstractMQTTProcessor : public core::Processor { .withDescription("Private key passphrase") .isSensitive(true) .build(); - EXTENSIONAPI static constexpr auto BasicProperties = std::array<core::PropertyReference, 3>{ + EXTENSIONAPI static constexpr auto BasicProperties = std::to_array<core::PropertyReference>({ BrokerURI, ClientID, MqttVersion - }; - EXTENSIONAPI static constexpr auto AdvancedProperties = std::array<core::PropertyReference, 15>{ + }); + EXTENSIONAPI static constexpr auto AdvancedProperties = std::to_array<core::PropertyReference>({ QoS, ConnectionTimeout, KeepAliveInterval, @@ -187,7 +187,7 @@ class AbstractMQTTProcessor : public core::Processor { SecurityCert, SecurityPrivateKey, SecurityPrivateKeyPassword - }; + }); void onSchedule(core::ProcessContext& context, core::ProcessSessionFactory& factory) override; void onTrigger(core::ProcessContext& context, core::ProcessSession& session) override; diff --git a/extensions/mqtt/processors/ConsumeMQTT.h b/extensions/mqtt/processors/ConsumeMQTT.h index 0b694a54f..857555726 100644 --- a/extensions/mqtt/processors/ConsumeMQTT.h +++ b/extensions/mqtt/processors/ConsumeMQTT.h @@ -83,7 +83,7 @@ class ConsumeMQTT : public processors::AbstractMQTTProcessor { .withPropertyType(core::StandardPropertyTypes::UNSIGNED_INT_TYPE) .withDefaultValue(MQTT_MAX_RECEIVE_MAXIMUM_STR) .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AbstractMQTTProcessor::BasicProperties, std::array<core::PropertyReference, 8>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AbstractMQTTProcessor::BasicProperties, std::to_array<core::PropertyReference>({ Topic, CleanSession, CleanStart, @@ -92,7 +92,7 @@ class ConsumeMQTT : public processors::AbstractMQTTProcessor { AttributeFromContentType, TopicAliasMaximum, ReceiveMaximum - }, AbstractMQTTProcessor::AdvancedProperties); + }), AbstractMQTTProcessor::AdvancedProperties); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "FlowFiles that are sent successfully to the destination are transferred to this relationship"}; EXTENSIONAPI static constexpr auto Relationships = std::array{Success}; diff --git a/extensions/mqtt/processors/PublishMQTT.h b/extensions/mqtt/processors/PublishMQTT.h index bd323426f..8e8d09bc1 100644 --- a/extensions/mqtt/processors/PublishMQTT.h +++ b/extensions/mqtt/processors/PublishMQTT.h @@ -64,12 +64,12 @@ class PublishMQTT : public processors::AbstractMQTTProcessor { .withDescription("Content type of the message. MQTT 5.x only.") .supportsExpressionLanguage(true) .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AbstractMQTTProcessor::BasicProperties, std::array<core::PropertyReference, 4>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(AbstractMQTTProcessor::BasicProperties, std::to_array<core::PropertyReference>({ Topic, Retain, MessageExpiryInterval, ContentType - }, AbstractMQTTProcessor::AdvancedProperties); + }), AbstractMQTTProcessor::AdvancedProperties); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "FlowFiles that are sent successfully to the destination are transferred to this relationship"}; EXTENSIONAPI static constexpr auto Failure = core::RelationshipDefinition{"failure", "FlowFiles that failed to be sent to the destination are transferred to this relationship"}; diff --git a/extensions/opc/include/fetchopc.h b/extensions/opc/include/fetchopc.h index 06c4feafc..0edfcc0d7 100644 --- a/extensions/opc/include/fetchopc.h +++ b/extensions/opc/include/fetchopc.h @@ -73,13 +73,13 @@ class FetchOPCProcessor : public BaseOPCProcessor { .isRequired(true) .withAllowedValues({"On", "Off"}) .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(BaseOPCProcessor::Properties, std::array<core::PropertyReference, 5>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(BaseOPCProcessor::Properties, std::to_array<core::PropertyReference>({ NodeIDType, NodeID, NameSpaceIndex, MaxDepth, Lazy - }); + })); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "Successfully retrieved OPC-UA nodes"}; diff --git a/extensions/opc/include/opcbase.h b/extensions/opc/include/opcbase.h index ca41a06dc..2fc5ff90d 100644 --- a/extensions/opc/include/opcbase.h +++ b/extensions/opc/include/opcbase.h @@ -58,7 +58,7 @@ class BaseOPCProcessor : public core::Processor { EXTENSIONAPI static constexpr auto TrustedPath = core::PropertyDefinitionBuilder<>::createProperty("Trusted server certificate path") .withDescription("Path to the DER-encoded trusted server certificate") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 7>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ OPCServerEndPoint, ApplicationURI, Username, @@ -66,7 +66,7 @@ class BaseOPCProcessor : public core::Processor { CertificatePath, KeyPath, TrustedPath - }; + }); explicit BaseOPCProcessor(std::string_view name, const utils::Identifier& uuid = {}) diff --git a/extensions/opc/include/putopc.h b/extensions/opc/include/putopc.h index df4f51970..849ad6e75 100644 --- a/extensions/opc/include/putopc.h +++ b/extensions/opc/include/putopc.h @@ -76,7 +76,7 @@ class PutOPCProcessor : public BaseOPCProcessor { .withDescription("The index of the namespace. Used only if node ID type is not path.") .supportsExpressionLanguage(true) .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(BaseOPCProcessor::Properties, std::array<core::PropertyReference, 8>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(BaseOPCProcessor::Properties, std::to_array<core::PropertyReference>({ ParentNodeIDType, ParentNodeID, ParentNameSpaceIndex, @@ -85,7 +85,7 @@ class PutOPCProcessor : public BaseOPCProcessor { TargetNodeID, TargetNodeBrowseName, TargetNodeNameSpaceIndex - }); + })); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "Successfully put OPC-UA node"}; diff --git a/extensions/opencv/CaptureRTSPFrame.h b/extensions/opencv/CaptureRTSPFrame.h index 490c285ea..5c8d068d3 100644 --- a/extensions/opencv/CaptureRTSPFrame.h +++ b/extensions/opencv/CaptureRTSPFrame.h @@ -63,14 +63,14 @@ class CaptureRTSPFrame : public core::Processor { .withDescription("The encoding that should be applied the the frame images captured from the RTSP stream") .withDefaultValue(".jpg") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 6>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ RTSPUsername, RTSPPassword, RTSPHostname, RTSPURI, RTSPPort, ImageEncoding - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "Successful capture of RTSP frame"}; diff --git a/extensions/opencv/MotionDetector.h b/extensions/opencv/MotionDetector.h index 17c431da1..55a9c2c30 100644 --- a/extensions/opencv/MotionDetector.h +++ b/extensions/opencv/MotionDetector.h @@ -69,13 +69,13 @@ class MotionDetector : public core::Processor { .withDescription("If not provided then the processor will take the first input frame as background") .isRequired(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 5>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ ImageEncoding, MinInterestArea, Threshold, DilateIter, BackgroundFrame - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "Successful to detect motion"}; diff --git a/extensions/pdh/PerformanceDataMonitor.h b/extensions/pdh/PerformanceDataMonitor.h index be8f986bc..867643c44 100644 --- a/extensions/pdh/PerformanceDataMonitor.h +++ b/extensions/pdh/PerformanceDataMonitor.h @@ -82,13 +82,13 @@ class PerformanceDataMonitor : public core::Processor { .withDescription("The number of decimal places to round the values to (blank for no rounding)") .withDefaultValue("") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 5>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ PredefinedGroups, CustomPDHCounters, OutputFormatProperty, OutputCompactness, DecimalPlaces - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "All files are routed to success"}; diff --git a/extensions/procfs/processors/ProcFsMonitor.h b/extensions/procfs/processors/ProcFsMonitor.h index cc3b21592..0f25ea76d 100644 --- a/extensions/procfs/processors/ProcFsMonitor.h +++ b/extensions/procfs/processors/ProcFsMonitor.h @@ -83,12 +83,12 @@ class ProcFsMonitor : public core::Processor { .withDefaultValue(magic_enum::enum_name(ResultRelativeness::Absolute)) .isRequired(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 4>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ OutputFormatProperty, OutputCompactnessProperty, DecimalPlaces, ResultRelativenessProperty - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "All files are routed to success"}; diff --git a/extensions/python/ExecutePythonProcessor.h b/extensions/python/ExecutePythonProcessor.h index a244c910c..b87a5ee47 100644 --- a/extensions/python/ExecutePythonProcessor.h +++ b/extensions/python/ExecutePythonProcessor.h @@ -68,12 +68,12 @@ class ExecutePythonProcessor : public core::Processor { .withPropertyType(core::StandardPropertyTypes::BOOLEAN_TYPE) .withDefaultValue("true") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 4>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ ScriptFile, ScriptBody, ModuleDirectory, ReloadOnScriptChange - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "Script succeeds"}; diff --git a/extensions/rocksdb-repos/controllers/RocksDbStateStorage.h b/extensions/rocksdb-repos/controllers/RocksDbStateStorage.h index 03c568125..c1dc81e12 100644 --- a/extensions/rocksdb-repos/controllers/RocksDbStateStorage.h +++ b/extensions/rocksdb-repos/controllers/RocksDbStateStorage.h @@ -61,11 +61,11 @@ class RocksDbStateStorage : public KeyValueStateStorage { .withDescription("Path to a directory for the database") .isRequired(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 3>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ AlwaysPersist, AutoPersistenceInterval, Directory - }; + }); EXTENSIONAPI static constexpr bool SupportsDynamicProperties = false; diff --git a/extensions/script/ExecuteScript.h b/extensions/script/ExecuteScript.h index 56378e280..6a38651ee 100644 --- a/extensions/script/ExecuteScript.h +++ b/extensions/script/ExecuteScript.h @@ -72,12 +72,12 @@ class ExecuteScript : public core::Processor { EXTENSIONAPI static constexpr auto ModuleDirectory = core::PropertyDefinitionBuilder<>::createProperty("Module Directory") .withDescription(R"(Comma-separated list of paths to files and/or directories which contain modules required by the script)") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 4>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ ScriptEngine, ScriptFile, ScriptBody, ModuleDirectory - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "Script successes"}; diff --git a/extensions/sftp/processors/FetchSFTP.h b/extensions/sftp/processors/FetchSFTP.h index 00f106f5a..021a56544 100644 --- a/extensions/sftp/processors/FetchSFTP.h +++ b/extensions/sftp/processors/FetchSFTP.h @@ -92,14 +92,14 @@ class FetchSFTP : public SFTPProcessorBase { .withDefaultValue("false") .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(SFTPProcessorBase::Properties, std::array<core::PropertyReference, 6>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(SFTPProcessorBase::Properties, std::to_array<core::PropertyReference>({ RemoteFile, CompletionStrategy, MoveDestinationDirectory, CreateDirectory, DisableDirectoryListing, UseCompression - }); + })); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", diff --git a/extensions/sftp/processors/ListSFTP.h b/extensions/sftp/processors/ListSFTP.h index 824830d14..30055b7bc 100644 --- a/extensions/sftp/processors/ListSFTP.h +++ b/extensions/sftp/processors/ListSFTP.h @@ -156,7 +156,7 @@ class ListSFTP : public SFTPProcessorBase { .withDescription("The maximum size that a file must be in order to be pulled") .isRequired(false) .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(SFTPProcessorBase::Properties, std::array<core::PropertyReference, 14>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(SFTPProcessorBase::Properties, std::to_array<core::PropertyReference>({ ListingStrategy, RemotePath, SearchRecursively, @@ -171,7 +171,7 @@ class ListSFTP : public SFTPProcessorBase { MaximumFileAge, MinimumFileSize, MaximumFileSize - }); + })); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "All FlowFiles that are received are routed to success"}; diff --git a/extensions/sftp/processors/PutSFTP.h b/extensions/sftp/processors/PutSFTP.h index 5188e578c..4d5dc2b94 100644 --- a/extensions/sftp/processors/PutSFTP.h +++ b/extensions/sftp/processors/PutSFTP.h @@ -153,7 +153,7 @@ class PutSFTP : public SFTPProcessorBase { .withPropertyType(core::StandardPropertyTypes::BOOLEAN_TYPE) .withDefaultValue("false") .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(SFTPProcessorBase::Properties, std::array<core::PropertyReference, 13>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(SFTPProcessorBase::Properties, std::to_array<core::PropertyReference>({ RemotePath, CreateDirectory, DisableDirectoryListing, @@ -167,7 +167,7 @@ class PutSFTP : public SFTPProcessorBase { RemoteOwner, RemoteGroup, UseCompression - }); + })); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "FlowFiles that are successfully sent will be routed to success"}; diff --git a/extensions/sftp/processors/SFTPProcessorBase.h b/extensions/sftp/processors/SFTPProcessorBase.h index e3a1b96c4..f30b0f21a 100644 --- a/extensions/sftp/processors/SFTPProcessorBase.h +++ b/extensions/sftp/processors/SFTPProcessorBase.h @@ -135,7 +135,7 @@ class SFTPProcessorBase : public core::Processor { .supportsExpressionLanguage(true) .isSensitive(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 16>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ Hostname, Port, Username, @@ -152,7 +152,7 @@ class SFTPProcessorBase : public core::Processor { ProxyPort, HttpProxyUsername, HttpProxyPassword - }; + }); void notifyStop() override; diff --git a/extensions/smb/FetchSmb.h b/extensions/smb/FetchSmb.h index 62a4a618b..7b50c6595 100644 --- a/extensions/smb/FetchSmb.h +++ b/extensions/smb/FetchSmb.h @@ -56,10 +56,10 @@ class FetchSmb : public core::Processor { .isRequired(false) .supportsExpressionLanguage(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 2>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ ConnectionControllerService, RemoteFile - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "A flowfile will be routed here for each successfully fetched file."}; EXTENSIONAPI static constexpr auto Failure = core::RelationshipDefinition{"failure", "A flowfile will be routed here when failed to fetch its content."}; diff --git a/extensions/smb/ListSmb.h b/extensions/smb/ListSmb.h index 238adc927..ddb4409fd 100644 --- a/extensions/smb/ListSmb.h +++ b/extensions/smb/ListSmb.h @@ -93,7 +93,7 @@ class ListSmb : public core::Processor { .isRequired(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 10>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ ConnectionControllerService, InputDirectory, RecurseSubdirectories, @@ -104,7 +104,7 @@ class ListSmb : public core::Processor { MinimumFileSize, MaximumFileSize, IgnoreHiddenFiles - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "All FlowFiles that are received are routed to success"}; EXTENSIONAPI static constexpr auto Relationships = std::array{Success}; diff --git a/extensions/smb/PutSmb.h b/extensions/smb/PutSmb.h index bde5b460d..c25e38f33 100644 --- a/extensions/smb/PutSmb.h +++ b/extensions/smb/PutSmb.h @@ -66,7 +66,7 @@ class PutSmb : public core::Processor { .withDependentProperties({Directory.name}) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 4>{ ConnectionControllerService, Directory, ConflictResolution, CreateMissingDirectories}; + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ ConnectionControllerService, Directory, ConflictResolution, CreateMissingDirectories}); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "All files are routed to success"}; EXTENSIONAPI static constexpr auto Failure = core::RelationshipDefinition{"failure", "Failed files (conflict, write failure, etc.) are transferred to failure"}; diff --git a/extensions/smb/SmbConnectionControllerService.h b/extensions/smb/SmbConnectionControllerService.h index a3b1cecab..ae05c62ba 100644 --- a/extensions/smb/SmbConnectionControllerService.h +++ b/extensions/smb/SmbConnectionControllerService.h @@ -59,13 +59,13 @@ class SmbConnectionControllerService : public core::controller::ControllerServic .isSensitive(true) .build(); - static constexpr auto Properties = std::array<core::PropertyReference, 5>{ + static constexpr auto Properties = std::to_array<core::PropertyReference>({ Hostname, Share, Domain, Username, Password - }; + }); EXTENSIONAPI static constexpr bool SupportsDynamicProperties = false; ADD_COMMON_VIRTUAL_FUNCTIONS_FOR_CONTROLLER_SERVICES diff --git a/extensions/splunk/PutSplunkHTTP.h b/extensions/splunk/PutSplunkHTTP.h index 06580f388..8fbda961c 100644 --- a/extensions/splunk/PutSplunkHTTP.h +++ b/extensions/splunk/PutSplunkHTTP.h @@ -82,13 +82,13 @@ class PutSplunkHTTP final : public SplunkHECProcessor { "In case of neither of them is specified, this information will not be sent to the server.") .supportsExpressionLanguage(true) .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(SplunkHECProcessor::Properties, std::array<core::PropertyReference, 5>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(SplunkHECProcessor::Properties, std::to_array<core::PropertyReference>({ Source, SourceType, Host, Index, ContentType - }); + })); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "FlowFiles that are sent successfully to the destination are sent to this relationship."}; diff --git a/extensions/splunk/QuerySplunkIndexingStatus.h b/extensions/splunk/QuerySplunkIndexingStatus.h index 9a7bc2d8c..88a199c88 100644 --- a/extensions/splunk/QuerySplunkIndexingStatus.h +++ b/extensions/splunk/QuerySplunkIndexingStatus.h @@ -83,10 +83,10 @@ class QuerySplunkIndexingStatus final : public SplunkHECProcessor { .withDefaultValue("1000") .isRequired(true) .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(SplunkHECProcessor::Properties, std::array<core::PropertyReference, 2>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(SplunkHECProcessor::Properties, std::to_array<core::PropertyReference>({ MaximumWaitingTime, MaxQuerySize - }); + })); EXTENSIONAPI static constexpr auto Acknowledged = core::RelationshipDefinition{"acknowledged", diff --git a/extensions/splunk/SplunkHECProcessor.h b/extensions/splunk/SplunkHECProcessor.h index 398921c51..47cc902a5 100644 --- a/extensions/splunk/SplunkHECProcessor.h +++ b/extensions/splunk/SplunkHECProcessor.h @@ -61,13 +61,13 @@ class SplunkHECProcessor : public core::Processor { .withExclusiveOfProperties({{{"Hostname", "^http:.*$"}}}) .withAllowedTypes<minifi::controllers::SSLContextService>() .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 5>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ Hostname, Port, Token, SplunkRequestChannel, SSLContext - }; + }); explicit SplunkHECProcessor(std::string_view name, const utils::Identifier& uuid = {}) diff --git a/extensions/sql/processors/ExecuteSQL.h b/extensions/sql/processors/ExecuteSQL.h index bea85db41..8a6e9ccce 100644 --- a/extensions/sql/processors/ExecuteSQL.h +++ b/extensions/sql/processors/ExecuteSQL.h @@ -51,7 +51,7 @@ class ExecuteSQL : public SQLProcessor, public FlowFileSource { "Note that Expression Language is not evaluated for flow file contents.") .supportsExpressionLanguage(true) .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(SQLProcessor::Properties, FlowFileSource::Properties, std::array<core::PropertyReference, 1>{SQLSelectQuery}); + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(SQLProcessor::Properties, FlowFileSource::Properties, std::to_array<core::PropertyReference>({SQLSelectQuery})); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "Successfully created FlowFile from SQL query result set."}; EXTENSIONAPI static constexpr auto Failure = core::RelationshipDefinition{"failure", "Flow files containing malformed sql statements"}; diff --git a/extensions/sql/processors/FlowFileSource.h b/extensions/sql/processors/FlowFileSource.h index f453f057d..19310eba4 100644 --- a/extensions/sql/processors/FlowFileSource.h +++ b/extensions/sql/processors/FlowFileSource.h @@ -75,7 +75,7 @@ class FlowFileSource { .withPropertyType(core::StandardPropertyTypes::UNSIGNED_LONG_TYPE) .withDefaultValue("0") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 2>{OutputFormat, MaxRowsPerFlowFile}; + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({OutputFormat, MaxRowsPerFlowFile}); protected: class FlowFileGenerator : public sql::SQLRowSubscriber { diff --git a/extensions/sql/processors/PutSQL.h b/extensions/sql/processors/PutSQL.h index 35fa47cf0..8acb06863 100644 --- a/extensions/sql/processors/PutSQL.h +++ b/extensions/sql/processors/PutSQL.h @@ -48,7 +48,7 @@ class PutSQL : public SQLProcessor { .isRequired(false) .supportsExpressionLanguage(true) .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(SQLProcessor::Properties, std::array<core::PropertyReference, 1>{SQLStatement}); + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(SQLProcessor::Properties, std::to_array<core::PropertyReference>({SQLStatement})); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "After a successful SQL update operation, the incoming FlowFile sent here"}; EXTENSIONAPI static constexpr auto Failure = core::RelationshipDefinition{"failure", "Flow files that contain malformed sql statements"}; diff --git a/extensions/sql/processors/QueryDatabaseTable.h b/extensions/sql/processors/QueryDatabaseTable.h index 571ecfe20..7a8206038 100644 --- a/extensions/sql/processors/QueryDatabaseTable.h +++ b/extensions/sql/processors/QueryDatabaseTable.h @@ -82,12 +82,12 @@ class QueryDatabaseTable: public SQLProcessor, public FlowFileSource { .isRequired(false) .supportsExpressionLanguage(true) .build(); - EXTENSIONAPI static constexpr auto Properties = utils::array_cat(SQLProcessor::Properties, FlowFileSource::Properties, std::array<core::PropertyReference, 4>{ + EXTENSIONAPI static constexpr auto Properties = utils::array_cat(SQLProcessor::Properties, FlowFileSource::Properties, std::to_array<core::PropertyReference>({ TableName, ColumnNames, MaxValueColumnNames, WhereClause - }); + })); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "Successfully created FlowFile from SQL query result set."}; diff --git a/extensions/sql/processors/SQLProcessor.h b/extensions/sql/processors/SQLProcessor.h index cff3aa41f..c6ce3b5aa 100644 --- a/extensions/sql/processors/SQLProcessor.h +++ b/extensions/sql/processors/SQLProcessor.h @@ -38,7 +38,7 @@ class SQLProcessor: public core::Processor { .isRequired(true) .supportsExpressionLanguage(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 1>{DBControllerService}; + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({DBControllerService}); protected: SQLProcessor(std::string_view name, const utils::Identifier& uuid, std::shared_ptr<core::logging::Logger> logger) diff --git a/extensions/sql/services/DatabaseService.h b/extensions/sql/services/DatabaseService.h index c27aa1d2b..043d0418c 100644 --- a/extensions/sql/services/DatabaseService.h +++ b/extensions/sql/services/DatabaseService.h @@ -57,7 +57,7 @@ class DatabaseService : public core::controller::ControllerService { .isRequired(true) .isSensitive(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 1>{ConnectionString}; + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ConnectionString}); void initialize() override; diff --git a/extensions/standard-processors/controllers/JsonRecordSetWriter.h b/extensions/standard-processors/controllers/JsonRecordSetWriter.h index 5c2c05a78..8da60ab8d 100644 --- a/extensions/standard-processors/controllers/JsonRecordSetWriter.h +++ b/extensions/standard-processors/controllers/JsonRecordSetWriter.h @@ -78,9 +78,9 @@ class JsonRecordSetWriter final : public core::RecordSetWriter { .withDefaultValue("false") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 2>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ OutputGrouping, PrettyPrint - }; + }); EXTENSIONAPI static constexpr bool SupportsDynamicProperties = false; ADD_COMMON_VIRTUAL_FUNCTIONS_FOR_CONTROLLER_SERVICES diff --git a/extensions/standard-processors/controllers/PersistentMapStateStorage.h b/extensions/standard-processors/controllers/PersistentMapStateStorage.h index 90d079079..065fcca41 100644 --- a/extensions/standard-processors/controllers/PersistentMapStateStorage.h +++ b/extensions/standard-processors/controllers/PersistentMapStateStorage.h @@ -60,11 +60,11 @@ class PersistentMapStateStorage : public KeyValueStateStorage { .withDescription("Path to a file to store state") .isRequired(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 3>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ AlwaysPersist, AutoPersistenceInterval, File - }; + }); EXTENSIONAPI static constexpr bool SupportsDynamicProperties = false; diff --git a/extensions/standard-processors/controllers/VolatileMapStateStorage.h b/extensions/standard-processors/controllers/VolatileMapStateStorage.h index a506685d4..2e8c8f064 100644 --- a/extensions/standard-processors/controllers/VolatileMapStateStorage.h +++ b/extensions/standard-processors/controllers/VolatileMapStateStorage.h @@ -43,7 +43,7 @@ class VolatileMapStateStorage : virtual public KeyValueStateStorage { EXTENSIONAPI static constexpr auto LinkedServices = core::PropertyDefinitionBuilder<>::createProperty("Linked Services") .withDescription("Referenced Controller Services") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 1>{LinkedServices}; + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({LinkedServices}); EXTENSIONAPI static constexpr bool SupportsDynamicProperties = false; ADD_COMMON_VIRTUAL_FUNCTIONS_FOR_CONTROLLER_SERVICES diff --git a/extensions/standard-processors/modbus/FetchModbusTcp.h b/extensions/standard-processors/modbus/FetchModbusTcp.h index b0e0a4a8d..847cb885a 100644 --- a/extensions/standard-processors/modbus/FetchModbusTcp.h +++ b/extensions/standard-processors/modbus/FetchModbusTcp.h @@ -86,7 +86,7 @@ class FetchModbusTcp final : public core::Processor { .withAllowedTypes<core::RecordSetWriter>() .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 8>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ Hostname, Port, UnitIdentifier, @@ -95,7 +95,7 @@ class FetchModbusTcp final : public core::Processor { Timeout, SSLContextService, RecordSetWriter - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "Successfully processed"}; EXTENSIONAPI static constexpr auto Failure = core::RelationshipDefinition{"failure", "An error occurred processing"}; diff --git a/extensions/standard-processors/processors/AppendHostInfo.h b/extensions/standard-processors/processors/AppendHostInfo.h index 4f6b413c1..f2a91e0c6 100644 --- a/extensions/standard-processors/processors/AppendHostInfo.h +++ b/extensions/standard-processors/processors/AppendHostInfo.h @@ -65,12 +65,12 @@ class AppendHostInfo : public core::Processor { .withAllowedValues({ REFRESH_POLICY_ON_SCHEDULE, REFRESH_POLICY_ON_TRIGGER }) .withDefaultValue(REFRESH_POLICY_ON_SCHEDULE) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 4>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ InterfaceNameFilter, HostAttribute, IPAttribute, RefreshPolicy - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "success operational on the flow record"}; diff --git a/extensions/standard-processors/processors/AttributeRollingWindow.h b/extensions/standard-processors/processors/AttributeRollingWindow.h index eeeac2321..a1a74cf26 100644 --- a/extensions/standard-processors/processors/AttributeRollingWindow.h +++ b/extensions/standard-processors/processors/AttributeRollingWindow.h @@ -66,12 +66,12 @@ class AttributeRollingWindow final : public core::AbstractProcessor<AttributeRol .isRequired(true) .withDefaultValue("rolling.window.") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 4>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ ValueToTrack, TimeWindow, WindowLength, AttributeNamePrefix - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "All FlowFiles that are " "successfully processed are routed to this relationship."}; diff --git a/extensions/standard-processors/processors/AttributesToJSON.h b/extensions/standard-processors/processors/AttributesToJSON.h index 4cd98f7d8..b7c4568fc 100644 --- a/extensions/standard-processors/processors/AttributesToJSON.h +++ b/extensions/standard-processors/processors/AttributesToJSON.h @@ -97,13 +97,13 @@ class AttributesToJSON : public core::Processor { .withPropertyType(core::StandardPropertyTypes::BOOLEAN_TYPE) .withDefaultValue("false") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 5>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ AttributesList, AttributesRegularExpression, Destination, IncludeCoreAttributes, NullValue - }; + }); EXTENSIONAPI static constexpr core::RelationshipDefinition Success{"success", "All FlowFiles received are routed to success"}; diff --git a/extensions/standard-processors/processors/DefragmentText.h b/extensions/standard-processors/processors/DefragmentText.h index 7b0ce89bc..9d75526ed 100644 --- a/extensions/standard-processors/processors/DefragmentText.h +++ b/extensions/standard-processors/processors/DefragmentText.h @@ -86,12 +86,12 @@ class DefragmentText : public core::Processor { .withDescription("The maximum buffer size, if the buffer exceeds this, it will be transferred to failure. Expected format is <size> <data unit>") .withPropertyType(core::StandardPropertyTypes::DATA_SIZE_TYPE) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 4>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ Pattern, PatternLoc, MaxBufferAge, MaxBufferSize - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "Flowfiles that have been successfully defragmented"}; diff --git a/extensions/standard-processors/processors/ExtractText.h b/extensions/standard-processors/processors/ExtractText.h index 7b21ff172..8dd5f34e6 100644 --- a/extensions/standard-processors/processors/ExtractText.h +++ b/extensions/standard-processors/processors/ExtractText.h @@ -85,7 +85,7 @@ class ExtractText : public core::Processor { .withPropertyType(core::StandardPropertyTypes::BOOLEAN_TYPE) .withDefaultValue("false") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 7>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ Attribute, SizeLimit, RegexMode, @@ -93,7 +93,7 @@ class ExtractText : public core::Processor { InsensitiveMatch, MaxCaptureGroupLen, EnableRepeatingCaptureGroup - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "success operational on the flow record"}; diff --git a/extensions/standard-processors/processors/FetchFile.h b/extensions/standard-processors/processors/FetchFile.h index fde991a0a..d6dcfb49f 100644 --- a/extensions/standard-processors/processors/FetchFile.h +++ b/extensions/standard-processors/processors/FetchFile.h @@ -128,14 +128,14 @@ class FetchFile : public core::Processor { .withAllowedValues(magic_enum::enum_names<utils::LogUtils::LogLevelOption>()) .isRequired(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 6>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ FileToFetch, CompletionStrategy, MoveDestinationDirectory, MoveConflictStrategy, LogLevelWhenFileNotFound, LogLevelWhenPermissionDenied - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", diff --git a/extensions/standard-processors/processors/GenerateFlowFile.h b/extensions/standard-processors/processors/GenerateFlowFile.h index 5762a8049..cad866caf 100644 --- a/extensions/standard-processors/processors/GenerateFlowFile.h +++ b/extensions/standard-processors/processors/GenerateFlowFile.h @@ -78,13 +78,13 @@ class GenerateFlowFile : public core::Processor { "Finally, if Expression Language is used, evaluation will be performed only once per batch of generated FlowFiles") .supportsExpressionLanguage(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 5>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ FileSize, BatchSize, DataFormat, UniqueFlowFiles, CustomText - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "success operational on the flow record"}; EXTENSIONAPI static constexpr auto Relationships = std::array{Success}; diff --git a/extensions/standard-processors/processors/GetFile.h b/extensions/standard-processors/processors/GetFile.h index ef4f0690e..6cd55d2f3 100644 --- a/extensions/standard-processors/processors/GetFile.h +++ b/extensions/standard-processors/processors/GetFile.h @@ -147,7 +147,7 @@ class GetFile : public core::Processor { .withDescription("Only files whose names match the given regular expression will be picked up") .withDefaultValue(".*") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 11>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ Directory, Recurse, KeepSourceFile, @@ -159,7 +159,7 @@ class GetFile : public core::Processor { PollInterval, BatchSize, FileFilter - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "All files are routed to success"}; diff --git a/extensions/standard-processors/processors/GetTCP.h b/extensions/standard-processors/processors/GetTCP.h index 5fe9e0979..59cffee84 100644 --- a/extensions/standard-processors/processors/GetTCP.h +++ b/extensions/standard-processors/processors/GetTCP.h @@ -106,7 +106,7 @@ class GetTCP : public core::Processor { .isRequired(true) .supportsExpressionLanguage(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 8>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ EndpointList, SSLContextService, MessageDelimiter, @@ -115,7 +115,7 @@ class GetTCP : public core::Processor { MaxBatchSize, Timeout, ReconnectInterval - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "All files are routed to success"}; EXTENSIONAPI static constexpr auto Partial = core::RelationshipDefinition{"partial", "Indicates an incomplete message as a result of encountering the end of message byte trigger"}; diff --git a/extensions/standard-processors/processors/HashContent.h b/extensions/standard-processors/processors/HashContent.h index 583c2f923..efc850ee4 100644 --- a/extensions/standard-processors/processors/HashContent.h +++ b/extensions/standard-processors/processors/HashContent.h @@ -156,11 +156,11 @@ class HashContent : public core::Processor { .withDescription("Route to failure relationship in case of empty content") .withDefaultValue("false") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 3>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ HashAttribute, HashAlgorithm, FailOnEmpty - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "success operational on the flow record"}; diff --git a/extensions/standard-processors/processors/InvokeHTTP.h b/extensions/standard-processors/processors/InvokeHTTP.h index d53f8081e..bb5e9d283 100644 --- a/extensions/standard-processors/processors/InvokeHTTP.h +++ b/extensions/standard-processors/processors/InvokeHTTP.h @@ -187,7 +187,7 @@ class InvokeHTTP : public core::Processor { .withPropertyType(core::StandardPropertyTypes::DATA_TRANSFER_SPEED_TYPE) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 23>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ Method, URL, ConnectTimeout, @@ -211,7 +211,7 @@ class InvokeHTTP : public core::Processor { InvalidHTTPHeaderFieldHandlingStrategy, UploadSpeedLimit, DownloadSpeedLimit - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", diff --git a/extensions/standard-processors/processors/JoltTransformJSON.h b/extensions/standard-processors/processors/JoltTransformJSON.h index 59b1b2465..db0c8f21d 100644 --- a/extensions/standard-processors/processors/JoltTransformJSON.h +++ b/extensions/standard-processors/processors/JoltTransformJSON.h @@ -59,10 +59,10 @@ class JoltTransformJSON : public core::Processor { .isRequired(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 2>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ JoltTransform, JoltSpecification - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "The FlowFile with transformed content will be routed to this relationship"}; diff --git a/extensions/standard-processors/processors/ListFile.h b/extensions/standard-processors/processors/ListFile.h index 513026636..365006419 100644 --- a/extensions/standard-processors/processors/ListFile.h +++ b/extensions/standard-processors/processors/ListFile.h @@ -86,7 +86,7 @@ class ListFile : public core::Processor { .withDefaultValue("true") .isRequired(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 9>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ InputDirectory, RecurseSubdirectories, FileFilter, @@ -96,7 +96,7 @@ class ListFile : public core::Processor { MinimumFileSize, MaximumFileSize, IgnoreHiddenFiles - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "All FlowFiles that are received are routed to success"}; diff --git a/extensions/standard-processors/processors/ListenSyslog.h b/extensions/standard-processors/processors/ListenSyslog.h index 0e156ec1a..14ee92723 100644 --- a/extensions/standard-processors/processors/ListenSyslog.h +++ b/extensions/standard-processors/processors/ListenSyslog.h @@ -85,7 +85,7 @@ class ListenSyslog : public NetworkListenerProcessor { .withDefaultValue(magic_enum::enum_name(utils::net::ClientAuthOption::NONE)) .withAllowedValues(magic_enum::enum_names<utils::net::ClientAuthOption>()) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 7>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ Port, ProtocolProperty, MaxBatchSize, @@ -93,7 +93,7 @@ class ListenSyslog : public NetworkListenerProcessor { MaxQueueSize, SSLContextService, ClientAuth - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", diff --git a/extensions/standard-processors/processors/ListenTCP.h b/extensions/standard-processors/processors/ListenTCP.h index af26f81a7..d8c4b1e5f 100644 --- a/extensions/standard-processors/processors/ListenTCP.h +++ b/extensions/standard-processors/processors/ListenTCP.h @@ -82,7 +82,7 @@ class ListenTCP : public NetworkListenerProcessor { .isRequired(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 7>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ Port, MaxBatchSize, MaxQueueSize, @@ -90,7 +90,7 @@ class ListenTCP : public NetworkListenerProcessor { ClientAuth, MessageDelimiter, ConsumeDelimiter - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "Messages received successfully will be sent out this relationship."}; EXTENSIONAPI static constexpr auto Relationships = std::array{Success}; diff --git a/extensions/standard-processors/processors/ListenUDP.h b/extensions/standard-processors/processors/ListenUDP.h index 92749fcd8..804d7a6e9 100644 --- a/extensions/standard-processors/processors/ListenUDP.h +++ b/extensions/standard-processors/processors/ListenUDP.h @@ -55,11 +55,11 @@ class ListenUDP : public NetworkListenerProcessor { .withDefaultValue("10000") .isRequired(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 3>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ Port, MaxBatchSize, MaxQueueSize, - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "Messages received successfully will be sent out this relationship."}; diff --git a/extensions/standard-processors/processors/LogAttribute.h b/extensions/standard-processors/processors/LogAttribute.h index a14c546cd..e1a6efe15 100644 --- a/extensions/standard-processors/processors/LogAttribute.h +++ b/extensions/standard-processors/processors/LogAttribute.h @@ -80,7 +80,7 @@ class LogAttribute : public core::Processor { .withPropertyType(core::StandardPropertyTypes::UNSIGNED_LONG_TYPE) .withDefaultValue("1") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 8>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ LogLevel, AttributesToLog, AttributesToIgnore, @@ -89,7 +89,7 @@ class LogAttribute : public core::Processor { MaxPayloadLineLength, LogPrefix, FlowFilesToLog - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "success operational on the flow record"}; diff --git a/extensions/standard-processors/processors/PutFile.h b/extensions/standard-processors/processors/PutFile.h index 454baae16..d969d1d47 100644 --- a/extensions/standard-processors/processors/PutFile.h +++ b/extensions/standard-processors/processors/PutFile.h @@ -84,17 +84,17 @@ class PutFile : public core::Processor { .build(); EXTENSIONAPI static constexpr auto Properties = #ifndef WIN32 - std::array<core::PropertyReference, 6>{ + std::to_array<core::PropertyReference>({ Permissions, DirectoryPermissions, #else - std::array<core::PropertyReference, 4>{ + std::to_array<core::PropertyReference>({ #endif Directory, ConflictResolution, CreateDirs, MaxDestFiles - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "All files are routed to success"}; EXTENSIONAPI static constexpr auto Failure = core::RelationshipDefinition{"failure", "Failed files (conflict, write failure, etc.) are transferred to failure"}; @@ -126,10 +126,12 @@ class PutFile : public core::Processor { #ifndef WIN32 class FilePermissions { static const uint32_t MINIMUM_INVALID_PERMISSIONS_VALUE = 1 << 9; + public: [[nodiscard]] bool valid() const { return permissions_ < MINIMUM_INVALID_PERMISSIONS_VALUE; } [[nodiscard]] uint32_t getValue() const { return permissions_; } void setValue(uint32_t perms) { permissions_ = perms; } + private: uint32_t permissions_ = MINIMUM_INVALID_PERMISSIONS_VALUE; }; diff --git a/extensions/standard-processors/processors/PutTCP.h b/extensions/standard-processors/processors/PutTCP.h index 79446c733..263653c0e 100644 --- a/extensions/standard-processors/processors/PutTCP.h +++ b/extensions/standard-processors/processors/PutTCP.h @@ -102,7 +102,7 @@ class PutTCP final : public core::Processor { .isRequired(false) .withPropertyType(core::StandardPropertyTypes::DATA_SIZE_TYPE) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 8>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ Hostname, Port, IdleConnectionExpiration, @@ -111,7 +111,7 @@ class PutTCP final : public core::Processor { OutgoingMessageDelimiter, SSLContextService, MaxSizeOfSocketSendBuffer - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "FlowFiles that are sent to the destination are sent out this relationship."}; diff --git a/extensions/standard-processors/processors/PutUDP.h b/extensions/standard-processors/processors/PutUDP.h index 48a563d07..a2567e3e1 100644 --- a/extensions/standard-processors/processors/PutUDP.h +++ b/extensions/standard-processors/processors/PutUDP.h @@ -47,7 +47,7 @@ class PutUDP final : public core::Processor { .isRequired(true) .supportsExpressionLanguage(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 2>{Hostname, Port}; + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({Hostname, Port}); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "FlowFiles that are sent to the destination are sent out this relationship."}; EXTENSIONAPI static constexpr auto Failure = core::RelationshipDefinition{"failure", "FlowFiles that encountered IO errors are sent out this relationship."}; diff --git a/extensions/standard-processors/processors/ReplaceText.h b/extensions/standard-processors/processors/ReplaceText.h index 27062f802..dd34c2a0c 100644 --- a/extensions/standard-processors/processors/ReplaceText.h +++ b/extensions/standard-processors/processors/ReplaceText.h @@ -156,13 +156,13 @@ class ReplaceText : public core::Processor { .isRequired(true) .supportsExpressionLanguage(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 5>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ EvaluationMode, LineByLineEvaluationMode, ReplacementStrategy, SearchValue, ReplacementValue - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", diff --git a/extensions/standard-processors/processors/RetryFlowFile.h b/extensions/standard-processors/processors/RetryFlowFile.h index b6a101c39..36c8fb2f6 100644 --- a/extensions/standard-processors/processors/RetryFlowFile.h +++ b/extensions/standard-processors/processors/RetryFlowFile.h @@ -98,13 +98,13 @@ class RetryFlowFile : public core::Processor { .withDefaultValue(FAIL_ON_REUSE) .isRequired(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 5>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ RetryAttribute, MaximumRetries, PenalizeRetries, FailOnNonNumericalOverwrite, ReuseMode - }; + }); EXTENSIONAPI static constexpr auto Retry = core::RelationshipDefinition{"retry", diff --git a/extensions/standard-processors/processors/RouteText.h b/extensions/standard-processors/processors/RouteText.h index e3f57e262..4d195e022 100644 --- a/extensions/standard-processors/processors/RouteText.h +++ b/extensions/standard-processors/processors/RouteText.h @@ -168,7 +168,7 @@ class RouteText : public core::Processor { .withDefaultValue(magic_enum::enum_name(route_text::Segmentation::PER_LINE)) .withAllowedValues(magic_enum::enum_names<route_text::Segmentation>()) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 7>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ RoutingStrategy, MatchingStrategy, TrimWhitespace, @@ -176,7 +176,7 @@ class RouteText : public core::Processor { GroupingRegex, GroupingFallbackValue, SegmentationStrategy - }; + }); EXTENSIONAPI static constexpr auto Original = core::RelationshipDefinition{"original", "The original input file will be routed to this destination"}; diff --git a/extensions/standard-processors/processors/SplitText.h b/extensions/standard-processors/processors/SplitText.h index 02b2215a4..528c0de52 100644 --- a/extensions/standard-processors/processors/SplitText.h +++ b/extensions/standard-processors/processors/SplitText.h @@ -131,13 +131,13 @@ class SplitText : public core::Processor { .isRequired(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 5>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ LineSplitCount, MaximumFragmentSize, HeaderLineCount, HeaderLineMarkerCharacters, RemoveTrailingNewlines - }; + }); EXTENSIONAPI static constexpr auto Failure = core::RelationshipDefinition{"failure", "If a file cannot be split for some reason, the original file will be routed to this destination and nothing will be routed elsewhere"}; diff --git a/extensions/standard-processors/processors/TailFile.h b/extensions/standard-processors/processors/TailFile.h index 02074d591..29e11a6b1 100644 --- a/extensions/standard-processors/processors/TailFile.h +++ b/extensions/standard-processors/processors/TailFile.h @@ -189,7 +189,7 @@ class TailFile : public core::Processor { .withPropertyType(core::StandardPropertyTypes::UNSIGNED_INT_TYPE) .withDefaultValue("0") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 11>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ FileName, StateFile, Delimiter, @@ -201,7 +201,7 @@ class TailFile : public core::Processor { InitialStartPosition, AttributeProviderService, BatchSize - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "All files are routed to success"}; diff --git a/extensions/standard-processors/tests/unit/FlowJsonTests.cpp b/extensions/standard-processors/tests/unit/FlowJsonTests.cpp index c8387386d..5cf07b868 100644 --- a/extensions/standard-processors/tests/unit/FlowJsonTests.cpp +++ b/extensions/standard-processors/tests/unit/FlowJsonTests.cpp @@ -345,7 +345,7 @@ class DummyFlowJsonProcessor : public core::Processor { .withDescription("Sensitive property") .isSensitive(true) .build(); - static constexpr auto Properties = std::array<core::PropertyReference, 2>{SimpleProperty, SensitiveProperty}; + static constexpr auto Properties = std::to_array<core::PropertyReference>({SimpleProperty, SensitiveProperty}); static constexpr auto Relationships = std::array<core::RelationshipDefinition, 0>{}; static constexpr bool SupportsDynamicProperties = true; static constexpr bool SupportsDynamicRelationships = true; diff --git a/extensions/standard-processors/tests/unit/YamlConfigurationTests.cpp b/extensions/standard-processors/tests/unit/YamlConfigurationTests.cpp index 67c59be10..bf444a0cf 100644 --- a/extensions/standard-processors/tests/unit/YamlConfigurationTests.cpp +++ b/extensions/standard-processors/tests/unit/YamlConfigurationTests.cpp @@ -586,10 +586,10 @@ TEST_CASE("Test Dependent Property", "[YamlConfigurationDependentProperty]") { core::YamlConfiguration yamlConfig(test_controller.getContext()); const auto component = std::make_shared<DummyComponent>(); - component->setSupportedProperties(std::array<core::PropertyReference, 2>{ + component->setSupportedProperties(std::to_array<core::PropertyReference>({ core::PropertyDefinitionBuilder<>::createProperty("Prop A").withDescription("Prop A desc").withDefaultValue("val A").isRequired(true).build(), core::PropertyDefinitionBuilder<0, 1>::createProperty("Prop B").withDescription("Prop B desc").withDefaultValue("val B").isRequired(true).withDependentProperties({ "Prop A" }).build() - }); + })); yamlConfig.validateComponentProperties(*component, "component A", "section A"); REQUIRE(true); // Expected to get here w/o any exceptions } @@ -599,10 +599,10 @@ TEST_CASE("Test Dependent Property 2", "[YamlConfigurationDependentProperty2]") core::YamlConfiguration yamlConfig(test_controller.getContext()); const auto component = std::make_shared<DummyComponent>(); - component->setSupportedProperties(std::array<core::PropertyReference, 2>{ + component->setSupportedProperties(std::to_array<core::PropertyReference>({ core::PropertyDefinitionBuilder<>::createProperty("Prop A").withDescription("Prop A desc").isRequired(false).build(), core::PropertyDefinitionBuilder<0, 1>::createProperty("Prop B").withDescription("Prop B desc").withDefaultValue("val B").isRequired(true).withDependentProperties({ "Prop A" }).build() - }); + })); bool config_failed = false; try { yamlConfig.validateComponentProperties(*component, "component A", "section A"); @@ -620,11 +620,11 @@ TEST_CASE("Test Exclusive Property", "[YamlConfigurationExclusiveOfProperty]") { core::YamlConfiguration yamlConfig(test_controller.getContext()); const auto component = std::make_shared<DummyComponent>(); - component->setSupportedProperties(std::array<core::PropertyReference, 2>{ + component->setSupportedProperties(std::to_array<core::PropertyReference>({ core::PropertyDefinitionBuilder<>::createProperty("Prop A").withDescription("Prop A desc").withDefaultValue("val A").isRequired(true).build(), core::PropertyDefinitionBuilder<0, 0, 1>::createProperty("Prop B").withDescription("Prop B desc").withDefaultValue("val B").isRequired(true) .withExclusiveOfProperties({{ { "Prop A", "^abcd.*$" } }}).build() - }); + })); yamlConfig.validateComponentProperties(*component, "component A", "section A"); REQUIRE(true); // Expected to get here w/o any exceptions } @@ -634,11 +634,11 @@ TEST_CASE("Test Exclusive Property 2", "[YamlConfigurationExclusiveOfProperty2]" core::YamlConfiguration yamlConfig(test_controller.getContext()); const auto component = std::make_shared<DummyComponent>(); - component->setSupportedProperties(std::array<core::PropertyReference, 2>{ + component->setSupportedProperties(std::to_array<core::PropertyReference>({ core::PropertyDefinitionBuilder<>::createProperty("Prop A").withDescription("Prop A desc").withDefaultValue("val A").isRequired(true).build(), core::PropertyDefinitionBuilder<0, 0, 1>::createProperty("Prop B").withDescription("Prop B desc").withDefaultValue("val B").isRequired(true) .withExclusiveOfProperties({{ { "Prop A", "^val.*$" } }}).build() - }); + })); bool config_failed = false; try { yamlConfig.validateComponentProperties(*component, "component A", "section A"); @@ -1273,7 +1273,7 @@ class DummyFlowYamlProcessor : public core::Processor { .withDescription("Sensitive property") .isSensitive(true) .build(); - static constexpr auto Properties = std::array<core::PropertyReference, 2>{SimpleProperty, SensitiveProperty}; + static constexpr auto Properties = std::to_array<core::PropertyReference>({SimpleProperty, SensitiveProperty}); static constexpr auto Relationships = std::array<core::RelationshipDefinition, 0>{}; static constexpr bool SupportsDynamicProperties = true; static constexpr bool SupportsDynamicRelationships = true; diff --git a/extensions/systemd/ConsumeJournald.h b/extensions/systemd/ConsumeJournald.h index ad4c0f28e..fddfd3647 100644 --- a/extensions/systemd/ConsumeJournald.h +++ b/extensions/systemd/ConsumeJournald.h @@ -94,14 +94,14 @@ class ConsumeJournald final : public core::Processor { .withDefaultValue("%x %X %Z") .isRequired(true) .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 6>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ BatchSize, PayloadFormat, IncludeTimestamp, JournalType, ProcessOldMessages, TimestampFormat - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "Successfully consumed journal messages."}; diff --git a/extensions/test-processors/KamikazeProcessor.h b/extensions/test-processors/KamikazeProcessor.h index 2b5aa497f..08ecb6a32 100644 --- a/extensions/test-processors/KamikazeProcessor.h +++ b/extensions/test-processors/KamikazeProcessor.h @@ -57,10 +57,10 @@ class KamikazeProcessor : public core::Processor { .withPropertyType(core::StandardPropertyTypes::BOOLEAN_TYPE) .withDefaultValue("false") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 2>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ ThrowInOnSchedule, ThrowInOnTrigger - }; + }); EXTENSIONAPI static constexpr auto Relationships = std::array<core::RelationshipDefinition, 0>{}; diff --git a/extensions/windows-event-log/ConsumeWindowsEventLog.h b/extensions/windows-event-log/ConsumeWindowsEventLog.h index e2509b532..3a86fa33e 100644 --- a/extensions/windows-event-log/ConsumeWindowsEventLog.h +++ b/extensions/windows-event-log/ConsumeWindowsEventLog.h @@ -177,7 +177,7 @@ class ConsumeWindowsEventLog : public core::Processor { .withDefaultValue("true") .withDescription("Determines whether SID to name lookups are cached in memory") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 15>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ Channel, Query, MaxBufferSize, @@ -193,7 +193,7 @@ class ConsumeWindowsEventLog : public core::Processor { BookmarkRootDirectory, ProcessOldEvents, CacheSidLookups - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "Relationship for successfully consumed events."}; diff --git a/extensions/windows-event-log/TailEventLog.h b/extensions/windows-event-log/TailEventLog.h index 0dfcdd962..d155e9d8d 100644 --- a/extensions/windows-event-log/TailEventLog.h +++ b/extensions/windows-event-log/TailEventLog.h @@ -56,10 +56,10 @@ class TailEventLog : public core::Processor { .withDescription("Events per flow file") .withDefaultValue("1") .build(); - EXTENSIONAPI static constexpr auto Properties = std::array<core::PropertyReference, 2>{ + EXTENSIONAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ LogSourceFileName, MaxEventsPerFlowFile - }; + }); EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success", "All files, containing log events, are routed to success"}; diff --git a/extensions/windows-event-log/tests/ConsumeWindowsEventLogTests.cpp b/extensions/windows-event-log/tests/ConsumeWindowsEventLogTests.cpp index 31e40a83d..e2061d644 100644 --- a/extensions/windows-event-log/tests/ConsumeWindowsEventLogTests.cpp +++ b/extensions/windows-event-log/tests/ConsumeWindowsEventLogTests.cpp @@ -107,7 +107,7 @@ TEST_CASE("ConsumeWindowsEventLog properties work with default values", "[create auto processor = test_plan->addProcessor("ConsumeWindowsEventLog", "cwel"); TestController::runSession(test_plan); - auto properties_required_or_with_default_value = std::array<core::PropertyReference, 12>{ + auto properties_required_or_with_default_value = std::to_array<core::PropertyReference>({ ConsumeWindowsEventLog::Channel, ConsumeWindowsEventLog::Query, // ConsumeWindowsEventLog::RenderFormatXML, // FIXME(fgerlits): not defined, does not exist in NiFi either; should be removed @@ -122,16 +122,16 @@ TEST_CASE("ConsumeWindowsEventLog properties work with default values", "[create ConsumeWindowsEventLog::BookmarkRootDirectory, // TODO(fgerlits): obsolete, see definition; remove in a later release ConsumeWindowsEventLog::ProcessOldEvents, ConsumeWindowsEventLog::CacheSidLookups - }; + }); for (const auto& property : properties_required_or_with_default_value) { if (!LogTestController::getInstance().contains("property name " + std::string(property.name) + " value ")) { FAIL("Property did not get queried: " << property.name); } } - auto properties_optional_without_default_value = std::array<core::PropertyReference, 1>{ + auto properties_optional_without_default_value = std::to_array<core::PropertyReference>({ ConsumeWindowsEventLog::EventHeaderDelimiter - }; + }); for (const auto& property : properties_optional_without_default_value) { if (!LogTestController::getInstance().contains("property name " + std::string(property.name) + ", empty value")) { FAIL("Optional property did not get queried: " << property.name); diff --git a/libminifi/include/RemoteProcessorGroupPort.h b/libminifi/include/RemoteProcessorGroupPort.h index 837ce6727..e795b365f 100644 --- a/libminifi/include/RemoteProcessorGroupPort.h +++ b/libminifi/include/RemoteProcessorGroupPort.h @@ -112,13 +112,13 @@ class RemoteProcessorGroupPort : public core::Processor { .withPropertyType(core::StandardPropertyTypes::TIME_PERIOD_TYPE) .withDefaultValue("15 s") .build(); - MINIFIAPI static constexpr auto Properties = std::array<core::PropertyReference, 5>{ + MINIFIAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ hostName, SSLContext, port, portUUID, idleTimeout - }; + }); MINIFIAPI static constexpr auto relation = core::RelationshipDefinition{"", ""}; diff --git a/libminifi/include/controllers/LinuxPowerManagementService.h b/libminifi/include/controllers/LinuxPowerManagementService.h index a450c1004..65ccacf11 100644 --- a/libminifi/include/controllers/LinuxPowerManagementService.h +++ b/libminifi/include/controllers/LinuxPowerManagementService.h @@ -91,14 +91,14 @@ class LinuxPowerManagerService : public ThreadManagementService { .withPropertyType(core::StandardPropertyTypes::TIME_PERIOD_TYPE) .withDefaultValue("100 ms") .build(); - MINIFIAPI static constexpr auto Properties = std::array<core::PropertyReference, 6>{ + MINIFIAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ BatteryCapacityPath, BatteryStatusPath, BatteryStatusDischargeKeyword, TriggerThreshold, LowBatteryThreshold, WaitPeriod - }; + }); MINIFIAPI static constexpr bool SupportsDynamicProperties = false; diff --git a/libminifi/include/controllers/NetworkPrioritizerService.h b/libminifi/include/controllers/NetworkPrioritizerService.h index 2ba25712c..9d8f94a29 100644 --- a/libminifi/include/controllers/NetworkPrioritizerService.h +++ b/libminifi/include/controllers/NetworkPrioritizerService.h @@ -93,13 +93,13 @@ class NetworkPrioritizerService : public core::controller::ControllerService, pu .withPropertyType(core::StandardPropertyTypes::BOOLEAN_TYPE) .withDefaultValue("false") .build(); - MINIFIAPI static constexpr auto Properties = std::array<core::PropertyReference, 5>{ + MINIFIAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ NetworkControllers, MaxThroughput, MaxPayload, VerifyInterfaces, DefaultPrioritizer - }; + }); MINIFIAPI static constexpr bool SupportsDynamicProperties = false; diff --git a/libminifi/include/controllers/SSLContextService.h b/libminifi/include/controllers/SSLContextService.h index 0169a949b..6b62275fd 100644 --- a/libminifi/include/controllers/SSLContextService.h +++ b/libminifi/include/controllers/SSLContextService.h @@ -215,21 +215,21 @@ class SSLContextService : public core::controller::ControllerService { .build(); MINIFIAPI static constexpr auto Properties = #ifdef WIN32 - std::array<core::PropertyReference, 10>{ + std::to_array<core::PropertyReference>({ CertStoreLocation, ServerCertStore, ClientCertStore, ClientCertCN, ClientCertKeyUsage, #else - std::array<core::PropertyReference, 5>{ + std::to_array<core::PropertyReference>({ #endif // WIN32 ClientCertificate, PrivateKey, Passphrase, CACertificate, UseSystemCertStore - }; + }); MINIFIAPI static constexpr bool SupportsDynamicProperties = false; ADD_COMMON_VIRTUAL_FUNCTIONS_FOR_CONTROLLER_SERVICES diff --git a/libminifi/include/controllers/UpdatePolicyControllerService.h b/libminifi/include/controllers/UpdatePolicyControllerService.h index 2031cfd8d..1cc59f519 100644 --- a/libminifi/include/controllers/UpdatePolicyControllerService.h +++ b/libminifi/include/controllers/UpdatePolicyControllerService.h @@ -72,12 +72,12 @@ class UpdatePolicyControllerService : public core::controller::ControllerService .withDescription("Properties for which we will not allow updates") .isRequired(false) .build(); - MINIFIAPI static constexpr auto Properties = std::array<core::PropertyReference, 4>{ + MINIFIAPI static constexpr auto Properties = std::to_array<core::PropertyReference>({ AllowAllProperties, PersistUpdates, AllowedProperties, DisallowedProperties - }; + }); MINIFIAPI static constexpr bool SupportsDynamicProperties = false; ADD_COMMON_VIRTUAL_FUNCTIONS_FOR_CONTROLLER_SERVICES diff --git a/libminifi/test/flow-tests/CustomProcessors.h b/libminifi/test/flow-tests/CustomProcessors.h index 41f43da25..7546547e5 100644 --- a/libminifi/test/flow-tests/CustomProcessors.h +++ b/libminifi/test/flow-tests/CustomProcessors.h @@ -63,7 +63,7 @@ class TestProcessor : public core::Processor, public ProcessorWithStatistics { explicit TestProcessor(const std::string& name) : Processor(name) {} static constexpr const char* Description = "Processor used for testing cycles"; - static constexpr auto Properties = std::array<core::PropertyReference, 2>{AppleProbability, BananaProbability}; + static constexpr auto Properties = std::to_array<core::PropertyReference>({AppleProbability, BananaProbability}); static constexpr auto Relationships = std::array{Apple, Banana}; static constexpr bool SupportsDynamicProperties = false; static constexpr bool SupportsDynamicRelationships = false; diff --git a/libminifi/test/unit/AbstractProcessorTest.cpp b/libminifi/test/unit/AbstractProcessorTest.cpp index 99506c63d..680e3380b 100644 --- a/libminifi/test/unit/AbstractProcessorTest.cpp +++ b/libminifi/test/unit/AbstractProcessorTest.cpp @@ -38,7 +38,7 @@ struct AbstractProcessorTestCase1 : core::AbstractProcessor<AbstractProcessorTes .supportsExpressionLanguage(false) .isRequired(false) .build(); - static constexpr auto Properties = std::array<core::PropertyReference, 2>{Property1, Property2}; + static constexpr auto Properties = std::to_array<core::PropertyReference>({Property1, Property2}); static constexpr core::RelationshipDefinition Rel1{"rel1", "rel1 description"}; static constexpr auto Relationships = std::array{Rel1}; AbstractProcessorTestCase1() :core::AbstractProcessor<AbstractProcessorTestCase1>{"TestCase1"} {} @@ -82,7 +82,7 @@ struct AbstractProcessorTestCase2 : core::AbstractProcessor<AbstractProcessorTes .supportsExpressionLanguage(false) .isRequired(false) .build(); - static constexpr auto Properties = std::array<core::PropertyReference, 2>{Property1, Property2}; + static constexpr auto Properties = std::to_array<core::PropertyReference>({Property1, Property2}); static constexpr core::RelationshipDefinition Rel1{"Relationship1", "rel1 description"}; static constexpr auto Relationships = std::array{Rel1}; AbstractProcessorTestCase2() :core::AbstractProcessor<AbstractProcessorTestCase2>{"TestCase2"} {} diff --git a/libminifi/test/unit/ComponentManifestTests.cpp b/libminifi/test/unit/ComponentManifestTests.cpp index 5ea244280..7eb551966 100644 --- a/libminifi/test/unit/ComponentManifestTests.cpp +++ b/libminifi/test/unit/ComponentManifestTests.cpp @@ -66,7 +66,7 @@ class ExampleProcessor : public core::Processor { .isRequired(false) .withAllowedTypes<ExampleService>() .build(); - static constexpr auto Properties = std::array<core::PropertyReference, 1>{ExampleProperty}; + static constexpr auto Properties = std::to_array<core::PropertyReference>({ExampleProperty}); static constexpr auto Relationships = std::array<core::RelationshipDefinition, 0>{}; static constexpr bool SupportsDynamicProperties = false; static constexpr bool SupportsDynamicRelationships = false; diff --git a/libminifi/test/unit/ProcessorConfigUtilsTests.cpp b/libminifi/test/unit/ProcessorConfigUtilsTests.cpp index 38c28284b..677334f75 100644 --- a/libminifi/test/unit/ProcessorConfigUtilsTests.cpp +++ b/libminifi/test/unit/ProcessorConfigUtilsTests.cpp @@ -47,7 +47,7 @@ TEST_CASE("Parse enum property") { .withAllowedValues(magic_enum::enum_names<TestEnum>()) .build(); auto proc = std::make_shared<TestProcessor>("test-proc"); - proc->setSupportedProperties(std::array<core::PropertyReference, 1>{prop}); + proc->setSupportedProperties(std::to_array<core::PropertyReference>({prop})); ProcessContext context(std::make_shared<ProcessorNode>(proc.get()), nullptr, nullptr, nullptr, nullptr, nullptr); SECTION("Valid") { proc->setProperty(prop, "B");
