From e0fe449c16bd0781840e1608e72373ac1d2cc18a Mon Sep 17 00:00:00 2001 From: Tomasz Golabek Date: Fri, 20 Mar 2020 11:49:04 +0100 Subject: Set of fixes for pnfsimulator startup * v0.7.7 of netopeer used * SSLAuthenticationHelper marked as primary bean to avoid duplicated-bean exception * spring props properly mounted into container Change-Id: Ib6bb32f32a7f60786901ffbf592b1a26b5cb1cbf Issue-ID: INT-1320 Signed-off-by: Tomasz Golabek --- test/mocks/pnfsimulator/netconfsimulator/Dockerfile_netopeer | 2 +- test/mocks/pnfsimulator/pnfsimulator/docker-compose.yml | 1 + .../simulator/client/utils/ssl/SSLAuthenticationHelper.java | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'test/mocks') diff --git a/test/mocks/pnfsimulator/netconfsimulator/Dockerfile_netopeer b/test/mocks/pnfsimulator/netconfsimulator/Dockerfile_netopeer index 876b78631..9fe56e19d 100644 --- a/test/mocks/pnfsimulator/netconfsimulator/Dockerfile_netopeer +++ b/test/mocks/pnfsimulator/netconfsimulator/Dockerfile_netopeer @@ -1,4 +1,4 @@ -FROM sysrepo/sysrepo-netopeer2:latest +FROM sysrepo/sysrepo-netopeer2:v0.7.7 ADD apt.conf /etc/apt/apt.conf RUN apt-get update && apt-get install -y python3 python3-pip python-pip && pip3 install flask flask_restful kafka-python && pip install kafka-python RUN cd /opt/dev/sysrepo && cmake -DGEN_PYTHON_VERSION=2 -DREPOSITORY_LOC:PATH=/etc/sysrepo . && make install diff --git a/test/mocks/pnfsimulator/pnfsimulator/docker-compose.yml b/test/mocks/pnfsimulator/pnfsimulator/docker-compose.yml index 3ec8931a4..23797fed3 100644 --- a/test/mocks/pnfsimulator/pnfsimulator/docker-compose.yml +++ b/test/mocks/pnfsimulator/pnfsimulator/docker-compose.yml @@ -31,6 +31,7 @@ services: - ./logs:/var/log - ./templates:/app/templates - ./store:/app/store + - ./src/main/resources/application.properties:/app/application.properties restart: on-failure depends_on: - mongo diff --git a/test/mocks/pnfsimulator/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/client/utils/ssl/SSLAuthenticationHelper.java b/test/mocks/pnfsimulator/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/client/utils/ssl/SSLAuthenticationHelper.java index 40b8ab30b..eda17ef27 100644 --- a/test/mocks/pnfsimulator/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/client/utils/ssl/SSLAuthenticationHelper.java +++ b/test/mocks/pnfsimulator/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/client/utils/ssl/SSLAuthenticationHelper.java @@ -22,11 +22,13 @@ package org.onap.pnfsimulator.simulator.client.utils.ssl; import java.io.Serializable; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.cloud.context.config.annotation.RefreshScope; +import org.springframework.context.annotation.Primary; import org.springframework.stereotype.Component; @Component @ConfigurationProperties(prefix = "ssl") @RefreshScope +@Primary public class SSLAuthenticationHelper implements Serializable { private boolean clientCertificateEnabled; -- cgit 1.2.3-korg