diff options
4 files changed, 7 insertions, 33 deletions
diff --git a/a1-policy-management/config/application.yaml b/a1-policy-management/config/application.yaml index 5e6c6fec..5684c463 100644 --- a/a1-policy-management/config/application.yaml +++ b/a1-policy-management/config/application.yaml @@ -57,8 +57,7 @@ server: key-password: policy_agent key-alias: policy_agent app: - # Location of the component configuration file. The file will only be used if the Consul database is not used; - # configuration from the Consul will override the file. + # Location of the component configuration file. filepath: /opt/app/policy-agent/data/application_configuration.json webclient: # Configuration of the trust store used for the HTTP client (outgoing requests) 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 6c7607e9..874929a5 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 @@ -22,6 +22,7 @@ package org.onap.ccsdk.oran.a1policymanagementservice.tasks; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.atLeastOnce; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.times; @@ -114,7 +115,7 @@ class RefreshConfigTaskTest { .verify(); // Then - verify(refreshTaskUnderTest).loadConfigurationFromFile(); + verify(refreshTaskUnderTest, atLeastOnce()).loadConfigurationFromFile(); verify(refreshTaskUnderTest, times(2)).addRic(any(Ric.class)); @@ -153,7 +154,8 @@ class RefreshConfigTaskTest { } private static Optional<JsonObject> getCorrectJson() throws IOException { - URL url = ApplicationConfigParser.class.getClassLoader().getResource("test_application_configuration.json"); + URL url = ApplicationConfigParser.class.getClassLoader() + .getResource("test_application_configuration.json"); String string = Resources.toString(url, Charsets.UTF_8); return Optional.of(JsonParser.parseString(string).getAsJsonObject()); } diff --git a/docs/consumedapis/consumedapis.rst b/docs/consumedapis/consumedapis.rst index d96dc9e5..b572bc49 100755 --- a/docs/consumedapis/consumedapis.rst +++ b/docs/consumedapis/consumedapis.rst @@ -7,11 +7,6 @@ Consumed APIs Policy Management Service application is interacting with two ONAP APIs and the A1-P API. -******* -CBS API -******* - -If *Consul* is used for configuring the A1 Policy Management Service the `ONAP DCAE Config Binding Service <https://docs.onap.org/projects/onap-dcaegen2/en/latest/sections/apis/configbinding.html>`_ is used. ********* DMAAP API @@ -26,7 +21,6 @@ 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)* describe this interface. The specification can be viewed from the `O-RAN Alliance <https://www.o-ran.org>`_ website. -The **Honolulu** ONAP A1 Policy functions implement the *A1 Policy* parts (*A1-P*) of A1-AP versions *v1.1* and *v2.0* An opensource implementation of a `near-RT-RIC <https://wiki.o-ran-sc.org/pages/viewpage.action?pageId=1179659>`_ is available from `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 d0eb79c9..29c9f91d 100644 --- a/docs/guide/developer-guide.rst +++ b/docs/guide/developer-guide.rst @@ -42,15 +42,7 @@ Dependencies This project uses various frameworks which are managed with Maven dependency management tool (see *pom.xml* file at root level) : -- Swagger annotations -- `Spring Framework <https://github.com/spring-projects/spring-boot>`_ -- `Springfox <https://github.com/springfox/springfox>`_ Automated JSON API documentation for API's built with Spring -- `Immutable <https://immutables.github.io/>`_ to generate simple, safe and consistent value objects -- `JSON in Java <https://github.com/stleary/JSON-java>`_ to parse JSON documents into Java objects -- `Apache Commons Net <https://github.com/apache/commons-net>`_ for network utilities and protocol implementations -- `DCAE SDK <https://github.com/onap/dcaegen2-services-sdk>`_ to get configuration from CBS -- `Lombok <https://github.com/rzwitserloot/lombok>`_ to generate code, such as getters and setters -- `Awaitility <https://github.com/awaitility/awaitility>`_ to test asynchronous functionality +To get a complete list of all dependencies, use command "mvn dependency:tree". Configuration ------------- @@ -83,7 +75,7 @@ For details about the parameters in this file, see documentation in the file. Dynamic configuration --------------------- -The component has configuration that can be updated in runtime. This configuration can either be loaded from a file (accessible from the container) or from a CBS/Consul database (Cloudify). The configuration is re-read and refreshed at regular intervals. This file based configuration can be updated or read via the REST API, See :ref:`pms_api`. +The component has configuration that can be updated in runtime. This configuration is loaded from a file (accessible from the container). The configuration is re-read and refreshed at regular intervals. This file based configuration can be updated or read via the REST API, See :ref:`pms_api`. The configuration includes: @@ -98,19 +90,6 @@ The configuration includes: For details about the syntax of the file, there is an example in source code repository */config/application_configuration.json*. This file is also included in the docker container */opt/app/policy-agent/data/application_configuration.json_example*. -Using CBS/Consul database for dynamic configuration ---------------------------------------------------- - -The access of CBS is setup by means of environment variables. There is currently no support for setting these at on boarding. - -The following variables are required by the CBS: - - * CONSUL_HOST - * CONSUL_PORT - * CONFIG_BINDING_SERVICE - * SERVICE_NAME - -The CBS/Consul overrides the configuration file. So when CBS/Consul is used, the configuration file is ignored. Configuration of certs ---------------------- |