trust-store: /opt/app/policy-agent/etc/cert/truststore.jks
# Configuration of usage of HTTP Proxy for the southbound accesses.
# The HTTP proxy (if configured) will only be used for accessing NearRT RIC:s
+ # proxy-type can be either HTTP, SOCKS4 or SOCKS5
http.proxy-host:
http.proxy-port: 0
+ http.proxy-type: HTTP
# path where the service can store data
vardata-directory: /var/policy-management-service
import reactor.core.publisher.Mono;
import reactor.netty.http.client.HttpClient;
-import reactor.netty.transport.ProxyProvider;
/**
* Generic reactive REST client.
}
if (isHttpProxyConfigured()) {
- httpClient = httpClient.proxy(proxy -> proxy.type(ProxyProvider.Proxy.HTTP)
- .host(httpProxyConfig.httpProxyHost()).port(httpProxyConfig.httpProxyPort()));
+ httpClient = httpClient.proxy(proxy -> proxy.type(httpProxyConfig.httpProxyType()) //
+ .host(httpProxyConfig.httpProxyHost()) //
+ .port(httpProxyConfig.httpProxyPort()));
}
return httpClient;
}
import org.onap.ccsdk.oran.a1policymanagementservice.exceptions.ServiceException;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
+
import reactor.core.publisher.Flux;
+import reactor.netty.transport.ProxyProvider;
@EnableConfigurationProperties
public class ApplicationConfig {
@Value("${app.webclient.http.proxy-port:0}")
private int httpProxyPort = 0;
+ @Value("${app.webclient.http.proxy-type:HTTP}")
+ private String httpProxyType = "HTTP";
+
private Map<String, RicConfig> ricConfigs = new HashMap<>();
@Getter
HttpProxyConfig httpProxyConfig = ImmutableHttpProxyConfig.builder() //
.httpProxyHost(this.httpProxyHost) //
.httpProxyPort(this.httpProxyPort) //
+ .httpProxyType(ProxyProvider.Proxy.valueOf(this.httpProxyType)) //
.build();
this.webClientConfig = ImmutableWebClientConfig.builder() //
package org.onap.ccsdk.oran.a1policymanagementservice.configuration;
import org.immutables.value.Value;
+import reactor.netty.transport.ProxyProvider;
@Value.Immutable
@Value.Style(redactedMask = "####")
public String httpProxyHost();
public int httpProxyPort();
+
+ public ProxyProvider.Proxy httpProxyType();
}
public HttpProxyConfig httpProxyConfig();