From a3b05955caa7e6e5eeb487e650662cf774b14440 Mon Sep 17 00:00:00 2001 From: Ram Krishna Verma Date: Tue, 23 Aug 2022 15:37:38 -0400 Subject: Fix Sdc configuration Fixing the SdcConfiguration class to accomodate the parameter for switching http vs https communication between Sdc client & server. So that distribution component is compatible with Service Mesh (Istio) initiative in OOM. For more details - https://jira.onap.org/browse/POLICY-4226 Issue-ID: POLICY-4226 Change-Id: Ia3956832d37953e1b6149303ca685d4b82c30f5d Signed-off-by: Ram Krishna Verma --- .../policy/distribution/reception/handling/sdc/SdcConfiguration.java | 5 +++++ .../handling/sdc/SdcReceptionHandlerConfigurationParameterGroup.java | 1 + .../sdc/TestSdcReceptionHandlerConfigurationParameterGroup.java | 1 + plugins/reception-plugins/src/test/resources/handling-sdc.json | 3 ++- 4 files changed, 9 insertions(+), 1 deletion(-) (limited to 'plugins/reception-plugins/src') diff --git a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcConfiguration.java b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcConfiguration.java index 3ed09cf1..1b13457a 100644 --- a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcConfiguration.java +++ b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcConfiguration.java @@ -108,4 +108,9 @@ public class SdcConfiguration implements IConfiguration { public Boolean isUseHttpsWithDmaap() { return configParameters.isUseHttpsWithDmaap(); } + + @Override + public Boolean isUseHttpsWithSDC() { + return configParameters.isUseHttpsWithSdc(); + } } diff --git a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterGroup.java b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterGroup.java index 7964aa19..485fab06 100644 --- a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterGroup.java +++ b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterGroup.java @@ -49,6 +49,7 @@ public class SdcReceptionHandlerConfigurationParameterGroup extends ReceptionHan private boolean activeServerTlsAuth; private boolean isFilterInEmptyResources; private boolean isUseHttpsWithDmaap; + private boolean isUseHttpsWithSdc; public SdcReceptionHandlerConfigurationParameterGroup() { super(SdcReceptionHandlerConfigurationParameterGroup.class.getSimpleName()); diff --git a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandlerConfigurationParameterGroup.java b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandlerConfigurationParameterGroup.java index 06f6d9e6..25764f0e 100644 --- a/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandlerConfigurationParameterGroup.java +++ b/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandlerConfigurationParameterGroup.java @@ -66,6 +66,7 @@ public class TestSdcReceptionHandlerConfigurationParameterGroup { assertEquals(false, config.activateServerTLSAuth()); assertEquals(true, config.isFilterInEmptyResources()); assertEquals(false, config.isUseHttpsWithDmaap()); + assertEquals(false, config.isUseHttpsWithSDC()); } @Test diff --git a/plugins/reception-plugins/src/test/resources/handling-sdc.json b/plugins/reception-plugins/src/test/resources/handling-sdc.json index 0bb936bf..8c8a02a4 100644 --- a/plugins/reception-plugins/src/test/resources/handling-sdc.json +++ b/plugins/reception-plugins/src/test/resources/handling-sdc.json @@ -22,6 +22,7 @@ "keyStorePassword": "null", "activeServerTlsAuth": false, "isFilterInEmptyResources": true, - "isUseHttpsWithDmaap": false + "isUseHttpsWithDmaap": false, + "isUseHttpsWithSdc": false } -- cgit 1.2.3-korg