Update tests and component spec to use AAI v23 API 19/123219/3 1.7.0
authorRemigiusz Janeczek <remigiusz.janeczek@nokia.com>
Tue, 10 Aug 2021 11:32:21 +0000 (13:32 +0200)
committerRemigiusz Janeczek <remigiusz.janeczek@nokia.com>
Wed, 11 Aug 2021 08:01:16 +0000 (08:01 +0000)
Issue-ID: DCAEGEN2-1531
Signed-off-by: Remigiusz Janeczek <remigiusz.janeczek@nokia.com>
Change-Id: I4bf16f64cc4e8a338ee83b846b3fb939a56f5a0f

dpo/spec/prh.componentspec.json
prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/TestAppConfiguration.java
prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/integration/PrhWorkflowIntegrationTest.java
prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskTest.java
prh-app-server/src/test/resources/BbsActionsTaskTestFiles/oldLogicalLink.json
prh-app-server/src/test/resources/BbsActionsTaskTestFiles/pnfWithLogicalLink.json
prh-app-server/src/test/resources/configurationFromCbs.json
prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiClientConfigurations.java
prh-commons/src/test/java/org/onap/dcaegen2/services/prh/adapter/aai/impl/AaiGetServiceInstanceClientTest.java

index 045ca11..ce4272e 100644 (file)
       {
         "format": "AAI_Interaction",
         "version": "1.0.0",
-        "config_key": "/aai/v12/network/pnfs/pnf/pnf_name",
+        "config_key": "/aai/v23/network/pnfs/pnf/pnf_name",
         "type": "message_router"
       },
       {
         "format": "AAI_Interaction",
         "version": "1.0.0",
-        "config_key": "/aai/v12/network/pnfs/pnf/pnf_name",
+        "config_key": "/aai/v23/network/pnfs/pnf/pnf_name",
         "type": "message_router"
       }
     ]
index bb79516..4cfaff2 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * PNF-REGISTRATION-HANDLER
  * ================================================================================
