diff options
author | elinuxhenrik <henrik.b.andersson@est.tech> | 2018-11-06 09:14:45 +0100 |
---|---|---|
committer | elinuxhenrik <henrik.b.andersson@est.tech> | 2018-11-06 10:54:57 +0100 |
commit | 7feb08ddbc51f53a5b0b3b1613940d09f7bc601f (patch) | |
tree | 1fe810ebfb083dee963a6f83c2e4327705fe90fe | |
parent | f964ebd72b28c29d2b00cf09803e2076996376fe (diff) |
Add cloud config of mutual authentication3.0.0-ONAP1.0.4
Change-Id: I8e51c07f750192e1aa03f13c98d3a3a8f0db0f3c
Issue-ID: DCAEGEN2-946
Signed-off-by: elinuxhenrik <henrik.b.andersson@est.tech>
-rw-r--r-- | datafile-app-server/pom.xml | 2 | ||||
-rw-r--r-- | datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/configuration/CloudConfigParser.java | 3 | ||||
-rw-r--r-- | datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/configuration/CloudConfiguration.java | 42 | ||||
-rw-r--r-- | datafile-commons/pom.xml | 2 | ||||
-rw-r--r-- | datafile-dmaap-client/pom.xml | 2 | ||||
-rw-r--r-- | pom.xml | 2 | ||||
-rw-r--r-- | version.properties | 2 |
7 files changed, 32 insertions, 23 deletions
diff --git a/datafile-app-server/pom.xml b/datafile-app-server/pom.xml index 3c91f94e..24267459 100644 --- a/datafile-app-server/pom.xml +++ b/datafile-app-server/pom.xml @@ -24,7 +24,7 @@ <parent> <groupId>org.onap.dcaegen2.collectors</groupId> <artifactId>datafile</artifactId> - <version>1.0.3-SNAPSHOT</version> + <version>1.0.4-SNAPSHOT</version> </parent> <groupId>org.onap.dcaegen2.collectors.datafile</groupId> diff --git a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/configuration/CloudConfigParser.java b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/configuration/CloudConfigParser.java index 03ef70ab..7303a68f 100644 --- a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/configuration/CloudConfigParser.java +++ b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/configuration/CloudConfigParser.java @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2018 NOKIA Intellectual Property. All rights reserved. + * Copyright (C) 2018 NOKIA Intellectual Property, 2018 Nordix Foundation. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +27,7 @@ import org.onap.dcaegen2.collectors.datafile.config.ImmutableDmaapPublisherConfi /** * @author <a href="mailto:przemyslaw.wasala@nokia.com">Przemysław Wąsala</a> on 9/19/18 + * @author <a href="mailto:henrik.b.andersson@est.tech">Henrik Andersson</a> */ public class CloudConfigParser { diff --git a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/configuration/CloudConfiguration.java b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/configuration/CloudConfiguration.java index 7bf711bc..f7722053 100644 --- a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/configuration/CloudConfiguration.java +++ b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/configuration/CloudConfiguration.java @@ -1,26 +1,26 @@ /* - * ============LICENSE_START======================================================= - * Copyright (C) 2018 NOKIA Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * ============LICENSE_START====================================================================== + * Copyright (C) 2018 NOKIA Intellectual Property, 2018 Nordix Foundation. All rights reserved. + * =============================================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END======================================================================== */ package org.onap.dcaegen2.collectors.datafile.configuration; import com.google.gson.JsonObject; + import java.util.Optional; import java.util.Properties; + import org.onap.dcaegen2.collectors.datafile.config.DmaapConsumerConfiguration; import org.onap.dcaegen2.collectors.datafile.config.DmaapPublisherConfiguration; import org.onap.dcaegen2.collectors.datafile.model.EnvProperties; @@ -33,11 +33,13 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; import org.springframework.scheduling.annotation.EnableScheduling; + import reactor.core.publisher.Flux; import reactor.core.scheduler.Schedulers; /** * @author <a href="mailto:przemyslaw.wasala@nokia.com">Przemysław Wąsala</a> on 9/19/18 + * @author <a href="mailto:henrik.b.andersson@est.tech">Henrik Andersson</a> */ @Configuration @EnableConfigurationProperties @@ -50,6 +52,7 @@ public class CloudConfiguration extends AppConfig { private DatafileConfigurationProvider datafileConfigurationProvider; private DmaapPublisherConfiguration dmaapPublisherCloudConfiguration; private DmaapConsumerConfiguration dmaapConsumerCloudConfiguration; + private FtpesConfig ftpesCloudConfiguration; @Value("#{systemEnvironment}") private Properties systemEnvironment; @@ -61,9 +64,8 @@ public class CloudConfiguration extends AppConfig { protected void runTask() { - Flux.defer(() -> EnvironmentProcessor.evaluate(systemEnvironment)) - .subscribeOn(Schedulers.parallel()) - .subscribe(this::parsingConfigSuccess, this::parsingConfigError); + Flux.defer(() -> EnvironmentProcessor.evaluate(systemEnvironment)).subscribeOn(Schedulers.parallel()) + .subscribe(this::parsingConfigSuccess, this::parsingConfigError); } private void parsingConfigError(Throwable throwable) { @@ -77,7 +79,7 @@ public class CloudConfiguration extends AppConfig { private void parsingConfigSuccess(EnvProperties envProperties) { logger.info("Fetching Datafile Collector configuration from ConfigBindingService/Consul"); datafileConfigurationProvider.callForDataFileCollectorConfiguration(envProperties) - .subscribe(this::parseCloudConfig, this::cloudConfigError); + .subscribe(this::parseCloudConfig, this::cloudConfigError); } private void parseCloudConfig(JsonObject jsonObject) { @@ -85,6 +87,7 @@ public class CloudConfiguration extends AppConfig { CloudConfigParser cloudConfigParser = new CloudConfigParser(jsonObject); dmaapPublisherCloudConfiguration = cloudConfigParser.getDmaapPublisherConfig(); dmaapConsumerCloudConfiguration = cloudConfigParser.getDmaapConsumerConfig(); + ftpesCloudConfiguration = cloudConfigParser.getFtpesConfig(); } @Override @@ -96,4 +99,9 @@ public class CloudConfiguration extends AppConfig { public DmaapConsumerConfiguration getDmaapConsumerConfiguration() { return Optional.ofNullable(dmaapConsumerCloudConfiguration).orElse(super.getDmaapConsumerConfiguration()); } + + @Override + public FtpesConfig getFtpesConfiguration() { + return Optional.ofNullable(ftpesCloudConfiguration).orElse(super.getFtpesConfiguration()); + } } diff --git a/datafile-commons/pom.xml b/datafile-commons/pom.xml index 1ae3c2da..8c6e2e6a 100644 --- a/datafile-commons/pom.xml +++ b/datafile-commons/pom.xml @@ -24,7 +24,7 @@ <parent> <groupId>org.onap.dcaegen2.collectors</groupId> <artifactId>datafile</artifactId> - <version>1.0.3-SNAPSHOT</version> + <version>1.0.4-SNAPSHOT</version> </parent> <groupId>org.onap.dcaegen2.collectors.datafile</groupId> diff --git a/datafile-dmaap-client/pom.xml b/datafile-dmaap-client/pom.xml index 5006b002..52394ad5 100644 --- a/datafile-dmaap-client/pom.xml +++ b/datafile-dmaap-client/pom.xml @@ -24,7 +24,7 @@ <parent> <groupId>org.onap.dcaegen2.collectors</groupId> <artifactId>datafile</artifactId> - <version>1.0.3-SNAPSHOT</version> + <version>1.0.4-SNAPSHOT</version> </parent> <groupId>org.onap.dcaegen2.collectors.datafile</groupId> @@ -30,7 +30,7 @@ <groupId>org.onap.dcaegen2.collectors</groupId> <artifactId>datafile</artifactId> - <version>1.0.3-SNAPSHOT</version> + <version>1.0.4-SNAPSHOT</version> <name>dcaegen2-collectors.datafile</name> <description>datafile collector</description> diff --git a/version.properties b/version.properties index 39e03d93..d4894448 100644 --- a/version.properties +++ b/version.properties @@ -1,6 +1,6 @@ major=1
minor=0
-patch=3
+patch=4
base_version=${major}.${minor}.${patch}
release_version=${base_version}
snapshot_version=${base_version}-SNAPSHOT
|