<groupId>org.onap.dcaegen2.services.son-handler</groupId>
<artifactId>son-handler</artifactId>
<name>dcaegen2-services-son-handler</name>
- <version>2.1.3-SNAPSHOT</version>
+ <version>2.1.4-SNAPSHOT</version>
<!--parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version> </parent -->
<properties>
- <sdk.version>1.1.4</sdk.version>
+ <sdk.version>1.8.6</sdk.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
* ============LICENSE_START=======================================================
* son-handler
* ================================================================================
- * Copyright (C) 2019-2020 Wipro Limited.
+ * Copyright (C) 2019-2021 Wipro Limited.
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import org.onap.dcaegen2.services.sdk.rest.services.cbs.client.api.CbsClientFactory;
import org.onap.dcaegen2.services.sdk.rest.services.cbs.client.api.CbsRequests;
import org.onap.dcaegen2.services.sdk.rest.services.cbs.client.model.CbsRequest;
-import org.onap.dcaegen2.services.sdk.rest.services.cbs.client.model.EnvProperties;
+import org.onap.dcaegen2.services.sdk.rest.services.cbs.client.model.CbsClientConfiguration;
+import org.onap.dcaegen2.services.sdk.rest.services.model.logging.ImmutableRequestDiagnosticContext;
import org.onap.dcaegen2.services.sdk.rest.services.model.logging.RequestDiagnosticContext;
import org.onap.dcaegen2.services.sonhms.ConfigPolicy;
import org.onap.dcaegen2.services.sonhms.Configuration;
log.info("getAppconfig start ..");
RequestDiagnosticContext diagnosticContext = RequestDiagnosticContext.create();
// Read necessary properties from the environment
- final EnvProperties env = EnvProperties.fromEnvironment();
- log.debug("environments {}", env);
+ final CbsClientConfiguration cbsClientConfiguration = CbsClientConfiguration.fromEnvironment();
+ log.debug("environments {}", cbsClientConfiguration);
ConfigPolicy configPolicy = ConfigPolicy.getInstance();
// Polling properties
// Create the client and use it to get the configuration
final CbsRequest request = CbsRequests.getAll(diagnosticContext);
- return CbsClientFactory.createCbsClient(env)
+ return CbsClientFactory.createCbsClient(cbsClientConfiguration)
.flatMapMany(cbsClient -> cbsClient.updates(request, initialDelay, period)).subscribe(jsonObject -> {
log.info("configuration and policy from CBS {}", jsonObject);
JsonObject config = jsonObject.getAsJsonObject("config");
}
}
-}
\ No newline at end of file
+}