- * Copyright (C) 2018 NOKIA Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2021 NOKIA Intellectual Property. 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.
@@ -55,8 +55,8 @@ public class TestAppConfiguration {
 
     public static ImmutableAaiClientConfiguration createDefaultAaiClientConfiguration() {
         return new ImmutableAaiClientConfiguration.Builder()
-                .pnfUrl("https://aai.onap.svc.cluster.local:8443/aai/v12/network/pnfs/pnf")
-                .baseUrl("https://aai.onap.svc.cluster.local:8443/aai/v12")
+                .pnfUrl("https://aai.onap.svc.cluster.local:8443/aai/v23/network/pnfs/pnf")
+                .baseUrl("https://aai.onap.svc.cluster.local:8443/aai/v23")
                 .aaiUserName("AAI")
                 .aaiUserPassword("AAI")
                 .aaiIgnoreSslCertificateErrors(true)
index 672cfc4..01beb88 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * PNF-REGISTRATION-HANDLER
  * ================================================================================
- * Copyright (C) 2019 NOKIA Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2021 NOKIA Intellectual Property. 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.
@@ -103,8 +103,8 @@ class PrhWorkflowIntegrationTest {
 
         stubFor(get(urlEqualTo("/events/unauthenticated.VES_PNFREG_OUTPUT/OpenDCAE-c12/c12"))
                 .willReturn(ok().withBody(new Gson().toJson(singletonList(event)))));
-        stubFor(get(urlEqualTo("/aai/v12/network/pnfs/pnf/" + pnfName)).willReturn(ok().withBody("{}")));
-        stubFor(patch(urlEqualTo("/aai/v12/network/pnfs/pnf/" + pnfName)));
+        stubFor(get(urlEqualTo("/aai/v23/network/pnfs/pnf/" + pnfName)).willReturn(ok().withBody("{}")));
+        stubFor(patch(urlEqualTo("/aai/v23/network/pnfs/pnf/" + pnfName)));
         stubFor(post(urlEqualTo("/events/unauthenticated.PNF_READY")));
 
         scheduledTasks.scheduleMainPrhEventTask();
index f060ac7..6eed61b 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * PNF-REGISTRATION-HANDLER
  * ================================================================================
- * Copyright (C) 2019 NOKIA Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2021 NOKIA Intellectual Property. 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.
@@ -57,7 +57,7 @@ import reactor.core.publisher.Mono;
 
 class BbsActionsTaskTest {
 
-    private static final String AAI_URL = "https://aai.onap.svc.cluster.local:8443/aai/v12/network";
+    private static final String AAI_URL = "https://aai.onap.svc.cluster.local:8443/aai/v23/network";
     private static final String PNF_URL = "/pnfs/pnf";
     private static final String LOGICAL_LINK_URL = "/logical-links/logical-link";
     private static final String ATTACHMENT_POINT = "attachment-point";
index 7d3f02d..da3459e 100644 (file)
@@ -8,7 +8,7 @@
       {
         "related-to": "pnf",
         "relationship-label": "org.onap.relationships.inventory.BridgedTo",
-        "related-link": "/aai/v14/network/pnfs/pnf/Nokia123",
+        "related-link": "/aai/v23/network/pnfs/pnf/Nokia123",
         "relationship-data": [
           {
             "relationship-key": "pnf.pnf-name",
index 6f4690d..c34a074 100644 (file)
@@ -12,7 +12,7 @@
       {
         "related-to": "logical-link",
         "relationship-label": "org.onap.relationships.inventory.BridgedTo",
-        "related-link": "/aai/v14/network/logical-links/logical-link/some-link",
+        "related-link": "/aai/v23/network/logical-links/logical-link/some-link",
         "relationship-data": [
           {
             "relationship-key": "logical-link.link-name",
index dd2da43..31b21a3 100644 (file)
@@ -10,8 +10,8 @@
     "dmaap.dmaapProducerConfiguration.dmaapUserPassword":"admin",
     "dmaap.dmaapUpdateProducerConfiguration.dmaapUserName":"admin",
     "dmaap.dmaapUpdateProducerConfiguration.dmaapUserPassword":"admin",
-    "aai.aaiClientConfiguration.pnfUrl": "https://aai.onap.svc.cluster.local:8443/aai/v12/network/pnfs/pnf",
-    "aai.aaiClientConfiguration.baseUrl": "https://aai.onap.svc.cluster.local:8443/aai/v12",
+    "aai.aaiClientConfiguration.pnfUrl": "https://aai.onap.svc.cluster.local:8443/aai/v23/network/pnfs/pnf",
+    "aai.aaiClientConfiguration.baseUrl": "https://aai.onap.svc.cluster.local:8443/aai/v23",
     "aai.aaiClientConfiguration.aaiUserName":"AAI",
     "aai.aaiClientConfiguration.aaiUserPassword":"AAI",
     "aai.aaiClientConfiguration.aaiIgnoreSslCertificateErrors":true,
index 2f3dba0..eef76e1 100644 (file)
@@ -43,7 +43,7 @@ public final class AaiClientConfigurations {
 
     private static AaiClientConfiguration validConfiguration(Map<String, String> headers, boolean secure) {
         return new ImmutableAaiClientConfiguration.Builder()
-            .baseUrl("https://aai.onap.svc.cluster.local:8443/aai/v12")
+            .baseUrl("https://aai.onap.svc.cluster.local:8443/aai/v23")
             .aaiUserName("sample-username")
             .aaiUserPassword("sample-password")
             .aaiIgnoreSslCertificateErrors(false)
index 9c7ce60..81b0b16 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * DCAEGEN2-SERVICES-SDK
  * ================================================================================
- * Copyright (C) 2019 NOKIA Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2021 NOKIA Intellectual Property. 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.
@@ -37,7 +37,7 @@ import reactor.test.StepVerifier;
 class AaiGetServiceInstanceClientTest extends AbstractHttpClientTest {
 
     public static final String SERVICE_INSTANCE_PATH =
-        "https://aai.onap.svc.cluster.local:8443/aai/v12/business/customers/customer/Demonstration/"
+        "https://aai.onap.svc.cluster.local:8443/aai/v23/business/customers/customer/Demonstration/"
             + "service-subscriptions/service-subscription/VCPE/service-instances/service-instance/df018f76-7fc8-46ab-8444-7d67e1efc284";
 
     @Test