summaryrefslogtreecommitdiffstats
path: root/infra/northbound/restconf/src/main/java/io/fd/honeycomb
diff options
context:
space:
mode:
Diffstat (limited to 'infra/northbound/restconf/src/main/java/io/fd/honeycomb')
-rw-r--r--infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfConfiguration.java3
-rw-r--r--infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfProvider.java5
2 files changed, 7 insertions, 1 deletions
diff --git a/infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfConfiguration.java b/infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfConfiguration.java
index 78bc39dd6..21307a3cc 100644
--- a/infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfConfiguration.java
+++ b/infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfConfiguration.java
@@ -55,6 +55,8 @@ public class RestconfConfiguration {
public Optional<String> restconfTruststore;
@InjectConfig("restconf-truststore-password")
public Optional<String> truststorePassword;
+ @InjectConfig("restconf-websocket-address")
+ public Optional<String> restconfWebsocketAddress = Optional.of("0.0.0.0");
@InjectConfig("restconf-websocket-port")
public Optional<Integer> restconfWebsocketPort = Optional.of(7779);
@InjectConfig("restconf-root-path")
@@ -98,6 +100,7 @@ public class RestconfConfiguration {
", keystoreManagerPassword=" + keystoreManagerPassword +
", restconfTruststore=" + restconfTruststore +
", truststorePassword=" + truststorePassword +
+ ", restconfWebsocketAddress=" + restconfWebsocketAddress +
", restconfWebsocketPort=" + restconfWebsocketPort +
", restconfRootPath=" + restconfRootPath +
", restPoolMaxSize=" + restPoolMaxSize +
diff --git a/infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfProvider.java b/infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfProvider.java
index ff338f1d9..e924dd751 100644
--- a/infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfProvider.java
+++ b/infra/northbound/restconf/src/main/java/io/fd/honeycomb/northbound/restconf/RestconfProvider.java
@@ -28,6 +28,7 @@ import org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter;
import org.opendaylight.controller.sal.core.api.model.SchemaService;
import org.opendaylight.netconf.sal.rest.api.RestConnector;
import org.opendaylight.netconf.sal.restconf.impl.RestconfProviderImpl;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressBuilder;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber;
final class RestconfProvider extends ProviderTrait<RestConnector> {
@@ -51,7 +52,9 @@ final class RestconfProvider extends ProviderTrait<RestConnector> {
@Override
protected RestconfProviderImpl create() {
final RestconfProviderImpl instance = new RestconfProviderImpl(domDataBroker, schemaService, rpcService,
- notificationService, mountPointService, new PortNumber(cfg.restconfWebsocketPort.get()));
+ notificationService, mountPointService,
+ IpAddressBuilder.getDefaultInstance(cfg.restconfWebsocketAddress.get()),
+ new PortNumber(cfg.restconfWebsocketPort.get()));
// Required to properly initialize restconf (broker, schema ctx, etc.).
// Without that restconf would fail with 503 (service not available).