Merge "Create tests for EventPublisher error scenarios"
authorToine Siebelink <toine.siebelink@est.tech>
Mon, 15 Jan 2024 10:29:14 +0000 (10:29 +0000)
committerGerrit Code Review <gerrit@onap.org>
Mon, 15 Jan 2024 10:29:14 +0000 (10:29 +0000)
54 files changed:
checkstyle/pom.xml
cps-application/pom.xml
cps-application/src/main/resources/application.yml
cps-bom/pom.xml
cps-dependencies/pom.xml
cps-events/pom.xml
cps-ncmp-events/pom.xml
cps-ncmp-rest-stub/cps-ncmp-rest-stub-app/pom.xml
cps-ncmp-rest-stub/cps-ncmp-rest-stub-service/pom.xml
cps-ncmp-rest-stub/pom.xml
cps-ncmp-rest/pom.xml
cps-ncmp-service/pom.xml
cps-parent/pom.xml
cps-path-parser/pom.xml
cps-rest/pom.xml
cps-ri/pom.xml
cps-ri/src/main/java/org/onap/cps/spi/entities/FragmentEntity.java [changed mode: 0755->0644]
cps-ri/src/main/resources/changelog/changelog-master.yaml
cps-ri/src/main/resources/changelog/db/changes/22-fragment-id-sequence-forward.sql [new file with mode: 0644]
cps-ri/src/main/resources/changelog/db/changes/22-fragment-id-sequence-rollback.sql [new file with mode: 0644]
cps-ri/src/main/resources/changelog/db/changes/22-fragment-id-sequence.yaml [new file with mode: 0644]
cps-service/pom.xml
csit/data/cps-core/dataOperationRequest.json
csit/data/subscription-notification/cmSubscriptionNcmpInEventForCsit.json
csit/data/subscription-notification/createCmHandleRequestBody.json
csit/plans/cps/sdnc/check_sdnc_mount_node.sh
csit/tests/cm-handle-query/cm-handle-query.robot
csit/tests/cps-data-operations/cps-data-operations.robot
csit/tests/cps-data-sync/cps-data-sync.robot
csit/tests/cps-model-sync/cps-model-sync.robot
csit/tests/ncmp-passthrough/ncmp-passthrough.robot
dmi-plugin-demo-and-csit-stub/dmi-plugin-demo-and-csit-stub-app/pom.xml
dmi-plugin-demo-and-csit-stub/dmi-plugin-demo-and-csit-stub-service/pom.xml
dmi-plugin-demo-and-csit-stub/dmi-plugin-demo-and-csit-stub-service/src/main/java/org/onap/cps/ncmp/dmi/rest/stub/controller/DmiRestStubController.java
dmi-plugin-demo-and-csit-stub/dmi-plugin-demo-and-csit-stub-service/src/main/resources/module/bookStoreModuleResourcesResponse.json [new file with mode: 0644]
dmi-plugin-demo-and-csit-stub/dmi-plugin-demo-and-csit-stub-service/src/main/resources/module/bookStoreModuleResponse.json [new file with mode: 0644]
dmi-plugin-demo-and-csit-stub/dmi-plugin-demo-and-csit-stub-service/src/main/resources/module/ietfYangModuleResourcesResponse.json [moved from dmi-plugin-demo-and-csit-stub/dmi-plugin-demo-and-csit-stub-service/src/main/resources/module/moduleResourcesResponse.json with 99% similarity]
dmi-plugin-demo-and-csit-stub/dmi-plugin-demo-and-csit-stub-service/src/main/resources/module/ietfYangModuleResponse.json [moved from dmi-plugin-demo-and-csit-stub/dmi-plugin-demo-and-csit-stub-service/src/main/resources/module/moduleResponse.json with 99% similarity]
dmi-plugin-demo-and-csit-stub/pom.xml
docs/release-notes.rst
integration-test/pom.xml
integration-test/src/test/groovy/org/onap/cps/integration/performance/base/CpsPerfTestBase.groovy
integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/CpsDataServiceLimitsPerfTest.groovy
integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/DeletePerfTest.groovy
integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/UpdatePerfTest.groovy
integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/WritePerfTest.groovy
integration-test/src/test/resources/application.yml
integration-test/src/test/resources/liquibase/test-changelog.yaml
jacoco-report/pom.xml
pom.xml
releases/3.4.2-container.yaml [new file with mode: 0644]
releases/3.4.2.yaml [new file with mode: 0644]
spotbugs/pom.xml
version.properties

index dac29d8..ff4ecb5 100644 (file)
@@ -26,7 +26,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.onap.cps</groupId>
     <artifactId>checkstyle</artifactId>
-    <version>3.4.2-SNAPSHOT</version>
+    <version>3.4.3-SNAPSHOT</version>
 
     <profiles>
         <profile>
index 244067b..b3e1fe9 100644 (file)
@@ -28,7 +28,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.4.2-SNAPSHOT</version>
+        <version>3.4.3-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
index f973b6f..4e20a4b 100644 (file)
@@ -1,7 +1,7 @@
 #  ============LICENSE_START=======================================================
 #  Copyright (C) 2021 Pantheon.tech
 #  Modifications Copyright (C) 2021-2022 Bell Canada
-#  Modifications Copyright (C) 2021-2023 Nordix Foundation
+#  Modifications Copyright (C) 2021-2024 Nordix Foundation
 #  ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -39,6 +39,9 @@ spring:
         properties:
             hibernate.enable_lazy_load_no_trans: true
             hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect
+            # Please ensure these values match those used in integration-test/src/test/resources/application.yml
+            hibernate.id.new_generator_mappings: true
+            hibernate.jdbc.batch_size: 100
 
     datasource:
         url: jdbc:postgresql://${DB_HOST}:${DB_PORT:5432}/cpsdb
index bde5143..54d7602 100644 (file)
@@ -25,7 +25,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.onap.cps</groupId>
     <artifactId>cps-bom</artifactId>
-    <version>3.4.2-SNAPSHOT</version>
+    <version>3.4.3-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <description>This artifact contains dependencyManagement declarations of all published CPS components.</description>
index b40b029..e7eb576 100644 (file)
@@ -27,7 +27,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.onap.cps</groupId>
     <artifactId>cps-dependencies</artifactId>
-    <version>3.4.2-SNAPSHOT</version>
+    <version>3.4.3-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>${project.groupId}:${project.artifactId}</name>
index b46665d..b1fd6f9 100644 (file)
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.4.2-SNAPSHOT</version>
+        <version>3.4.3-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
index 037fbba..36c69c6 100644 (file)
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.4.2-SNAPSHOT</version>
+        <version>3.4.3-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
index 554bfd4..cdd9eef 100644 (file)
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-ncmp-rest-stub</artifactId>
-        <version>3.4.2-SNAPSHOT</version>
+        <version>3.4.3-SNAPSHOT</version>
     </parent>
 
     <artifactId>cps-ncmp-rest-stub-app</artifactId>
index 7a94305..695065a 100644 (file)
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-ncmp-rest-stub</artifactId>
-        <version>3.4.2-SNAPSHOT</version>
+        <version>3.4.3-SNAPSHOT</version>
     </parent>
     <artifactId>cps-ncmp-rest-stub-service</artifactId>
 
index 3b1192f..a1c5ee0 100644 (file)
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.4.2-SNAPSHOT</version>
+        <version>3.4.3-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
index 25f9c5a..27c640a 100644 (file)
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.4.2-SNAPSHOT</version>
+        <version>3.4.3-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
index 8cc58c1..f12d5b0 100644 (file)
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.4.2-SNAPSHOT</version>
+        <version>3.4.3-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
index 5a64613..2856b98 100644 (file)
@@ -32,7 +32,7 @@
 
     <groupId>org.onap.cps</groupId>
     <artifactId>cps-parent</artifactId>
-    <version>3.4.2-SNAPSHOT</version>
+    <version>3.4.3-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <properties>
index f88ef13..4b743a7 100644 (file)
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.4.2-SNAPSHOT</version>
+        <version>3.4.3-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
index 8471723..0b31577 100644 (file)
@@ -28,7 +28,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.4.2-SNAPSHOT</version>
+        <version>3.4.3-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
index 8e2683d..6006768 100644 (file)
@@ -26,7 +26,7 @@
     <parent>\r
         <groupId>org.onap.cps</groupId>\r
         <artifactId>cps-parent</artifactId>\r
-        <version>3.4.2-SNAPSHOT</version>\r
+        <version>3.4.3-SNAPSHOT</version>\r
         <relativePath>../cps-parent/pom.xml</relativePath>\r
     </parent>\r
 \r
old mode 100755 (executable)
new mode 100644 (file)
index 12f42f2..c763f61
@@ -1,6 +1,6 @@
 /*
  * ============LICENSE_START=======================================================
- * Copyright (C) 2020-2023 Nordix Foundation.
+ * Copyright (C) 2020-2024 Nordix Foundation.
  * Modifications Copyright (C) 2021 Pantheon.tech
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -31,6 +31,7 @@ import jakarta.persistence.Id;
 import jakarta.persistence.JoinColumn;
 import jakarta.persistence.ManyToOne;
 import jakarta.persistence.OneToMany;
+import jakarta.persistence.SequenceGenerator;
 import jakarta.persistence.Table;
 import jakarta.validation.constraints.NotNull;
 import java.io.Serializable;
@@ -63,7 +64,8 @@ public class FragmentEntity implements Serializable {
     private static final long serialVersionUID = 7737669789097119667L;
 
     @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "fragment_id_seq_generator")
+    @SequenceGenerator(name = "fragment_id_seq_generator", sequenceName = "fragment_id_seq", allocationSize = 100)
     private Long id;
 
     @NotNull
index f76c5ba..e10ce63 100644 (file)
@@ -1,6 +1,6 @@
 # ============LICENSE_START=======================================================
 # Copyright (c) 2021 Bell Canada.
-# Modifications Copyright (C) 2022-2023 Nordix Foundation.
+# Modifications Copyright (C) 2022-2024 Nordix Foundation.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -58,3 +58,5 @@ databaseChangeLog:
       file: changelog/db/changes/20-change-foreign-key-id-types-to-integer.yaml
   - include:
       file: changelog/db/changes/21-escape-quotes-in-xpath.yaml
+  - include:
+      file: changelog/db/changes/22-fragment-id-sequence.yaml
diff --git a/cps-ri/src/main/resources/changelog/db/changes/22-fragment-id-sequence-forward.sql b/cps-ri/src/main/resources/changelog/db/changes/22-fragment-id-sequence-forward.sql
new file mode 100644 (file)
index 0000000..7f8d686
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+   ============LICENSE_START=======================================================
+    Copyright (C) 2024 Nordix Foundation.
+   ================================================================================
+   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
+        http://www.apache.org/licenses/LICENSE-2.0
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   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.
+   SPDX-License-Identifier: Apache-2.0
+   ============LICENSE_END=========================================================
+*/
+
+ALTER TABLE fragment ALTER COLUMN id DROP IDENTITY;
+CREATE SEQUENCE fragment_id_seq INCREMENT BY 100 START WITH 100;
+SELECT setval('fragment_id_seq', (SELECT ((max(id) / 100) + 1) * 100 FROM fragment), TRUE);
diff --git a/cps-ri/src/main/resources/changelog/db/changes/22-fragment-id-sequence-rollback.sql b/cps-ri/src/main/resources/changelog/db/changes/22-fragment-id-sequence-rollback.sql
new file mode 100644 (file)
index 0000000..88bb8c7
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+   ============LICENSE_START=======================================================
+    Copyright (C) 2024 Nordix Foundation.
+   ================================================================================
+   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
+        http://www.apache.org/licenses/LICENSE-2.0
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   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.
+   SPDX-License-Identifier: Apache-2.0
+   ============LICENSE_END=========================================================
+*/
+
+DROP SEQUENCE fragment_id_seq;
+ALTER TABLE fragment ALTER id ADD GENERATED BY DEFAULT AS IDENTITY;
+SELECT setval('fragment_id_seq', (SELECT max(id) FROM fragment), TRUE);
diff --git a/cps-ri/src/main/resources/changelog/db/changes/22-fragment-id-sequence.yaml b/cps-ri/src/main/resources/changelog/db/changes/22-fragment-id-sequence.yaml
new file mode 100644 (file)
index 0000000..8bdabb5
--- /dev/null
@@ -0,0 +1,28 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2024 Nordix Foundation.
+# ================================================================================
+# 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
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+databaseChangeLog:
+  - changeSet:
+      author: cps
+      id: 21
+      changes:
+        - sqlFile:
+            path: changelog/db/changes/22-fragment-id-sequence-forward.sql
+      rollback:
+        - sqlFile:
+            path: changelog/db/changes/22-fragment-id-sequence-rollback.sql
index a428a35..9c2ee86 100644 (file)
@@ -29,7 +29,7 @@
   <parent>
     <groupId>org.onap.cps</groupId>
     <artifactId>cps-parent</artifactId>
-    <version>3.4.2-SNAPSHOT</version>
+    <version>3.4.3-SNAPSHOT</version>
     <relativePath>../cps-parent/pom.xml</relativePath>
   </parent>
 
index 1b94a29..ddaecdf 100644 (file)
@@ -6,7 +6,7 @@
       "datastore": "ncmp-datastore:passthrough-operational",
       "options": "(fields=schemas/schema)",
       "resourceIdentifier": "parent/child",
-      "targetIds": ["850117873c9a4936856a5081be96e6a8"]
+      "targetIds": ["CMHandle1"]
     }
   ]
 }
