Update version of SDC-Client to 2.0.0 74/132174/6
authordavid.mcweeney <david.mcweeney@est.tech>
Mon, 7 Nov 2022 17:11:32 +0000 (17:11 +0000)
committerdavid.mcweeney <david.mcweeney@est.tech>
Thu, 17 Nov 2022 15:06:30 +0000 (15:06 +0000)
Signed-off-by: david.mcweeney <david.mcweeney@est.tech>
Issue-ID: DMAAP-1790
Change-Id: I21edcdafe965a3e17b863e5f8766eeb764cf6bc5

plugins/reception-plugins/pom.xml
plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcConfiguration.java
plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterGroup.java
plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/file/TestFileSystemReceptionHandler.java
plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandlerConfigurationParameterGroup.java
plugins/reception-plugins/src/test/resources/handling-sdc-null-parameters.json
plugins/reception-plugins/src/test/resources/handling-sdc.json
plugins/reception-plugins/src/test/resources/handling-sdcInvalid.json

index 206f6b0..56e5cd8 100644 (file)
@@ -45,7 +45,7 @@
                     <groupId>org.slf4j</groupId>
                     <artifactId>slf4j-log4j12</artifactId>
                 </exclusion>
-          </exclusions>
+            </exclusions>
         </dependency>
     </dependencies>
 </project>
index 1b13457..1ab2b5a 100644 (file)
@@ -2,6 +2,7 @@
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Intel. All rights reserved.
  *  Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
