summaryrefslogtreecommitdiffstats
path: root/artifactbroker/plugins
diff options
context:
space:
mode:
authorefiacor <fiachra.corcoran@est.tech>2022-11-23 12:29:39 +0000
committerefiacor <fiachra.corcoran@est.tech>2022-11-25 09:29:58 +0000
commite127b3c32c81390e0c8d928f1266360802fc7071 (patch)
tree1ab1a16a2321b34b85fc6d57733cfc0a002a9cd4 /artifactbroker/plugins
parent55d29b46ab9f585b79ccf713aada7f77eee5f3fd (diff)
[ARTIFACT-BROKER] Upgrade sdc-distro-client to 2.0.01.9.0
Signed-off-by: efiacor <fiachra.corcoran@est.tech> Change-Id: I3c726357fe3760724f64e71f09749d939f74d7be Issue-ID: DMAAP-1806
Diffstat (limited to 'artifactbroker/plugins')
-rw-r--r--artifactbroker/plugins/forwarding-plugins/pom.xml2
-rw-r--r--artifactbroker/plugins/pom.xml2
-rw-r--r--artifactbroker/plugins/reception-plugins/pom.xml9
-rw-r--r--artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcConfiguration.java14
-rw-r--r--artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterBuilder.java56
-rw-r--r--artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterGroup.java59
-rw-r--r--artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandlerConfigurationParameterGroup.java42
-rw-r--r--artifactbroker/plugins/reception-plugins/src/test/resources/handling-sdc.json10
-rw-r--r--artifactbroker/plugins/reception-plugins/src/test/resources/handling-sdcInvalid.json10
9 files changed, 48 insertions, 156 deletions
diff --git a/artifactbroker/plugins/forwarding-plugins/pom.xml b/artifactbroker/plugins/forwarding-plugins/pom.xml
index 9c88f8f..ceeac00 100644
--- a/artifactbroker/plugins/forwarding-plugins/pom.xml
+++ b/artifactbroker/plugins/forwarding-plugins/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.onap.multicloud.framework</groupId>
<artifactId>multicloud-framework-artifactbroker-plugins</artifactId>
- <version>1.8.3-SNAPSHOT</version>
+ <version>1.9.0-SNAPSHOT</version>
</parent>
<artifactId>multicloud-framework-artifactbroker-forwarding-plugins</artifactId>
diff --git a/artifactbroker/plugins/pom.xml b/artifactbroker/plugins/pom.xml
index afafbf7..010cff3 100644
--- a/artifactbroker/plugins/pom.xml
+++ b/artifactbroker/plugins/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.onap.multicloud.framework</groupId>
<artifactId>multicloud-framework-artifactbroker</artifactId>
- <version>1.8.3-SNAPSHOT</version>
+ <version>1.9.0-SNAPSHOT</version>
</parent>
<artifactId>multicloud-framework-artifactbroker-plugins</artifactId>
diff --git a/artifactbroker/plugins/reception-plugins/pom.xml b/artifactbroker/plugins/reception-plugins/pom.xml
index 79da5e4..9fb2633 100644
--- a/artifactbroker/plugins/reception-plugins/pom.xml
+++ b/artifactbroker/plugins/reception-plugins/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.onap.multicloud.framework</groupId>
<artifactId>multicloud-framework-artifactbroker-plugins</artifactId>
- <version>1.8.3-SNAPSHOT</version>
+ <version>1.9.0-SNAPSHOT</version>
</parent>
<artifactId>multicloud-framework-artifactbroker-reception-plugins</artifactId>
@@ -38,13 +38,6 @@
<dependency>
<groupId>org.onap.sdc.sdc-distribution-client</groupId>
<artifactId>sdc-distribution-client</artifactId>
- <version>1.4.5</version>
- <exclusions>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </exclusion>
- </exclusions>
</dependency>
</dependencies>
</project>
diff --git a/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcConfiguration.java b/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcConfiguration.java
index d65f9d6..cc30f40 100644
--- a/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcConfiguration.java
+++ b/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcConfiguration.java
@@ -41,13 +41,8 @@ public class SdcConfiguration implements IConfiguration {
}
@Override
- public String getAsdcAddress() {
- return configParameters.getAsdcAddress();
- }
-
- @Override
- public List<String> getMsgBusAddress() {
- return configParameters.getMessageBusAddress();
+ public String getSdcAddress() {
+ return configParameters.getSdcAddress();
}
@Override
@@ -111,11 +106,6 @@ public class SdcConfiguration implements IConfiguration {
}
@Override
- public Boolean isUseHttpsWithDmaap() {
- return configParameters.isUseHttpsWithDmaap();
- }
-
- @Override
public Boolean isUseHttpsWithSDC() {
return configParameters.isUseHttpsWithSDC();
}
diff --git a/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterBuilder.java b/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterBuilder.java
index 2476b07..24a27c9 100644
--- a/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterBuilder.java
+++ b/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterBuilder.java
@@ -31,7 +31,6 @@ public class SdcReceptionHandlerConfigurationParameterBuilder {
private boolean activeserverTlsAuth;
private boolean filterinEmptyResources;
- private boolean useHttpsWithDmaap;
private boolean useHttpsWithSDC;
private int pollingTimeout;
private int pollingInterval;
@@ -39,7 +38,7 @@ public class SdcReceptionHandlerConfigurationParameterBuilder {
private String password;
private String consumerId;
private String consumerGroup;
- private String asdcAddress;
+ private String sdcAddress;
private String environmentName;
private String keystorePath;
private String keystorePassword;
@@ -47,7 +46,6 @@ public class SdcReceptionHandlerConfigurationParameterBuilder {
private int httpproxyPort;
private String httpsproxyHost;
private String httpproxyHost;
- private List<String> messageBusAddress;
private List<String> artifactTypes;
private int retryDelay;
@@ -73,16 +71,6 @@ public class SdcReceptionHandlerConfigurationParameterBuilder {
}
/**
- * Set useHttpsWithDmaap to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
- *
- * @param useHttpsWithDmaap the useHttpsWithDmaap
- */
- public SdcReceptionHandlerConfigurationParameterBuilder setUseHttpsWithDmaap(final Boolean useHttpsWithDmaap) {
- this.useHttpsWithDmaap = useHttpsWithDmaap;
- return this;
- }
-
- /**
* Set pollingInterval to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
*
* @param pollingInterval the pollingInterval
@@ -103,12 +91,12 @@ public class SdcReceptionHandlerConfigurationParameterBuilder {
}
/**
- * Set asdcAddress to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
+ * Set sdcAddress to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
*
- * @param asdcAddress the asdcAddress
+ * @param sdcAddress the sdcAddress
*/
- public SdcReceptionHandlerConfigurationParameterBuilder setAsdcAddress(final String asdcAddress) {
- this.asdcAddress = asdcAddress;
+ public SdcReceptionHandlerConfigurationParameterBuilder setSdcAddress(final String sdcAddress) {
+ this.sdcAddress = sdcAddress;
return this;
}
@@ -183,16 +171,6 @@ public class SdcReceptionHandlerConfigurationParameterBuilder {
}
/**
- * Set messageBusAddress to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
- *
- * @param messageBusAddress the messageBusAddress
- */
- public SdcReceptionHandlerConfigurationParameterBuilder setMessageBusAddress(final List<String> messageBusAddress) {
- this.messageBusAddress = messageBusAddress;
- return this;
- }
-
- /**
* Set artifactTypes to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
*
* @param artifactTypes the artifactTypes
@@ -232,15 +210,6 @@ public class SdcReceptionHandlerConfigurationParameterBuilder {
}
/**
- * Returns the isUseHttpsWithDmaap flag of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
- *
- * @return the isUseHttpsWithDmaap
- */
- public Boolean getIsUseHttpsWithDmaap() {
- return useHttpsWithDmaap;
- }
-
- /**
* Returns the isUseHttpsWithSDC flag of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
*
* @return the isUseHttpsWithSDC
@@ -270,10 +239,10 @@ public class SdcReceptionHandlerConfigurationParameterBuilder {
/**
* Returns the asdc address of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
*
- * @return the asdcAddress
+ * @return the sdcAddress
*/
- public String getAsdcAddress() {
- return asdcAddress;
+ public String getSdcAddress() {
+ return sdcAddress;
}
/**
@@ -340,15 +309,6 @@ public class SdcReceptionHandlerConfigurationParameterBuilder {
}
/**
- * Returns the message bus address of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
- *
- * @return the messageBusAddress
- */
- public List<String> getMessageBusAddress() {
- return messageBusAddress;
- }
-
- /**
* Returns the artifact types of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance.
*
* @return the artifactTypes
diff --git a/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterGroup.java b/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterGroup.java
index c204d75..16cb612 100644
--- a/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterGroup.java
+++ b/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterGroup.java
@@ -33,27 +33,25 @@ import org.onap.policy.distribution.reception.parameters.ReceptionHandlerConfigu
*/
public class SdcReceptionHandlerConfigurationParameterGroup extends ReceptionHandlerConfigurationParameterGroup {
- private String asdcAddress;
- private List<String> messageBusAddress;
- private String user;
- private String password;
- private int pollingInterval;
- private int pollingTimeout;
- private int retryDelay;
- private int httpsProxyPort;
- private int httpProxyPort;
- private String httpsProxyHost;
- private String httpProxyHost;
- private String consumerId;
- private List<String> artifactTypes;
- private String consumerGroup;
- private String environmentName;
- private String keyStorePath;
- private String keyStorePassword;
- private boolean activeServerTlsAuth;
- private boolean isFilterInEmptyResources;
- private boolean isUseHttpsWithDmaap;
- private boolean isUseHttpsWithSDC;
+ private final String sdcAddress;
+ private final String user;
+ private final String password;
+ private final int pollingInterval;
+ private final int pollingTimeout;
+ private final int retryDelay;
+ private final int httpsProxyPort;
+ private final int httpProxyPort;
+ private final String httpsProxyHost;
+ private final String httpProxyHost;
+ private final String consumerId;
+ private final List<String> artifactTypes;
+ private final String consumerGroup;
+ private final String environmentName;
+ private final String keyStorePath;
+ private final String keyStorePassword;
+ private final boolean activeServerTlsAuth;
+ private final boolean isFilterInEmptyResources;
+ private final boolean isUseHttpsWithSDC;
/**
* The constructor for instantiating {@link SdcReceptionHandlerConfigurationParameterGroup} class.
@@ -62,8 +60,7 @@ public class SdcReceptionHandlerConfigurationParameterGroup extends ReceptionHan
*/
public SdcReceptionHandlerConfigurationParameterGroup(
final SdcReceptionHandlerConfigurationParameterBuilder builder) {
- asdcAddress = builder.getAsdcAddress();
- messageBusAddress = builder.getMessageBusAddress();
+ sdcAddress = builder.getSdcAddress();
user = builder.getUser();
password = builder.getPassword();
pollingInterval = builder.getPollingInterval();
@@ -81,17 +78,12 @@ public class SdcReceptionHandlerConfigurationParameterGroup extends ReceptionHan
keyStorePassword = builder.getKeystorePassword();
activeServerTlsAuth = builder.isActiveserverTlsAuth();
isFilterInEmptyResources = builder.isFilterinEmptyResources();
- isUseHttpsWithDmaap = builder.getIsUseHttpsWithDmaap();
isUseHttpsWithSDC = builder.getIsUseHttpsWithSDC();
}
- public String getAsdcAddress() {
- return asdcAddress;
- }
-
- public List<String> getMessageBusAddress() {
- return messageBusAddress;
+ public String getSdcAddress() {
+ return sdcAddress;
}
public String getUser() {
@@ -146,10 +138,6 @@ public class SdcReceptionHandlerConfigurationParameterGroup extends ReceptionHan
return isFilterInEmptyResources;
}
- public boolean isUseHttpsWithDmaap() {
- return isUseHttpsWithDmaap;
- }
-
public boolean isUseHttpsWithSDC() {
return isUseHttpsWithSDC;
}
@@ -176,7 +164,7 @@ public class SdcReceptionHandlerConfigurationParameterGroup extends ReceptionHan
@Override
public GroupValidationResult validate() {
final GroupValidationResult validationResult = new GroupValidationResult(this);
- validateStringElement(validationResult, asdcAddress, "asdcAddress");
+ validateStringElement(validationResult, sdcAddress, "sdcAddress");
validateStringElement(validationResult, user, "user");
validateStringElement(validationResult, consumerId, "consumerId");
validateStringElement(validationResult, consumerGroup, "consumerGroup");
@@ -185,7 +173,6 @@ public class SdcReceptionHandlerConfigurationParameterGroup extends ReceptionHan
validateIntElement(validationResult, pollingInterval, "pollingInterval");
validateIntElement(validationResult, pollingTimeout, "pollingTimeout");
validateIntElement(validationResult, retryDelay, "retryDelay");
- validateStringListElement(validationResult, messageBusAddress, "messageBusAddress");
validateStringListElement(validationResult, artifactTypes, "artifactTypes");
return validationResult;
}
diff --git a/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandlerConfigurationParameterGroup.java b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandlerConfigurationParameterGroup.java
index 8f16708..d4f029f 100644
--- a/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandlerConfigurationParameterGroup.java
+++ b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandlerConfigurationParameterGroup.java
@@ -54,9 +54,8 @@ public class TestSdcReceptionHandlerConfigurationParameterGroup {
final GroupValidationResult 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", "HELM"), config.getRelevantArtifactTypes());
- assertEquals("localhost", config.getAsdcAddress());
+ assertEquals("localhost", config.getSdcAddress());
assertEquals("policy", config.getUser());
assertEquals("policy", config.getPassword());
assertEquals(20, config.getPollingInterval());
@@ -68,7 +67,6 @@ public class TestSdcReceptionHandlerConfigurationParameterGroup {
assertEquals("null", config.getKeyStorePassword());
assertEquals(false, config.activateServerTLSAuth());
assertEquals(true, config.isFilterInEmptyResources());
- assertEquals(false, config.isUseHttpsWithDmaap());
}
@Test
@@ -89,19 +87,18 @@ public class TestSdcReceptionHandlerConfigurationParameterGroup {
public void testSdcConfigurationBuilder() {
final SdcReceptionHandlerConfigurationParameterBuilder builder =
- new SdcReceptionHandlerConfigurationParameterBuilder().setAsdcAddress("localhost")
+ new SdcReceptionHandlerConfigurationParameterBuilder().setSdcAddress("localhost")
.setConsumerGroup("policy-group").setConsumerId("policy-id").setEnvironmentName("TEST")
.setKeystorePassword("password").setKeystorePath("dummyPath").setPassword("policy")
.setPollingInterval(10).setPollingTimeout(20).setRetryDelay(30).setUser("policy")
- .setUseHttpsWithDmaap(false).setActiveserverTlsAuth(false).setFilterinEmptyResources(true)
- .setArtifactTypes(Arrays.asList("TOSCA_CSAR")).setMessageBusAddress(Arrays.asList("localhost"));
+ .setActiveserverTlsAuth(false).setFilterinEmptyResources(true)
+ .setArtifactTypes(Arrays.asList("TOSCA_CSAR"));
final SdcReceptionHandlerConfigurationParameterGroup configParameters =
new SdcReceptionHandlerConfigurationParameterGroup(builder);
configParameters.setName("SDCConfiguration");
- assertEquals(Arrays.asList("localhost"), configParameters.getMessageBusAddress());
assertEquals(Arrays.asList("TOSCA_CSAR"), configParameters.getArtifactTypes());
- assertEquals("localhost", configParameters.getAsdcAddress());
+ assertEquals("localhost", configParameters.getSdcAddress());
assertEquals("policy", configParameters.getUser());
assertEquals("policy", configParameters.getPassword());
assertEquals(10, configParameters.getPollingInterval());
@@ -114,41 +111,18 @@ public class TestSdcReceptionHandlerConfigurationParameterGroup {
assertEquals("password", configParameters.getKeyStorePassword());
assertEquals(false, configParameters.isActiveServerTlsAuth());
assertEquals(true, configParameters.isFilterInEmptyResources());
- assertEquals(false, configParameters.isUseHttpsWithDmaap());
- }
-
- @Test
- public void testSdcConfigurationWithNullList() {
-
- final SdcReceptionHandlerConfigurationParameterBuilder builder =
- new SdcReceptionHandlerConfigurationParameterBuilder().setAsdcAddress("localhost")
- .setConsumerGroup("policy-group").setConsumerId("policy-id").setEnvironmentName("TEST")
- .setKeystorePassword("password").setKeystorePath("dummyPath").setPassword("policy")
- .setPollingInterval(10).setPollingTimeout(20).setUser("policy").setUseHttpsWithDmaap(false)
- .setActiveserverTlsAuth(false).setFilterinEmptyResources(true)
- .setArtifactTypes(Arrays.asList("TOSCA_CSAR")).setMessageBusAddress(null);
- final SdcReceptionHandlerConfigurationParameterGroup configParameters =
- new SdcReceptionHandlerConfigurationParameterGroup(builder);
- configParameters.setName("SDCConfiguration");
-
- try {
- configParameters.validate();
- fail("Test must throw an exception");
- } catch (final Exception exp) {
- assertTrue(exp.getMessage().contains("collection parameter \"messageBusAddress\" is null"));
- }
}
@Test
public void testSdcConfigurationWithEmptyStringList() {
final SdcReceptionHandlerConfigurationParameterBuilder builder =
- new SdcReceptionHandlerConfigurationParameterBuilder().setAsdcAddress("localhost")
+ new SdcReceptionHandlerConfigurationParameterBuilder().setSdcAddress("localhost")
.setConsumerGroup("policy-group").setConsumerId("policy-id").setEnvironmentName("TEST")
.setKeystorePassword("password").setKeystorePath("dummyPath").setPassword("policy")
- .setPollingInterval(10).setPollingTimeout(20).setUser("policy").setUseHttpsWithDmaap(false)
+ .setPollingInterval(10).setPollingTimeout(20).setUser("policy")
.setActiveserverTlsAuth(false).setFilterinEmptyResources(true)
- .setArtifactTypes(Arrays.asList("")).setMessageBusAddress(Arrays.asList("localhost"));
+ .setArtifactTypes(Arrays.asList(""));
final SdcReceptionHandlerConfigurationParameterGroup configParameters =
new SdcReceptionHandlerConfigurationParameterGroup(builder);
configParameters.setName("SDCConfiguration");
diff --git a/artifactbroker/plugins/reception-plugins/src/test/resources/handling-sdc.json b/artifactbroker/plugins/reception-plugins/src/test/resources/handling-sdc.json
index aa548e4..6f0d050 100644
--- a/artifactbroker/plugins/reception-plugins/src/test/resources/handling-sdc.json
+++ b/artifactbroker/plugins/reception-plugins/src/test/resources/handling-sdc.json
@@ -1,11 +1,6 @@
{
"name" : "parameterConfig1",
- "asdcAddress": "localhost",
- "messageBusAddress": [
- "a.com",
- "b.com",
- "c.com"
- ],
+ "sdcAddress": "localhost",
"user": "policy",
"password": "policy",
"pollingInterval":20,
@@ -22,7 +17,6 @@
"keyStorePath": "null",
"keyStorePassword": "null",
"activeServerTlsAuth": false,
- "isFilterInEmptyResources": true,
- "isUseHttpsWithDmaap": false
+ "isFilterInEmptyResources": true
}
diff --git a/artifactbroker/plugins/reception-plugins/src/test/resources/handling-sdcInvalid.json b/artifactbroker/plugins/reception-plugins/src/test/resources/handling-sdcInvalid.json
index 65201d1..2e41017 100644
--- a/artifactbroker/plugins/reception-plugins/src/test/resources/handling-sdcInvalid.json
+++ b/artifactbroker/plugins/reception-plugins/src/test/resources/handling-sdcInvalid.json
@@ -1,11 +1,6 @@
{
"name" : "parameterConfig1",
- "asdcAddress": "",
- "messageBusAddress": [
- "a.com",
- "b.com",
- "c.com"
- ],
+ "sdcAddress": "",
"user": "tbdsdc-1480",
"password": "tbdsdc-1480",
"pollingInterval":-1,
@@ -21,7 +16,6 @@
"keyStorePath": "null",
"keyStorePassword": "null",
"activeserverTlsAuth": false,
- "isFilterInEmptyResources": true,
- "isUseHttpsWithDmaap": false
+ "isFilterInEmptyResources": true
}