Implement second part of dynamic DMaaP config 17/58617/4
authorPawelSzalapski <pawel.szalapski@nokia.com>
Thu, 2 Aug 2018 08:31:56 +0000 (10:31 +0200)
committerPawelSzalapski <pawel.szalapski@nokia.com>
Mon, 6 Aug 2018 07:43:32 +0000 (09:43 +0200)
commit7752c2d818e6d19e4d805c2fd6760b4a13d601bc
tree053cbc5afd76a8b9644ec62298053aad8cf5e2a8
parent654ebdff4c9ec2487b819d2b76273732759de4c7
Implement second part of dynamic DMaaP config

VESCollector app can now fetch CBS configuration and
rebuilt the part regarding sending events dynamically,
without restarting application.
Application will still be restarted by a .sh script,
if there were changes regarding collector.properties file.
The decision of whether dynamic configuration should be
triggered is now based on existence of env vars
CONSUL_HOST, CONFIG_BINDING_SERVICE, HOSTNAME,
not as previously on CBSPOLLTIME.
Frequency at which the config check should happen is
now exposed via property from collector.properties

Change-Id: I98ff160fa51d08d84a23c716d90ceaacbe17ada6
Signed-off-by: PawelSzalapski <pawel.szalapski@nokia.com>
Issue-ID: DCAEGEN2-519
33 files changed:
etc/collector.properties
pom.xml
src/main/java/org/onap/dcae/ApplicationSettings.java
src/main/java/org/onap/dcae/VesApplication.java
src/main/java/org/onap/dcae/commonFunction/event/publishing/DMaaPConfigurationParser.java
src/main/java/org/onap/dcae/commonFunction/event/publishing/DMaaPPublishersBuilder.java
src/main/java/org/onap/dcae/commonFunction/event/publishing/VavrUtils.java
src/main/java/org/onap/dcae/controller/ConfigFilesFacade.java [new file with mode: 0644]
src/main/java/org/onap/dcae/controller/ConfigLoader.java [new file with mode: 0644]
src/main/java/org/onap/dcae/controller/ConfigParsing.java [new file with mode: 0644]
src/main/java/org/onap/dcae/controller/ConfigSource.java [new file with mode: 0644]
src/main/java/org/onap/dcae/controller/Conversions.java [new file with mode: 0644]
src/main/java/org/onap/dcae/controller/EnvPropertiesReader.java [new file with mode: 0644]
src/main/java/org/onap/dcae/controller/EnvProps.java [new file with mode: 0644]
src/main/java/org/onap/dcae/controller/FetchDynamicConfig.java [deleted file]
src/main/java/org/onap/dcae/controller/LoadDynamicConfig.java [deleted file]
src/main/java/org/onap/dcae/controller/PreAppStartupConfigUpdater.java [new file with mode: 0644]
src/main/java/org/onap/dcae/restapi/VesRestController.java
src/main/scripts/VESConfigPoller.sh [deleted file]
src/main/scripts/VESrestfulCollector.sh [deleted file]
src/main/scripts/appController.sh [new file with mode: 0644]
src/main/scripts/configurationPoller.sh [new file with mode: 0644]
src/main/scripts/docker-entry.sh
src/test/java/org/onap/dcae/ApplicationSettingsTest.java
src/test/java/org/onap/dcae/TestingUtilities.java [new file with mode: 0644]
src/test/java/org/onap/dcae/WiremockBasedTest.java [new file with mode: 0644]
src/test/java/org/onap/dcae/controller/ConfigCBSSourceTest.java [new file with mode: 0644]
src/test/java/org/onap/dcae/controller/ConfigFilesFacadeTest.java [new file with mode: 0644]
src/test/java/org/onap/dcae/controller/ConfigLoaderIntegrationE2ETest.java [new file with mode: 0644]
src/test/java/org/onap/dcae/controller/ConfigParsingTest.java [new file with mode: 0644]
src/test/java/org/onap/dcae/controller/EnvPropertiesReaderTest.java [new file with mode: 0644]
src/test/java/org/onap/dcae/vestest/TestFetchConfig.java [deleted file]
src/test/java/org/onap/dcae/vestest/TestLoadDynamicConfig.java [deleted file]