- uplifted spring boot from 3.1.2 to 3.2.4
- removed redundant dependencies
- upgraded relevant dependencies
- use of @Bean(some_name) is give a specific bean name
- using @Bean(some_name) with @Qualifier so on the injection point to specify which bean to actually inject, this is used as we deal with multiple beans of the same type.
Issue-ID: CPS-2101
Change-Id: I64d5bf567b9eb03fb39034a46528d0160b332715
Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
24 files changed:
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
</dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
</dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-http</artifactId>
- </dependency>
- <dependency>
- <groupId>jakarta.servlet</groupId>
- <artifactId>jakarta.servlet-api</artifactId>
- </dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>org.junit.vintage</groupId>
- <artifactId>junit-vintage-engine</artifactId>
- </exclusion>
- </exclusions>
</dependency>
</dependencies>
</dependency>
</dependencies>
liquibase:
change-log: classpath:changelog/changelog-master.yaml
liquibase:
change-log: classpath:changelog/changelog-master.yaml
- labels: ${LIQUIBASE_LABELS}
+ label-filter: ${LIQUIBASE_LABELS}
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
- <version>2.0.2</version>
+ <version>2.4.0</version>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
- <version>3.1.2</version>
+ <version>3.2.4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
- <version>2022.0.3</version>
+ <version>2023.0.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<type>pom</type>
<scope>import</scope>
</dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-test</artifactId>
- <version>6.0.11</version>
- </dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId>
- <version>3.1.2</version>
+ <version>3.2.4</version>
</dependency>
<!-- A L P H A B E T I C A L D E P E N D E N C I E S -->
<dependency>
</dependency>
<!-- A L P H A B E T I C A L D E P E N D E N C I E S -->
<dependency>
</dependency>
<dependency>
<groupId>io.hypersistence</groupId>
</dependency>
<dependency>
<groupId>io.hypersistence</groupId>
- <artifactId>hypersistence-utils-hibernate-60</artifactId>
- <version>3.5.0</version>
+ <artifactId>hypersistence-utils-hibernate-63</artifactId>
+ <version>3.7.3</version>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>groovy</artifactId>
<version>${groovy.version}</version>
</dependency>
<artifactId>groovy</artifactId>
<version>${groovy.version}</version>
</dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-server</artifactId>
- <version>${jetty-version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-http</artifactId>
- <version>${jetty-version}</version>
- </dependency>
<dependency>
<groupId>org.codehaus.janino</groupId>
<artifactId>janino</artifactId>
<dependency>
<groupId>org.codehaus.janino</groupId>
<artifactId>janino</artifactId>
<artifactId>annotations</artifactId>
<version>22.0.0</version>
</dependency>
<artifactId>annotations</artifactId>
<version>22.0.0</version>
</dependency>
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-api</artifactId>
- <version>5.10.0</version>
- </dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<!--
============LICENSE_START=======================================================
<!--
============LICENSE_START=======================================================
- Copyright (C) 2023 Nordix Foundation
+ Copyright (C) 2023-2024 Nordix Foundation
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
<groupId>org.onap.cps</groupId>
<artifactId>cps-ncmp-rest</artifactId>
</dependency>
<groupId>org.onap.cps</groupId>
<artifactId>cps-ncmp-rest</artifactId>
</dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-server</artifactId>
- </dependency>
- <dependency>
- <groupId>jakarta.servlet</groupId>
- <artifactId>jakarta.servlet-api</artifactId>
- </dependency>
<!-- T E S T - D E P E N D E N C I E S -->
<dependency>
<groupId>org.spockframework</groupId>
<!-- T E S T - D E P E N D E N C I E S -->
<dependency>
<groupId>org.spockframework</groupId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>org.junit.vintage</groupId>
- <artifactId>junit-vintage-engine</artifactId>
- </exclusion>
- </exclusions>
</dependency>
<dependency>
<groupId>org.spockframework</groupId>
</dependency>
<dependency>
<groupId>org.spockframework</groupId>
# ============LICENSE_START=======================================================
# ============LICENSE_START=======================================================
-# Copyright (C) 2021 Nordix Foundation
+# Copyright (C) 2021-2024 Nordix Foundation
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# ============LICENSE_END=========================================================
config.stopBubbling = true
# ============LICENSE_END=========================================================
config.stopBubbling = true
-lombok.addLombokGeneratedAnnotation = true
\ No newline at end of file
+lombok.addLombokGeneratedAnnotation = true
+lombok.copyableAnnotations += org.springframework.beans.factory.annotation.Qualifier
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
============LICENSE_START=======================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
============LICENSE_START=======================================================
- Copyright (C) 2021-2023 Nordix Foundation
+ Copyright (C) 2021-2024 Nordix Foundation
Modifications Copyright (C) 2021 Bell Canada
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
Modifications Copyright (C) 2021 Bell Canada
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>org.junit.vintage</groupId>
- <artifactId>junit-vintage-engine</artifactId>
- </exclusion>
- </exclusions>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.onap.cps.ncmp.api.NetworkCmProxyDataService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.onap.cps.ncmp.api.NetworkCmProxyDataService;
+import org.onap.cps.ncmp.api.impl.config.embeddedcache.TrustLevelCacheConfig;
import org.onap.cps.ncmp.api.impl.exception.InvalidDatastoreException;
import org.onap.cps.ncmp.api.impl.inventory.CompositeState;
import org.onap.cps.ncmp.api.impl.operations.DatastoreType;
import org.onap.cps.ncmp.api.impl.exception.InvalidDatastoreException;
import org.onap.cps.ncmp.api.impl.inventory.CompositeState;
import org.onap.cps.ncmp.api.impl.operations.DatastoreType;
import org.onap.cps.ncmp.rest.util.DeprecationHelper;
import org.onap.cps.spi.model.ModuleDefinition;
import org.onap.cps.utils.JsonObjectMapper;
import org.onap.cps.ncmp.rest.util.DeprecationHelper;
import org.onap.cps.spi.model.ModuleDefinition;
import org.onap.cps.utils.JsonObjectMapper;
+import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.util.StringUtils;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.util.StringUtils;
private final NcmpCachedResourceRequestHandler ncmpCachedResourceRequestHandler;
private final NcmpPassthroughResourceRequestHandler ncmpPassthroughResourceRequestHandler;
private final DataOperationRequestMapper dataOperationRequestMapper;
private final NcmpCachedResourceRequestHandler ncmpCachedResourceRequestHandler;
private final NcmpPassthroughResourceRequestHandler ncmpPassthroughResourceRequestHandler;
private final DataOperationRequestMapper dataOperationRequestMapper;
+ @Qualifier(TrustLevelCacheConfig.TRUST_LEVEL_PER_CM_HANDLE)
private final Map<String, TrustLevel> trustLevelPerCmHandle;
/**
private final Map<String, TrustLevel> trustLevelPerCmHandle;
/**
# ============LICENSE_START=======================================================
# ============LICENSE_START=======================================================
-# Copyright (C) 2021-2022 Nordix Foundation
+# Copyright (C) 2021-2024 Nordix Foundation
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# ============LICENSE_END=========================================================
config.stopBubbling = true
# ============LICENSE_END=========================================================
config.stopBubbling = true
-lombok.addLombokGeneratedAnnotation = true
\ No newline at end of file
+lombok.addLombokGeneratedAnnotation = true
+lombok.copyableAnnotations += org.springframework.beans.factory.annotation.Qualifier
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
============LICENSE_START=======================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
============LICENSE_START=======================================================
- Copyright (C) 2021-2023 Nordix Foundation
+ Copyright (C) 2021-2024 Nordix Foundation
Modifications Copyright (C) 2021 Pantheon.tech
Modifications Copyright (C) 2022 Bell Canada
================================================================================
Modifications Copyright (C) 2021 Pantheon.tech
Modifications Copyright (C) 2022 Bell Canada
================================================================================
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>org.junit.vintage</groupId>
- <artifactId>junit-vintage-engine</artifactId>
- </exclusion>
- </exclusions>
</dependency>
<dependency>
<groupId>org.spockframework</groupId>
</dependency>
<dependency>
<groupId>org.spockframework</groupId>
import org.onap.cps.api.CpsDataService;
import org.onap.cps.ncmp.api.NetworkCmProxyCmHandleQueryService;
import org.onap.cps.ncmp.api.NetworkCmProxyDataService;
import org.onap.cps.api.CpsDataService;
import org.onap.cps.ncmp.api.NetworkCmProxyCmHandleQueryService;
import org.onap.cps.ncmp.api.NetworkCmProxyDataService;
+import org.onap.cps.ncmp.api.impl.config.embeddedcache.TrustLevelCacheConfig;
import org.onap.cps.ncmp.api.impl.events.lcm.LcmEventsCmHandleStateHandler;
import org.onap.cps.ncmp.api.impl.inventory.CmHandleQueries;
import org.onap.cps.ncmp.api.impl.inventory.CmHandleState;
import org.onap.cps.ncmp.api.impl.events.lcm.LcmEventsCmHandleStateHandler;
import org.onap.cps.ncmp.api.impl.inventory.CmHandleQueries;
import org.onap.cps.ncmp.api.impl.inventory.CmHandleState;
import org.onap.cps.spi.model.ModuleDefinition;
import org.onap.cps.spi.model.ModuleReference;
import org.onap.cps.utils.JsonObjectMapper;
import org.onap.cps.spi.model.ModuleDefinition;
import org.onap.cps.spi.model.ModuleReference;
import org.onap.cps.utils.JsonObjectMapper;
+import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
private final LcmEventsCmHandleStateHandler lcmEventsCmHandleStateHandler;
private final CpsDataService cpsDataService;
private final IMap<String, Object> moduleSyncStartedOnCmHandles;
private final LcmEventsCmHandleStateHandler lcmEventsCmHandleStateHandler;
private final CpsDataService cpsDataService;
private final IMap<String, Object> moduleSyncStartedOnCmHandles;
+
+ @Qualifier(TrustLevelCacheConfig.TRUST_LEVEL_PER_DMI_PLUGIN)
private final Map<String, TrustLevel> trustLevelPerDmiPlugin;
private final Map<String, TrustLevel> trustLevelPerDmiPlugin;
private final TrustLevelManager trustLevelManager;
private final AlternateIdChecker alternateIdChecker;
private final TrustLevelManager trustLevelManager;
private final AlternateIdChecker alternateIdChecker;
/*
* ============LICENSE_START========================================================
/*
* ============LICENSE_START========================================================
- * Copyright (C) 2023 Nordix Foundation
+ * Copyright (C) 2023-2024 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@Configuration
public class TrustLevelCacheConfig extends HazelcastCacheConfig {
@Configuration
public class TrustLevelCacheConfig extends HazelcastCacheConfig {
+ public static final String TRUST_LEVEL_PER_DMI_PLUGIN = "trustLevelPerDmiPlugin";
+
+ public static final String TRUST_LEVEL_PER_CM_HANDLE = "trustLevelPerCmHandle";
private static final MapConfig trustLevelPerCmHandleCacheConfig =
createMapConfig("trustLevelPerCmHandleCacheConfig");
private static final MapConfig trustLevelPerCmHandleCacheConfig =
createMapConfig("trustLevelPerCmHandleCacheConfig");
*
* @return configured map of cm handle name as keys to trust-level for values.
*/
*
* @return configured map of cm handle name as keys to trust-level for values.
*/
+ @Bean(TRUST_LEVEL_PER_CM_HANDLE)
public Map<String, TrustLevel> trustLevelPerCmHandle() {
return createHazelcastInstance("hazelcastInstanceTrustLevelPerCmHandleMap",
public Map<String, TrustLevel> trustLevelPerCmHandle() {
return createHazelcastInstance("hazelcastInstanceTrustLevelPerCmHandleMap",
- trustLevelPerCmHandleCacheConfig).getMap("trustLevelPerCmHandle");
+ trustLevelPerCmHandleCacheConfig).getMap(TRUST_LEVEL_PER_CM_HANDLE);
*
* @return configured map of dmi-plugin name as keys to trust-level for values.
*/
*
* @return configured map of dmi-plugin name as keys to trust-level for values.
*/
+ @Bean(TRUST_LEVEL_PER_DMI_PLUGIN)
public Map<String, TrustLevel> trustLevelPerDmiPlugin() {
return createHazelcastInstance("hazelcastInstanceTrustLevelPerDmiPluginMap",
public Map<String, TrustLevel> trustLevelPerDmiPlugin() {
return createHazelcastInstance("hazelcastInstanceTrustLevelPerDmiPluginMap",
- trustLevelPerDmiPluginCacheConfig).getMap("trustLevelPerDmiPlugin");
+ trustLevelPerDmiPluginCacheConfig).getMap(TRUST_LEVEL_PER_DMI_PLUGIN);
/*
* ============LICENSE_START=======================================================
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2022-2023 Nordix Foundation
+ * Copyright (C) 2022-2024 Nordix Foundation
* Modifications Copyright (C) 2023 TechMahindra Ltd.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* Modifications Copyright (C) 2023 TechMahindra Ltd.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
import java.util.Map;
import java.util.stream.Collectors;
import lombok.RequiredArgsConstructor;
import java.util.Map;
import java.util.stream.Collectors;
import lombok.RequiredArgsConstructor;
+import org.onap.cps.ncmp.api.impl.config.embeddedcache.TrustLevelCacheConfig;
import org.onap.cps.ncmp.api.impl.inventory.enums.PropertyType;
import org.onap.cps.ncmp.api.impl.trustlevel.TrustLevel;
import org.onap.cps.spi.CpsDataPersistenceService;
import org.onap.cps.spi.FetchDescendantsOption;
import org.onap.cps.spi.model.DataNode;
import org.onap.cps.spi.utils.CpsValidator;
import org.onap.cps.ncmp.api.impl.inventory.enums.PropertyType;
import org.onap.cps.ncmp.api.impl.trustlevel.TrustLevel;
import org.onap.cps.spi.CpsDataPersistenceService;
import org.onap.cps.spi.FetchDescendantsOption;
import org.onap.cps.spi.model.DataNode;
import org.onap.cps.spi.utils.CpsValidator;
+import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
@RequiredArgsConstructor
import org.springframework.stereotype.Component;
@RequiredArgsConstructor
private static final String DESCENDANT_PATH = "//";
private static final String ANCESTOR_CM_HANDLES = "/ancestor::cm-handles";
private final CpsDataPersistenceService cpsDataPersistenceService;
private static final String DESCENDANT_PATH = "//";
private static final String ANCESTOR_CM_HANDLES = "/ancestor::cm-handles";
private final CpsDataPersistenceService cpsDataPersistenceService;
+
+ @Qualifier(TrustLevelCacheConfig.TRUST_LEVEL_PER_DMI_PLUGIN)
private final Map<String, TrustLevel> trustLevelPerDmiPlugin;
private final Map<String, TrustLevel> trustLevelPerDmiPlugin;
+
+ @Qualifier(TrustLevelCacheConfig.TRUST_LEVEL_PER_CM_HANDLE)
private final Map<String, TrustLevel> trustLevelPerCmHandle;
private final Map<String, TrustLevel> trustLevelPerCmHandle;
private final CpsValidator cpsValidator;
@Override
private final CpsValidator cpsValidator;
@Override
/*
* ============LICENSE_START=======================================================
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2023 Nordix Foundation
+ * Copyright (C) 2023-2024 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import java.util.Map;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import java.util.Map;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
+import org.onap.cps.ncmp.api.impl.config.embeddedcache.TrustLevelCacheConfig;
import org.onap.cps.ncmp.api.impl.events.avc.ncmptoclient.AvcEventPublisher;
import org.onap.cps.ncmp.api.impl.inventory.InventoryPersistence;
import org.onap.cps.ncmp.api.impl.operations.RequiredDmiService;
import org.onap.cps.ncmp.api.impl.yangmodels.YangModelCmHandle;
import org.onap.cps.ncmp.api.impl.events.avc.ncmptoclient.AvcEventPublisher;
import org.onap.cps.ncmp.api.impl.inventory.InventoryPersistence;
import org.onap.cps.ncmp.api.impl.operations.RequiredDmiService;
import org.onap.cps.ncmp.api.impl.yangmodels.YangModelCmHandle;
+import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
@Slf4j
import org.springframework.stereotype.Service;
@Slf4j
@RequiredArgsConstructor
public class TrustLevelManager {
@RequiredArgsConstructor
public class TrustLevelManager {
+ @Qualifier(TrustLevelCacheConfig.TRUST_LEVEL_PER_CM_HANDLE)
private final Map<String, TrustLevel> trustLevelPerCmHandle;
private final Map<String, TrustLevel> trustLevelPerCmHandle;
+
+ @Qualifier(TrustLevelCacheConfig.TRUST_LEVEL_PER_DMI_PLUGIN)
private final Map<String, TrustLevel> trustLevelPerDmiPlugin;
private final Map<String, TrustLevel> trustLevelPerDmiPlugin;
private final InventoryPersistence inventoryPersistence;
private final AvcEventPublisher avcEventPublisher;
private static final String AVC_CHANGED_ATTRIBUTE_NAME = "trustLevel";
private final InventoryPersistence inventoryPersistence;
private final AvcEventPublisher avcEventPublisher;
private static final String AVC_CHANGED_ATTRIBUTE_NAME = "trustLevel";
/*
* ============LICENSE_START=======================================================
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2023 Nordix Foundation
+ * Copyright (C) 2023-2024 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import lombok.extern.slf4j.Slf4j;
import org.onap.cps.ncmp.api.NetworkCmProxyDataService;
import org.onap.cps.ncmp.api.impl.client.DmiRestClient;
import lombok.extern.slf4j.Slf4j;
import org.onap.cps.ncmp.api.NetworkCmProxyDataService;
import org.onap.cps.ncmp.api.impl.client.DmiRestClient;
+import org.onap.cps.ncmp.api.impl.config.embeddedcache.TrustLevelCacheConfig;
import org.onap.cps.ncmp.api.impl.trustlevel.TrustLevel;
import org.onap.cps.ncmp.api.impl.trustlevel.TrustLevelManager;
import org.onap.cps.ncmp.api.impl.trustlevel.TrustLevel;
import org.onap.cps.ncmp.api.impl.trustlevel.TrustLevelManager;
+import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
private final DmiRestClient dmiRestClient;
private final NetworkCmProxyDataService networkCmProxyDataService;
private final TrustLevelManager trustLevelManager;
private final DmiRestClient dmiRestClient;
private final NetworkCmProxyDataService networkCmProxyDataService;
private final TrustLevelManager trustLevelManager;
+
+ @Qualifier(TrustLevelCacheConfig.TRUST_LEVEL_PER_DMI_PLUGIN)
private final Map<String, TrustLevel> trustLevelPerDmiPlugin;
/**
private final Map<String, TrustLevel> trustLevelPerDmiPlugin;
/**
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
- <version>3.1.2</version>
+ <version>3.2.4</version>
<executions>
<execution>
<goals>
<executions>
<execution>
<goals>
<?xml version="1.0" encoding="UTF-8"?>
<!--
============LICENSE_START=======================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
============LICENSE_START=======================================================
- Copyright (c) 2021 Linux Foundation.
+ Copyright (C) 2021-2024 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>org.junit.vintage</groupId>
- <artifactId>junit-vintage-engine</artifactId>
- </exclusion>
- </exclusions>
</dependency>
</dependencies>
</dependency>
</dependencies>
<?xml version="1.0" encoding="UTF-8"?>
<!--
============LICENSE_START=======================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
============LICENSE_START=======================================================
- Copyright (c) 2020 Linux Foundation.
- Modifications Copyright (C) 2020-2023 Nordix Foundation.
+ Modifications Copyright (C) 2020-2024 Nordix Foundation.
Modifications Copyright (C) 2021 Bell Canada.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
Modifications Copyright (C) 2021 Bell Canada.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
- <artifactId>springdoc-openapi-ui</artifactId>
+ <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>org.junit.vintage</groupId>
- <artifactId>junit-vintage-engine</artifactId>
- </exclusion>
- </exclusions>
</dependency>
</dependencies>
</dependency>
</dependencies>
============LICENSE_START=======================================================\r
Copyright (C) 2020-2021 Pantheon.tech\r
Modifications Copyright (C) 2020-2021 Bell Canada\r
============LICENSE_START=======================================================\r
Copyright (C) 2020-2021 Pantheon.tech\r
Modifications Copyright (C) 2020-2021 Bell Canada\r
- Modifications Copyright (C) 2020-2023 Nordix Foundation\r
+ Modifications Copyright (C) 2020-2024 Nordix Foundation\r
================================================================================\r
Licensed under the Apache License, Version 2.0 (the "License");\r
you may not use this file except in compliance with the License.\r
================================================================================\r
Licensed under the Apache License, Version 2.0 (the "License");\r
you may not use this file except in compliance with the License.\r
<!-- Add Hibernate support for Postgres datatype JSONB and Postgres arrays -->\r
<dependency>\r
<groupId>io.hypersistence</groupId>\r
<!-- Add Hibernate support for Postgres datatype JSONB and Postgres arrays -->\r
<dependency>\r
<groupId>io.hypersistence</groupId>\r
- <artifactId>hypersistence-utils-hibernate-60</artifactId>\r
+ <artifactId>hypersistence-utils-hibernate-63</artifactId>\r
</dependency>\r
<dependency>\r
<groupId>org.projectlombok</groupId>\r
</dependency>\r
<dependency>\r
<groupId>org.projectlombok</groupId>\r
<groupId>org.springframework.boot</groupId>\r
<artifactId>spring-boot-starter-test</artifactId>\r
<scope>test</scope>\r
<groupId>org.springframework.boot</groupId>\r
<artifactId>spring-boot-starter-test</artifactId>\r
<scope>test</scope>\r
- <exclusions>\r
- <exclusion>\r
- <groupId>org.junit.vintage</groupId>\r
- <artifactId>junit-vintage-engine</artifactId>\r
- </exclusion>\r
- </exclusions>\r
</dependency>\r
</dependencies>\r
\r
</dependency>\r
</dependencies>\r
\r
import org.opendaylight.yangtools.yang.parser.api.YangSyntaxErrorException;
import org.opendaylight.yangtools.yang.parser.rfc7950.repo.YangModelDependencyInfo;
import org.springframework.dao.DataIntegrityViolationException;
import org.opendaylight.yangtools.yang.parser.api.YangSyntaxErrorException;
import org.opendaylight.yangtools.yang.parser.rfc7950.repo.YangModelDependencyInfo;
import org.springframework.dao.DataIntegrityViolationException;
+import org.springframework.retry.RetryContext;
import org.springframework.retry.annotation.Backoff;
import org.springframework.retry.annotation.Retryable;
import org.springframework.retry.support.RetrySynchronizationManager;
import org.springframework.retry.annotation.Backoff;
import org.springframework.retry.annotation.Retryable;
import org.springframework.retry.support.RetrySynchronizationManager;
dataIntegrityViolationException, newYangResourceEntities);
convertedException.ifPresent(
e -> {
dataIntegrityViolationException, newYangResourceEntities);
convertedException.ifPresent(
e -> {
- int retryCount = RetrySynchronizationManager.getContext() == null ? 0
- : RetrySynchronizationManager.getContext().getRetryCount();
+ final RetryContext retryContext = RetrySynchronizationManager.getContext();
+ int retryCount = retryContext == null ? 0 : retryContext.getRetryCount();
log.warn("Cannot persist duplicated yang resource. System will attempt this method "
+ "up to 5 times. Current retry count : {}", ++retryCount, e);
});
log.warn("Cannot persist duplicated yang resource. System will attempt this method "
+ "up to 5 times. Current retry count : {}", ++retryCount, e);
});
<?xml version="1.0" encoding="UTF-8"?>
<!--
============LICENSE_START=======================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
============LICENSE_START=======================================================
- Copyright (C) 2021-2023 Nordix Foundation
+ Copyright (C) 2021-2024 Nordix Foundation
Modifications Copyright (C) 2021 Bell Canada.
Modifications Copyright (C) 2021 Pantheon.tech
Modifications Copyright (C) 2022 Deutsche Telekom AG
Modifications Copyright (C) 2021 Bell Canada.
Modifications Copyright (C) 2021 Pantheon.tech
Modifications Copyright (C) 2022 Deutsche Telekom AG
<artifactId>cloudevents-spring</artifactId>
</dependency>
<!-- T E S T D E P E N D E N C I E S -->
<artifactId>cloudevents-spring</artifactId>
</dependency>
<!-- T E S T D E P E N D E N C I E S -->
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-test</artifactId>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<groupId>org.testcontainers</groupId>
<artifactId>kafka</artifactId>
<scope>test</scope>
<groupId>org.testcontainers</groupId>
<artifactId>kafka</artifactId>
<scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka-test</artifactId>
<scope>test</scope>
</dependency>
</dependency>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka-test</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.aspectj</groupId>
- <artifactId>aspectjrt</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
</dependencies>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<!--
============LICENSE_START=======================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
============LICENSE_START=======================================================
- Copyright (C) 2023 Nordix Foundation
+ Copyright (C) 2023-2024 Nordix Foundation
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
<groupId>org.onap.cps</groupId>
<artifactId>dmi-plugin-demo-and-csit-stub-service</artifactId>
<version>${project.version}</version>
<groupId>org.onap.cps</groupId>
<artifactId>dmi-plugin-demo-and-csit-stub-service</artifactId>
<version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-server</artifactId>
- <version>11.0.16</version>
- </dependency>
- <dependency>
- <groupId>jakarta.servlet</groupId>
- <artifactId>jakarta.servlet-api</artifactId>
- <version>6.0.0</version>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
</dependencies>
</project>
\ No newline at end of file
</dependency>
</dependencies>
</project>
\ No newline at end of file
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
</dependency>
<dependency>
* @return ResponseEntity response entity having module response as json string.
*/
@PostMapping("/v1/ch/{cmHandleId}/modules")
* @return ResponseEntity response entity having module response as json string.
*/
@PostMapping("/v1/ch/{cmHandleId}/modules")
- public ResponseEntity<String> getModuleReferences(@PathVariable final String cmHandleId,
+ public ResponseEntity<String> getModuleReferences(@PathVariable("cmHandleId") final String cmHandleId,
@RequestBody final Object moduleReferencesRequest) {
delay(moduleReferencesDelayMs);
final String moduleResponseContent = getModuleResourceResponse(cmHandleId,
@RequestBody final Object moduleReferencesRequest) {
delay(moduleReferencesDelayMs);
final String moduleResponseContent = getModuleResourceResponse(cmHandleId,
*/
@PostMapping("/v1/ch/{cmHandleId}/moduleResources")
public ResponseEntity<String> retrieveModuleResources(
*/
@PostMapping("/v1/ch/{cmHandleId}/moduleResources")
public ResponseEntity<String> retrieveModuleResources(
- @PathVariable final String cmHandleId,
+ @PathVariable("cmHandleId") final String cmHandleId,
@RequestBody final Object moduleResourcesReadRequest) {
delay(moduleResourcesDelayMs);
final String moduleResourcesResponseContent = getModuleResourceResponse(cmHandleId,
@RequestBody final Object moduleResourcesReadRequest) {
delay(moduleResourcesDelayMs);
final String moduleResourcesResponseContent = getModuleResourceResponse(cmHandleId,
<artifactId>groovy</artifactId>
<scope>test</scope>
</dependency>
<artifactId>groovy</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>cps-rest</artifactId>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>cps-rest</artifactId>