diff options
Diffstat (limited to 'sdc-distribution-ci/src/main/java/org')
-rw-r--r-- | sdc-distribution-ci/src/main/java/org/onap/test/core/config/DistributionClientConfig.java | 2 | ||||
-rw-r--r-- | sdc-distribution-ci/src/main/java/org/onap/test/core/service/ClientNotifyCallback.java | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/sdc-distribution-ci/src/main/java/org/onap/test/core/config/DistributionClientConfig.java b/sdc-distribution-ci/src/main/java/org/onap/test/core/config/DistributionClientConfig.java index be6f6a6..8a02801 100644 --- a/sdc-distribution-ci/src/main/java/org/onap/test/core/config/DistributionClientConfig.java +++ b/sdc-distribution-ci/src/main/java/org/onap/test/core/config/DistributionClientConfig.java @@ -38,7 +38,7 @@ public class DistributionClientConfig implements IConfiguration { public static final String DEFAULT_KEY_STORE_PATH = "etc/asdc-client.jks"; public static final String DEFAULT_KEY_STORE_PASSWORD = "Aa123456"; public static final boolean DEFAULT_ACTIVATE_SERVER_TLS_AUTH = false; - public static final boolean DEFAULT_IS_FILTER_IN_EMPTY_RESOURCES = false; + public static final boolean DEFAULT_IS_FILTER_IN_EMPTY_RESOURCES = true; public static final boolean DEFAULT_USE_HTTPS_WITH_SDC = false; public static final String DEFAULT_MSG_BUS_ADDRESS = "localhost"; private String asdcAddress; diff --git a/sdc-distribution-ci/src/main/java/org/onap/test/core/service/ClientNotifyCallback.java b/sdc-distribution-ci/src/main/java/org/onap/test/core/service/ClientNotifyCallback.java index 7737457..4dfe388 100644 --- a/sdc-distribution-ci/src/main/java/org/onap/test/core/service/ClientNotifyCallback.java +++ b/sdc-distribution-ci/src/main/java/org/onap/test/core/service/ClientNotifyCallback.java @@ -25,6 +25,7 @@ import org.onap.sdc.api.notification.INotificationData; import org.onap.sdc.api.notification.IResourceInstance; import org.onap.sdc.http.HttpAsdcClient; import org.onap.sdc.http.SdcConnectorClient; +import org.onap.sdc.impl.DistributionClientDownloadResultImpl; import org.onap.sdc.impl.DistributionClientImpl; import org.onap.sdc.utils.DistributionStatusEnum; import org.onap.test.core.config.DistributionClientConfig; @@ -33,6 +34,7 @@ import org.slf4j.LoggerFactory; import java.time.LocalDateTime; import java.time.ZoneOffset; +import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -42,11 +44,16 @@ public class ClientNotifyCallback implements INotificationCallback { private final List<ArtifactsValidator> validators; private final DistributionClientImpl distributionClient; + private final List<DistributionClientDownloadResultImpl> pulledArtifacts = new ArrayList<>(); DistributionClientConfig config = new DistributionClientConfig(); HttpAsdcClient asdcClient = new HttpAsdcClient(config); - SdcConnectorClient sdcConnectorClient = new SdcConnectorClient(config,asdcClient); + SdcConnectorClient sdcConnectorClient = new SdcConnectorClient(config, asdcClient); ArtifactsDownloader artifactsDownloader = new ArtifactsDownloader("/app/path", sdcConnectorClient); + public List<DistributionClientDownloadResultImpl> getPulledArtifacts() { + return List.copyOf(pulledArtifacts); + } + public ClientNotifyCallback(List<ArtifactsValidator> validators, DistributionClientImpl distributionClient) { this.validators = validators; this.distributionClient = distributionClient; @@ -55,7 +62,7 @@ public class ClientNotifyCallback implements INotificationCallback { @Override public void activateCallback(INotificationData inotificationData) { logServiceInfo(inotificationData); - artifactsDownloader.pullArtifacts(inotificationData); + pulledArtifacts.addAll(artifactsDownloader.pullArtifacts(inotificationData)); } private void logServiceInfo(INotificationData service) { |