diff options
-rw-r--r-- | LICENSE.txt | 11 | ||||
-rw-r--r-- | README.md | 12 | ||||
-rw-r--r-- | a1-policy-management/README.md | 41 | ||||
-rw-r--r-- | a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/A1ClientFactory.java | 34 | ||||
-rw-r--r-- | a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/A1ClientFactoryTest.java | 14 | ||||
-rwxr-xr-x | docs/architecture/architecture.rst | 3 | ||||
-rwxr-xr-x | docs/consumedapis/consumedapis.rst | 5 | ||||
-rw-r--r-- | docs/guide/developer-guide.rst | 5 | ||||
-rw-r--r-- | docs/humaninterfaces/humaninterfaces.rst | 3 | ||||
-rw-r--r-- | docs/media/ONAP-A1ControllerArchitecture-Montreal.png | bin | 0 -> 57021 bytes | |||
-rw-r--r-- | docs/releasenotes/release-notes.rst | 60 | ||||
-rw-r--r-- | docs/requirements-docs.txt | 2 | ||||
-rw-r--r-- | docs/tox.ini | 4 |
13 files changed, 149 insertions, 45 deletions
diff --git a/LICENSE.txt b/LICENSE.txt index 117bfdae..58a95690 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,8 +1,9 @@ /* -* ============LICENSE_START========================================== -* =================================================================== -* Copyright © 2020 Nordix Foundation. All rights reserved. -* =================================================================== +* ============LICENSE_START=============================================== +* ======================================================================== +* Copyright © 2020-2023 Nordix Foundation. All rights reserved. +* Copyright © 2023-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. * You may obtain a copy of the License at @@ -14,5 +15,5 @@ * 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============================================ +* ============LICENSE_END================================================= * @@ -2,6 +2,14 @@ This source repository contains the code for the ORAN A1 related components. +More information on the CCSDK A1 Policy Management Service can be found in the 'a1-policy-management' sub-directory. + +More information on the CCSDK A1-Adapter controller extension can be found in the 'a1-adapter' subdirectory. + +See also additional information at: + - https://wiki.onap.org/display/DW/O-RAN+A1+Policies+in+ONAP + - https://docs.onap.org/projects/onap-ccsdk-oran/en/latest/index.html + ## Prerequisits To compile this code: @@ -12,7 +20,9 @@ To compile this code: ## License -Copyright (C) 2022 Nordix Foundation. +Copyright (C) 2022-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. You may obtain a copy of the License at diff --git a/a1-policy-management/README.md b/a1-policy-management/README.md index 1457d02b..3b784a4f 100644 --- a/a1-policy-management/README.md +++ b/a1-policy-management/README.md @@ -1,15 +1,21 @@ # ONAP ccsdk-oran A1 Policy Management Service -The A1 Policy Management Service provides a REST API for management of policies. -It provides support for: - -Supervision of clients (R-APPs) to eliminate stray policies in case of failure - -Consistency monitoring of the SMO view of policies and the actual situation in the RICs - -Consistency monitoring of RIC capabilities (policy types) - -Policy configuration. This includes: - -One REST API towards all RICs in the network - -Query functions that can find all policies in a RIC, all policies owned by a service (R-APP), - all policies of a type etc. - -Maps O1 resources (ManagedElement) as defined in O1 to the controlling RIC +The A1 Policy Management Service is a micro service which maintains a transient repository of: + - All A1 policies instances in the network. Each policy is targeted to a near-RT-RIC instance and is owned by a 'service' (or 'rApp'). + - All near-RT-RICs in the network. + - All Policy types supported by each near-RT-RIC. + +The service provides : + - Unified REST API for managing A1 Policies in all near-RT-RICs. + - Synchronized view of A1 Policy instances for each rApp/Client + - Synchronized view of A1 Policy instances in each near-RT-RIC + - Synchronized view of A1 Policy types supported by each near-RT-RIC + - Lookup service to find the near-RT-RIC to control resources in the RAN as defined in O1 (e.g. which near-RT-RIC should be accessed to control a certain CU or DU, which in turn controls a certain cell). + - Monitors all near-RT-RICs and maintains data consistency – e.g. recovery from near-RT-RIC restarts + - Support for different Southbound APIs to the near-RT-RICs (different versions of the A1-P application protocol and other similar APIs). + - HTTPS can be configured to use a supplied certificate/private key and to validate peers towards a list of trusted CAs/certs. + - HTTP proxy support for tunneling HTTP/HTTPS connections. + - Fine-grained access-control - with new optional callouts to an external auth function The Policy Management Service uses the default keystore and truststore that are built into the container. The paths and passwords for these stores are located in a yaml file: oran/a1-policy-management/config/application.yaml @@ -21,9 +27,9 @@ The default keystore, truststore, and application.yaml files can be overridden b Assuming that the keystore, truststore, and application.yaml files are located in the same directory as docker-compose, the volumes field should have these entries: volumes: - - ./new_keystore.jks:/opt/app/policy-agent/etc/cert/keystore.jks:ro - - ./new_truststore.jks:/opt/app/policy-agent/etc/cert/truststore.jks:ro - - ./new_application.yaml:/opt/app/policy-agent/config/application.yaml:ro + - ./new_keystore.jks:/opt/app/policy-agent/etc/cert/keystore.jks:ro + - ./new_truststore.jks:/opt/app/policy-agent/etc/cert/truststore.jks:ro + - ./new_application.yaml:/opt/app/policy-agent/config/application.yaml:ro The target paths in the container should not be modified. @@ -32,22 +38,27 @@ It is also possible to configure a HTTP(S) Proxy for southbound connections. Thi Example docker run command for mounting new files (assuming they are located in the current directory): docker run -p 8081:8081 -p 8433:8433 --name=PMS-container --network=oran-docker-net --volume "$PWD/new_keystore.jks:/opt/app/policy-agent/etc/cert/keystore.jks" --volume "$PWD/new_truststore.jks:/opt/app/policy-agent/etc/cert/truststore.jks" --volume "$PWD/new_application.yaml:/opt/app/policy-agent/config/application.yaml" onap/ccsdk-oran-a1policymanagementservice:1.0.0-SNAPSHOT -To Run Policy Management Service in Local: +To run A1 Policy Management Service in a local environment: In the folder /opt/app/policy-agent/config/, create a soft link with below command, ln -s <path to test_application_configuration.json> application_configuration.json -The Policy Management Service can be run stand alone in a simulated test mode. Then it simulates RICs. +The A1 Policy Management Service can be run stand alone in a simulated test mode. Then it simulates RICs. The REST API is published on port 8081 and it is started by command: mvn -Dtest=MockPolicyManagementService test The backend server publishes live API documentation at the URL `http://your-host-name-here:8081/swagger-ui.html` +More information about the ONAP CCSDK A1 Policy Management Service can be found at: + - https://wiki.onap.org/display/DW/O-RAN+A1+Policies+in+ONAP + - https://docs.onap.org/projects/onap-ccsdk-oran/en/latest/index.html + ## License ONAP : ccsdk oran Copyright (C) 2019-2023 Nordix Foundation. All rights reserved. +Copyright (C) 2023-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. You may obtain a copy of the License at 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 87776c0f..b5c10bf6 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 @@ -3,6 +3,7 @@ * ONAP : ccsdk oran * ====================================================================== * Copyright (C) 2020-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. @@ -105,22 +106,31 @@ public class A1ClientFactory { private A1Client createCustomAdapter(Ric ric) throws ServiceException { try { - Class<?> clazz = Class.forName(ric.getConfig().getCustomAdapterClass()); - if (A1Client.class.isAssignableFrom(clazz)) { - Constructor<?> constructor = clazz.getConstructor(RicConfig.class, AsyncRestClientFactory.class); - logger.debug("A1Client (" + clazz.getTypeName() + ") being created for ric: {}", - ric.getConfig().getRicId()); - return (A1Client) constructor.newInstance(ric.getConfig(), this.restClientFactory); - } else if (A1Client.Factory.class.isAssignableFrom(clazz)) { - A1Client.Factory factory = (A1Client.Factory) clazz.getDeclaredConstructor().newInstance(); - logger.debug("A1Client (" + clazz.getTypeName() + ") factory creating client for ric: {}", - ric.getConfig().getRicId()); - return factory.create(ric.getConfig(), this.restClientFactory); + if (ric.getConfig().getCustomAdapterClass() != null && !ric.getConfig().getCustomAdapterClass().isEmpty()) { + Class<?> clazz = Class.forName(ric.getConfig().getCustomAdapterClass()); + if (A1Client.class.isAssignableFrom(clazz)) { + Constructor<?> constructor = clazz.getConstructor(RicConfig.class, AsyncRestClientFactory.class); + logger.debug("A1Client (" + clazz.getTypeName() + ") being created for ric: {}", + ric.getConfig().getRicId()); + return (A1Client) constructor.newInstance(ric.getConfig(), this.restClientFactory); + } else if (A1Client.Factory.class.isAssignableFrom(clazz)) { + A1Client.Factory factory = (A1Client.Factory) clazz.getDeclaredConstructor().newInstance(); + logger.debug("A1Client (" + clazz.getTypeName() + ") factory creating client for ric: {}", + ric.getConfig().getRicId()); + return factory.create(ric.getConfig(), this.restClientFactory); + } else { + throw new ServiceException("The custom class must either implement A1Client.Factory or A1Client"); + } } else { - throw new ServiceException("The custom class must either implement A1Client.Factory or A1Client"); + throw new ServiceException("Custom adapter class is required to use A1ProtocolType.CUSTOM_PROTOCOL"); } } catch (ClassNotFoundException e) { throw new ServiceException("Could not find class: " + ric.getConfig().getCustomAdapterClass(), e); + } catch (NoSuchMethodException e) { + throw new ServiceException("Could not find the required constructor in class " + + ric.getConfig().getCustomAdapterClass(), e); + } catch (ServiceException e) { + throw e; } catch (Exception e) { throw new ServiceException("Cannot create custom adapter: " + ric.getConfig().getCustomAdapterClass(), e); } diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/A1ClientFactoryTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/A1ClientFactoryTest.java index f50d5537..a23540e5 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/A1ClientFactoryTest.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/A1ClientFactoryTest.java @@ -3,6 +3,7 @@ * ONAP : ccsdk oran * ====================================================================== * Copyright (C) 2020-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. @@ -41,6 +42,7 @@ import org.onap.ccsdk.oran.a1policymanagementservice.configuration.RicConfig; import org.onap.ccsdk.oran.a1policymanagementservice.exceptions.ServiceException; import org.onap.ccsdk.oran.a1policymanagementservice.repository.Ric; +import org.onap.ccsdk.oran.a1policymanagementservice.utils.MockA1Client; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -148,6 +150,18 @@ class A1ClientFactoryTest { factoryUnderTest.createClient(new Ric(ricConfig("", "junk")), A1ProtocolType.CUSTOM_PROTOCOL); }); assertEquals("Could not find class: junk", e.getMessage()); + + Exception exceptionNoSuchMethod = Assertions.assertThrows(Exception.class, () -> { + factoryUnderTest.createClient(new Ric(ricConfig("", MockA1Client.class.getName())), + A1ProtocolType.CUSTOM_PROTOCOL); + }); + assertEquals("Could not find the required constructor in class " + MockA1Client.class.getName(), + exceptionNoSuchMethod.getMessage()); + + Exception exceptionNullCustomAdaptor = Assertions.assertThrows(Exception.class, () -> { + factoryUnderTest.createClient(new Ric(ricConfig("", null)), A1ProtocolType.CUSTOM_PROTOCOL); + }); + assertEquals("Custom adapter class is required to use A1ProtocolType.CUSTOM_PROTOCOL", exceptionNullCustomAdaptor.getMessage()); } @Test diff --git a/docs/architecture/architecture.rst b/docs/architecture/architecture.rst index d1e770be..bf47c91c 100755 --- a/docs/architecture/architecture.rst +++ b/docs/architecture/architecture.rst @@ -1,5 +1,6 @@ .. SPDX-License-Identifier: CC-BY-4.0 -.. Copyright 2023 Nordix Foundation +.. Copyright 2023 Nordix Foundation. All rights reserved. +.. Copyright 2024 OpenInfra Foundation Europe. All rights reserved. .. _architecture: diff --git a/docs/consumedapis/consumedapis.rst b/docs/consumedapis/consumedapis.rst index edb2084a..4f9fea4e 100755 --- a/docs/consumedapis/consumedapis.rst +++ b/docs/consumedapis/consumedapis.rst @@ -1,5 +1,6 @@ .. SPDX-License-Identifier: CC-BY-4.0 -.. Copyright 2023 Nordix Foundation +.. Copyright 2023 Nordix Foundation. All rights reserved. +.. Copyright 2024 OpenInfra Foundation Europe. All rights reserved. Consumed APIs ============= @@ -15,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 **London** ONAP A1 Policy functions implement the *A1 Policy* (*A1-P*) parts of A1-AP, supporting versions *v1.1*, *v2.0* and *v3.0*. +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*. An opensource implementation of a `near-RT RIC <https://wiki.o-ran-sc.org/pages/viewpage.action?pageId=1179659>`_ 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 e9882a2d..2230c0f4 100644 --- a/docs/guide/developer-guide.rst +++ b/docs/guide/developer-guide.rst @@ -1,6 +1,7 @@ .. This work is licensed under a Creative Commons Attribution 4.0 International License. .. http://creativecommons.org/licenses/by/4.0 -.. Copyright (C) 2023 Nordix Foundation. +.. Copyright 2023 Nordix Foundation. All rights reserved. +.. Copyright 2024 OpenInfra Foundation Europe. All rights reserved. .. _developer_guide: @@ -9,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-London.png +.. image:: ../media/ONAP-A1ControllerArchitecture-Montreal.png :width: 500pt Source tree diff --git a/docs/humaninterfaces/humaninterfaces.rst b/docs/humaninterfaces/humaninterfaces.rst index be271b43..a68962b8 100644 --- a/docs/humaninterfaces/humaninterfaces.rst +++ b/docs/humaninterfaces/humaninterfaces.rst @@ -1,5 +1,6 @@ .. SPDX-License-Identifier: CC-BY-4.0 -.. Copyright 2022 Nordix Foundation +.. Copyright 2022-2023 Nordix Foundation. All rights reserved. +.. Copyright 2024 OpenInfra Foundation Europe. All rights reserved. Human Interfaces diff --git a/docs/media/ONAP-A1ControllerArchitecture-Montreal.png b/docs/media/ONAP-A1ControllerArchitecture-Montreal.png Binary files differnew file mode 100644 index 00000000..f2d4c602 --- /dev/null +++ b/docs/media/ONAP-A1ControllerArchitecture-Montreal.png diff --git a/docs/releasenotes/release-notes.rst b/docs/releasenotes/release-notes.rst index cca6f553..0690800c 100644 --- a/docs/releasenotes/release-notes.rst +++ b/docs/releasenotes/release-notes.rst @@ -2,6 +2,8 @@ .. 4.0 International License. .. http://creativecommons.org/licenses/by/4.0 .. Copyright (C) 2023 Nordix Foundation. +.. Copyright (C) 2024 OpenInfra Foundation Europe. + .. _release_notes: ============= @@ -9,14 +11,14 @@ Release-Notes ============= This document provides the release notes for the release of the different parts -of the ORAN project. +of the CCSDK ORAN project. .. contents:: :depth: 3 :local: -Version history Policy Management Service -========================================= +Version history A1 Policy Management Service +============================================ +------------+----------+-------------+-------------------+ | **Date** | **Ver.** | **Author** | **Comment** | @@ -91,6 +93,12 @@ Version history Policy Management Service | 2023-04-26 | 1.5.0 | Dan Timoney | RC version, | | | | | London Release | +------------+----------+-------------+-------------------+ +| 2023-11-10 | 1.6.0 | Dan Timoney | RC version, | +| | | | Montreal Release | ++------------+----------+-------------+-------------------+ +| 2023-11-27 | 1.6.1 | Dan Timoney | Release version, | +| | | | Montreal Release | ++------------+----------+-------------+-------------------+ Version history A1 Adapter ========================== @@ -168,6 +176,12 @@ Version history A1 Adapter | 2023-04-26 | 1.5.0 | Dan Timoney | RC version, | | | | | London Release | +------------+----------+-------------+-------------------+ +| 2023-11-10 | 1.6.0 | Dan Timoney | RC version, | +| | | | Montreal Release | ++------------+----------+-------------+-------------------+ +| 2023-11-27 | 1.6.1 | Dan Timoney | Release version, | +| | | | Montreal Release | ++------------+----------+-------------+-------------------+ Release Data ============ @@ -608,3 +622,43 @@ London, Release 1.5.0 | **Purpose of the delivery** | Improvements, London Release, 1.5.0 version | | | | +-----------------------------+-----------------------------------------------------+ + + +Montreal, Release 1.6.0 +----------------------- ++-----------------------------+-----------------------------------------------------+ +| **Project** | CCSDK ORAN | +| | | ++-----------------------------+-----------------------------------------------------+ +| **Repo/commit-ID** | ccsdk-oran/376ac6d1d25fa69016a92ddf47794ad3e3691a8b | +| | | ++-----------------------------+-----------------------------------------------------+ +| **Release designation** | Montreal, RC | +| | | ++-----------------------------+-----------------------------------------------------+ +| **Release date** | 2023-11-10 | +| | | ++-----------------------------+-----------------------------------------------------+ +| **Purpose of the delivery** | Improvements, Montreal RC, 1.6.0 version | +| | | ++-----------------------------+-----------------------------------------------------+ + + +Montreal, Release 1.6.1 +----------------------- ++-----------------------------+-----------------------------------------------------+ +| **Project** | CCSDK ORAN | +| | | ++-----------------------------+-----------------------------------------------------+ +| **Repo/commit-ID** | ccsdk-oran/80e8366498e34302afe7e85db6d345e148571712 | +| | | ++-----------------------------+-----------------------------------------------------+ +| **Release designation** | Montreal, RC | +| | | ++-----------------------------+-----------------------------------------------------+ +| **Release date** | 2023-11-27 | +| | | ++-----------------------------+-----------------------------------------------------+ +| **Purpose of the delivery** | Improvements, Montreal Release, 1.6.1 version | +| | | ++-----------------------------+-----------------------------------------------------+ diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt index 3ba864af..2622ddf5 100644 --- a/docs/requirements-docs.txt +++ b/docs/requirements-docs.txt @@ -7,4 +7,4 @@ sphinxcontrib-spelling sphinxcontrib-plantuml sphinxcontrib-redoc sphinx-tabs - +six diff --git a/docs/tox.ini b/docs/tox.ini index 00ec327c..3efa9479 100644 --- a/docs/tox.ini +++ b/docs/tox.ini @@ -9,7 +9,7 @@ skipsdist = true basepython = python3.8 deps = -r{toxinidir}/requirements-docs.txt - -chttps://raw.githubusercontent.com/openstack/requirements/stable/yoga/upper-constraints.txt + -chttps://releases.openstack.org/constraints/upper/yoga -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt commands = sphinx-build -W -b html -n -d {envtmpdir}/doctrees ./ {toxinidir}/_build/html @@ -30,7 +30,7 @@ allowlist_externals = echo basepython = python3.8 deps = -r{toxinidir}/requirements-docs.txt - -chttps://raw.githubusercontent.com/openstack/requirements/stable/yoga/upper-constraints.txt + -chttps://releases.openstack.org/constraints/upper/yoga -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt?h=master commands = sphinx-build -W -q -b spelling -d {envtmpdir}/doctrees {toxinidir} {toxinidir}/_build/spellcheck |