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


##########
extensions/aws/processors/AwsProcessor.cpp:
##########
@@ -66,15 +66,25 @@ std::optional<Aws::Auth::AWSCredentials> 
AwsProcessor::getAWSCredentials(
   return aws_credentials_provider.getAWSCredentials();
 }
 
-aws::ProxyOptions AwsProcessor::getProxy(core::ProcessContext& context, const 
core::FlowFile* const flow_file) {
-  aws::ProxyOptions proxy;
-
-  proxy.host = minifi::utils::parseOptionalProperty(context, ProxyHost, 
flow_file).value_or("");
-  proxy.port = 
gsl::narrow<uint32_t>(minifi::utils::parseOptionalU64Property(context, 
ProxyPort, flow_file).value_or(0));
-  proxy.username = minifi::utils::parseOptionalProperty(context, 
ProxyUsername, flow_file).value_or("");
-  proxy.password = minifi::utils::parseOptionalProperty(context, 
ProxyPassword, flow_file).value_or("");
+minifi::controllers::ProxyConfiguration 
AwsProcessor::getProxy(core::ProcessContext& context, const core::FlowFile* 
const flow_file) {
+  minifi::controllers::ProxyConfiguration proxy;
+
+  auto proxy_controller_service = 
minifi::utils::parseOptionalControllerService<minifi::controllers::ProxyConfigurationServiceInterface>(context,
 ProxyConfigurationService, getUUID());
+  if (proxy_controller_service) {
+    proxy.proxy_type = proxy_controller_service->getProxyType();
+    proxy.proxy_host = proxy_controller_service->getHost();
+    proxy.proxy_port = proxy_controller_service->getPort().value_or(0);
+    proxy.proxy_user = proxy_controller_service->getUsername().value_or("");
+    proxy.proxy_password = 
proxy_controller_service->getPassword().value_or("");
+  } else {
+    proxy.proxy_type = 
minifi::utils::parseOptionalEnumProperty<minifi::controllers::ProxyType>(context,
 ProxyType).value_or(minifi::controllers::ProxyType::HTTP);

Review Comment:
   Added DIRECT option in 
https://github.com/apache/nifi-minifi-cpp/pull/2045/commits/8890e9fe63b26c4f38dc59af04906e40c737b5cf,
 but I kept the HTTP as the default as the main intention should be to use a 
proxy when a controller is added.



##########
extensions/azure/storage/DataLakeStorageClient.h:
##########
@@ -39,6 +41,7 @@ struct AzureDataLakeStorageParameters {
   std::string file_system_name;
   std::string directory_name;
   std::optional<uint64_t> number_of_retries;
+  std::optional<minifi::controllers::ProxyConfiguration> proxy_configuration;

Review Comment:
   Updated in 
https://github.com/apache/nifi-minifi-cpp/pull/2045/commits/8890e9fe63b26c4f38dc59af04906e40c737b5cf



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to