diff options
25 files changed, 118 insertions, 50 deletions
diff --git a/a1-policy-management/api/pms-api.json b/a1-policy-management/api/pms-api.json index d16cfe2f..7574032c 100644 --- a/a1-policy-management/api/pms-api.json +++ b/a1-policy-management/api/pms-api.json @@ -185,7 +185,7 @@ "example": false }, "service_id": { - "description": "the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registerred.", + "description": "the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registered.", "type": "string" }, "policy_data": { diff --git a/a1-policy-management/api/pms-api.yaml b/a1-policy-management/api/pms-api.yaml index d3b720db..0cd28d07 100644 --- a/a1-policy-management/api/pms-api.yaml +++ b/a1-policy-management/api/pms-api.yaml @@ -1154,7 +1154,7 @@ components: service_id: description: the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated - to a service). Note that the service does not need to be registerred. + to a service). Note that the service does not need to be registered. type: string policy_data: description: the configuration of the policy diff --git a/a1-policy-management/api/pms-api/index.html b/a1-policy-management/api/pms-api/index.html index be7b8819..c8f97a81 100644 --- a/a1-policy-management/api/pms-api/index.html +++ b/a1-policy-management/api/pms-api/index.html @@ -921,7 +921,7 @@ ul.nav-tabs { }, "service_id" : { "type" : "string", - "description" : "the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registerred." + "description" : "the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registered." }, "policy_data" : { "type" : "object", diff --git a/a1-policy-management/pom.xml b/a1-policy-management/pom.xml index bcbe2381..3450d433 100644 --- a/a1-policy-management/pom.xml +++ b/a1-policy-management/pom.xml @@ -19,13 +19,15 @@ ~ ============LICENSE_END======================================================= ~ --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>spring-boot-30-starter-parent</artifactId> <version>2.5.4</version> - <relativePath/> + <relativePath /> </parent> <groupId>org.onap.ccsdk.oran</groupId> <artifactId>a1-policy-management-service</artifactId> @@ -36,8 +38,8 @@ <java.version.target>17</java.version.target> <gson.version>2.10.1</gson.version> <json.version>20220924</json.version> - <formatter-maven-plugin.version>2.13.0</formatter-maven-plugin.version> - <spotless-maven-plugin.version>1.24.3</spotless-maven-plugin.version> + <formatter-maven-plugin.version>2.22.0</formatter-maven-plugin.version> + <spotless-maven-plugin.version>2.35.0</spotless-maven-plugin.version> <commons-io.version>2.11.0</commons-io.version> <guava.version>31.0.1-jre</guava.version> <springdoc.version>2.0.2</springdoc.version> @@ -82,7 +84,7 @@ <groupId>org.springframework</groupId> <artifactId>spring-webflux</artifactId> </dependency> - <dependency> + <dependency> <!-- May be possible to remove this later when ccsdk parent bom stabilizes --> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> @@ -245,9 +247,9 @@ <configuration> <lineEndings>UNIX</lineEndings> <java> - <removeUnusedImports/> + <removeUnusedImports /> <importOrder> - <order>com,java,javax,org</order> + <order>com,io,java,lombok,javax,org,reactor</order> </importOrder> </java> </configuration> @@ -261,16 +263,19 @@ <version>${surefire-maven-plugin.version}</version> <configuration> <skipTests>${allowskiptests}</skipTests> - <statelessTestsetReporter implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5Xml30StatelessReporter"> + <statelessTestsetReporter + implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5Xml30StatelessReporter"> <usePhrasedFileName>false</usePhrasedFileName> <usePhrasedTestSuiteClassName>true</usePhrasedTestSuiteClassName> <usePhrasedTestCaseClassName>true</usePhrasedTestCaseClassName> <usePhrasedTestCaseMethodName>true</usePhrasedTestCaseMethodName> </statelessTestsetReporter> - <consoleOutputReporter implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5ConsoleOutputReporter"> + <consoleOutputReporter + implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5ConsoleOutputReporter"> <usePhrasedFileName>false</usePhrasedFileName> </consoleOutputReporter> - <statelessTestsetInfoReporter implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5StatelessTestsetInfoReporter"> + <statelessTestsetInfoReporter + implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5StatelessTestsetInfoReporter"> <usePhrasedFileName>false</usePhrasedFileName> <usePhrasedClassNameInRunning>true</usePhrasedClassNameInRunning> <usePhrasedClassNameInTestCaseSummary>true</usePhrasedClassNameInTestCaseSummary> @@ -336,10 +341,12 @@ <skipOperationExample>false</skipOperationExample> <strictSpec>false</strictSpec> <configOptions> - <appDescription>The O-RAN Non-RT RIC Policy Management Service provides a REST API for managing O-RAN A1 Policies.</appDescription> + <appDescription>The O-RAN Non-RT RIC Policy Management Service + provides a REST API for managing O-RAN A1 Policies.</appDescription> <appName>ONAP CCSDK A1 Policy Management Service</appName> <infoUrl>https://wiki.onap.org/display/DW/O-RAN+A1+Policies+in+ONAP</infoUrl> - <licenseInfo>Copyright (C) 2020-2023 Nordix Foundation. Licensed under the Apache License.</licenseInfo> + <licenseInfo>Copyright (C) 2020-2023 Nordix Foundation. Licensed + under the Apache License.</licenseInfo> <licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl> </configOptions> </configuration> @@ -393,7 +400,8 @@ </goals> <configuration> <verbose>true</verbose> - <outputDirectory>${project.basedir}/../docs/offeredapis/openapitoolgen/offeredapis/pms-api</outputDirectory> + <outputDirectory> + ${project.basedir}/../docs/offeredapis/openapitoolgen/offeredapis/pms-api</outputDirectory> <resources> <resource> <directory>${project.basedir}/api/pms-api</directory> @@ -421,7 +429,8 @@ <configuration> <images> <image> - <name>onap/ccsdk-oran-a1policymanagementservice:${project.version}</name> + <name> + onap/ccsdk-oran-a1policymanagementservice:${project.version}</name> <build> <cleanup>try</cleanup> <contextDir>${basedir}</contextDir> @@ -446,7 +455,8 @@ <configuration> <images> <image> - <name>onap/ccsdk-oran-a1policymanagementservice:${project.version}</name> + <name> + onap/ccsdk-oran-a1policymanagementservice:${project.version}</name> <build> <contextDir>${basedir}</contextDir> <dockerFile>Dockerfile</dockerFile> @@ -476,4 +486,4 @@ </plugin> </plugins> </reporting> -</project> +</project>
\ No newline at end of file diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/A1ClientFactory.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/A1ClientFactory.java index 54dfab88..5f573140 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/A1ClientFactory.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/A1ClientFactory.java @@ -31,6 +31,7 @@ import org.onap.ccsdk.oran.a1policymanagementservice.exceptions.ServiceException import org.onap.ccsdk.oran.a1policymanagementservice.repository.Ric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; + import reactor.core.publisher.Mono; /** diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/WebClientConfig.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/WebClientConfig.java index 04367e0e..ab2958c6 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/WebClientConfig.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/WebClientConfig.java @@ -23,6 +23,7 @@ package org.onap.ccsdk.oran.a1policymanagementservice.configuration; import lombok.Builder; import lombok.Getter; import lombok.ToString; + import reactor.netty.transport.ProxyProvider; @Builder diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ErrorResponse.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ErrorResponse.java index f3f57067..e79a8217 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ErrorResponse.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ErrorResponse.java @@ -36,6 +36,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatusCode; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; + import reactor.core.publisher.Mono; public class ErrorResponse { diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/PolicyAuthorizationRequest.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/PolicyAuthorizationRequest.java new file mode 100644 index 00000000..63a53109 --- /dev/null +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/PolicyAuthorizationRequest.java @@ -0,0 +1,47 @@ +/*- + * ========================LICENSE_START================================= + * ONAP : ccsdk oran + * ====================================================================== + * Copyright (C) 2022 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 + * + * 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.ccsdk.oran.a1policymanagementservice.controllers.v2; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.gson.annotations.SerializedName; + +import io.swagger.v3.oas.annotations.media.Schema; + +import lombok.Builder; +import lombok.Getter; + + +@Schema(name = "policy_authorization", description = "Authorization request for A1 policy requests") +@Builder +public class PolicyAuthorizationRequest { + + @Schema(name = "acces_type", description = "Access type") + public enum AccessType { + READ, WRITE, DELETE + } + + @Schema(name = "access_type", description = "Access type", required = true) + @JsonProperty(value = "access_type", required = true) + @SerializedName("access_type") + @Getter + private String accessType; + +} diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/PolicyController.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/PolicyController.java index 500ddd2a..395daa30 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/PolicyController.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/PolicyController.java @@ -68,6 +68,7 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.reactive.function.client.WebClientException; import org.springframework.web.reactive.function.client.WebClientResponseException; + import reactor.core.publisher.Mono; @RestController("PolicyControllerV2") diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/PolicyInfo.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/PolicyInfo.java index f7bc22ca..537f98c2 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/PolicyInfo.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/PolicyInfo.java @@ -53,7 +53,8 @@ public class PolicyInfo { + " This can be used to group the policies (it is possible to get all policies associated to a service)." + " Note that the service does not need to be registered."; - @Schema(name = "service_id", description = SERVICE_ID_DESCRIPTION, requiredMode = RequiredMode.NOT_REQUIRED, defaultValue = "") + @Schema(name = "service_id", description = SERVICE_ID_DESCRIPTION, requiredMode = RequiredMode.NOT_REQUIRED, + defaultValue = "") @JsonProperty(value = "service_id", required = false) @SerializedName("service_id") public String serviceId = ""; @@ -65,8 +66,8 @@ public class PolicyInfo { @SerializedName("transient") public boolean isTransient = false; - @Schema(name = "status_notification_uri", description = "Callback URI for policy status updates", requiredMode = RequiredMode.NOT_REQUIRED, - defaultValue = "") + @Schema(name = "status_notification_uri", description = "Callback URI for policy status updates", + requiredMode = RequiredMode.NOT_REQUIRED, defaultValue = "") @JsonProperty(value = "status_notification_uri", required = false) @SerializedName("status_notification_uri") public String statusNotificationUri = ""; diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/RicInfo.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/RicInfo.java index d6069aa2..81fc56cb 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/RicInfo.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/RicInfo.java @@ -35,12 +35,13 @@ public class RicInfo { UNAVAILABLE, AVAILABLE, SYNCHRONIZING, CONSISTENCY_CHECK } - private static final String STATE_DESCRIPTION = """ - State for the Near-RT RIC, values: - UNAVAILABLE: The Near-RT RIC is not available, information may be inconsistent - AVAILABLE: The normal state. Policies can be configured. - SYNCHRONIZING: The Policy Management Service is synchronizing the view of the Near-RT RIC. Policies cannot be configured. - CONSISTENCY_CHECK: A consistency check between the Policy Management Service and the Near-RT RIC. Policies cannot be configured."""; + private static final String STATE_DESCRIPTION = + """ + State for the Near-RT RIC, values: + UNAVAILABLE: The Near-RT RIC is not available, information may be inconsistent + AVAILABLE: The normal state. Policies can be configured. + SYNCHRONIZING: The Policy Management Service is synchronizing the view of the Near-RT RIC. Policies cannot be configured. + CONSISTENCY_CHECK: A consistency check between the Policy Management Service and the Near-RT RIC. Policies cannot be configured."""; @Schema(description = "identity of the Near-RT RIC") @SerializedName("ric_id") diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ServiceRegistrationInfo.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ServiceRegistrationInfo.java index 16494076..1bbac871 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ServiceRegistrationInfo.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ServiceRegistrationInfo.java @@ -44,7 +44,8 @@ public class ServiceRegistrationInfo { @JsonProperty("keep_alive_interval_seconds") public long keepAliveIntervalSeconds = 0; - @Schema(description = "callback for notifying of Near-RT RIC state changes", requiredMode = RequiredMode.NOT_REQUIRED, defaultValue = "") + @Schema(description = "callback for notifying of Near-RT RIC state changes", + requiredMode = RequiredMode.NOT_REQUIRED, defaultValue = "") @SerializedName("callback_url") @JsonProperty("callback_url") public String callbackUrl = ""; diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/StatusController.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/StatusController.java index 28d434b7..64d587d9 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/StatusController.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/StatusController.java @@ -32,6 +32,7 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; + import reactor.core.publisher.Mono; @RestController("StatusControllerV2") diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/datastore/S3ObjectStore.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/datastore/S3ObjectStore.java index 5b81f756..1c67ff7d 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/datastore/S3ObjectStore.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/datastore/S3ObjectStore.java @@ -30,6 +30,7 @@ import org.slf4j.LoggerFactory; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; + import software.amazon.awssdk.auth.credentials.AwsBasicCredentials; import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider; import software.amazon.awssdk.core.BytesWrapper; diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/aspect/LogAspectTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/aspect/LogAspectTest.java index cada8bc5..d33fbd65 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/aspect/LogAspectTest.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/aspect/LogAspectTest.java @@ -27,9 +27,6 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import ch.qos.logback.classic.spi.ILoggingEvent; -import ch.qos.logback.core.read.ListAppender; - import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.reflect.MethodSignature; import org.junit.jupiter.api.DisplayName; @@ -39,6 +36,9 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import org.onap.ccsdk.oran.a1policymanagementservice.utils.LoggingUtils; +import ch.qos.logback.classic.spi.ILoggingEvent; +import ch.qos.logback.core.read.ListAppender; + @ExtendWith(MockitoExtension.class) class LogAspectTest { @Mock diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/AsyncRestClientTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/AsyncRestClientTest.java index 12ac46de..ac9d1fba 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/AsyncRestClientTest.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/AsyncRestClientTest.java @@ -25,9 +25,6 @@ import io.netty.util.internal.logging.JdkLoggerFactory; import java.io.IOException; -import okhttp3.mockwebserver.MockResponse; -import okhttp3.mockwebserver.MockWebServer; - import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.DisplayName; @@ -40,6 +37,9 @@ import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import reactor.util.Loggers; +import okhttp3.mockwebserver.MockResponse; +import okhttp3.mockwebserver.MockWebServer; + class AsyncRestClientTest { private static final String BASE_URL = "BaseUrl"; private static final String REQUEST_URL = "/test"; diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ConfigurationFileTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ConfigurationFileTest.java index b79a4ca8..befbc583 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ConfigurationFileTest.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ConfigurationFileTest.java @@ -25,10 +25,6 @@ import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.when; -import ch.qos.logback.classic.Level; -import ch.qos.logback.classic.spi.ILoggingEvent; -import ch.qos.logback.core.read.ListAppender; - import com.google.gson.JsonObject; import com.google.gson.JsonParser; @@ -45,6 +41,10 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import org.onap.ccsdk.oran.a1policymanagementservice.utils.LoggingUtils; +import ch.qos.logback.classic.Level; +import ch.qos.logback.classic.spi.ILoggingEvent; +import ch.qos.logback.core.read.ListAppender; + @ExtendWith(MockitoExtension.class) class ConfigurationFileTest { @Mock diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/tasks/RefreshConfigTaskTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/tasks/RefreshConfigTaskTest.java index bfdb58ca..3b1ee8f7 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/tasks/RefreshConfigTaskTest.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/tasks/RefreshConfigTaskTest.java @@ -60,6 +60,7 @@ import org.onap.ccsdk.oran.a1policymanagementservice.repository.PolicyTypes; import org.onap.ccsdk.oran.a1policymanagementservice.repository.Ric; import org.onap.ccsdk.oran.a1policymanagementservice.repository.Rics; import org.onap.ccsdk.oran.a1policymanagementservice.repository.Services; + import reactor.test.StepVerifier; @ExtendWith(MockitoExtension.class) @@ -113,9 +114,7 @@ class RefreshConfigTaskTest { verify(refreshTaskUnderTest.rics, times(2)).put(any(Ric.class)); java.util.Collection<RicConfig> ricConfigs = appConfig.getRicConfigs(); - assertThat(ricConfigs) - .isNotNull() - .hasSize(2); + assertThat(ricConfigs).isNotNull().hasSize(2); } @Test diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/tasks/RicSupervisionTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/tasks/RicSupervisionTest.java index 77464300..c83bb858 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/tasks/RicSupervisionTest.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/tasks/RicSupervisionTest.java @@ -56,6 +56,7 @@ import org.onap.ccsdk.oran.a1policymanagementservice.repository.PolicyTypes; import org.onap.ccsdk.oran.a1policymanagementservice.repository.Ric; import org.onap.ccsdk.oran.a1policymanagementservice.repository.Ric.RicState; import org.onap.ccsdk.oran.a1policymanagementservice.repository.Rics; + import reactor.core.publisher.Mono; @ExtendWith(MockitoExtension.class) diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/tasks/ServiceSupervisionTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/tasks/ServiceSupervisionTest.java index e8f28195..29f6affd 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/tasks/ServiceSupervisionTest.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/tasks/ServiceSupervisionTest.java @@ -29,9 +29,6 @@ import static org.mockito.Mockito.verifyNoInteractions; import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.when; -import ch.qos.logback.classic.spi.ILoggingEvent; -import ch.qos.logback.core.read.ListAppender; - import java.time.Duration; import java.time.Instant; @@ -52,8 +49,12 @@ import org.onap.ccsdk.oran.a1policymanagementservice.repository.Ric; import org.onap.ccsdk.oran.a1policymanagementservice.repository.Service; import org.onap.ccsdk.oran.a1policymanagementservice.repository.Services; import org.onap.ccsdk.oran.a1policymanagementservice.utils.LoggingUtils; + import reactor.core.publisher.Mono; +import ch.qos.logback.classic.spi.ILoggingEvent; +import ch.qos.logback.core.read.ListAppender; + @ExtendWith(MockitoExtension.class) class ServiceSupervisionTest { diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/utils/LoggingUtils.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/utils/LoggingUtils.java index 2f7d7a65..be5d47f7 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/utils/LoggingUtils.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/utils/LoggingUtils.java @@ -20,13 +20,13 @@ package org.onap.ccsdk.oran.a1policymanagementservice.utils; +import org.slf4j.LoggerFactory; + import ch.qos.logback.classic.Level; import ch.qos.logback.classic.Logger; import ch.qos.logback.classic.spi.ILoggingEvent; import ch.qos.logback.core.read.ListAppender; -import org.slf4j.LoggerFactory; - public class LoggingUtils { /** diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/utils/MockA1ClientFactory.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/utils/MockA1ClientFactory.java index 22f534cf..be7dfcb3 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/utils/MockA1ClientFactory.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/utils/MockA1ClientFactory.java @@ -35,6 +35,7 @@ import org.onap.ccsdk.oran.a1policymanagementservice.repository.PolicyTypes; import org.onap.ccsdk.oran.a1policymanagementservice.repository.Ric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; + import reactor.core.publisher.Mono; public class MockA1ClientFactory extends A1ClientFactory { diff --git a/docs/offeredapis/openapitoolgen/offeredapis/pms-api/index.html b/docs/offeredapis/openapitoolgen/offeredapis/pms-api/index.html index be7b8819..c8f97a81 100644 --- a/docs/offeredapis/openapitoolgen/offeredapis/pms-api/index.html +++ b/docs/offeredapis/openapitoolgen/offeredapis/pms-api/index.html @@ -921,7 +921,7 @@ ul.nav-tabs { }, "service_id" : { "type" : "string", - "description" : "the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registerred." + "description" : "the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registered." }, "policy_data" : { "type" : "object", diff --git a/docs/offeredapis/swagger/pms-api.json b/docs/offeredapis/swagger/pms-api.json index d16cfe2f..7574032c 100644 --- a/docs/offeredapis/swagger/pms-api.json +++ b/docs/offeredapis/swagger/pms-api.json @@ -185,7 +185,7 @@ "example": false }, "service_id": { - "description": "the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registerred.", + "description": "the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated to a service). Note that the service does not need to be registered.", "type": "string" }, "policy_data": { diff --git a/docs/offeredapis/swagger/pms-api.yaml b/docs/offeredapis/swagger/pms-api.yaml index d3b720db..0cd28d07 100644 --- a/docs/offeredapis/swagger/pms-api.yaml +++ b/docs/offeredapis/swagger/pms-api.yaml @@ -1154,7 +1154,7 @@ components: service_id: description: the identity of the service owning the policy. This can be used to group the policies (it is possible to get all policies associated - to a service). Note that the service does not need to be registerred. + to a service). Note that the service does not need to be registered. type: string policy_data: description: the configuration of the policy |