From d16cf7f33f3cb0a104ca91a5e5db59d3ad81bb21 Mon Sep 17 00:00:00 2001 From: PatrikBuhr Date: Wed, 8 Mar 2023 09:36:03 +0100 Subject: [PATCH] Uplift from ONAP Stepping to springboot 3 Using Java 17 Signed-off-by: PatrikBuhr Issue-ID: NONRTRIC-743 Change-Id: I809a592cfe0465c270fa3e1f06424e8e51cbdb5a --- README.md | 29 ------------------------- config/README | 2 +- config/application.yaml | 2 +- docs/overview.rst | 6 ------ dpo/blueprints/k8s-policy-agent.yaml | 14 +----------- onap/oran | 2 +- pom.xml | 42 +++++++++++++++--------------------- 7 files changed, 21 insertions(+), 76 deletions(-) diff --git a/README.md b/README.md index d660df9..f773ff0 100644 --- a/README.md +++ b/README.md @@ -41,10 +41,6 @@ To Run Policy Agent in Local: In the folder /opt/app/policy-agent/config/, create a soft link with below command, ln -s application_configuration.json -To Run Policy Agent in Local with the DMaaP polling turned on: -In the folder /opt/app/policy-agent/config/, create a soft link with below command, -ln -s application_configuration.json - The agent 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=MockPolicyAgent test @@ -52,31 +48,6 @@ mvn -Dtest=MockPolicyAgent test The backend server publishes live API documentation at the URL `http://your-host-name-here:8081/swagger-ui.html` -PolicyAgent uses A1-POLICY-AGENT-READ & A1-POLICY-AGENT-WRITE topic for subscribe & Publish to the DMaap. -Sample Request Message to DMaaP: -{ - "type": "request", - "target": "policy-agent", - "timestamp": "2019-05-14T11:44:51.36Z", - "operation": "GET", - "correlationId": "c09ac7d1-de62-0016-2000-e63701125557-201", - "apiVersion": "1.0", - "originatorId": "849e6c6b420", - "requestId": "23343221", - "url": "/policies?type=type1&ric=ric1&service=service1" -} - -Sample Response Message to DMaaP: -{ - "type": "response", - "timestamp": "2019-05-14T11:44:51.36Z", - "correlationId": "c09ac7d1-de62-0016-2000-e63701125557-201", - "originatorId": "849e6c6b420", - "requestId": "23343221", - "status": "200 OK", - "message": [] -} - ## License Copyright (C) 2019 Nordix Foundation. All rights reserved. diff --git a/config/README b/config/README index 42e0b7b..38d4f3d 100644 --- a/config/README +++ b/config/README @@ -29,7 +29,7 @@ keytool -list -v -keystore truststore.jks -storepass policy_agent ## License ONAP : ccsdk oran -Copyright (C) 2020 Nordix Foundation. All rights reserved. +Copyright (C) 2020-2023 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 diff --git a/config/application.yaml b/config/application.yaml index 8f37aaa..44e0b07 100644 --- a/config/application.yaml +++ b/config/application.yaml @@ -2,7 +2,7 @@ # ============LICENSE_START======================================================= # ONAP : ccsdk oran # ================================================================================ -# Copyright (C) 2020 Nordix Foundation. All rights reserved. +# Copyright (C) 2020-2023 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. diff --git a/docs/overview.rst b/docs/overview.rst index 3c66a81..018b7b4 100644 --- a/docs/overview.rst +++ b/docs/overview.rst @@ -7,12 +7,6 @@ A1 Policy Management Service (from ONAP CCSDK) A1 Controller Service above A1 Controller/Adaptor that provides: -* Unified REST & DMaaP NBI APIs for managing A1 Policies in all near-RT-RICs. - - + Query A1 Policy Types in near-RT-RICs. - + Create/Query/Update/Delete A1 Policy Instances in near-RT-RICs. - + Query Status for A1 Policy Instances. - * Maintains (persistent) cache of RAN's A1 Policy information. * Support RAN-wide view of A1 Policy information. diff --git a/dpo/blueprints/k8s-policy-agent.yaml b/dpo/blueprints/k8s-policy-agent.yaml index 477948d..4d4309b 100644 --- a/dpo/blueprints/k8s-policy-agent.yaml +++ b/dpo/blueprints/k8s-policy-agent.yaml @@ -75,16 +75,6 @@ node_templates: get_input: envs properties: application_config: - streams_publishes: - dmaap_publisher: - dmaap_info: - topic_url: { concat: ['https://message-router:3905/events/',{ get_input: publish_topic_name }] } - type: message_router - streams_subscribes: - dmaap_subscriber: - dmaap_info: - topic_url: { concat: ['https://message-router:3905/events/',{ get_input: subscribe_topic_name }, '/', { get_input: consumer_group }, "/", { get_input: consumer_id }, "?timeout=15000&limit=100"] } - type: message_router ric: - name: ric1 baseUrl: http://localhost:8083/ @@ -103,7 +93,7 @@ node_templates: type: http endpoint: /status ports: - - concat: ["8081", {get_input: external_port}] + - concat: ["8081", { get_input: external_port }] image: get_input: tag_version service_component_type: policy-agent @@ -123,5 +113,3 @@ node_templates: get_input: policy-agent_cpu_request memory: get_input: policy-agent_memory_request - - diff --git a/onap/oran b/onap/oran index 1c317eb..62abcd8 160000 --- a/onap/oran +++ b/onap/oran @@ -1 +1 @@ -Subproject commit 1c317ebe1323f5f749adad062ec3486612ef7a25 +Subproject commit 62abcd8a852595e8d2e32154708f962a8fa8d4a2 diff --git a/pom.xml b/pom.xml index 859842b..84f8365 100644 --- a/pom.xml +++ b/pom.xml @@ -21,12 +21,12 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 org.springframework.boot spring-boot-starter-parent - 2.7.7 + 3.0.4 org.o-ran-sc.nonrtric.plt @@ -46,9 +46,7 @@ - 11 - 3.0.0 - 2.2.8 + 17 20220924 3.10.0 2.13.0 @@ -59,6 +57,7 @@ 0.8.8 3.1.0 2.19.17 + 2.0.2 @@ -100,16 +99,6 @@ org.springframework spring-webflux - - io.swagger.core.v3 - swagger-jaxrs2 - ${swagger.version} - - - io.swagger.core.v3 - swagger-jaxrs2-servlet-initializer - ${swagger.version} - com.google.code.gson gson @@ -144,16 +133,17 @@ org.springframework.boot spring-boot-starter-actuator - + - io.springfox - springfox-swagger2 - ${springfox.version} + org.springdoc + springdoc-openapi-starter-webmvc-ui + ${springdoc.version} - io.springfox - springfox-swagger-ui - ${springfox.version} + org.springdoc + springdoc-openapi-ui + ${springdoc.version} @@ -283,7 +273,8 @@ ${env.CONTAINER_PULL_REGISTRY} - o-ran-sc/nonrtric-plt-a1policymanagementservice:${project.version} + + o-ran-sc/nonrtric-plt-a1policymanagementservice:${project.version} try ${basedir} @@ -310,7 +301,8 @@ ${env.CONTAINER_PUSH_REGISTRY} - o-ran-sc/nonrtric-plt-a1policymanagementservice:${project.version} + + o-ran-sc/nonrtric-plt-a1policymanagementservice:${project.version} ${basedir} Dockerfile @@ -378,4 +370,4 @@ JIRA https://jira.o-ran-sc.org/ - + \ No newline at end of file -- 2.16.6