parent
47a0296211
commit
2276ff6283
|
@ -50,9 +50,6 @@ public class AwsEc2Service extends AbstractLifecycleComponent<AwsEc2Service> {
|
||||||
@Inject
|
@Inject
|
||||||
public AwsEc2Service(Settings settings, SettingsFilter settingsFilter, NetworkService networkService, DiscoveryNodeService discoveryNodeService) {
|
public AwsEc2Service(Settings settings, SettingsFilter settingsFilter, NetworkService networkService, DiscoveryNodeService discoveryNodeService) {
|
||||||
super(settings);
|
super(settings);
|
||||||
// Filter global settings
|
|
||||||
settingsFilter.addFilter("cloud.key");
|
|
||||||
settingsFilter.addFilter("cloud.account");
|
|
||||||
settingsFilter.addFilter("cloud.aws.access_key");
|
settingsFilter.addFilter("cloud.aws.access_key");
|
||||||
settingsFilter.addFilter("cloud.aws.secret_key");
|
settingsFilter.addFilter("cloud.aws.secret_key");
|
||||||
// Filter repository-specific settings
|
// Filter repository-specific settings
|
||||||
|
@ -81,8 +78,8 @@ public class AwsEc2Service extends AbstractLifecycleComponent<AwsEc2Service> {
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("No protocol supported [" + protocol + "], can either be [http] or [https]");
|
throw new IllegalArgumentException("No protocol supported [" + protocol + "], can either be [http] or [https]");
|
||||||
}
|
}
|
||||||
String account = settings.get("cloud.aws.access_key", settings.get("cloud.account"));
|
String account = settings.get("cloud.aws.access_key");
|
||||||
String key = settings.get("cloud.aws.secret_key", settings.get("cloud.key"));
|
String key = settings.get("cloud.aws.secret_key");
|
||||||
|
|
||||||
String proxyHost = settings.get("cloud.aws.proxy_host");
|
String proxyHost = settings.get("cloud.aws.proxy_host");
|
||||||
proxyHost = settings.get("cloud.aws.ec2.proxy_host", proxyHost);
|
proxyHost = settings.get("cloud.aws.ec2.proxy_host", proxyHost);
|
||||||
|
|
|
@ -55,8 +55,8 @@ public class InternalAwsS3Service extends AbstractLifecycleComponent<AwsS3Servic
|
||||||
@Override
|
@Override
|
||||||
public synchronized AmazonS3 client() {
|
public synchronized AmazonS3 client() {
|
||||||
String endpoint = getDefaultEndpoint();
|
String endpoint = getDefaultEndpoint();
|
||||||
String account = settings.get("cloud.aws.access_key", settings.get("cloud.account"));
|
String account = settings.get("cloud.aws.access_key");
|
||||||
String key = settings.get("cloud.aws.secret_key", settings.get("cloud.key"));
|
String key = settings.get("cloud.aws.secret_key");
|
||||||
|
|
||||||
return getClient(endpoint, null, account, key, null);
|
return getClient(endpoint, null, account, key, null);
|
||||||
}
|
}
|
||||||
|
@ -75,8 +75,8 @@ public class InternalAwsS3Service extends AbstractLifecycleComponent<AwsS3Servic
|
||||||
endpoint = getDefaultEndpoint();
|
endpoint = getDefaultEndpoint();
|
||||||
}
|
}
|
||||||
if (account == null || key == null) {
|
if (account == null || key == null) {
|
||||||
account = settings.get("cloud.aws.access_key", settings.get("cloud.account"));
|
account = settings.get("cloud.aws.access_key");
|
||||||
key = settings.get("cloud.aws.secret_key", settings.get("cloud.key"));
|
key = settings.get("cloud.aws.secret_key");
|
||||||
}
|
}
|
||||||
|
|
||||||
return getClient(endpoint, protocol, account, key, maxRetries);
|
return getClient(endpoint, protocol, account, key, maxRetries);
|
||||||
|
|
Loading…
Reference in New Issue