use different settings for aws proxy port / host
This commit is contained in:
parent
8eb6e91eac
commit
7379258f2e
|
@ -68,14 +68,14 @@ public class AwsEc2Service extends AbstractLifecycleComponent<AwsEc2Service> {
|
|||
throw new ElasticSearchIllegalArgumentException("No s3 secret_key defined for s3 gateway");
|
||||
}
|
||||
|
||||
String proxyHost = settings.get("network.proxyHost");
|
||||
String proxyHost = componentSettings.get("proxy_host");
|
||||
if (proxyHost != null) {
|
||||
String portString = settings.get("network.proxyPort","80");
|
||||
String portString = componentSettings.get("proxy_port", "80");
|
||||
Integer proxyPort;
|
||||
try {
|
||||
proxyPort = Integer.parseInt(portString,10);
|
||||
proxyPort = Integer.parseInt(portString, 10);
|
||||
} catch (NumberFormatException ex) {
|
||||
throw new ElasticSearchIllegalArgumentException("The configured proxy port value [" + portString + "] is invalid",ex);
|
||||
throw new ElasticSearchIllegalArgumentException("The configured proxy port value [" + portString + "] is invalid", ex);
|
||||
}
|
||||
clientConfiguration.withProxyHost(proxyHost).setProxyPort(proxyPort);
|
||||
}
|
||||
|
|
|
@ -68,14 +68,14 @@ public class AwsS3Service extends AbstractLifecycleComponent<AwsS3Service> {
|
|||
throw new ElasticSearchIllegalArgumentException("No s3 secret_key defined for s3 gateway");
|
||||
}
|
||||
|
||||
String proxyHost = settings.get("network.proxyHost");
|
||||
String proxyHost = componentSettings.get("proxy_host");
|
||||
if (proxyHost != null) {
|
||||
String portString = settings.get("network.proxyPort","80");
|
||||
String portString = componentSettings.get("proxy_port", "80");
|
||||
Integer proxyPort;
|
||||
try {
|
||||
proxyPort = Integer.parseInt(portString,10);
|
||||
proxyPort = Integer.parseInt(portString, 10);
|
||||
} catch (NumberFormatException ex) {
|
||||
throw new ElasticSearchIllegalArgumentException("The configured proxy port value [" + portString + "] is invalid",ex);
|
||||
throw new ElasticSearchIllegalArgumentException("The configured proxy port value [" + portString + "] is invalid", ex);
|
||||
}
|
||||
clientConfiguration.withProxyHost(proxyHost).setProxyPort(proxyPort);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue