Merge "Fix registration of types for DMaaP Mediator"
authorHenrik Andersson <henrik.b.andersson@est.tech>
Wed, 12 Jan 2022 09:01:09 +0000 (09:01 +0000)
committerGerrit Code Review <gerrit@o-ran-sc.org>
Wed, 12 Jan 2022 09:01:09 +0000 (09:01 +0000)
a1-policy-management-service/Dockerfile
docker-compose/.env
docker-compose/policy-service/docker-compose.yaml
docker-compose/sdnc/docker-compose.yml
r-app-catalogue/api/rac-api.yaml
r-app-catalogue/pom.xml
r-app-catalogue/src/test/java/org/oransc/rappcatalogue/HttpsRequestTest.java
test/usecases/odusliceassurance/goversion/main.go
test/usecases/odusliceassurance/goversion/stub/sdnr/sdnrstub.go

index f64eebb..6f8387e 100644 (file)
@@ -34,9 +34,15 @@ ADD /config/application_configuration.json /opt/app/policy-agent/data/applicatio
 ADD /config/keystore.jks /opt/app/policy-agent/etc/cert/keystore.jks
 ADD /config/truststore.jks /opt/app/policy-agent/etc/cert/truststore.jks
 
-RUN chmod -R 777 /opt/app/policy-agent/config/
-RUN chmod -R 777 /opt/app/policy-agent/data/
+ARG user=nonrtric
+ARG group=nonrtric
 
-ADD target/${JAR} /opt/app/policy-agent/policy-agent.jar
-CMD ["java", "-jar", "/opt/app/policy-agent/policy-agent.jar"]
+RUN groupadd $user && \
+    useradd -r -g $group $user
+RUN chown -R $user:$group /opt/app/policy-agent
+RUN chown -R $user:$group /var/log/policy-agent
+
+USER ${user}
 
+ADD target/${JAR} /opt/app/policy-agent/policy-agent.jar
+CMD ["java", "-jar", "/opt/app/policy-agent/policy-agent.jar"]
\ No newline at end of file
index b984df9..66db95f 100644 (file)
 #
 
 #PMS
-PMS_IMAGE_BASE="nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-policy-agent"
-PMS_IMAGE_TAG="2.2.0"
+PMS_IMAGE_BASE="nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-a1-policy-management-service"
+PMS_IMAGE_TAG="2.3.0"
 
 #A1_SIM
 A1_SIM_IMAGE_BASE="nexus3.o-ran-sc.org:10002/o-ran-sc/a1-simulator"
-A1_SIM_IMAGE_TAG="2.1.0"
+A1_SIM_IMAGE_TAG="2.2.0"
 
 #RAPP
 RAPP_IMAGE_BASE="nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-r-app-catalogue"
-RAPP_IMAGE_TAG="1.0.0"
+RAPP_IMAGE_TAG="1.0.1"
 
 #CONTROL_PANEL
 CONTROL_PANEL_IMAGE_BASE="nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-controlpanel"
-CONTROL_PANEL_IMAGE_TAG="2.2.0"
+CONTROL_PANEL_IMAGE_TAG="2.3.0"
 
 #GATEWAY
 NONRTRIC_GATEWAY_IMAGE_BASE="nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-gateway"
@@ -37,7 +37,7 @@ NONRTRIC_GATEWAY_IMAGE_TAG="1.0.0"
 
 #ICS
 ICS_IMAGE_BASE="nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-information-coordinator-service"
-ICS_IMAGE_TAG="1.1.0"
+ICS_IMAGE_TAG="1.2.0"
 
 #CONSUMER
 CONSUMER_IMAGE_BASE="eexit/mirror-http-server"
@@ -48,8 +48,8 @@ ORU_APP_IMAGE_BASE="nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-o-ru-closed-loop
 ORU_APP_IMAGE_TAG="1.0.0"
 
 #DB
-DB_IMAGE_BASE="mysql/mysql-server"
-DB_IMAGE_TAG="5.6"
+DB_IMAGE_BASE="mariadb"
+DB_IMAGE_TAG="10.5"
 
 #A1CONTROLLER
 A1CONTROLLER_IMAGE_BASE="nexus3.onap.org:10002/onap/sdnc-image"
index 2dfc38c..79e6a6e 100644 (file)
@@ -33,7 +33,7 @@ services:
       - 8433:8433
     volumes:
       - ./policy-service/config/application-policyagent.yaml:/opt/app/policy-agent/config/application.yaml:ro
-      - ./policy-service/config/application_configuration.json:/opt/app/policy-agent/data/application_configuration.json:ro
+      - ./policy-service/config/application_configuration.json:/opt/app/policy-agent/data/application_configuration.json:rw
     # For using own certs instead of the default ones (built into the container),
     # place them in config/ directory, update the application-policyagent.yaml file, and uncomment the following lines
     #  - ./policy-service/config/keystore-policyagent.jks:/opt/app/policy-agent/etc/cert/keystore.jks:ro
index 3661db9..69d8ac9 100644 (file)
@@ -22,7 +22,7 @@ networks:
 
 services:
   db:
