Add send requests to VES via HTTPS in Mass PNF Simulator 63/116063/4
authorEli Halych <eli.halych@gmail.com>
Thu, 3 Dec 2020 09:56:50 +0000 (09:56 +0000)
committerEli Halych <illia.halych@t-mobile.pl>
Fri, 4 Dec 2020 00:42:11 +0000 (00:42 +0000)
commita579a48948f0b61bb9d98e1591d1fe727a550dbb
tree7abd52518d5f5233a8e48440b7c6f952edbe7d72
parent59305b4e52464023a6350a1d69ced2eb23dee73e
Add send requests to VES via HTTPS in Mass PNF Simulator

Details:
- Previously allowed only HTTP.
- HTTPS support added since VES accepts HTTPS and throws 400 Bad Request on HTTP.
- Added autogenerating Basic Authorization token based on user:password in Base64 to access real VES together with HTTPS.
- For this reason, simple HttpClient became part of RestTemplate that can ignore certificate checks for HTTPS when connecting to VES.
- Adjusted test cases.

Issue-ID: INT-1799
Signed-off-by: Eli Halych <illia.halych@t-mobile.pl>
Change-Id: I69eaeb4b10f903c3a3aa880dbb787034da4c30bb
15 files changed:
test/mocks/masspnfsim/MassPnfSim.py
test/mocks/masspnfsim/conftest.py
test/mocks/masspnfsim/pnf-sim-lightweight/pom.xml
test/mocks/masspnfsim/pnf-sim-lightweight/src/main/java/org/onap/pnfsimulator/logging/MDCVariables.java
test/mocks/masspnfsim/pnf-sim-lightweight/src/main/java/org/onap/pnfsimulator/rest/SimulatorController.java
test/mocks/masspnfsim/pnf-sim-lightweight/src/main/java/org/onap/pnfsimulator/simulator/Simulator.java
test/mocks/masspnfsim/pnf-sim-lightweight/src/main/java/org/onap/pnfsimulator/simulator/client/HttpClientAdapterImpl.java [deleted file]
test/mocks/masspnfsim/pnf-sim-lightweight/src/main/java/org/onap/pnfsimulator/simulator/client/RestTemplateAdapter.java [moved from test/mocks/masspnfsim/pnf-sim-lightweight/src/main/java/org/onap/pnfsimulator/simulator/client/HttpClientAdapter.java with 96% similarity]
test/mocks/masspnfsim/pnf-sim-lightweight/src/main/java/org/onap/pnfsimulator/simulator/client/RestTemplateAdapterImpl.java [new file with mode: 0644]
test/mocks/masspnfsim/pnf-sim-lightweight/src/test/java/org/onap/pnfsimulator/rest/SimulatorControllerTest.java
test/mocks/masspnfsim/pnf-sim-lightweight/src/test/java/org/onap/pnfsimulator/simulator/SimulatorTest.java
test/mocks/masspnfsim/pnf-sim-lightweight/src/test/java/org/onap/pnfsimulator/simulator/client/HttpClientAdapterImplTest.java [deleted file]
test/mocks/masspnfsim/pnf-sim-lightweight/src/test/java/org/onap/pnfsimulator/simulator/client/RestTemplateAdapterImplTest.java [new file with mode: 0644]
test/mocks/masspnfsim/test_lifecycle.py
test/mocks/masspnfsim/test_settings.py