+ *  Modifications Copyright (C) 2022 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -35,13 +36,8 @@ public class SdcConfiguration implements IConfiguration {
     private SdcReceptionHandlerConfigurationParameterGroup configParameters;
 
     @Override
-    public String getAsdcAddress() {
-        return configParameters.getAsdcAddress();
-    }
-
-    @Override
-    public List<String> getMsgBusAddress() {
-        return configParameters.getMessageBusAddress();
+    public String getSdcAddress() {
+        return configParameters.getSdcAddress();
     }
 
     @Override
@@ -105,12 +101,27 @@ public class SdcConfiguration implements IConfiguration {
     }
 
     @Override
-    public Boolean isUseHttpsWithDmaap() {
-        return configParameters.isUseHttpsWithDmaap();
+    public String getHttpProxyHost() {
+        return configParameters.getHttpProxyHost();
+    }
+
+    @Override
+    public int getHttpProxyPort() {
+        return configParameters.getHttpProxyPort();
+    }
+
+    @Override
+    public String getHttpsProxyHost() {
+        return configParameters.getHttpsProxyHost();
+    }
+
+    @Override
+    public int getHttpsProxyPort() {
+        return configParameters.getHttpsProxyPort();
     }
 
     @Override
     public Boolean isUseHttpsWithSDC() {
-        return configParameters.isUseHttpsWithSdc();
+        return configParameters.getIsUseHttpsWithSdc();
     }
 }
index 485fab0..79a8121 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Intel. All rights reserved.
- *  Modifications Copyright (C) 2019-2021 Nordix Foundation.
+ *  Modifications Copyright (C) 2019-2022 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,8 +33,7 @@ import org.onap.policy.distribution.reception.parameters.ReceptionHandlerConfigu
  */
 @Getter
 public class SdcReceptionHandlerConfigurationParameterGroup extends ReceptionHandlerConfigurationParameterGroup {
-    private @NotNull @NotBlank String asdcAddress;
-    private @NotNull @NotBlank List<String> messageBusAddress;
+    private @NotNull @NotBlank String sdcAddress;
     private @NotNull @NotBlank String user;
     private @NotNull @NotBlank String password;
     private @NotNull @NotBlank int pollingInterval;
@@ -48,8 +47,11 @@ public class SdcReceptionHandlerConfigurationParameterGroup extends ReceptionHan
     private String keyStorePassword;
     private boolean activeServerTlsAuth;
     private boolean isFilterInEmptyResources;
-    private boolean isUseHttpsWithDmaap;
-    private boolean isUseHttpsWithSdc;
+    private Boolean isUseHttpsWithSdc;
+    private String httpsProxyHost;
+    private String httpProxyHost;
+    private int httpsProxyPort;
+    private int httpProxyPort;
 
     public SdcReceptionHandlerConfigurationParameterGroup() {
         super(SdcReceptionHandlerConfigurationParameterGroup.class.getSimpleName());
index e7a97a2..7308018 100644 (file)
@@ -85,7 +85,7 @@ public class TestFileSystemReceptionHandler {
 
     @Test
     public final void testInit() throws IOException {
-        final FileSystemReceptionHandler sypHandler = Mockito.spy(fileSystemHandler);
+        FileSystemReceptionHandler sypHandler = Mockito.spy(fileSystemHandler);
         Mockito.doNothing().when(sypHandler).initFileWatcher(Mockito.isA(String.class),
                 Mockito.anyInt());
         assertThatCode(() -> sypHandler.initializeReception(pssdConfigParameters.getName()))
index 25764f0..717f635 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Intel. All rights reserved.
- *  Modifications Copyright (C) 2019-2021 Nordix Foundation.
+ *  Modifications Copyright (C) 2019-2022 Nordix Foundation.
  *  Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -51,9 +51,8 @@ public class TestSdcReceptionHandlerConfigurationParameterGroup {
         final ValidationResult validationResult = configParameters.validate();
         assertTrue(validationResult.isValid());
         final SdcConfiguration config = new SdcConfiguration(configParameters);
-        assertEquals(Arrays.asList("a.com", "b.com", "c.com"), config.getMsgBusAddress());
         assertEquals(Arrays.asList("TOSCA_CSAR", "HEAT"), config.getRelevantArtifactTypes());
-        assertEquals("localhost", config.getAsdcAddress());
+        assertEquals("localhost", config.getSdcAddress());
         assertEquals("policy", config.getUser());
         assertEquals("policy", config.getPassword());
         assertEquals(20, config.getPollingInterval());
@@ -65,7 +64,6 @@ public class TestSdcReceptionHandlerConfigurationParameterGroup {
         assertEquals("null", config.getKeyStorePassword());
         assertEquals(false, config.activateServerTLSAuth());
         assertEquals(true, config.isFilterInEmptyResources());
-        assertEquals(false, config.isUseHttpsWithDmaap());
         assertEquals(false, config.isUseHttpsWithSDC());
     }
 
@@ -84,7 +82,6 @@ public class TestSdcReceptionHandlerConfigurationParameterGroup {
         //if boolean parameters are null they are set to false
         assertEquals(false, config.activateServerTLSAuth());
         assertEquals(false, config.isFilterInEmptyResources());
-        assertEquals(false, config.isUseHttpsWithDmaap());
     }
 
     @Test
index 6c9301a..c1f1c6a 100644 (file)
@@ -1,11 +1,6 @@
 {
     "name" : "parameterConfig1",
-    "asdcAddress": "localhost",
-    "messageBusAddress": [
-        "a.com",
-        "b.com",
-        "c.com"
-    ],
+    "sdcAddress": "localhost",
     "user": "policy",
     "password": "policy",
     "pollingInterval":20,
@@ -21,7 +16,6 @@
     "keyStorePath": null,
     "keyStorePassword": null,
     "activeServerTlsAuth": null,
-    "isFilterInEmptyResources": null,
-    "isUseHttpsWithDmaap": null
+    "isFilterInEmptyResources": null
 }
 
index 8c8a02a..638a468 100644 (file)
@@ -1,11 +1,6 @@
 {
     "name" : "parameterConfig1",
-    "asdcAddress": "localhost",
-    "messageBusAddress": [
-        "a.com",
-        "b.com",
-        "c.com"
-    ],
+    "sdcAddress": "localhost",
     "user": "policy",
     "password": "policy",
     "pollingInterval":20,
@@ -13,7 +8,7 @@
     "retryDelay":30,
     "consumerId": "policy-id",
     "artifactTypes": [
-        "TOSCA_CSAR", 
+        "TOSCA_CSAR",
         "HEAT"
     ],
     "consumerGroup": "policy-group",
@@ -22,7 +17,6 @@
     "keyStorePassword": "null",
     "activeServerTlsAuth": false,
     "isFilterInEmptyResources": true,
-    "isUseHttpsWithDmaap": false,
     "isUseHttpsWithSdc": false
 }
 
index 803fc41..d2cffdd 100644 (file)
@@ -1,18 +1,13 @@
 {
     "name" : "parameterConfig1",
-    "asdcAddress": "",
-    "messageBusAddress": [
-        "a.com",
-        "b.com",
-        "c.com"
-    ],
+    "sdcAddress": "",
     "user": "tbdsdc-1480",
     "password": "tbdsdc-1480",
     "pollingInterval":-1,
     "pollingTimeout":-2,
     "consumerId": "policy-id",
     "artifactTypes": [
-        "TOSCA_CSAR", 
+        "TOSCA_CSAR",
         "HEAT"
     ],
     "consumerGroup": "policy-group",
@@ -20,7 +15,6 @@
     "keyStorePath": "null",
     "keyStorePassword": "null",
     "activeserverTlsAuth": false,
-    "isFilterInEmptyResources": true,
-    "isUseHttpsWithDmaap": false
+    "isFilterInEmptyResources": true
 }