\ No newline at end of file
index be749ad..755f9a9 100644 (file)
@@ -11,7 +11,7 @@
     },
     "predicates": {
       "targets": [
-        "CMHandle1"
+        "ietfYang-CMHandle1"
       ],
       "datastore": "ncmp-datastore:passthrough-running",
       "datastore-xpath-filter": "//_3gpp-nr-nrm-gnbdufunction:GNBDUFunction/_3gpp-nr-nrm-nrcelldu:NRCellDU/ | //_3gpp-nr-nrm-gnbcuupfunction:GNBCUUPFunction// | //_3gpp-nr-nrm-gnbcucpfunction:GNBCUCPFunction/_3gpp-nr-nrm-nrcelldu:NRCellCU// | //_3gpp-nr-nrm-nrsectorcarrier:NRSectorCarrier//"
index 642ea62..cc096e4 100644 (file)
@@ -3,7 +3,7 @@
   "dmiModelPlugin":"x",
   "createdCmHandles": [
     {
-      "cmHandle": "CMHandle1",
+      "cmHandle": "ietfYang-CMHandle1",
       "cmHandleProperties": {
         "Books": "Social Media"
       },
index 9ea6670..e92cec7 100644 (file)
@@ -1,5 +1,5 @@
 # ============LICENSE_START=======================================================
-# Copyright (C) 2023 Nordix Foundation
+# Copyright (C) 2023-2024 Nordix Foundation
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -44,13 +44,13 @@ SDNC_TIME=0
 while [ "$SDNC_TIME" -le "$SDNC_TIME_OUT" ]; do
 
   # Mount netconf node
-  curl --location --request PUT 'http://'$SDNC_HOST:$SDNC_PORT'/restconf/config/network-topology:network-topology/topology/topology-netconf/node/PNFDemo' \
+  curl --location --request PUT 'http://'$SDNC_HOST:$SDNC_PORT'/restconf/config/network-topology:network-topology/topology/topology-netconf/node/ietfYang-PNFDemo' \
   --header 'Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==' \
   --header 'Content-Type: application/json' \
   --data-raw '{
     "node": [
     {
-      "node-id": "PNFDemo",
+      "node-id": "ietfYang-PNFDemo",
       "netconf-node-topology:protocol": {
       "name": "TLS"
       },
@@ -70,7 +70,7 @@ while [ "$SDNC_TIME" -le "$SDNC_TIME_OUT" ]; do
 
   RESPONSE=$( curl --location --request GET 'http://'$SDNC_HOST:$SDNC_PORT'/restconf/config/network-topology:network-topology/topology/topology-netconf' --header 'Authorization: basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==')
 
-  if [[ "$RESPONSE" == *"PNFDemo"* ]]; then
+  if [[ "$RESPONSE" == *"ietfYang-PNFDemo"* ]]; then
     echo "Node mounted in $SDNC_TIME"
     sleep 10
     break;
index 4941cde..a16446a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  ============LICENSE_START=======================================================
- *  Copyright (C) 2022 Nordix Foundation
+ *  Copyright (C) 2022-2024 Nordix Foundation
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -42,14 +42,14 @@ Retrieve CM Handle ids where query parameters Match (module and property query)
     ${headers}=          Create Dictionary  Content-Type=application/json   Authorization=${auth}
     ${response}=         POST On Session    CPS_URL   ${uri}   headers=${headers}   data=${jsonModuleAndPropertyQueryParameters}
     Should Be Equal As Strings              ${response.status_code}   200
-    Should Contain       ${response.json()}    PNFDemo
+    Should Contain       ${response.json()}    ietfYang-PNFDemo
 
 Retrieve CM Handle ids where query parameters Match (empty query)
     ${uri}=              Set Variable       ${ncmpBasePath}/ch/id-searches
     ${headers}=          Create Dictionary  Content-Type=application/json   Authorization=${auth}
     ${response}=         POST On Session    CPS_URL   ${uri}   headers=${headers}   data=${jsonEmptyQueryParameters}
     Should Be Equal As Strings              ${response.status_code}   200
-    Should Contain       ${response.json()}    PNFDemo
+    Should Contain       ${response.json()}    ietfYang-PNFDemo
 
 Throw 400 when Structure of Request is Incorrect
     ${uri}=              Set Variable       ${ncmpBasePath}/ch/id-searches
index d0206d1..1f66119 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  ============LICENSE_START=======================================================
- *  Copyright (C) 2023 Nordix Foundation
+ *  Copyright (C) 2023-2024 Nordix Foundation
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ ${topic}                                data-operation-client-topic
 ${ncmpBasePath}                         /ncmp
 ${expectedRequestId}                    ${EMPTY}
 ${dmipluginCsitStubUrl}                 http://${DMI_CSIT_STUB_HOST}:${DMI_CSIT_STUB_PORT}
-${newCmHandleRequestBody}               {"dmiPlugin":"${dmipluginCsitStubUrl}","createdCmHandles":[{"cmHandle":"850117873c9a4936856a5081be96e6a8"}]}
+${newCmHandleRequestBody}               {"dmiPlugin":"${dmipluginCsitStubUrl}","createdCmHandles":[{"cmHandle":"CMHandle1"}]}
 
 *** Test Cases ***
 
index e96e10a..71de4be 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  ============LICENSE_START=======================================================
- *  Copyright (C) 2022 Nordix Foundation
+ *  Copyright (C) 2022-2024 Nordix Foundation
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -35,19 +35,19 @@ ${ncmpBasePath}           /ncmp
 
 *** Test Cases ***
 Operational state goes to UNSYNCHRONIZED when data sync (flag) is enabled
-    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/PNFDemo/data-sync
+    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data-sync
     ${params}=           Create Dictionary  dataSyncEnabled=true
     ${headers}=          Create Dictionary  Authorization=${auth}
     ${response}=         PUT On Session     CPS_URL   ${uri}   params=${params}   headers=${headers}
     Should Be Equal As Strings              ${response.status_code}   200
-    ${verifyUri}=              Set Variable       ${ncmpBasePath}/v1/ch/PNFDemo/state
+    ${verifyUri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/state
     ${verifyHeaders}=          Create Dictionary  Authorization=${auth}
     ${verifyResponse}=         GET On Session     CPS_URL   ${verifyUri}   headers=${verifyHeaders}
     Should Be Equal As Strings                    ${verifyResponse.json()['state']['dataSyncState']['operational']['syncState']}   UNSYNCHRONIZED
     Sleep    5
 
 Operational state goes to SYNCHRONIZED after sometime when data sync (flag) is enabled
-    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/PNFDemo/state
+    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/state
     ${headers}=          Create Dictionary  Authorization=${auth}
     ${response}=         GET On Session     CPS_URL   ${uri}   headers=${headers}
     Should Be Equal As Strings              ${response.json()['state']['dataSyncState']['operational']['syncState']}   SYNCHRONIZED
\ No newline at end of file
index 519c7a7..704d02c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  ============LICENSE_START=======================================================
- *  Copyright (C) 2021-2022 Nordix Foundation
+ *  Copyright (C) 2021-2024 Nordix Foundation
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -34,8 +34,8 @@ ${auth}                   Basic Y3BzdXNlcjpjcHNyMGNrcyE=
 ${ncmpInventoryBasePath}  /ncmpInventory
 ${ncmpBasePath}           /ncmp
 ${dmiUrl}                 http://${DMI_HOST}:${DMI_PORT}
-${jsonDataCreate}         {"dmiPlugin":"${dmiUrl}","dmiDataPlugin":"","dmiModelPlugin":"","createdCmHandles":[{"cmHandle":"PNFDemo","cmHandleProperties":{"Book1":"Sci-Fi Book"},"publicCmHandleProperties":{"Contact":"storeemail@bookstore.com", "Contact2":"storeemail2@bookstore.com"}}]}
-${jsonDataUpdate}         {"dmiPlugin":"${dmiUrl}","dmiDataPlugin":"","dmiModelPlugin":"","updatedCmHandles":[{"cmHandle":"PNFDemo","cmHandleProperties":{"Book1":"Romance Book"},"publicCmHandleProperties":{"Contact":"newemailforstore@bookstore.com"}}]}
+${jsonDataCreate}         {"dmiPlugin":"${dmiUrl}","dmiDataPlugin":"","dmiModelPlugin":"","createdCmHandles":[{"cmHandle":"ietfYang-PNFDemo","cmHandleProperties":{"Book1":"Sci-Fi Book"},"publicCmHandleProperties":{"Contact":"storeemail@bookstore.com", "Contact2":"storeemail2@bookstore.com"}}]}
+${jsonDataUpdate}         {"dmiPlugin":"${dmiUrl}","dmiDataPlugin":"","dmiModelPlugin":"","updatedCmHandles":[{"cmHandle":"ietfYang-PNFDemo","cmHandleProperties":{"Book1":"Romance Book"},"publicCmHandleProperties":{"Contact":"newemailforstore@bookstore.com"}}]}
 
 *** Test Cases ***
 Register data node and sync modules.
@@ -45,13 +45,13 @@ Register data node and sync modules.
     Should Be Equal As Strings              ${response.status_code}   200
 
 Get CM Handle details and confirm it has been registered.
-    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/PNFDemo
+    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo
     ${headers}=          Create Dictionary  Authorization=${auth}
     ${response}=         GET On Session     CPS_URL   ${uri}   headers=${headers}
     ${responseJson}=     Set Variable       ${response.json()}
     ${schemaCount}=      Get length         ${responseJson}
     Should Be Equal As Strings              ${response.status_code}   200
-    IF    "${responseJson['cmHandle']}" == "PNFDemo"
+    IF    "${responseJson['cmHandle']}" == "ietfYang-PNFDemo"
            FOR   ${item}   IN  @{responseJson['publicCmHandleProperties']}
                    Should Be Equal As Strings              "${item['Contact']}"  "storeemail@bookstore.com"
            END
@@ -64,20 +64,20 @@ Update data node and sync modules.
     Should Be Equal As Strings              ${response.status_code}   200
 
 Get CM Handle details and confirm it has been updated.
-    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/PNFDemo
+    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo
     ${headers}=          Create Dictionary  Authorization=${auth}
     ${response}=         GET On Session     CPS_URL   ${uri}   headers=${headers}
     ${responseJson}=     Set Variable       ${response.json()}
     ${schemaCount}=      Get length         ${responseJson}
     Should Be Equal As Strings              ${response.status_code}   200
-    IF    "${responseJson['cmHandle']}" == "PNFDemo"
+    IF    "${responseJson['cmHandle']}" == "ietfYang-PNFDemo"
            FOR   ${item}   IN  @{responseJson['publicCmHandleProperties']}
                    Should Be Equal As Strings              "${item['Contact']}"  "newemailforstore@bookstore.com"
            END
     END
 
 Get modules for registered data node
-    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/PNFDemo/modules
+    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/modules
     ${headers}=          Create Dictionary  Authorization=${auth}
     ${response}=         GET On Session     CPS_URL   ${uri}   headers=${headers}
     Should Be Equal As Strings              ${response.status_code}   200
index 48af1cf..02689f3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  ============LICENSE_START=======================================================
- *  Copyright (C) 2021 Nordix Foundation
+ *  Copyright (C) 2021-2024 Nordix Foundation
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -37,13 +37,13 @@ ${netconf}              NETCONF
 *** Test Cases ***
 
 Get for Passthrough Operational (CF, RO) with fields & topic
-    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/PNFDemo/data/ds/ncmp-datastore:passthrough-operational?resourceIdentifier=ietf-netconf-monitoring:netconf-state&options=(fields=schemas/schema)&topic=test-topic
+    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-operational?resourceIdentifier=ietf-netconf-monitoring:netconf-state&options=(fields=schemas/schema)&topic=test-topic
     ${headers}=          Create Dictionary  Authorization=${auth}
     ${response}=         Get On Session     CPS_URL   ${uri}   headers=${headers}   expected_status=200
     Should Be Equal As Strings              ${response.status_code}   200
 
 Get for Passthrough Operational (CF, RO) with fields
-    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/PNFDemo/data/ds/ncmp-datastore:passthrough-operational?resourceIdentifier=ietf-netconf-monitoring:netconf-state&options=(fields=schemas/schema)
+    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-operational?resourceIdentifier=ietf-netconf-monitoring:netconf-state&options=(fields=schemas/schema)
     ${headers}=          Create Dictionary  Authorization=${auth}
     ${response}=         Get On Session     CPS_URL   ${uri}   headers=${headers}   expected_status=200
     ${responseJson}=     Set Variable       ${response.json()}
@@ -52,14 +52,14 @@ Get for Passthrough Operational (CF, RO) with fields
     Should Contain                          ${responseJson['ietf-netconf-monitoring:netconf-state']['schemas']['schema'][0]['location']}   ${netconf}
 
 Create to bookstore using passthrough-running
-    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore
+    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore
     ${headers}=          Create Dictionary  Content-Type=application/json   Authorization=${auth}
     ${jsonData}=         Get Binary File    ${DATADIR_NCMP}${/}bookstoreCreateExample.json
     ${response}=         POST On Session    CPS_URL   ${uri}   headers=${headers}   data=${jsonData}
     Should Be Equal As Strings              ${response.status_code}   201
 
 Verify create to bookstore using passthrough-running
-    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore
+    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore
     ${headers}=          Create Dictionary  Authorization=${auth}
     ${response}=         Get On Session     CPS_URL   ${uri}   headers=${headers}
     Should Be Equal As Strings              ${response.status_code}   200
@@ -75,14 +75,14 @@ Verify create to bookstore using passthrough-running
     END
 
 Update Bookstore using passthrough-running update Category 01 (replace category)
-    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore/categories=01
+    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore/categories=01
     ${headers}=          Create Dictionary  Content-Type=application/json   Authorization=${auth}
     ${jsonData}=         Get Binary File    ${DATADIR_NCMP}${/}bookstoreUpdateExample.json
     ${response}=         PUT On Session     CPS_URL   ${uri}   headers=${headers}   data=${jsonData}
     Should Be Equal As Strings              ${response.status_code}   200
 
 Verify update to bookstore using passthrough-running updated category 01
-    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore/categories=01
+    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore/categories=01
     ${headers}=          Create Dictionary  Authorization=${auth}
     ${response}=         Get On Session     CPS_URL   ${uri}   headers=${headers}
     Should Be Equal As Strings              ${response.status_code}   200
@@ -93,7 +93,7 @@ Verify update to bookstore using passthrough-running updated category 01
     END
 
 Verify update to bookstore using passthrough-running did not remove category 02
-    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore
+    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore
     ${headers}=          Create Dictionary  Authorization=${auth}
     ${response}=         Get On Session     CPS_URL   ${uri}   headers=${headers}
     Should Be Equal As Strings              ${response.status_code}   200
@@ -101,13 +101,13 @@ Verify update to bookstore using passthrough-running did not remove category 02
     Should Be Equal As Numbers              ${schemaCount}  2
 
 Delete Bookstore using passthrough-running for Category 01
-    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore/categories=01
+    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore/categories=01
     ${headers}=          Create Dictionary  Content-Type=application/json   Authorization=${auth}
     ${response}=         DELETE On Session  CPS_URL   ${uri}   headers=${headers}
     Should Be Equal As Strings              ${response.status_code}   204
 
 Verify delete to bookstore using passthrough-running removed only category 01
-    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore
+    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore
     ${headers}=          Create Dictionary  Authorization=${auth}
     ${response}=         Get On Session     CPS_URL   ${uri}   headers=${headers}
     ${responseJson}=     Set Variable       ${response.json()['stores:bookstore']['categories']}
@@ -121,12 +121,12 @@ Verify delete to bookstore using passthrough-running removed only category 01
     END
 
 Patch will add new category with new book and add a new book to an existing category
-    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore
+    ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore
     ${headers}=          Create Dictionary  Content-Type=application/yang.patch+json   Authorization=${auth}
     ${jsonData}=         Get Binary File    ${DATADIR_NCMP}${/}bookstorePatchExample.json
     ${response}=         PATCH On Session   CPS_URL   ${uri}   headers=${headers}   data=${jsonData}
     Should Be Equal As Strings              ${response.status_code}   200
-    ${verifyUri}=       Set Variable        ${ncmpBasePath}/v1/ch/PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore/categories=100
+    ${verifyUri}=       Set Variable        ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore/categories=100
     ${verifyHeaders}=    Create Dictionary  Authorization=${auth}
     ${verifyResponse}=   Get On Session     CPS_URL   ${verifyUri}   headers=${verifyHeaders}
     Should Be Equal As Strings              ${verifyResponse.status_code}   200
@@ -135,6 +135,6 @@ Patch will add new category with new book and add a new book to an existing cate
             Should Be Equal As Strings              "${item['name']}"  "Category100"
         END
     END
-    ${verifyUri}=       Set Variable       ${ncmpBasePath}/v1/ch/PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore/categories=02/books=A%20New%20book%20in%20existing%20category
+    ${verifyUri}=       Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore/categories=02/books=A%20New%20book%20in%20existing%20category
     ${verifyResponse}=  Get On Session     CPS_URL   ${verifyUri}   headers=${verifyHeaders}
     Should Be Equal As Strings             ${verifyResponse.status_code}   200
index 0818ccc..cbb5155 100644 (file)
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>dmi-plugin-demo-and-csit-stub</artifactId>
-        <version>3.4.2-SNAPSHOT</version>
+        <version>3.4.3-SNAPSHOT</version>
     </parent>
 
     <artifactId>dmi-plugin-demo-and-csit-stub-app</artifactId>
index e2d326c..9b6e402 100644 (file)
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>dmi-plugin-demo-and-csit-stub</artifactId>
-        <version>3.4.2-SNAPSHOT</version>
+        <version>3.4.3-SNAPSHOT</version>
     </parent>
     <artifactId>dmi-plugin-demo-and-csit-stub-service</artifactId>
 
index 5c72429..a4f7111 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2023 Nordix Foundation
+ *  Copyright (C) 2023-2024 Nordix Foundation
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -44,6 +44,7 @@ import org.onap.cps.ncmp.events.async1_0_0.DataOperationEvent;
 import org.onap.cps.ncmp.events.async1_0_0.Response;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.ApplicationContext;
+import org.springframework.core.io.Resource;
 import org.springframework.core.io.ResourceLoader;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
@@ -73,37 +74,35 @@ public class DmiRestStubController {
     /**
      * Get all modules for given cm handle.
      *
-     * @param cmHandle                The identifier for a network function, network element, subnetwork,
+     * @param cmHandleId              The identifier for a network function, network element, subnetwork,
      *                                or any other cm object by managed Network CM Proxy
      * @param moduleReferencesRequest module references request body
      * @return ResponseEntity response entity having module response as json string.
      */
-    @PostMapping("/v1/ch/{cmHandle}/modules")
-    public ResponseEntity<String> getModuleReferences(@PathVariable final String cmHandle,
+    @PostMapping("/v1/ch/{cmHandleId}/modules")
+    public ResponseEntity<String> getModuleReferences(@PathVariable final String cmHandleId,
                                                       @RequestBody final Object moduleReferencesRequest) {
-        final String moduleResponseContent = ResourceFileReaderUtil
-                .getResourceFileContent(applicationContext.getResource(
-                        ResourceLoader.CLASSPATH_URL_PREFIX + "module/moduleResponse.json"));
-        log.info("cm handle: {} requested for modules", cmHandle);
+        final String moduleResponseContent = getModuleResourceResponse(cmHandleId,
+                "ModuleResponse.json");
+        log.info("cm handle: {} requested for modules", cmHandleId);
         return ResponseEntity.ok(moduleResponseContent);
     }
 
     /**
-     * Get all module resources for given cm handle.
+     * Retrieves module resources for a given cmHandleId.
      *
-     * @param cmHandle                   The identifier for a network function, network element, subnetwork,
+     * @param cmHandleId                 The identifier for a network function, network element, subnetwork,
      *                                   or any other cm object by managed Network CM Proxy
      * @param moduleResourcesReadRequest module resources read request body
      * @return ResponseEntity response entity having module resources response as json string.
      */
-    @PostMapping("/v1/ch/{cmHandle}/moduleResources")
+    @PostMapping("/v1/ch/{cmHandleId}/moduleResources")
     public ResponseEntity<String> retrieveModuleResources(
-            @PathVariable final String cmHandle,
+            @PathVariable final String cmHandleId,
             @RequestBody final Object moduleResourcesReadRequest) {
-        final String moduleResourcesResponseContent = ResourceFileReaderUtil
-                .getResourceFileContent(applicationContext.getResource(
-                        ResourceLoader.CLASSPATH_URL_PREFIX + "module/moduleResourcesResponse.json"));
-        log.info("cm handle: {} requested for module resources", cmHandle);
+        final String moduleResourcesResponseContent = getModuleResourceResponse(cmHandleId,
+                "ModuleResourcesResponse.json");
+        log.info("cm handle: {} requested for modules resources", cmHandleId);
         return ResponseEntity.ok(moduleResourcesResponseContent);
     }
 
@@ -186,4 +185,18 @@ public class DmiRestStubController {
         dataOperationEvent.setData(data);
         return dataOperationEvent;
     }
+
+    private String getModuleResourceResponse(final String cmHandleId, final String moduleResponseType) {
+        final String nodeType = cmHandleId.split("-")[0];
+        final String moduleResponseFilePath = String.format("module/%s%s", nodeType, moduleResponseType);
+        final Resource moduleResponseResource = applicationContext.getResource(
+                ResourceLoader.CLASSPATH_URL_PREFIX + moduleResponseFilePath);
+        if (moduleResponseResource.exists()) {
+            log.info("Using requested node type: {}", nodeType);
+            return ResourceFileReaderUtil.getResourceFileContent(moduleResponseResource);
+        }
+        log.info("Using default node type: ietfYang");
+        return ResourceFileReaderUtil.getResourceFileContent(applicationContext.getResource(
+                ResourceLoader.CLASSPATH_URL_PREFIX + "module/ietfYang" + moduleResponseType));
+    }
 }
diff --git a/dmi-plugin-demo-and-csit-stub/dmi-plugin-demo-and-csit-stub-service/src/main/resources/module/bookStoreModuleResourcesResponse.json b/dmi-plugin-demo-and-csit-stub/dmi-plugin-demo-and-csit-stub-service/src/main/resources/module/bookStoreModuleResourcesResponse.json
new file mode 100644 (file)
index 0000000..5f07fca
--- /dev/null
@@ -0,0 +1,27 @@
+[
+       {
+               "moduleName": "book-store-types-11",
+               "revision": "2013-07-25",
+               "yangSource": "module book-store-types-11 {\n\n  namespace \"urn:ietf:params:xml:ns:yang:book-store-types-11\";\n  prefix \"yang\";\n\n  organization\n   \"IETF NETMOD (NETCONF Data Modeling Language) Working Group\";\n\n  contact\n   \"WG Web:   <http://tools.ietf.org/wg/netmod/>\n    WG List:  <mailto:netmod@ietf.org>\n\n    WG Chair: David Kessens\n              <mailto:david.kessens@nsn.com>\n\n    WG Chair: Juergen Schoenwaelder\n              <mailto:j.schoenwaelder@jacobs-university.de>\n\n    Editor:   Juergen Schoenwaelder\n              <mailto:j.schoenwaelder@jacobs-university.de>\";\n\n  description\n   \"This module contains a collection of generally useful derived\n    YANG data types.\n\n    Copyright (c) 2013 IETF Trust and the persons identified as\n    authors of the code.  All rights reserved.\n\n    Redistribution and use in source and binary forms, with or\n    without modification, is permitted pursuant to, and subject\n    to the license terms contained in, the Simplified BSD License\n    set forth in Section 4.c of the IETF Trust's Legal Provisions\n    Relating to IETF Documents\n    (http://trustee.ietf.org/license-info).\n\n    This version of this YANG module is part of RFC 6991; see\n    the RFC itself for full legal notices.\";\n\n  revision 2013-07-25 {\n    description\n     \"This revision adds the following new data types:\n      - yang-identifier\n      - hex-string\n      - uuid\n      - dotted-quad\";\n    reference\n     \"RFC 6991: Common YANG Data Types\";\n  }\n\n  revision 2010-09-24 {\n    description\n     \"Initial revision.\";\n    reference\n     \"RFC 6021: Common YANG Data Types\";\n  }\n\n  /*** collection of counter and gauge types ***/\n\n  typedef counter32 {\n    type uint32;\n    description\n     \"The counter32 type represents a non-negative integer\n      that monotonically increases until it reaches a\n      maximum value of 2^32-1 (4294967295 decimal), when it\n      wraps around and starts increasing again from zero.\n\n      Counters have no defined 'initial' value, and thus, a\n      single value of a counter has (in general) no information\n      content.  Discontinuities in the monotonically increasing\n      value normally occur at re-initialization of the\n      management system, and at other times as specified in the\n      description of a schema node using this type.  If such\n      other times can occur, for example, the creation of\n      a schema node of type counter32 at times other than\n      re-initialization, then a corresponding schema node\n      should be defined, with an appropriate type, to indicate\n      the last discontinuity.\n\n      The counter32 type should not be used for configuration\n      schema nodes.  A default statement SHOULD NOT be used in\n      combination with the type counter32.\n\n      In the value set and its semantics, this type is equivalent\n      to the Counter32 type of the SMIv2.\";\n    reference\n     \"RFC 2578: Structure of Management Information Version 2\n                (SMIv2)\";\n  }\n}\n"
+       },
+       {
+               "moduleName": "book-store-types-12",
+               "revision": "2013-07-26",
+               "yangSource": "module book-store-types-12 {\n\n  namespace \"urn:ietf:params:xml:ns:yang:book-store-types-12\";\n  prefix \"yang\";\n\n  organization\n   \"IETF NETMOD (NETCONF Data Modeling Language) Working Group\";\n\n  contact\n   \"WG Web:   <http://tools.ietf.org/wg/netmod/>\n    WG List:  <mailto:netmod@ietf.org>\n\n    WG Chair: David Kessens\n              <mailto:david.kessens@nsn.com>\n\n    WG Chair: Juergen Schoenwaelder\n              <mailto:j.schoenwaelder@jacobs-university.de>\n\n    Editor:   Juergen Schoenwaelder\n              <mailto:j.schoenwaelder@jacobs-university.de>\";\n\n  description\n   \"This module contains a collection of generally useful derived\n    YANG data types.\n\n    Copyright (c) 2013 IETF Trust and the persons identified as\n    authors of the code.  All rights reserved.\n\n    Redistribution and use in source and binary forms, with or\n    without modification, is permitted pursuant to, and subject\n    to the license terms contained in, the Simplified BSD License\n    set forth in Section 4.c of the IETF Trust's Legal Provisions\n    Relating to IETF Documents\n    (http://trustee.ietf.org/license-info).\n\n    This version of this YANG module is part of RFC 6991; see\n    the RFC itself for full legal notices.\";\n\n  revision 2013-07-26 {\n    description\n     \"This revision adds the following new data types:\n      - yang-identifier\n      - hex-string\n      - uuid\n      - dotted-quad\";\n    reference\n     \"RFC 6991: Common YANG Data Types\";\n  }\n\n  revision 2010-09-24 {\n    description\n     \"Initial revision.\";\n    reference\n     \"RFC 6021: Common YANG Data Types\";\n  }\n\n  /*** collection of counter and gauge types ***/\n\n  typedef counter32 {\n    type uint32;\n    description\n     \"The counter32 type represents a non-negative integer\n      that monotonically increases until it reaches a\n      maximum value of 2^32-1 (4294967295 decimal), when it\n      wraps around and starts increasing again from zero.\n\n      Counters have no defined 'initial' value, and thus, a\n      single value of a counter has (in general) no information\n      content.  Discontinuities in the monotonically increasing\n      value normally occur at re-initialization of the\n      management system, and at other times as specified in the\n      description of a schema node using this type.  If such\n      other times can occur, for example, the creation of\n      a schema node of type counter32 at times other than\n      re-initialization, then a corresponding schema node\n      should be defined, with an appropriate type, to indicate\n      the last discontinuity.\n\n      The counter32 type should not be used for configuration\n      schema nodes.  A default statement SHOULD NOT be used in\n      combination with the type counter32.\n\n      In the value set and its semantics, this type is equivalent\n      to the Counter32 type of the SMIv2.\";\n    reference\n     \"RFC 2578: Structure of Management Information Version 2\n                (SMIv2)\";\n  }\n}\n"
+       },
+       {
+               "moduleName": "book-store-types-13",
+               "revision": "2013-07-27",
+               "yangSource": "module book-store-types-13 {\n\n  namespace \"urn:ietf:params:xml:ns:yang:book-store-types-13\";\n  prefix \"yang\";\n\n  organization\n   \"IETF NETMOD (NETCONF Data Modeling Language) Working Group\";\n\n  contact\n   \"WG Web:   <http://tools.ietf.org/wg/netmod/>\n    WG List:  <mailto:netmod@ietf.org>\n\n    WG Chair: David Kessens\n              <mailto:david.kessens@nsn.com>\n\n    WG Chair: Juergen Schoenwaelder\n              <mailto:j.schoenwaelder@jacobs-university.de>\n\n    Editor:   Juergen Schoenwaelder\n              <mailto:j.schoenwaelder@jacobs-university.de>\";\n\n  description\n   \"This module contains a collection of generally useful derived\n    YANG data types.\n\n    Copyright (c) 2013 IETF Trust and the persons identified as\n    authors of the code.  All rights reserved.\n\n    Redistribution and use in source and binary forms, with or\n    without modification, is permitted pursuant to, and subject\n    to the license terms contained in, the Simplified BSD License\n    set forth in Section 4.c of the IETF Trust's Legal Provisions\n    Relating to IETF Documents\n    (http://trustee.ietf.org/license-info).\n\n    This version of this YANG module is part of RFC 6991; see\n    the RFC itself for full legal notices.\";\n\n  revision 2013-07-27 {\n    description\n     \"This revision adds the following new data types:\n      - yang-identifier\n      - hex-string\n      - uuid\n      - dotted-quad\";\n    reference\n     \"RFC 6991: Common YANG Data Types\";\n  }\n\n  revision 2010-09-24 {\n    description\n     \"Initial revision.\";\n    reference\n     \"RFC 6021: Common YANG Data Types\";\n  }\n\n  /*** collection of counter and gauge types ***/\n\n  typedef counter32 {\n    type uint32;\n    description\n     \"The counter32 type represents a non-negative integer\n      that monotonically increases until it reaches a\n      maximum value of 2^32-1 (4294967295 decimal), when it\n      wraps around and starts increasing again from zero.\n\n      Counters have no defined 'initial' value, and thus, a\n      single value of a counter has (in general) no information\n      content.  Discontinuities in the monotonically increasing\n      value normally occur at re-initialization of the\n      management system, and at other times as specified in the\n      description of a schema node using this type.  If such\n      other times can occur, for example, the creation of\n      a schema node of type counter32 at times other than\n      re-initialization, then a corresponding schema node\n      should be defined, with an appropriate type, to indicate\n      the last discontinuity.\n\n      The counter32 type should not be used for configuration\n      schema nodes.  A default statement SHOULD NOT be used in\n      combination with the type counter32.\n\n      In the value set and its semantics, this type is equivalent\n      to the Counter32 type of the SMIv2.\";\n    reference\n     \"RFC 2578: Structure of Management Information Version 2\n                (SMIv2)\";\n  }\n}\n"
+       },
+       {
+               "moduleName": "book-store-types-14",
+               "revision": "2013-07-28",
+               "yangSource": "module book-store-types-14 {\n\n  namespace \"urn:ietf:params:xml:ns:yang:book-store-types-14\";\n  prefix \"yang\";\n\n  organization\n   \"IETF NETMOD (NETCONF Data Modeling Language) Working Group\";\n\n  contact\n   \"WG Web:   <http://tools.ietf.org/wg/netmod/>\n    WG List:  <mailto:netmod@ietf.org>\n\n    WG Chair: David Kessens\n              <mailto:david.kessens@nsn.com>\n\n    WG Chair: Juergen Schoenwaelder\n              <mailto:j.schoenwaelder@jacobs-university.de>\n\n    Editor:   Juergen Schoenwaelder\n              <mailto:j.schoenwaelder@jacobs-university.de>\";\n\n  description\n   \"This module contains a collection of generally useful derived\n    YANG data types.\n\n    Copyright (c) 2013 IETF Trust and the persons identified as\n    authors of the code.  All rights reserved.\n\n    Redistribution and use in source and binary forms, with or\n    without modification, is permitted pursuant to, and subject\n    to the license terms contained in, the Simplified BSD License\n    set forth in Section 4.c of the IETF Trust's Legal Provisions\n    Relating to IETF Documents\n    (http://trustee.ietf.org/license-info).\n\n    This version of this YANG module is part of RFC 6991; see\n    the RFC itself for full legal notices.\";\n\n  revision 2013-07-28 {\n    description\n     \"This revision adds the following new data types:\n      - yang-identifier\n      - hex-string\n      - uuid\n      - dotted-quad\";\n    reference\n     \"RFC 6991: Common YANG Data Types\";\n  }\n\n  revision 2010-09-24 {\n    description\n     \"Initial revision.\";\n    reference\n     \"RFC 6021: Common YANG Data Types\";\n  }\n\n  /*** collection of counter and gauge types ***/\n\n  typedef counter32 {\n    type uint32;\n    description\n     \"The counter32 type represents a non-negative integer\n      that monotonically increases until it reaches a\n      maximum value of 2^32-1 (4294967295 decimal), when it\n      wraps around and starts increasing again from zero.\n\n      Counters have no defined 'initial' value, and thus, a\n      single value of a counter has (in general) no information\n      content.  Discontinuities in the monotonically increasing\n      value normally occur at re-initialization of the\n      management system, and at other times as specified in the\n      description of a schema node using this type.  If such\n      other times can occur, for example, the creation of\n      a schema node of type counter32 at times other than\n      re-initialization, then a corresponding schema node\n      should be defined, with an appropriate type, to indicate\n      the last discontinuity.\n\n      The counter32 type should not be used for configuration\n      schema nodes.  A default statement SHOULD NOT be used in\n      combination with the type counter32.\n\n      In the value set and its semantics, this type is equivalent\n      to the Counter32 type of the SMIv2.\";\n    reference\n     \"RFC 2578: Structure of Management Information Version 2\n                (SMIv2)\";\n  }\n}\n"
+       },
+       {
+               "moduleName": "book-store-types-15",
+               "revision": "2013-07-29",
+               "yangSource": "module book-store-types-15 {\n\n  namespace \"urn:ietf:params:xml:ns:yang:book-store-types-15\";\n  prefix \"yang\";\n\n  organization\n   \"IETF NETMOD (NETCONF Data Modeling Language) Working Group\";\n\n  contact\n   \"WG Web:   <http://tools.ietf.org/wg/netmod/>\n    WG List:  <mailto:netmod@ietf.org>\n\n    WG Chair: David Kessens\n              <mailto:david.kessens@nsn.com>\n\n    WG Chair: Juergen Schoenwaelder\n              <mailto:j.schoenwaelder@jacobs-university.de>\n\n    Editor:   Juergen Schoenwaelder\n              <mailto:j.schoenwaelder@jacobs-university.de>\";\n\n  description\n   \"This module contains a collection of generally useful derived\n    YANG data types.\n\n    Copyright (c) 2013 IETF Trust and the persons identified as\n    authors of the code.  All rights reserved.\n\n    Redistribution and use in source and binary forms, with or\n    without modification, is permitted pursuant to, and subject\n    to the license terms contained in, the Simplified BSD License\n    set forth in Section 4.c of the IETF Trust's Legal Provisions\n    Relating to IETF Documents\n    (http://trustee.ietf.org/license-info).\n\n    This version of this YANG module is part of RFC 6991; see\n    the RFC itself for full legal notices.\";\n\n  revision 2013-07-29 {\n    description\n     \"This revision adds the following new data types:\n      - yang-identifier\n      - hex-string\n      - uuid\n      - dotted-quad\";\n    reference\n     \"RFC 6991: Common YANG Data Types\";\n  }\n\n  revision 2010-09-24 {\n    description\n     \"Initial revision.\";\n    reference\n     \"RFC 6021: Common YANG Data Types\";\n  }\n\n  /*** collection of counter and gauge types ***/\n\n  typedef counter32 {\n    type uint32;\n    description\n     \"The counter32 type represents a non-negative integer\n      that monotonically increases until it reaches a\n      maximum value of 2^32-1 (4294967295 decimal), when it\n      wraps around and starts increasing again from zero.\n\n      Counters have no defined 'initial' value, and thus, a\n      single value of a counter has (in general) no information\n      content.  Discontinuities in the monotonically increasing\n      value normally occur at re-initialization of the\n      management system, and at other times as specified in the\n      description of a schema node using this type.  If such\n      other times can occur, for example, the creation of\n      a schema node of type counter32 at times other than\n      re-initialization, then a corresponding schema node\n      should be defined, with an appropriate type, to indicate\n      the last discontinuity.\n\n      The counter32 type should not be used for configuration\n      schema nodes.  A default statement SHOULD NOT be used in\n      combination with the type counter32.\n\n      In the value set and its semantics, this type is equivalent\n      to the Counter32 type of the SMIv2.\";\n    reference\n     \"RFC 2578: Structure of Management Information Version 2\n                (SMIv2)\";\n  }\n}\n"
+       }
+]
\ No newline at end of file
diff --git a/dmi-plugin-demo-and-csit-stub/dmi-plugin-demo-and-csit-stub-service/src/main/resources/module/bookStoreModuleResponse.json b/dmi-plugin-demo-and-csit-stub/dmi-plugin-demo-and-csit-stub-service/src/main/resources/module/bookStoreModuleResponse.json
new file mode 100644 (file)
index 0000000..9215a58
--- /dev/null
@@ -0,0 +1,24 @@
+{
+       "schemas": [
+               {
+                       "moduleName": "book-store-types-11",
+                       "revision": "2013-07-25"
+               },
+               {
+                       "moduleName": "book-store-types-12",
+                       "revision": "2013-07-26"
+               },
+               {
+                       "moduleName": "book-store-types-13",
+                       "revision": "2013-07-27"
+               },
+               {
+                       "moduleName": "book-store-types-14",
+                       "revision": "2013-07-28"
+               },
+               {
+                       "moduleName": "book-store-types-15",
+                       "revision": "2013-07-29"
+               }
+       ]
+}
\ No newline at end of file
@@ -49,5 +49,4 @@
                "revision": "2013-07-24",
                "yangSource": "module ietf-yang-types-10 {\n\n  namespace \"urn:ietf:params:xml:ns:yang:ietf-yang-types-10\";\n  prefix \"yang\";\n\n  organization\n   \"IETF NETMOD (NETCONF Data Modeling Language) Working Group\";\n\n  contact\n   \"WG Web:   <http://tools.ietf.org/wg/netmod/>\n    WG List:  <mailto:netmod@ietf.org>\n\n    WG Chair: David Kessens\n              <mailto:david.kessens@nsn.com>\n\n    WG Chair: Juergen Schoenwaelder\n              <mailto:j.schoenwaelder@jacobs-university.de>\n\n    Editor:   Juergen Schoenwaelder\n              <mailto:j.schoenwaelder@jacobs-university.de>\";\n\n  description\n   \"This module contains a collection of generally useful derived\n    YANG data types.\n\n    Copyright (c) 2013 IETF Trust and the persons identified as\n    authors of the code.  All rights reserved.\n\n    Redistribution and use in source and binary forms, with or\n    without modification, is permitted pursuant to, and subject\n    to the license terms contained in, the Simplified BSD License\n    set forth in Section 4.c of the IETF Trust's Legal Provisions\n    Relating to IETF Documents\n    (http://trustee.ietf.org/license-info).\n\n    This version of this YANG module is part of RFC 6991; see\n    the RFC itself for full legal notices.\";\n\n  revision 2013-07-24 {\n    description\n     \"This revision adds the following new data types:\n      - yang-identifier\n      - hex-string\n      - uuid\n      - dotted-quad\";\n    reference\n     \"RFC 6991: Common YANG Data Types\";\n  }\n\n  revision 2010-09-24 {\n    description\n     \"Initial revision.\";\n    reference\n     \"RFC 6021: Common YANG Data Types\";\n  }\n\n  /*** collection of counter and gauge types ***/\n\n  typedef counter32 {\n    type uint32;\n    description\n     \"The counter32 type represents a non-negative integer\n      that monotonically increases until it reaches a\n      maximum value of 2^32-1 (4294967295 decimal), when it\n      wraps around and starts increasing again from zero.\n\n      Counters have no defined 'initial' value, and thus, a\n      single value of a counter has (in general) no information\n      content.  Discontinuities in the monotonically increasing\n      value normally occur at re-initialization of the\n      management system, and at other times as specified in the\n      description of a schema node using this type.  If such\n      other times can occur, for example, the creation of\n      a schema node of type counter32 at times other than\n      re-initialization, then a corresponding schema node\n      should be defined, with an appropriate type, to indicate\n      the last discontinuity.\n\n      The counter32 type should not be used for configuration\n      schema nodes.  A default statement SHOULD NOT be used in\n      combination with the type counter32.\n\n      In the value set and its semantics, this type is equivalent\n      to the Counter32 type of the SMIv2.\";\n    reference\n     \"RFC 2578: Structure of Management Information Version 2\n                (SMIv2)\";\n  }\n}\n"
        }
-]
-
+]
\ No newline at end of file
index fd2f317..d708f7c 100644 (file)
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.4.2-SNAPSHOT</version>
+        <version>3.4.3-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
index 1d9f806..2b66caf 100644 (file)
@@ -16,6 +16,35 @@ CPS Release Notes
 ..      * * *   NEW DELHI   * * *
 ..      =========================
 
+Version: 3.4.3
+==============
+
+Release Data
+------------
+
++--------------------------------------+--------------------------------------------------------+
+| **CPS Project**                      |                                                        |
+|                                      |                                                        |
++--------------------------------------+--------------------------------------------------------+
+| **Docker images**                    | onap/cps-and-ncmp:3.4.3                                |
+|                                      |                                                        |
++--------------------------------------+--------------------------------------------------------+
+| **Release designation**              | 3.4.3 New Delhi                                        |
+|                                      |                                                        |
++--------------------------------------+--------------------------------------------------------+
+| **Release date**                     | Not yet released                                       |
+|                                      |                                                        |
++--------------------------------------+--------------------------------------------------------+
+
+Bug Fixes
+---------
+3.4.3
+
+
+Features
+--------
+
+
 Version: 3.4.2
 ==============
 
@@ -32,7 +61,7 @@ Release Data
 | **Release designation**              | 3.4.2 New Delhi                                        |
 |                                      |                                                        |
 +--------------------------------------+--------------------------------------------------------+
-| **Release date**                     | Not yet released                                       |
+| **Release date**                     | 2024 January 11                                        |
 |                                      |                                                        |
 +--------------------------------------+--------------------------------------------------------+
 
@@ -43,6 +72,8 @@ Bug Fixes
 
 Features
 --------
+    - `CPS-1638 <https://jira.onap.org/browse/CPS-1638>`_ Introduce trust level for CM handle.
+    - `CPS-1795 <https://jira.onap.org/browse/CPS-1795>`_ Double performance of CPS write operations (via write batching)
     - `CPS-2018 <https://jira.onap.org/browse/CPS-2018>`_ Improve performance of CPS update operations.
     - `CPS-2019 <https://jira.onap.org/browse/CPS-2019>`_ Improve performance of saving CM handles.
 
@@ -50,6 +81,17 @@ Notes
 -----
     - Java API method CpsDataService::saveListElementsBatch has been removed as part of CPS-2019.
 
+Known Limitations, Issues and Workarounds
+-----------------------------------------
+
+*System Limitations*
+
+For upgrading, CPS uses Liquibase for database upgrades. In order to enable Hibernate write batching
+(`CPS-1795 <https://jira.onap.org/browse/CPS-1795>`_), a change to the database entity ID generation is required.
+As such, *this release does not fully support In-Service Software Upgrade* - CPS will not store new DataNodes and
+NCMP will not register new CM-handles during an upgrade with old and new versions of CPS running concurrently.
+Other operations (read, update, delete) are not impacted.
+
 
 Version: 3.4.1
 ==============
index 18e72b2..f03b1c6 100644 (file)
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.4.2-SNAPSHOT</version>
+        <version>3.4.3-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
index 816aeff..920f407 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  ============LICENSE_START=======================================================
- *  Copyright (C) 2023 Nordix Foundation
+ *  Copyright (C) 2023-2024 Nordix Foundation
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the 'License');
  *  you may not use this file except in compliance with the License.
@@ -67,7 +67,7 @@ class CpsPerfTestBase extends PerfTestBase {
         addAnchorsWithData(OPENROADM_ANCHORS, CPS_PERFORMANCE_TEST_DATASPACE, LARGE_SCHEMA_SET, 'openroadm', data)
         resourceMeter.stop()
         def durationInSeconds = resourceMeter.getTotalTimeInSeconds()
-        recordAndAssertResourceUsage('Creating openroadm anchors with large data tree', 200, durationInSeconds, 600, resourceMeter.getTotalMemoryUsageInMB())
+        recordAndAssertResourceUsage('Creating openroadm anchors with large data tree', 100, durationInSeconds, 600, resourceMeter.getTotalMemoryUsageInMB())
     }
 
     def generateOpenRoadData(numberOfNodes) {
@@ -87,7 +87,7 @@ class CpsPerfTestBase extends PerfTestBase {
         then: 'memory used is within #peakMemoryUsage'
             assert resourceMeter.getTotalMemoryUsageInMB() <= 30
         and: 'all data is read within expected time'
-            recordAndAssertResourceUsage("Warming database", 200, durationInSeconds, 600, resourceMeter.getTotalMemoryUsageInMB())
+            recordAndAssertResourceUsage("Warming database", 100, durationInSeconds, 600, resourceMeter.getTotalMemoryUsageInMB())
     }
 
 }
index 4d4d612..0c1e1f5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  ============LICENSE_START=======================================================
- *  Copyright (C) 2023 Nordix Foundation
+ *  Copyright (C) 2023-2024 Nordix Foundation
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the 'License');
  *  you may not use this file except in compliance with the License.
@@ -46,8 +46,8 @@ class CpsDataServiceLimitsPerfTest extends CpsPerfTestBase {
             }
             resourceMeter.stop()
             def durationInSeconds = resourceMeter.getTotalTimeInSeconds()
-        then: 'the operation completes within 25 seconds'
-            recordAndAssertResourceUsage("Creating 33,000 books", 25, durationInSeconds, 150, resourceMeter.getTotalMemoryUsageInMB())
+        then: 'the operation completes within 12 seconds'
+            recordAndAssertResourceUsage("Creating 33,000 books", 12, durationInSeconds, 150, resourceMeter.getTotalMemoryUsageInMB())
     }
 
     def 'Get data nodes from multiple xpaths 32K (2^15) limit exceeded.'() {
index e7bfabe..2efbf7d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  ============LICENSE_START=======================================================
- *  Copyright (C) 2023 Nordix Foundation
+ *  Copyright (C) 2023-2024 Nordix Foundation
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the 'License');
  *  you may not use this file except in compliance with the License.
@@ -40,7 +40,7 @@ class DeletePerfTest extends CpsPerfTestBase {
             resourceMeter.stop()
             def setupDurationInSeconds = resourceMeter.getTotalTimeInSeconds()
         then: 'setup duration is within expected time and memory used is within limit'
-            recordAndAssertResourceUsage('Delete test setup', 200, setupDurationInSeconds, 800, resourceMeter.getTotalMemoryUsageInMB())
+            recordAndAssertResourceUsage('Delete test setup', 100, setupDurationInSeconds, 800, resourceMeter.getTotalMemoryUsageInMB())
     }
 
     def 'Delete 100 container nodes'() {
index b3030b1..69f6477 100644 (file)
@@ -79,12 +79,12 @@ class UpdatePerfTest extends CpsPerfTestBase {
                     memoryLimit, resourceMeter.getTotalMemoryUsageInMB())
         where:
             scenario                           | totalNodes | startId | changeLeaves || timeLimit | memoryLimit
-            'Replace 0 nodes with 100'         | 100        | 1       | false        ||         7 | 250
-            'Replace 100 using same data'      | 100        | 1       | false        ||         3 | 250
-            'Replace 100 with new leaf values' | 100        | 1       | true         ||         3 | 250
-            'Replace 100 with 100 new nodes'   | 100        | 101     | false        ||        12 | 300
-            'Replace 50 existing and 50 new'   | 100        | 151     | true         ||         8 | 250
-            'Replace 100 nodes with 0'         | 0          | 1       | false        ||         5 | 250
+            'Replace 0 nodes with 100'         | 100        | 1       | false        ||       2.5 | 200
+            'Replace 100 using same data'      | 100        | 1       | false        ||       3.0 | 200
+            'Replace 100 with new leaf values' | 100        | 1       | true         ||       3.0 | 200
+            'Replace 100 with 100 new nodes'   | 100        | 101     | false        ||       6.0 | 200
+            'Replace 50 existing and 50 new'   | 100        | 151     | true         ||       4.5 | 200
+            'Replace 100 nodes with 0'         | 0          | 1       | false        ||       3.0 | 200
     }
 
     def 'Replace list content: #scenario.'() {
@@ -105,12 +105,12 @@ class UpdatePerfTest extends CpsPerfTestBase {
                     memoryLimit, resourceMeter.getTotalMemoryUsageInMB())
         where:
             scenario                                   | totalNodes | startId | changeLeaves || timeLimit | memoryLimit
-            'Replace list of 0 with 100'               | 100        | 1       | false        ||         7 | 250
-            'Replace list of 100 using same data'      | 100        | 1       | false        ||         3 | 250
-            'Replace list of 100 with new leaf values' | 100        | 1       | true         ||         3 | 250
-            'Replace list with 100 new nodes'          | 100        | 101     | false        ||        12 | 300
-            'Replace list with 50 existing and 50 new' | 100        | 151     | true         ||         8 | 250
-            'Replace list of 100 nodes with 1'         | 1          | 1       | false        ||         5 | 250
+            'Replace list of 0 with 100'               | 100        | 1       | false        ||       2.5 | 200
+            'Replace list of 100 using same data'      | 100        | 1       | false        ||       3.0 | 200
+            'Replace list of 100 with new leaf values' | 100        | 1       | true         ||       3.0 | 200
+            'Replace list with 100 new nodes'          | 100        | 101     | false        ||       6.0 | 200
+            'Replace list with 50 existing and 50 new' | 100        | 151     | true         ||       4.5 | 200
+            'Replace list of 100 nodes with 1'         | 1          | 1       | false        ||       3.0 | 200
     }
 
     def 'Update leaves for 100 data nodes.'() {
@@ -127,7 +127,7 @@ class UpdatePerfTest extends CpsPerfTestBase {
             assert 100 == countDataNodes('/openroadm-devices/openroadm-device[@status="fail"]')
         and: 'update completes within expected time and memory used is within limit'
             recordAndAssertResourceUsage('Update leaves for 100 data nodes',
-                    0.5, resourceMeter.getTotalTimeInSeconds(),
+                    0.4, resourceMeter.getTotalTimeInSeconds(),
                     120, resourceMeter.getTotalMemoryUsageInMB())
     }
 
index 1898f43..c36ec83 100644 (file)
@@ -45,10 +45,10 @@ class WritePerfTest extends CpsPerfTestBase {
             cpsAnchorService.deleteAnchor(CPS_PERFORMANCE_TEST_DATASPACE, WRITE_TEST_ANCHOR)
         where:
             totalNodes || expectedDuration | memoryLimit
-            50         || 4                | 100
-            100        || 7                | 200
-            200        || 14               | 400
-            400        || 28               | 500
+            50         || 2                | 100
+            100        || 4                | 200
+            200        ||                | 400
+            400        || 14               | 500
     }
 
     def 'Writing bookstore data has exponential time.'() {
@@ -71,8 +71,8 @@ class WritePerfTest extends CpsPerfTestBase {
             cpsAnchorService.deleteAnchor(CPS_PERFORMANCE_TEST_DATASPACE, WRITE_TEST_ANCHOR)
         where:
             totalBooks || expectedDuration | memoryLimit
-            800        || 1                | 50
-            1600       || 2                | 100
+            800        || 0.5              | 50
+            1600       || 1.5              | 100
             3200       || 6                | 150
             6400       || 18               | 200
     }
index 0aefac8..55560aa 100644 (file)
@@ -1,5 +1,5 @@
 # ============LICENSE_START=======================================================
-# Copyright (C) 2023 Nordix Foundation.
+# Copyright (C) 2023-2024 Nordix Foundation.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -20,11 +20,13 @@ spring:
     ddl-auto: create
     show-sql: false
     properties:
-      hibernate:
-        enable_lazy_load_no_trans: true
-        dialect: org.hibernate.dialect.PostgreSQLDialect
-        format_sql: true
-        show_sql: false
+      hibernate.enable_lazy_load_no_trans: true
+      hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect
+      hibernate.format_sql: true
+      hibernate.show_sql: false
+      # Please ensure these values match those used in cps-application/src/main/resources/application.yml
+      hibernate.id.new_generator_mappings: true
+      hibernate.jdbc.batch_size: 100
 
   datasource:
     url: ${DB_URL}
index 3f12331..ba639ed 100644 (file)
@@ -1,5 +1,5 @@
 # ============LICENSE_START=======================================================
-# Copyright (c) 2023 Nordix Foundation.
+# Copyright (c) 2023-2024 Nordix Foundation.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -100,7 +100,7 @@ databaseChangeLog:
         - createTable:
             columns:
               - column:
-                  autoIncrement: true
+                  autoIncrement: false
                   constraints:
                     nullable: false
                     primaryKey: true
@@ -127,6 +127,11 @@ databaseChangeLog:
                   name: schema_node_id
                   type: INTEGER
             tableName: fragment
+        - createSequence:
+            dataType: BIGINT
+            incrementBy: 100
+            sequenceName: fragment_id_seq
+            startValue: 100
   - changeSet:
       id: 1-5
       author: cps
index 6fd135c..47486e8 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.4.2-SNAPSHOT</version>
+        <version>3.4.3-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
diff --git a/pom.xml b/pom.xml
index 4f9355d..42d2bfa 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
 \r
     <groupId>org.onap.cps</groupId>\r
     <artifactId>cps-aggregator</artifactId>\r
-    <version>3.4.2-SNAPSHOT</version>\r
+    <version>3.4.3-SNAPSHOT</version>\r
     <packaging>pom</packaging>\r
 \r
     <name>cps</name>\r
diff --git a/releases/3.4.2-container.yaml b/releases/3.4.2-container.yaml
new file mode 100644 (file)
index 0000000..2da78ad
--- /dev/null
@@ -0,0 +1,8 @@
+distribution_type: container
+container_release_tag: 3.4.2
+project: cps
+log_dir: cps-maven-docker-stage-master/933/
+ref: 02d8bf8c8a3469f75ef841c9d8c72349c51f3330
+containers:
+  - name: 'cps-and-ncmp'
+    version: '3.4.2-20240111T145232Z'
\ No newline at end of file
diff --git a/releases/3.4.2.yaml b/releases/3.4.2.yaml
new file mode 100644 (file)
index 0000000..1f41433
--- /dev/null
@@ -0,0 +1,4 @@
+distribution_type: maven
+log_dir: cps-maven-stage-master/941/
+project: cps
+version: 3.4.2
\ No newline at end of file
index d47a688..8fcf040 100644 (file)
@@ -25,7 +25,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.onap.cps</groupId>
     <artifactId>spotbugs</artifactId>
-    <version>3.4.2-SNAPSHOT</version>
+    <version>3.4.3-SNAPSHOT</version>
 
     <properties>
         <nexusproxy>https://nexus.onap.org</nexusproxy>
index 9c3bc33..6c691bf 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START=======================================================
-#  Copyright (C) 2021-2023 Nordix Foundation
+#  Copyright (C) 2021-2024 Nordix Foundation
 #  Modifications Copyright (C) 2022 Bell Canada.
 #  ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
@@ -22,7 +22,7 @@
 
 major=3
 minor=4
-patch=2
+patch=3
 
 base_version=${major}.${minor}.${patch}