-    image: mysql/mysql-server:5.6
+    image: "${DB_IMAGE_BASE}:${DB_IMAGE_TAG}"
     container_name: sdnc-db
     networks:
       - default
index 748cf2b..9ba6c39 100644 (file)
@@ -14,7 +14,7 @@ paths:
       summary: Services
       operationId: getServices
       responses:
-        200:
+        "200":
           description: Services
           content:
             application/json:
@@ -40,13 +40,13 @@ paths:
           type: string
         example: DroneIdentifier
       responses:
-        200:
+        "200":
           description: Service
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/service'
-        404:
+        "404":
           description: Service is not found
           content:
             application/json:
@@ -75,9 +75,9 @@ paths:
               $ref: '#/components/schemas/inputService'
         required: true
       responses:
-        200:
+        "200":
           description: Service updated
-        201:
+        "201":
           description: Service created
           headers:
             Location:
@@ -86,14 +86,14 @@ paths:
               explode: false
               schema:
                 type: string
-        400:
+        "400":
           description: Provided service is not correct
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/error_information'
               example:
-                detail: 'Service is missing required property: version'
+                detail: "Service is missing required property: version"
                 status: 400
       deprecated: false
     delete:
@@ -111,7 +111,7 @@ paths:
           type: string
         example: DroneIdentifier
       responses:
-        204:
+        "204":
           description: Service deleted
       deprecated: false
 components:
index 5da52d3..67be912 100644 (file)
@@ -26,7 +26,7 @@
     <parent>\r
         <groupId>org.springframework.boot</groupId>\r
         <artifactId>spring-boot-starter-parent</artifactId>\r
-        <version>2.3.4.RELEASE</version>\r
+        <version>2.6.2</version>\r
         <relativePath />\r
     </parent>\r
     <groupId>org.o-ran-sc.nonrtric</groupId>\r
@@ -43,8 +43,8 @@
         <swagger-annotations.version>1.5.22</swagger-annotations.version>\r
         <springfox.version>2.9.2</springfox.version>\r
         <jackson-databind-nullable.version>0.2.1</jackson-databind-nullable.version>\r
-        <openapi-generator-maven-plugin.version>4.3.1</openapi-generator-maven-plugin.version>\r
-        <swagger-codegen-maven-plugin.version>3.0.11</swagger-codegen-maven-plugin.version>\r
+        <openapi-generator-maven-plugin.version>5.3.1</openapi-generator-maven-plugin.version>\r
+        <swagger-codegen-maven-plugin.version>3.0.31</swagger-codegen-maven-plugin.version>\r
         <formatter-maven-plugin.version>2.12.2</formatter-maven-plugin.version>\r
         <spotless-maven-plugin.version>1.24.3</spotless-maven-plugin.version>\r
         <jacoco-maven-plugin.version>0.8.6</jacoco-maven-plugin.version>\r
             </plugin>\r
         </plugins>\r
     </build>\r
-</project>
\ No newline at end of file
+</project>\r
index 9b943df..8a66e14 100644 (file)
@@ -18,9 +18,9 @@
 
 package org.oransc.rappcatalogue;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThrows;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import javax.net.ssl.SSLContext;
 
@@ -28,8 +28,8 @@ import org.apache.http.client.HttpClient;
 import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
 import org.apache.http.impl.client.HttpClients;
 import org.apache.http.ssl.SSLContextBuilder;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.test.context.SpringBootTest;
@@ -43,11 +43,11 @@ import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
 import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
 import org.springframework.test.context.TestPropertySource;
-import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.test.context.junit.jupiter.SpringExtension;
 import org.springframework.util.ResourceUtils;
 import org.springframework.web.client.ResourceAccessException;
 
-@RunWith(SpringRunner.class)
+@ExtendWith(SpringExtension.class)
 @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
 @TestPropertySource(
     properties = { //
index 8366843..f1c8d42 100644 (file)
@@ -29,7 +29,7 @@ import (
        "oransc.org/usecase/oduclosedloop/internal/sliceassurance"
 )
 
-const TOPIC string = "/events/unauthenticated.PERFORMANCE_MEASUREMENTS"
+const TOPIC string = "unauthenticated.VES_O_RAN_SC_HELLO_WORLD_PM_STREAMING_OUTPUT"
 
 var configuration *config.Config
 
index d0b5b8a..41cc928 100644 (file)
@@ -109,8 +109,6 @@ func getDistributedUnitFunctions(w http.ResponseWriter, r *http.Request) {
 }
 
 func updateRRMPolicyDedicatedRatio(w http.ResponseWriter, r *http.Request) {
-       //vars := mux.Vars(r)
-       fmt.Println("::updateRRMPolicyDedicatedRatio::")
        var prMessage messages.DistributedUnitFunction
        decoder := json.NewDecoder(r.Body)
 
@@ -121,7 +119,6 @@ func updateRRMPolicyDedicatedRatio(w http.ResponseWriter, r *http.Request) {
        defer r.Body.Close()
 
        fmt.Println("prMessage: ", prMessage)
-       //prMessage.Id = vars["POLICY-ID"]
 
        respondWithJSON(w, http.StatusOK, map[string]string{"status": "200"})
 }