diff options
author | Vijay Venkatesh Kumar <vv770d@att.com> | 2022-03-29 21:03:59 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2022-03-29 21:03:59 +0000 |
commit | 8bac5aa914270399462e48aac19852523a25ba39 (patch) | |
tree | f9e9872381525fe1a039a66cc7da7648fd8b4bd6 /UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/VESAdapterInitializer.java | |
parent | 8e08680b7371ce9b6dfd80ba4d0810c54f55c1f6 (diff) | |
parent | e78a901ef86740ec3a5ad9d831831eede3fa0a93 (diff) |
Merge "VESMapper relying on CBS interface"1.4.0
Diffstat (limited to 'UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/VESAdapterInitializer.java')
-rw-r--r-- | UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/VESAdapterInitializer.java | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/VESAdapterInitializer.java b/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/VESAdapterInitializer.java index 01da983..e996669 100644 --- a/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/VESAdapterInitializer.java +++ b/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/VESAdapterInitializer.java @@ -3,6 +3,7 @@ * ONAP : DCAE * ================================================================================ * Copyright 2018-2019 TechMahindra + * Copyright (C) 2022 Huawei Technologies Co., Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,7 +42,7 @@ import org.onap.dcaegen2.services.sdk.rest.services.cbs.client.model.CbsRequest; import org.onap.dcaegen2.services.sdk.rest.services.cbs.client.model.CbsClientConfiguration; import org.onap.dcaegen2.services.sdk.rest.services.model.logging.RequestDiagnosticContext; import org.onap.universalvesadapter.utils.CollectorConfigPropertyRetrieval; -import org.onap.universalvesadapter.utils.FetchDynamicConfig; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -95,22 +96,13 @@ public class VESAdapterInitializer implements CommandLineRunner, Ordered { // Create the client and use it to get the configuration CbsClientFactory.createCbsClient(env).flatMapMany(cbsClient -> cbsClient.updates(request, initialDelay, period)) .subscribe(jsonObject -> { - - // If env details not fetched static configuration file will be used - if (env.consulHost() != null && env.cbsName() != null && env.appName() != null) { - debugLogger.info(">>>Dynamic configuration to be used"); - FetchDynamicConfig.cbsCall(defaultConfigFilelocation); - } - readJsonToMap(defaultConfigFilelocation); debugLogger.info("Triggering controller's start url "); fetchResultFromDestination("http://localhost:" + serverPort + "/start"); - }, throwable -> { debugLogger.warn("Cannot Connect", throwable); }); - } /** |