aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ServiceController.java2
-rw-r--r--a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/AsyncRestClientTest.java2
-rw-r--r--a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ApplicationTest.java27
-rwxr-xr-xcsit/scripts/healthcheck/test/pms_a1sim_sdnc.sh3
-rw-r--r--docs/_static/logo_onap_2024.pngbin0 -> 11627 bytes
-rw-r--r--docs/conf.py2
-rw-r--r--[-rwxr-xr-x]docs/consumedapis/consumedapis.rst2
-rw-r--r--docs/guide/developer-guide.rst4
-rw-r--r--docs/media/ONAP-A1ControllerArchitecture-NewDelhi.pngbin0 -> 203573 bytes
9 files changed, 36 insertions, 6 deletions
diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ServiceController.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ServiceController.java
index 09dfe446..1b885781 100644
--- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ServiceController.java
+++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ServiceController.java
@@ -138,7 +138,7 @@ public class ServiceController implements ServiceRegistryAndSupervisionApi {
Service service = removeService(serviceId);
removePolicies(service, exchange);
return Mono.just(new ResponseEntity<>(HttpStatus.NO_CONTENT));
- } catch (ServiceException | NullPointerException e) {
+ } catch (ServiceException e) {
logger.warn("Exception caught during service deletion while deleting service {}: {}", serviceId,
e.getMessage());
return ErrorResponse.createMono(e, HttpStatus.NOT_FOUND);
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 ac9d1fba..555f4639 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
@@ -29,6 +29,7 @@ import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.web.reactive.function.client.WebClientResponseException;
@@ -40,6 +41,7 @@ import reactor.util.Loggers;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
+@SpringBootTest
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/controllers/v2/ApplicationTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ApplicationTest.java
index 69ee12ba..0519c2d5 100644
--- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ApplicationTest.java
+++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ApplicationTest.java
@@ -956,6 +956,7 @@ class ApplicationTest {
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
// DELETE service
+ addPolicy("id1", "type1", serviceName);
assertThat(services.size()).isEqualTo(1);
url = "/services/" + serviceName;
restClient().delete(url).block();
@@ -977,6 +978,32 @@ class ApplicationTest {
}
@Test
+ @DisplayName("test delete Service with no authorization")
+ void testDeleteServiceWithNoAuth() throws Exception {
+ // PUT service
+ String serviceName = "ac.dc";
+ putService(serviceName, 0, HttpStatus.CREATED);
+
+ // No Authorization to Delete
+ this.applicationConfig
+ .setAuthProviderUrl(baseUrl() + OpenPolicyAgentSimulatorController.ACCESS_CONTROL_URL_REJECT);
+ addPolicy("id1", "type1", serviceName);
+ assertThat(services.size()).isEqualTo(1);
+ String url = "/services/" + serviceName;
+ restClient().delete(url).block();
+ assertThat(services.size()).isZero();
+ assertThat(policies.size()).isEqualTo(1);
+ testErrorCode(restClient().get("/policies/id1"), HttpStatus.UNAUTHORIZED);
+ }
+
+ @Test
+ @DisplayName("test delete Service with no service")
+ void testDeleteServiceWithNoService() {
+ String url = "/services/" + "NoService";
+ testErrorCode(restClient().delete(url), HttpStatus.NOT_FOUND);
+ }
+
+ @Test
@DisplayName("test Service Supervision")
void testServiceSupervision() throws Exception {
putService("service1", 2, HttpStatus.CREATED);
diff --git a/csit/scripts/healthcheck/test/pms_a1sim_sdnc.sh b/csit/scripts/healthcheck/test/pms_a1sim_sdnc.sh
index 79c08b63..be2bc578 100755
--- a/csit/scripts/healthcheck/test/pms_a1sim_sdnc.sh
+++ b/csit/scripts/healthcheck/test/pms_a1sim_sdnc.sh
@@ -1,7 +1,8 @@
#!/bin/bash
# ============LICENSE_START===============================================
-# Copyright (C) 2021 Nordix Foundation. All rights reserved.
+# Copyright (C) 2021-2023 Nordix Foundation. All rights reserved.
+# Copyright (C) 2024 OpenInfra Foundation Europe. 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.
diff --git a/docs/_static/logo_onap_2024.png b/docs/_static/logo_onap_2024.png
new file mode 100644
index 00000000..55d307fc
--- /dev/null
+++ b/docs/_static/logo_onap_2024.png
Binary files differ
diff --git a/docs/conf.py b/docs/conf.py
index 07f9c67c..460f86d1 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -33,7 +33,7 @@ html_theme = "sphinx_rtd_theme"
html_theme_options = {
"style_nav_header_background": "white",
"sticky_navigation": "False" }
-html_logo = "_static/logo_onap_2017.png"
+html_logo = "_static/logo_onap_2024.png"
html_favicon = "_static/favicon.ico"
html_static_path = ["_static"]
html_show_sphinx = False
diff --git a/docs/consumedapis/consumedapis.rst b/docs/consumedapis/consumedapis.rst
index 274dceec..d5dcf4e7 100755..100644
--- a/docs/consumedapis/consumedapis.rst
+++ b/docs/consumedapis/consumedapis.rst
@@ -16,7 +16,7 @@ O-RAN A1 Interface for A1 Policies (A1-P)
Southbound, the ONAP A1 Policy functions communicate with *near-RT RIC* RAN functions using the **A1** interface, as defined by the `O-RAN Alliance <https://www.o-ran.org>`_
The *A1 Interface - Application Protocol Specification (A1-AP)* describes this interface. The specification can be viewed from the `O-RAN Alliance <https://www.o-ran.org>`_ website.
-The **Montreal** ONAP A1 Policy functions implement the *A1 Policy* (*A1-P*) parts of A1-AP, supporting versions *v1.1*, *v2.0* and *v3.0*.
+The **Oslo** ONAP A1 Policy functions implement the *A1 Policy* (*A1-P*) parts of A1-AP, supporting versions *v1.1*, *v2.0* and *v3.0*.
An opensource implementation of a `near-RT RIC <https://lf-o-ran-sc.atlassian.net/wiki/spaces/RICP/overview>`_ is available from the `O-RAN Software Community <https://o-ran-sc.org>`_. It supports a pre-spec version of the A1-AP. The ONAP A1 Policy functions described here also supports this A1 version (*A1-OSC*).
diff --git a/docs/guide/developer-guide.rst b/docs/guide/developer-guide.rst
index bb737441..ef73af6b 100644
--- a/docs/guide/developer-guide.rst
+++ b/docs/guide/developer-guide.rst
@@ -10,7 +10,7 @@ Developer Guide
This document provides a quickstart for developers of the CCSDK functions for O-RAN A1 Policies.
-.. image:: ../media/ONAP-A1ControllerArchitecture-Montreal.png
+.. image:: ../media/ONAP-A1ControllerArchitecture-NewDelhi.png
:width: 500pt
Source tree
@@ -64,7 +64,7 @@ There are two configuration files for A1 Policy Management Service, *config/appl
The first (*config/application_configuration.json*) contains application-specific configuration needed by the application, such as which near-RT RICs, or controller to use.
The second (*config/application.yaml*) contains logging and security configurations.
-For more information about these configuration files can be found as comments in the sample files provided with the source code, or on the `ONAP wiki <https://wiki.onap.org/display/DW/O-RAN+A1+Policies+in+ONAP+London>`_
+For more information about these configuration files can be found as comments in the sample files provided with the source code, or on the `ONAP wiki <https://wiki.onap.org/display/DW/O-RAN+A1+Policies+in+ONAP>`_
Static configuration - Settings that cannot be changed at runtime (*application.yaml*)
--------------------------------------------------------------------------------------
diff --git a/docs/media/ONAP-A1ControllerArchitecture-NewDelhi.png b/docs/media/ONAP-A1ControllerArchitecture-NewDelhi.png
new file mode 100644
index 00000000..15580c87
--- /dev/null
+++ b/docs/media/ONAP-A1ControllerArchitecture-NewDelhi.png
Binary files differ