Merge "Handle Subscription Response from DMI"
authorPriyank Maheshwari <priyank.maheshwari@est.tech>
Fri, 12 Apr 2024 12:24:39 +0000 (12:24 +0000)
committerGerrit Code Review <gerrit@onap.org>
Fri, 12 Apr 2024 12:24:39 +0000 (12:24 +0000)
123 files changed:
.github/workflows/scorecard.yml [new file with mode: 0644]
INFO.yaml
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/docs/openapi/components.yaml
cps-ncmp-rest/docs/openapi/ncmp.yml
cps-ncmp-rest/lombok.config
cps-ncmp-rest/pom.xml
cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java
cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/handlers/NcmpPassthroughResourceRequestHandler.java
cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/exceptions/NetworkCmProxyRestExceptionHandler.java
cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/exceptions/PayloadTooLargeException.java [new file with mode: 0644]
cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/handlers/NcmpDatastoreRequestHandlerSpec.groovy
cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/exceptions/NetworkCmProxyRestExceptionHandlerSpec.groovy
cps-ncmp-service/lombok.config
cps-ncmp-service/pom.xml
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/DataJobService.java [new file with mode: 0644]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/NcmpResponseStatus.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/DataJobServiceImpl.java [new file with mode: 0644]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/config/embeddedcache/TrustLevelCacheConfig.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/config/kafka/KafkaConfig.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/cmsubscription/CmNotificationSubscriptionNcmpOutEventProducer.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/cmsubscription/CmNotificationSubscriptionNcmpOutEventPublishingTask.java [new file with mode: 0644]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/cmsubscription/service/CmNotificationSubscriptionPersistenceServiceImpl.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/inventory/CmHandleQueriesImpl.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operations/DmiModelOperations.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operations/DmiRequestBody.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/trustlevel/TrustLevelManager.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/trustlevel/dmiavailability/DmiPluginWatchDog.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/models/datajob/DataJobMetadata.java [new file with mode: 0644]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/models/datajob/DataJobReadRequest.java [new file with mode: 0644]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/models/datajob/DataJobWriteRequest.java [new file with mode: 0644]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/models/datajob/ReadOperation.java [new file with mode: 0644]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/models/datajob/WriteOperation.java [new file with mode: 0644]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/AbstractModelLoader.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/CmDataSubscriptionModelLoader.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/InventoryModelLoader.java
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/DataJobServiceImplSpec.groovy [new file with mode: 0644]
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/config/kafka/KafkaConfigSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/events/cmsubscription/CmNotificationSubscriptionNcmpOutEventProducerSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operations/DmiModelOperationsSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operations/DmiOperationsBaseSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/init/AbstractModelLoaderSpec.groovy
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/impl/CpsModulePersistenceServiceImpl.java
cps-ri/src/main/resources/changelog/changelog-master.yaml
cps-ri/src/main/resources/changelog/db/changes/01-createCPSTables.yaml
cps-ri/src/main/resources/changelog/db/changes/02-loadData-dataspace.yaml [deleted file]
cps-ri/src/main/resources/changelog/db/changes/03-loadData-schema-set.yaml [deleted file]
cps-ri/src/main/resources/changelog/db/changes/04-loadData-anchor.yaml [deleted file]
cps-ri/src/main/resources/changelog/db/changes/05-loadData-fragment.yaml [deleted file]
cps-ri/src/main/resources/changelog/db/changes/06-delete-not-required-fragment-index.yaml [deleted file]
cps-ri/src/main/resources/changelog/db/changes/07-update-yang-resource-checksums.yaml [deleted file]
cps-ri/src/main/resources/changelog/db/changes/08-update-yang-resources-cps-ran-model-forward.sql [deleted file]
cps-ri/src/main/resources/changelog/db/changes/08-update-yang-resources-cps-ran-model-rollback.sql [deleted file]
cps-ri/src/main/resources/changelog/db/changes/08-update-yang-resources-ietf-inet-types-forward.sql [deleted file]
cps-ri/src/main/resources/changelog/db/changes/08-update-yang-resources-ietf-inet-types-rollback.sql [deleted file]
cps-ri/src/main/resources/changelog/db/changes/08-update-yang-resources-ietf-yang-types-forward.sql [deleted file]
cps-ri/src/main/resources/changelog/db/changes/08-update-yang-resources-ietf-yang-types-rollback.sql [deleted file]
cps-ri/src/main/resources/changelog/db/changes/08-update-yang-resources.yaml [deleted file]
cps-ri/src/main/resources/changelog/db/changes/09-loadData-dmi-registry-schema-set.yaml [deleted file]
cps-ri/src/main/resources/changelog/db/changes/10-loadData-dmi-registry-fragment.yaml [deleted file]
cps-ri/src/main/resources/changelog/db/changes/11-add-column-to-yang-resources-table.yaml [deleted file]
cps-ri/src/main/resources/changelog/db/changes/12-delete-all-previous-dmi-registry-schema-set.yaml [deleted file]
cps-ri/src/main/resources/changelog/db/changes/13-insert-dmi-registry-2022-02-10-schema-set.yaml [deleted file]
cps-ri/src/main/resources/changelog/db/changes/14-loadData-dmi-registry-2022-05-10-schema-set.yaml [deleted file]
cps-ri/src/main/resources/changelog/db/changes/15-rename-column-yang-resource-table.yaml [deleted file]
cps-ri/src/main/resources/changelog/db/changes/16-insert-cm-handle-state-forward.sql [deleted file]
cps-ri/src/main/resources/changelog/db/changes/16-insert-cm-handle-state-rollback.sql [deleted file]
cps-ri/src/main/resources/changelog/db/changes/16-insert-cm-handle-state.yaml [deleted file]
cps-ri/src/main/resources/changelog/db/changes/17-add-index-to-schema-set-yang-resources.yaml [deleted file]
cps-ri/src/main/resources/changelog/db/changes/18-cascade-delete-fragment-children.yaml [deleted file]
cps-ri/src/main/resources/changelog/db/changes/19-delete-not-required-dataspace-id-from-fragment.yaml [deleted file]
cps-ri/src/main/resources/changelog/db/changes/20-change-foreign-key-id-types-to-integer.yaml [deleted file]
cps-ri/src/main/resources/changelog/db/changes/21-escape-quotes-in-xpath.yaml [deleted file]
cps-ri/src/main/resources/changelog/db/changes/data/anchor.csv [deleted file]
cps-ri/src/main/resources/changelog/db/changes/data/dataspace.csv [deleted file]
cps-ri/src/main/resources/changelog/db/changes/data/dmi/anchor.csv [deleted file]
cps-ri/src/main/resources/changelog/db/changes/data/dmi/dataspace.csv [deleted file]
cps-ri/src/main/resources/changelog/db/changes/data/dmi/fragment.csv [deleted file]
cps-ri/src/main/resources/changelog/db/changes/data/dmi/schema_set.csv [deleted file]
cps-ri/src/main/resources/changelog/db/changes/data/dmi/schema_set_yang_resources.csv [deleted file]
cps-ri/src/main/resources/changelog/db/changes/data/dmi/schema_set_yang_resources@2021-10-20.csv [deleted file]
cps-ri/src/main/resources/changelog/db/changes/data/dmi/schema_set_yang_resources@2021-12-13.csv [deleted file]
cps-ri/src/main/resources/changelog/db/changes/data/dmi/yang_resource.csv [deleted file]
cps-ri/src/main/resources/changelog/db/changes/data/dmi/yang_resource@2021-10-20.csv [deleted file]
cps-ri/src/main/resources/changelog/db/changes/data/fragment.csv [deleted file]
cps-ri/src/main/resources/changelog/db/changes/data/schema_set.csv [deleted file]
cps-ri/src/main/resources/changelog/db/changes/data/schema_set_yang_resources.csv [deleted file]
cps-ri/src/main/resources/changelog/db/changes/data/yang_resource.csv [deleted file]
cps-service/pom.xml
csit/tests/cps-admin/cps-admin.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/pom.xml
docs/cps-ncmp-message-status-codes.rst
docs/release-notes.rst
integration-test/pom.xml
integration-test/src/test/groovy/org/onap/cps/integration/base/CpsIntegrationSpecBase.groovy
integration-test/src/test/groovy/org/onap/cps/integration/functional/NcmpBearerTokenPassthroughSpec.groovy
integration-test/src/test/groovy/org/onap/cps/integration/functional/NcmpCmHandleCreateSpec.groovy
integration-test/src/test/groovy/org/onap/cps/integration/functional/NcmpCmHandleUpgradeSpec.groovy
integration-test/src/test/groovy/org/onap/cps/integration/functional/NcmpRestApiSpec.groovy [new file with mode: 0644]
jacoco-report/pom.xml
pom.xml
releases/3.4.7-container.yaml [new file with mode: 0644]
releases/3.4.7.yaml [new file with mode: 0644]
spotbugs/pom.xml
version.properties

diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml
new file mode 100644 (file)
index 0000000..ce296da
--- /dev/null
@@ -0,0 +1,72 @@
+# This workflow uses actions that are not certified by GitHub. They are provided
+# by a third-party and are governed by separate terms of service, privacy
+# policy, and support documentation.
+
+name: Scorecard supply-chain security
+on:
+  workflow_dispatch:
+  # For Branch-Protection check. Only the default branch is supported. See
+  # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
+  branch_protection_rule:
+  # To guarantee Maintained check is occasionally updated. See
+  # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
+  schedule:
+    - cron: '33 6 * * 0'
+
+# Declare default permissions as read only.
+permissions: read-all
+
+jobs:
+  analysis:
+    name: Scorecard analysis
+    runs-on: ubuntu-latest
+    permissions:
+      # Needed to upload the results to code-scanning dashboard.
+      security-events: write
+      # Needed to publish results and get a badge (see publish_results below).
+      id-token: write
+      # Uncomment the permissions below if installing in a private repository.
+      # contents: read
+      # actions: read
+
+    steps:
+      - name: "Checkout code"
+        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+        with:
+          persist-credentials: false
+
+      - name: "Run analysis"
+        uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
+        with:
+          results_file: results.sarif
+          results_format: sarif
+          # (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
+          # - you want to enable the Branch-Protection check on a *public* repository, or
+          # - you are installing Scorecard on a *private* repository
+          # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
+          # repo_token: ${{ secrets.SCORECARD_TOKEN }}
+
+          # Public repositories:
+          #   - Publish results to OpenSSF REST API for easy access by consumers
+          #   - Allows the repository to include the Scorecard badge.
+          #   - See https://github.com/ossf/scorecard-action#publishing-results.
+          # For private repositories:
+          #   - `publish_results` will always be set to `false`, regardless
+          #     of the value entered here.
+          publish_results: true
+
+      # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
+      # format to the repository Actions tab.
+      - name: "Upload artifact"
+        uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20
+        with:
+          name: SARIF file
+          path: results.sarif
+          retention-days: 5
+
+      # Upload the results to GitHub's code scanning dashboard (optional).
+      # Commenting out will disable upload of results to your repo's Code Scanning dashboard
+      - name: "Upload to code-scanning"
+        uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
+        with:
+          sarif_file: results.sarif
\ No newline at end of file
index 04e599d..fe96ba8 100755 (executable)
--- a/INFO.yaml
+++ b/INFO.yaml
@@ -1,5 +1,5 @@
 # ============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.
@@ -52,11 +52,6 @@ committers:
       company: 'Ericsson Software Technology'
       id: 'sourabh_sourabh'
       timezone: 'Europe/Dublin'
-    - name: 'Luke Gleeson'
-      email: 'luke.gleeson@est.tech'
-      company: 'Ericsson Software Technology'
-      id: 'lukegleeson'
-      timezone: 'Europe/Dublin'
     - name: 'Priyank Maheshwari'
       email: 'priyank.maheshwari@est.tech'
       company: 'Ericsson Software Technology'
@@ -67,6 +62,11 @@ committers:
       company: 'Ericsson Software Technology'
       id: 'emaclee'
       timezone: 'Europe/Dublin'
+    - name: 'Daniel Hanrahan'
+      email: 'daniel.hanrahan@est.tech'
+      company: 'Ericsson Software Technology'
+      id: 'danielhanrahan'
+      timezone: 'Europe/Dublin'
 repositories:
     - cps
 tsc:
index 83f1120..b1c4379 100644 (file)
@@ -26,7 +26,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.onap.cps</groupId>
     <artifactId>checkstyle</artifactId>
-    <version>3.4.7-SNAPSHOT</version>
+    <version>3.4.8-SNAPSHOT</version>
 
     <profiles>
         <profile>
index ac75c0b..e6e2f9a 100644 (file)
@@ -28,7 +28,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.4.7-SNAPSHOT</version>
+        <version>3.4.8-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
             <groupId>org.eclipse.jetty</groupId>
             <artifactId>jetty-server</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.eclipse.jetty</groupId>
-            <artifactId>jetty-http</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>jakarta.servlet</groupId>
-            <artifactId>jakarta.servlet-api</artifactId>
-        </dependency>
         <dependency>
             <groupId>io.micrometer</groupId>
             <artifactId>micrometer-registry-prometheus</artifactId>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>
             <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.junit.vintage</groupId>
-                    <artifactId>junit-vintage-engine</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
 
     </dependencies>
index d742483..3c263e3 100644 (file)
@@ -64,7 +64,7 @@ spring:
 
     liquibase:
         change-log: classpath:changelog/changelog-master.yaml
-        labels: ${LIQUIBASE_LABELS}
+        label-filter: ${LIQUIBASE_LABELS}
 
     servlet:
         multipart:
index 3e88be7..366d4c7 100644 (file)
@@ -25,7 +25,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.onap.cps</groupId>
     <artifactId>cps-bom</artifactId>
-    <version>3.4.7-SNAPSHOT</version>
+    <version>3.4.8-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <description>This artifact contains dependencyManagement declarations of all published CPS components.</description>
index 68f36fb..b7ec70b 100644 (file)
@@ -27,7 +27,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.onap.cps</groupId>
     <artifactId>cps-dependencies</artifactId>
-    <version>3.4.7-SNAPSHOT</version>
+    <version>3.4.8-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>${project.groupId}:${project.artifactId}</name>
@@ -75,7 +75,7 @@
             <dependency>
                 <groupId>org.springdoc</groupId>
                 <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
-                <version>2.0.2</version>
+                <version>2.4.0</version>
             </dependency>
             <dependency>
                 <groupId>org.springdoc</groupId>
             <dependency>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-dependencies</artifactId>
-                <version>3.1.2</version>
+                <version>3.2.4</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
             <dependency>
                 <groupId>org.springframework.cloud</groupId>
                 <artifactId>spring-cloud-dependencies</artifactId>
-                <version>2022.0.3</version>
+                <version>2023.0.0</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
-            <dependency>
-                <groupId>org.springframework</groupId>
-                <artifactId>spring-test</artifactId>
-                <version>6.0.11</version>
-            </dependency>
             <dependency>
                 <groupId>io.springfox</groupId>
                 <artifactId>springfox-boot-starter</artifactId>
             <dependency>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-starter-cache</artifactId>
-                <version>3.1.2</version>
+                <version>3.2.4</version>
             </dependency>
             <!-- A L P H A B E T I C A L   D E P E N D E N C I E S -->
             <dependency>
             </dependency>
             <dependency>
                 <groupId>io.hypersistence</groupId>
-                <artifactId>hypersistence-utils-hibernate-60</artifactId>
-                <version>3.5.0</version>
+                <artifactId>hypersistence-utils-hibernate-63</artifactId>
+                <version>3.7.3</version>
             </dependency>
             <dependency>
                 <groupId>io.micrometer</groupId>
                 <artifactId>groovy</artifactId>
                 <version>${groovy.version}</version>
             </dependency>
-            <dependency>
-                <groupId>org.eclipse.jetty</groupId>
-                <artifactId>jetty-server</artifactId>
-                <version>${jetty-version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.eclipse.jetty</groupId>
-                <artifactId>jetty-http</artifactId>
-                <version>${jetty-version}</version>
-            </dependency>
             <dependency>
                 <groupId>org.codehaus.janino</groupId>
                 <artifactId>janino</artifactId>
                 <artifactId>annotations</artifactId>
                 <version>22.0.0</version>
             </dependency>
-            <dependency>
-                <groupId>org.junit.jupiter</groupId>
-                <artifactId>junit-jupiter-api</artifactId>
-                <version>5.10.0</version>
-            </dependency>
             <dependency>
                 <groupId>org.liquibase</groupId>
                 <artifactId>liquibase-core</artifactId>
index fd75c2c..680d0bb 100644 (file)
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.4.7-SNAPSHOT</version>
+        <version>3.4.8-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
index 89785ca..e12ab3b 100644 (file)
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.4.7-SNAPSHOT</version>
+        <version>3.4.8-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
index 9d30692..ae755a3 100644 (file)
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-ncmp-rest-stub</artifactId>
-        <version>3.4.7-SNAPSHOT</version>
+        <version>3.4.8-SNAPSHOT</version>
     </parent>
 
     <artifactId>cps-ncmp-rest-stub-app</artifactId>
index 350bb00..b6c461c 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.
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-ncmp-rest-stub</artifactId>
-        <version>3.4.7-SNAPSHOT</version>
+        <version>3.4.8-SNAPSHOT</version>
     </parent>
     <artifactId>cps-ncmp-rest-stub-service</artifactId>
 
             <groupId>org.onap.cps</groupId>
             <artifactId>cps-ncmp-rest</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.eclipse.jetty</groupId>
-            <artifactId>jetty-server</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>jakarta.servlet</groupId>
-            <artifactId>jakarta.servlet-api</artifactId>
-        </dependency>
         <!-- T E S T - D E P E N D E N C I E S -->
         <dependency>
             <groupId>org.spockframework</groupId>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>
             <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.junit.vintage</groupId>
-                    <artifactId>junit-vintage-engine</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.spockframework</groupId>
index 3df8fa9..c2c789e 100644 (file)
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.4.7-SNAPSHOT</version>
+        <version>3.4.8-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
index 0ad453a..8aa38c0 100644 (file)
@@ -366,6 +366,7 @@ components:
           type: array
           items:
             type: string
+            description: targeted cm handles, maximum of 50 supported. If this limit is exceeded the request wil be refused.
             example: [ "da310eecdb8d44c2acc0ddaae01174b1","c748c58f8e0b438f9fd1f28370b17d47" ]
 
   examples:
@@ -695,7 +696,7 @@ components:
           schema:
             $ref: '#/components/schemas/ErrorMessage'
           example:
-            status: 400 BAD_REQUEST
+            status: 400
             message: Bad request error message
             details: Bad request error details
     Conflict:
@@ -705,9 +706,19 @@ components:
           schema:
             $ref: '#/components/schemas/ErrorMessage'
           example:
-            status: 409 CONFLICT
+            status: 409
             message: Conflict error message
             details: Conflict error details
+    PayloadTooLarge:
+      description: The request is larger than the server is willing or able to process
+      content:
+        application/json:
+          schema:
+            $ref: '#/components/schemas/ErrorMessage'
+          example:
+            status: 413
+            message: Payload Too Large error message
+            details: Payload Too Large error details
     NotImplemented:
       description: The given path has not been implemented
       content:
index 0cb1cdf..d0b1f35 100755 (executable)
@@ -194,7 +194,7 @@ dataOperationForCmHandle:
     tags:
       - network-cm-proxy
     summary: Execute a data operation for group of cm handle ids
-    description: This request will be handled asynchronously using messaging to the supplied topic. The rest response will be an acknowledge with a requestId to identify the relevant messages.
+    description: This request will be handled asynchronously using messaging to the supplied topic. The rest response will be an acknowledge with a requestId to identify the relevant messages. A maximum of 50 cm handles per operation is supported.
     operationId: executeDataOperationForCmHandles
     parameters:
       - $ref: 'components.yaml#/components/parameters/requiredTopicParamInQuery'
@@ -216,6 +216,8 @@ dataOperationForCmHandle:
         $ref: 'components.yaml#/components/responses/BadRequest'
       403:
         $ref: 'components.yaml#/components/responses/Forbidden'
+      413:
+        $ref: 'components.yaml#/components/responses/PayloadTooLarge'
       500:
         $ref: 'components.yaml#/components/responses/InternalServerError'
       502:
index 0418974..f5a2cab 100644 (file)
@@ -1,5 +1,5 @@
 #  ============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.
@@ -17,4 +17,5 @@
 #  ============LICENSE_END=========================================================
 
 config.stopBubbling = true
-lombok.addLombokGeneratedAnnotation = true
\ No newline at end of file
+lombok.addLombokGeneratedAnnotation = true
+lombok.copyableAnnotations += org.springframework.beans.factory.annotation.Qualifier
\ No newline at end of file
index 7e03120..453da8f 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   ============LICENSE_START=======================================================
-  Copyright (C) 2021-2023 Nordix Foundation
+  Copyright (C) 2021-2024 Nordix Foundation
   Modifications Copyright (C) 2021 Bell Canada
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.4.7-SNAPSHOT</version>
+        <version>3.4.8-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>
             <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.junit.vintage</groupId>
-                    <artifactId>junit-vintage-engine</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.junit.jupiter</groupId>
index 93cbccf..45c7c33 100755 (executable)
@@ -39,6 +39,7 @@ import java.util.stream.Collectors;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.onap.cps.ncmp.api.NetworkCmProxyDataService;
+import org.onap.cps.ncmp.api.impl.config.embeddedcache.TrustLevelCacheConfig;
 import org.onap.cps.ncmp.api.impl.exception.InvalidDatastoreException;
 import org.onap.cps.ncmp.api.impl.inventory.CompositeState;
 import org.onap.cps.ncmp.api.impl.operations.DatastoreType;
@@ -63,6 +64,7 @@ import org.onap.cps.ncmp.rest.model.RestOutputCmHandlePublicProperties;
 import org.onap.cps.ncmp.rest.util.DeprecationHelper;
 import org.onap.cps.spi.model.ModuleDefinition;
 import org.onap.cps.utils.JsonObjectMapper;
+import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
 import org.springframework.util.StringUtils;
@@ -84,6 +86,7 @@ public class NetworkCmProxyController implements NetworkCmProxyApi {
     private final NcmpCachedResourceRequestHandler ncmpCachedResourceRequestHandler;
     private final NcmpPassthroughResourceRequestHandler ncmpPassthroughResourceRequestHandler;
     private final DataOperationRequestMapper dataOperationRequestMapper;
+    @Qualifier(TrustLevelCacheConfig.TRUST_LEVEL_PER_CM_HANDLE)
     private final Map<String, TrustLevel> trustLevelPerCmHandle;
 
     /**
index 75112ca..eca7ebf 100644 (file)
@@ -33,6 +33,7 @@ import org.onap.cps.ncmp.api.impl.operations.OperationType;
 import org.onap.cps.ncmp.api.models.CmResourceAddress;
 import org.onap.cps.ncmp.api.models.DataOperationRequest;
 import org.onap.cps.ncmp.rest.exceptions.OperationNotSupportedException;
+import org.onap.cps.ncmp.rest.exceptions.PayloadTooLargeException;
 import org.onap.cps.ncmp.rest.executor.CpsNcmpTaskExecutor;
 import org.onap.cps.ncmp.rest.util.TopicValidator;
 import org.springframework.http.ResponseEntity;
@@ -45,6 +46,10 @@ public class NcmpPassthroughResourceRequestHandler extends NcmpDatastoreRequestH
 
     private static final Object noReturn = null;
 
+    private static final int MAXIMUM_CM_HANDLES_PER_OPERATION = 50;
+
+    private static final String PAYLOAD_TOO_LARGE_TEMPLATE = "Operation '%s' affects too many (%d) cm handles";
+
     /**
      * Constructor.
      *
@@ -101,17 +106,23 @@ public class NcmpPassthroughResourceRequestHandler extends NcmpDatastoreRequestH
     }
 
     private void validateDataOperationRequest(final String topicParamInQuery,
-                                              final DataOperationRequest
-                                                  dataOperationRequest) {
+                                              final DataOperationRequest dataOperationRequest) {
         TopicValidator.validateTopicName(topicParamInQuery);
         dataOperationRequest.getDataOperationDefinitions().forEach(dataOperationDetail -> {
             if (OperationType.fromOperationName(dataOperationDetail.getOperation()) != READ) {
                 throw new OperationNotSupportedException(
                     dataOperationDetail.getOperation() + " operation not yet supported");
-            } else if (DatastoreType.fromDatastoreName(dataOperationDetail.getDatastore()) == OPERATIONAL) {
+            }
+            if (DatastoreType.fromDatastoreName(dataOperationDetail.getDatastore()) == OPERATIONAL) {
                 throw new InvalidDatastoreException(dataOperationDetail.getDatastore()
                     + " datastore is not supported");
             }
+            if (dataOperationDetail.getCmHandleIds().size() > MAXIMUM_CM_HANDLES_PER_OPERATION) {
+                final String errorMessage = String.format(PAYLOAD_TOO_LARGE_TEMPLATE,
+                    dataOperationDetail.getOperationId(),
+                    dataOperationDetail.getCmHandleIds().size());
+                throw new PayloadTooLargeException(errorMessage);
+            }
         });
     }
 
index 7498c5f..d323691 100755 (executable)
@@ -1,7 +1,7 @@
 /*
  *  ============LICENSE_START=======================================================
  *  Copyright (C) 2021 Pantheon.tech
- *  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.
@@ -60,8 +60,7 @@ public class NetworkCmProxyRestExceptionHandler {
      * @return response with response code 500.
      */
     @ExceptionHandler
-    public static ResponseEntity<Object> handleInternalServerErrorExceptions(
-            final Exception exception) {
+    public static ResponseEntity<Object> handleInternalServerErrorExceptions(final Exception exception) {
         return buildErrorResponse(HttpStatus.INTERNAL_SERVER_ERROR, exception);
     }
 
@@ -73,7 +72,7 @@ public class NetworkCmProxyRestExceptionHandler {
     @ExceptionHandler({HttpClientRequestException.class})
     public static ResponseEntity<Object> handleClientRequestExceptions(
             final HttpClientRequestException httpClientRequestException) {
-        return wrapDmiErrorResponse(HttpStatus.BAD_GATEWAY, httpClientRequestException);
+        return wrapDmiErrorResponse(httpClientRequestException);
     }
 
     @ExceptionHandler({DmiRequestException.class, DataValidationException.class, OperationNotSupportedException.class,
@@ -88,10 +87,15 @@ public class NetworkCmProxyRestExceptionHandler {
     }
 
     @ExceptionHandler({DataNodeNotFoundException.class})
-    public static ResponseEntity<Object> handleNotFoundExceptions(final CpsException exception) {
+    public static ResponseEntity<Object> handleNotFoundExceptions(final Exception exception) {
         return buildErrorResponse(HttpStatus.NOT_FOUND, exception);
     }
 
+    @ExceptionHandler({PayloadTooLargeException.class})
+    public static ResponseEntity<Object> handlePayloadTooLargeExceptions(final Exception exception) {
+        return buildErrorResponse(HttpStatus.PAYLOAD_TOO_LARGE, exception);
+    }
+
     private static ResponseEntity<Object> buildErrorResponse(final HttpStatus status, final Exception exception) {
         if (exception.getCause() != null || !(exception instanceof CpsException)) {
             log.error("Exception occurred", exception);
@@ -111,15 +115,14 @@ public class NetworkCmProxyRestExceptionHandler {
         return new ResponseEntity<>(errorMessage, status);
     }
 
-    private static ResponseEntity<Object> wrapDmiErrorResponse(
-            final HttpStatus httpStatus,
-            final HttpClientRequestException httpClientRequestException) {
+    private static ResponseEntity<Object> wrapDmiErrorResponse(final HttpClientRequestException
+                                                                     httpClientRequestException) {
         final var dmiErrorMessage = new DmiErrorMessage();
         final var dmiErrorResponse = new DmiErrorMessageDmiResponse();
         dmiErrorResponse.setHttpCode(httpClientRequestException.getHttpStatus());
         dmiErrorResponse.setBody(httpClientRequestException.getDetails());
         dmiErrorMessage.setMessage(httpClientRequestException.getMessage());
         dmiErrorMessage.setDmiResponse(dmiErrorResponse);
-        return new ResponseEntity<>(dmiErrorMessage, httpStatus);
+        return new ResponseEntity<>(dmiErrorMessage, HttpStatus.BAD_GATEWAY);
     }
 }
diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/exceptions/PayloadTooLargeException.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/exceptions/PayloadTooLargeException.java
new file mode 100644 (file)
index 0000000..cddbd08
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ *  ============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=========================================================
+ */
+
+package org.onap.cps.ncmp.rest.exceptions;
+
+public class PayloadTooLargeException extends RuntimeException {
+
+    /**
+     * Instantiates a new payload too large exception.
+     */
+    public PayloadTooLargeException(final String message) {
+        super(message);
+    }
+}
index bdd0e71..aef37c9 100644 (file)
@@ -27,6 +27,7 @@ import org.onap.cps.ncmp.api.models.DataOperationDefinition
 import org.onap.cps.ncmp.api.models.DataOperationRequest
 import org.onap.cps.ncmp.api.models.CmResourceAddress
 import org.onap.cps.ncmp.rest.exceptions.OperationNotSupportedException
+import org.onap.cps.ncmp.rest.exceptions.PayloadTooLargeException
 import org.onap.cps.ncmp.rest.executor.CpsNcmpTaskExecutor
 import spock.lang.Specification
 import spock.util.concurrent.PollingConditions
@@ -110,9 +111,7 @@ class NcmpDatastoreRequestHandlerSpec extends Specification {
     }
 
     def 'Attempt to execute async data operation request with error #scenario'() {
-        given: 'notification feature is turned on'
-            objectUnderTest.notificationFeatureEnabled = true
-        and: 'a data operation definition with datastore: #datastore'
+        given: 'a data operation definition with datastore: #datastore'
             def dataOperationDefinition = new DataOperationDefinition(operation: 'read', datastore: datastore)
         when: 'data operation request is executed'
             def dataOperationRequest = new DataOperationRequest(dataOperationDefinitions: [dataOperationDefinition])
@@ -127,11 +126,9 @@ class NcmpDatastoreRequestHandlerSpec extends Specification {
     }
 
     def 'Attempt to execute async data operation request with #scenario operation: #operation.'() {
-        given: 'notification feature is turned on'
-            objectUnderTest.notificationFeatureEnabled = true
-        and: 'a data operation definition with operation: #operation'
+        given: 'a data operation definition with operation: #operation'
             def dataOperationDefinition = new DataOperationDefinition(operation: operation, datastore: 'ncmp-datastore:passthrough-running')
-        when: 'bulk request is executed'
+        when: 'data operation request is executed'
             objectUnderTest.executeRequest('someTopic', new DataOperationRequest(dataOperationDefinitions:[dataOperationDefinition]), NO_AUTH_HEADER)
         then: 'the expected type of exception is thrown'
             thrown(expectedException)
@@ -144,4 +141,16 @@ class NcmpDatastoreRequestHandlerSpec extends Specification {
             'unsupported' | 'delete'  || OperationNotSupportedException
     }
 
+    def 'Attempt to execute async data operation request with too many cm handles.'() {
+        given: 'a data operation definition with too many cm handles'
+            def cmHandleIds = new String[51]
+            def dataOperationDefinition = new DataOperationDefinition(operationId: 'abc', operation: 'read', datastore: 'ncmp-datastore:passthrough-running', cmHandleIds: cmHandleIds)
+        when: 'data operation request is executed'
+            objectUnderTest.executeRequest('someTopic', new DataOperationRequest(dataOperationDefinitions:[dataOperationDefinition]), NO_AUTH_HEADER)
+        then: 'a payload too large exception is thrown'
+            def exceptionThrown = thrown(PayloadTooLargeException)
+        and: 'the error message contains the offending number of cm handles'
+            assert exceptionThrown.message == "Operation 'abc' affects too many (51) cm handles"
+    }
+
 }
index dd02b31..a79ea25 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  ============LICENSE_START=======================================================
  *  Copyright (C) 2021 highstreet technologies GmbH
- *  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.
@@ -23,9 +23,10 @@ package org.onap.cps.ncmp.rest.exceptions
 
 import static org.springframework.http.HttpStatus.BAD_GATEWAY
 import static org.springframework.http.HttpStatus.BAD_REQUEST
+import static org.springframework.http.HttpStatus.CONFLICT
 import static org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR
 import static org.springframework.http.HttpStatus.NOT_FOUND
-import static org.springframework.http.HttpStatus.CONFLICT
+import static org.springframework.http.HttpStatus.PAYLOAD_TOO_LARGE
 import static org.onap.cps.ncmp.rest.exceptions.NetworkCmProxyRestExceptionHandlerSpec.ApiType.NCMP
 import static org.onap.cps.ncmp.rest.exceptions.NetworkCmProxyRestExceptionHandlerSpec.ApiType.NCMPINVENTORY
 import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get
@@ -111,22 +112,23 @@ class NetworkCmProxyRestExceptionHandlerSpec extends Specification {
         dataNodeBaseEndpointNcmpInventory = "$basePathNcmpInventory/v1"
     }
 
-    def 'Get request with generic #scenario exception returns correct HTTP Status with #scenario'() {
+    def 'Get request with #scenario exception returns correct HTTP Status with #scenario'() {
         when: 'an exception is thrown by the service'
             setupTestException(exception, NCMP)
             def response = performTestRequest(NCMP)
         then: 'an HTTP response is returned with correct message and details'
             assertTestResponse(response, expectedErrorCode, expectedErrorMessage, expectedErrorDetails)
         where:
-            scenario              | exception                                                        || expectedErrorDetails           | expectedErrorMessage        | expectedErrorCode
-            'CPS'                 | new CpsException(sampleErrorMessage, sampleErrorDetails)         || sampleErrorDetails             | sampleErrorMessage          | INTERNAL_SERVER_ERROR
-            'NCMP-server'         | new ServerNcmpException(sampleErrorMessage, sampleErrorDetails)  || null                           | sampleErrorMessage          | INTERNAL_SERVER_ERROR
-            'NCMP-client'         | new DmiRequestException(sampleErrorMessage, sampleErrorDetails)  || null                           | sampleErrorMessage          | BAD_REQUEST
-            'DataNode Validation' | new DataNodeNotFoundException('myDataspaceName', 'myAnchorName') || null                           | 'DataNode not found'        | NOT_FOUND
-            'other'               | new IllegalStateException(sampleErrorMessage)                    || null                           | sampleErrorMessage          | INTERNAL_SERVER_ERROR
-            'Data Node Not Found' | new DataNodeNotFoundException('myDataspaceName', 'myAnchorName') || 'DataNode not found'           | 'DataNode not found'        | NOT_FOUND
-            'Existing entry'      | new AlreadyDefinedException('name',null)                         || 'name already exists'          | 'Already defined exception' | CONFLICT
-            'Existing entries'    | AlreadyDefinedException.forDataNodes(['A', 'B'], 'myAnchorName') || '2 data node(s) already exist' | 'Already defined exception' | CONFLICT
+            scenario              | exception                                                        || expectedErrorCode     | expectedErrorMessage        | expectedErrorDetails
+            'CPS'                 | new CpsException(sampleErrorMessage, sampleErrorDetails)         || INTERNAL_SERVER_ERROR | sampleErrorMessage          | sampleErrorDetails
+            'NCMP-server'         | new ServerNcmpException(sampleErrorMessage, sampleErrorDetails)  || INTERNAL_SERVER_ERROR | sampleErrorMessage          | null
+            'NCMP-client'         | new DmiRequestException(sampleErrorMessage, sampleErrorDetails)  || BAD_REQUEST           | sampleErrorMessage          | null
+            'DataNode Validation' | new DataNodeNotFoundException('myDataspaceName', 'myAnchorName') || NOT_FOUND             | 'DataNode not found'        | null
+            'other'               | new IllegalStateException(sampleErrorMessage)                    || INTERNAL_SERVER_ERROR | sampleErrorMessage          | null
+            'Data Node Not Found' | new DataNodeNotFoundException('myDataspaceName', 'myAnchorName') || NOT_FOUND             | 'DataNode not found'        | 'DataNode not found'
+            'Existing entry'      | new AlreadyDefinedException('name',null)                         || CONFLICT              | 'Already defined exception' | 'name already exists'
+            'Existing entries'    | AlreadyDefinedException.forDataNodes(['A', 'B'], 'myAnchorName') || CONFLICT              | 'Already defined exception' | '2 data node(s) already exist'
+            'Operation too large' | new PayloadTooLargeException(sampleErrorMessage)                 || PAYLOAD_TOO_LARGE     | sampleErrorMessage          | 'Check logs'
     }
 
     def 'Post request with exception returns correct HTTP Status.'() {
index 359519c..f5a2cab 100644 (file)
@@ -1,5 +1,5 @@
 #  ============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.
@@ -17,4 +17,5 @@
 #  ============LICENSE_END=========================================================
 
 config.stopBubbling = true
-lombok.addLombokGeneratedAnnotation = true
\ No newline at end of file
+lombok.addLombokGeneratedAnnotation = true
+lombok.copyableAnnotations += org.springframework.beans.factory.annotation.Qualifier
\ No newline at end of file
index 4feb676..1510be9 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   ============LICENSE_START=======================================================
-  Copyright (C) 2021-2023 Nordix Foundation
+  Copyright (C) 2021-2024 Nordix Foundation
   Modifications Copyright (C) 2021 Pantheon.tech
   Modifications Copyright (C) 2022 Bell Canada
   ================================================================================
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.4.7-SNAPSHOT</version>
+        <version>3.4.8-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>
             <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.junit.vintage</groupId>
-                    <artifactId>junit-vintage-engine</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.spockframework</groupId>
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/DataJobService.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/DataJobService.java
new file mode 100644 (file)
index 0000000..6122afc
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ *  ============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=========================================================
+ */
+
+package org.onap.cps.ncmp.api;
+
+import org.onap.cps.ncmp.api.models.datajob.DataJobMetadata;
+import org.onap.cps.ncmp.api.models.datajob.DataJobReadRequest;
+import org.onap.cps.ncmp.api.models.datajob.DataJobWriteRequest;
+
+public interface DataJobService {
+
+    /**
+     * process read data job operations.
+     *
+     * @param dataJobId          Unique identifier of the job within the request
+     * @param dataJobMetadata    data job request headers
+     * @param dataJobReadRequest read data job request
+     */
+    void readDataJob(String dataJobId, DataJobMetadata dataJobMetadata, DataJobReadRequest dataJobReadRequest);
+
+    /**
+     * process write data job operations.
+     *
+     * @param dataJobId           Unique identifier of the job within the request
+     * @param dataJobMetadata     data job request headers
+     * @param dataJobWriteRequest write data job request
+     */
+    void writeDataJob(String dataJobId, DataJobMetadata dataJobMetadata, DataJobWriteRequest dataJobWriteRequest);
+}
\ No newline at end of file
index 462679e..bdc3dee 100644 (file)
@@ -37,7 +37,8 @@ public enum NcmpResponseStatus {
     UNKNOWN_ERROR("108", "Unknown error"),
     CM_HANDLE_ALREADY_EXIST("109", "cm-handle already exists"),
     CM_HANDLE_INVALID_ID("110", "cm-handle has an invalid character(s) in id"),
-    ALTERNATE_ID_ALREADY_ASSOCIATED("111", "alternate id already associated");
+    ALTERNATE_ID_ALREADY_ASSOCIATED("111", "alternate id already associated"),
+    MESSAGE_TOO_LARGE("112", "message too large");
 
     private final String code;
     private final String message;
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/DataJobServiceImpl.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/DataJobServiceImpl.java
new file mode 100644 (file)
index 0000000..b4377b8
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ *  ============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=========================================================
+ */
+
+package org.onap.cps.ncmp.api.impl;
+
+import lombok.extern.slf4j.Slf4j;
+import org.onap.cps.ncmp.api.DataJobService;
+import org.onap.cps.ncmp.api.models.datajob.DataJobMetadata;
+import org.onap.cps.ncmp.api.models.datajob.DataJobReadRequest;
+import org.onap.cps.ncmp.api.models.datajob.DataJobWriteRequest;
+
+@Slf4j
+public class DataJobServiceImpl implements DataJobService {
+
+    @Override
+    public void readDataJob(final String dataJobId, final DataJobMetadata dataJobMetadata,
+                            final DataJobReadRequest dataJobReadRequest) {
+        log.info("data job id for read operation is: {}", dataJobId);
+    }
+
+    @Override
+    public void writeDataJob(final String dataJobId, final DataJobMetadata dataJobMetadata,
+                             final DataJobWriteRequest dataJobWriteRequest) {
+        log.info("data job id for write operation is: {}", dataJobId);
+    }
+}
index c15df9c..6aa0976 100755 (executable)
@@ -51,6 +51,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.onap.cps.api.CpsDataService;
 import org.onap.cps.ncmp.api.NetworkCmProxyCmHandleQueryService;
 import org.onap.cps.ncmp.api.NetworkCmProxyDataService;
+import org.onap.cps.ncmp.api.impl.config.embeddedcache.TrustLevelCacheConfig;
 import org.onap.cps.ncmp.api.impl.events.lcm.LcmEventsCmHandleStateHandler;
 import org.onap.cps.ncmp.api.impl.inventory.CmHandleQueries;
 import org.onap.cps.ncmp.api.impl.inventory.CmHandleState;
@@ -85,6 +86,7 @@ import org.onap.cps.spi.exceptions.DataValidationException;
 import org.onap.cps.spi.model.ModuleDefinition;
 import org.onap.cps.spi.model.ModuleReference;
 import org.onap.cps.utils.JsonObjectMapper;
+import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Service;
 
@@ -103,7 +105,10 @@ public class NetworkCmProxyDataServiceImpl implements NetworkCmProxyDataService
     private final LcmEventsCmHandleStateHandler lcmEventsCmHandleStateHandler;
     private final CpsDataService cpsDataService;
     private final IMap<String, Object> moduleSyncStartedOnCmHandles;
+
+    @Qualifier(TrustLevelCacheConfig.TRUST_LEVEL_PER_DMI_PLUGIN)
     private final Map<String, TrustLevel> trustLevelPerDmiPlugin;
+
     private final TrustLevelManager trustLevelManager;
     private final AlternateIdChecker alternateIdChecker;
 
index 171db52..440cd3d 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.
@@ -30,6 +30,9 @@ import org.springframework.context.annotation.Configuration;
 @Configuration
 public class TrustLevelCacheConfig extends HazelcastCacheConfig {
 
+    public static final String TRUST_LEVEL_PER_DMI_PLUGIN = "trustLevelPerDmiPlugin";
+
+    public static final String TRUST_LEVEL_PER_CM_HANDLE = "trustLevelPerCmHandle";
     private static final MapConfig trustLevelPerCmHandleCacheConfig =
             createMapConfig("trustLevelPerCmHandleCacheConfig");
 
@@ -41,10 +44,10 @@ public class TrustLevelCacheConfig extends HazelcastCacheConfig {
      *
      * @return configured map of cm handle name as keys to trust-level for values.
      */
-    @Bean
+    @Bean(TRUST_LEVEL_PER_CM_HANDLE)
     public Map<String, TrustLevel> trustLevelPerCmHandle() {
         return createHazelcastInstance("hazelcastInstanceTrustLevelPerCmHandleMap",
-                trustLevelPerCmHandleCacheConfig).getMap("trustLevelPerCmHandle");
+                trustLevelPerCmHandleCacheConfig).getMap(TRUST_LEVEL_PER_CM_HANDLE);
     }
 
     /**
@@ -52,10 +55,10 @@ public class TrustLevelCacheConfig extends HazelcastCacheConfig {
      *
      * @return configured map of dmi-plugin name as keys to trust-level for values.
      */
-    @Bean
+    @Bean(TRUST_LEVEL_PER_DMI_PLUGIN)
     public Map<String, TrustLevel> trustLevelPerDmiPlugin() {
         return createHazelcastInstance("hazelcastInstanceTrustLevelPerDmiPluginMap",
-                trustLevelPerDmiPluginCacheConfig).getMap("trustLevelPerDmiPlugin");
+                trustLevelPerDmiPluginCacheConfig).getMap(TRUST_LEVEL_PER_DMI_PLUGIN);
     }
 
 }
index 4f2674a..167df5a 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.
@@ -26,6 +26,7 @@ import java.util.Map;
 import lombok.RequiredArgsConstructor;
 import org.apache.kafka.clients.producer.ProducerConfig;
 import org.springframework.boot.autoconfigure.kafka.KafkaProperties;
+import org.springframework.boot.ssl.SslBundles;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Primary;
@@ -51,6 +52,8 @@ public class KafkaConfig<T> {
 
     private final KafkaProperties kafkaProperties;
 
+    private static final SslBundles NO_SSL = null;
+
     /**
      * This sets the strategy for creating legacy Kafka producer instance from kafka properties defined into
      * application.yml and replaces value-serializer by JsonSerializer.
@@ -59,7 +62,7 @@ public class KafkaConfig<T> {
      */
     @Bean
     public ProducerFactory<String, T> legacyEventProducerFactory() {
-        final Map<String, Object> producerConfigProperties = kafkaProperties.buildProducerProperties();
+        final Map<String, Object> producerConfigProperties = kafkaProperties.buildProducerProperties(NO_SSL);
         producerConfigProperties.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, JsonSerializer.class);
         return new DefaultKafkaProducerFactory<>(producerConfigProperties);
     }
@@ -72,7 +75,7 @@ public class KafkaConfig<T> {
      */
     @Bean
     public ConsumerFactory<String, T> legacyEventConsumerFactory() {
-        final Map<String, Object> consumerConfigProperties = kafkaProperties.buildConsumerProperties();
+        final Map<String, Object> consumerConfigProperties = kafkaProperties.buildConsumerProperties(NO_SSL);
         consumerConfigProperties.put("spring.deserializer.value.delegate.class", JsonDeserializer.class);
         return new DefaultKafkaConsumerFactory<>(consumerConfigProperties);
     }
@@ -112,7 +115,7 @@ public class KafkaConfig<T> {
      */
     @Bean
     public ProducerFactory<String, CloudEvent> cloudEventProducerFactory() {
-        final Map<String, Object> producerConfigProperties = kafkaProperties.buildProducerProperties();
+        final Map<String, Object> producerConfigProperties = kafkaProperties.buildProducerProperties(NO_SSL);
         return new DefaultKafkaProducerFactory<>(producerConfigProperties);
     }
 
@@ -124,7 +127,7 @@ public class KafkaConfig<T> {
      */
     @Bean
     public ConsumerFactory<String, CloudEvent> cloudEventConsumerFactory() {
-        final Map<String, Object> consumerConfigProperties = kafkaProperties.buildConsumerProperties();
+        final Map<String, Object> consumerConfigProperties = kafkaProperties.buildConsumerProperties(NO_SSL);
         return new DefaultKafkaConsumerFactory<>(consumerConfigProperties);
     }
 
@@ -136,7 +139,8 @@ public class KafkaConfig<T> {
      */
     @Bean
     public KafkaTemplate<String, CloudEvent> cloudEventKafkaTemplate() {
-        final KafkaTemplate<String, CloudEvent> kafkaTemplate = new KafkaTemplate<>(cloudEventProducerFactory());
+        final KafkaTemplate<String, CloudEvent> kafkaTemplate =
+            new KafkaTemplate<>(cloudEventProducerFactory());
         kafkaTemplate.setConsumerFactory(cloudEventConsumerFactory());
         return kafkaTemplate;
     }
index 21468c3..76ee08e 100644 (file)
@@ -23,10 +23,18 @@ package org.onap.cps.ncmp.api.impl.events.cmsubscription;
 import io.cloudevents.CloudEvent;
 import io.cloudevents.core.builder.CloudEventBuilder;
 import java.net.URI;
+import java.util.Map;
 import java.util.UUID;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.TimeUnit;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.onap.cps.events.EventsPublisher;
+import org.onap.cps.ncmp.api.impl.events.cmsubscription.mapper.CmNotificationSubscriptionNcmpOutEventMapper;
+import org.onap.cps.ncmp.api.impl.events.cmsubscription.model.DmiCmNotificationSubscriptionDetails;
 import org.onap.cps.ncmp.events.cmsubscription_merge1_0_0.ncmp_to_client.CmNotificationSubscriptionNcmpOutEvent;
 import org.onap.cps.utils.JsonObjectMapper;
 import org.springframework.beans.factory.annotation.Value;
@@ -39,37 +47,87 @@ import org.springframework.stereotype.Component;
 @ConditionalOnProperty(name = "notification.enabled", havingValue = "true", matchIfMissing = true)
 public class CmNotificationSubscriptionNcmpOutEventProducer {
 
-    private final EventsPublisher<CloudEvent> eventsPublisher;
-    private final JsonObjectMapper jsonObjectMapper;
-
     @Value("${app.ncmp.avc.subscription-outcome-topic}")
     private String cmNotificationSubscriptionNcmpOutEventTopic;
 
+    @Value("${ncmp.timers.subscription-forwarding.dmi-response-timeout-ms}")
+    private Integer cmNotificationSubscriptionDmiOutEventTimeoutInMs;
+
+    private final EventsPublisher<CloudEvent> eventsPublisher;
+    private final JsonObjectMapper jsonObjectMapper;
+    private final Map<String, Map<String, DmiCmNotificationSubscriptionDetails>> cmNotificationSubscriptionCache;
+    private final CmNotificationSubscriptionNcmpOutEventMapper cmNotificationSubscriptionNcmpOutEventMapper;
+    private final ScheduledExecutorService scheduledExecutorService = Executors.newSingleThreadScheduledExecutor();
+    private static final Map<String, ScheduledFuture<?>> scheduledTasksPerSubscriptionId = new ConcurrentHashMap<>();
+
     /**
      * Publish the event to the client who requested the subscription with key as subscription id and event is Cloud
      * Event compliant.
      *
      * @param subscriptionId                         Cm Subscription Id
      * @param eventType                              Type of event
-     * @param cmNotificationSubscriptionNcmpOutEvent Cm Notification Subscription Event for the client
+     * @param cmNotificationSubscriptionNcmpOutEvent Cm Notification Subscription Event for the
+     *                                               client
+     * @param isScheduledEvent                       Determines if the event is to be scheduled
+     *                                               or published now
      */
     public void publishCmNotificationSubscriptionNcmpOutEvent(final String subscriptionId, final String eventType,
-            final CmNotificationSubscriptionNcmpOutEvent cmNotificationSubscriptionNcmpOutEvent) {
+            final CmNotificationSubscriptionNcmpOutEvent cmNotificationSubscriptionNcmpOutEvent,
+            final boolean isScheduledEvent) {
 
-        eventsPublisher.publishCloudEvent(cmNotificationSubscriptionNcmpOutEventTopic, subscriptionId,
-                buildAndGetCmNotificationNcmpOutEventAsCloudEvent(subscriptionId, eventType,
-                        cmNotificationSubscriptionNcmpOutEvent));
+        if (isScheduledEvent && !scheduledTasksPerSubscriptionId.containsKey(subscriptionId)) {
+            final ScheduledFuture<?> scheduledFuture =
+                    scheduleAndPublishCmNotificationSubscriptionNcmpOutEvent(subscriptionId, eventType);
+            scheduledTasksPerSubscriptionId.putIfAbsent(subscriptionId, scheduledFuture);
+            log.debug("Scheduled the CmNotificationSubscriptionEvent for subscriptionId : {}", subscriptionId);
+        } else {
+            cancelScheduledTaskForSubscriptionId(subscriptionId);
+            publishCmNotificationSubscriptionNcmpOutEventNow(subscriptionId, eventType,
+                    cmNotificationSubscriptionNcmpOutEvent);
+            log.info("Published CmNotificationSubscriptionEvent on demand for subscriptionId : {}", subscriptionId);
+        }
+
+    }
+
+    private ScheduledFuture<?> scheduleAndPublishCmNotificationSubscriptionNcmpOutEvent(final String subscriptionId,
+            final String eventType) {
+        final CmNotificationSubscriptionNcmpOutEventPublishingTask
+                cmNotificationSubscriptionNcmpOutEventPublishingTask =
+                new CmNotificationSubscriptionNcmpOutEventPublishingTask(cmNotificationSubscriptionNcmpOutEventTopic,
+                        subscriptionId, eventType, eventsPublisher, jsonObjectMapper, cmNotificationSubscriptionCache,
+                        cmNotificationSubscriptionNcmpOutEventMapper);
+        return scheduledExecutorService.schedule(cmNotificationSubscriptionNcmpOutEventPublishingTask,
+                cmNotificationSubscriptionDmiOutEventTimeoutInMs, TimeUnit.MILLISECONDS);
+    }
+
+    private void cancelScheduledTaskForSubscriptionId(final String subscriptionId) {
+
+        final ScheduledFuture<?> scheduledFuture = scheduledTasksPerSubscriptionId.get(subscriptionId);
+        if (scheduledFuture != null) {
+            scheduledFuture.cancel(true);
+            scheduledTasksPerSubscriptionId.remove(subscriptionId);
+        }
 
     }
 
-    private CloudEvent buildAndGetCmNotificationNcmpOutEventAsCloudEvent(final String subscriptionId,
-            final String eventType,
+
+    private void publishCmNotificationSubscriptionNcmpOutEventNow(final String subscriptionId, final String eventType,
+            final CmNotificationSubscriptionNcmpOutEvent cmNotificationSubscriptionNcmpOutEvent) {
+        final CloudEvent cmNotificationSubscriptionNcmpOutEventAsCloudEvent =
+                buildAndGetCmNotificationNcmpOutEventAsCloudEvent(jsonObjectMapper, subscriptionId, eventType,
+                        cmNotificationSubscriptionNcmpOutEvent);
+        eventsPublisher.publishCloudEvent(cmNotificationSubscriptionNcmpOutEventTopic, subscriptionId,
+                cmNotificationSubscriptionNcmpOutEventAsCloudEvent);
+    }
+
+    protected static CloudEvent buildAndGetCmNotificationNcmpOutEventAsCloudEvent(
+            final JsonObjectMapper jsonObjectMapper, final String subscriptionId, final String eventType,
             final CmNotificationSubscriptionNcmpOutEvent cmNotificationSubscriptionNcmpOutEvent) {
 
         return CloudEventBuilder.v1().withId(UUID.randomUUID().toString()).withType(eventType)
-                .withSource(URI.create("NCMP")).withDataSchema(URI.create("org.onap.ncmp.cm.subscription:1.0.0"))
-                .withExtension("correlationid", subscriptionId)
-                .withData(jsonObjectMapper.asJsonBytes(cmNotificationSubscriptionNcmpOutEvent)).build();
+                       .withSource(URI.create("NCMP")).withDataSchema(URI.create("org.onap.ncmp.cm.subscription:1.0.0"))
+                       .withExtension("correlationid", subscriptionId)
+                       .withData(jsonObjectMapper.asJsonBytes(cmNotificationSubscriptionNcmpOutEvent)).build();
     }
 
 }
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/cmsubscription/CmNotificationSubscriptionNcmpOutEventPublishingTask.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/cmsubscription/CmNotificationSubscriptionNcmpOutEventPublishingTask.java
new file mode 100644 (file)
index 0000000..f7ea4a4
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ *  ============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=========================================================
+ */
+
+package org.onap.cps.ncmp.api.impl.events.cmsubscription;
+
+import static org.onap.cps.ncmp.api.impl.events.cmsubscription.CmNotificationSubscriptionNcmpOutEventProducer.buildAndGetCmNotificationNcmpOutEventAsCloudEvent;
+
+import io.cloudevents.CloudEvent;
+import java.util.Map;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.onap.cps.events.EventsPublisher;
+import org.onap.cps.ncmp.api.impl.events.cmsubscription.mapper.CmNotificationSubscriptionNcmpOutEventMapper;
+import org.onap.cps.ncmp.api.impl.events.cmsubscription.model.DmiCmNotificationSubscriptionDetails;
+import org.onap.cps.ncmp.events.cmsubscription_merge1_0_0.ncmp_to_client.CmNotificationSubscriptionNcmpOutEvent;
+import org.onap.cps.utils.JsonObjectMapper;
+
+@Slf4j
+@RequiredArgsConstructor
+public class CmNotificationSubscriptionNcmpOutEventPublishingTask implements Runnable {
+
+
+    private final String topicName;
+    private final String subscriptionId;
+    private final String eventType;
+    private final EventsPublisher<CloudEvent> eventsPublisher;
+    private final JsonObjectMapper jsonObjectMapper;
+    private final Map<String, Map<String, DmiCmNotificationSubscriptionDetails>> cmNotificationSubscriptionCache;
+    private final CmNotificationSubscriptionNcmpOutEventMapper cmNotificationSubscriptionNcmpOutEventMapper;
+
+    /**
+     * Delegating the responsibility of publishing CmNotificationSubscriptionNcmpOutEvent as a separate task which will
+     * be called after a specified delay.
+     */
+    @Override
+    public void run() {
+        final Map<String, DmiCmNotificationSubscriptionDetails> dmiCmNotificationSubscriptionDetailsMap =
+                cmNotificationSubscriptionCache.get(subscriptionId);
+        final CmNotificationSubscriptionNcmpOutEvent cmNotificationSubscriptionNcmpOutEvent =
+                cmNotificationSubscriptionNcmpOutEventMapper.toCmNotificationSubscriptionNcmpOutEvent(subscriptionId,
+                        dmiCmNotificationSubscriptionDetailsMap);
+        eventsPublisher.publishCloudEvent(topicName, subscriptionId,
+                buildAndGetCmNotificationNcmpOutEventAsCloudEvent(jsonObjectMapper, subscriptionId, eventType,
+                        cmNotificationSubscriptionNcmpOutEvent));
+    }
+
+}
index 5eca5e8..2efd321 100644 (file)
@@ -20,7 +20,6 @@
 
 package org.onap.cps.ncmp.api.impl.events.cmsubscription.service;
 
-import static org.onap.cps.ncmp.api.impl.operations.DatastoreType.PASSTHROUGH_RUNNING;
 import static org.onap.cps.spi.FetchDescendantsOption.OMIT_DESCENDANTS;
 
 import java.io.Serializable;
@@ -109,14 +108,8 @@ public class CmNotificationSubscriptionPersistenceServiceImpl implements CmNotif
 
     private void addNewSubscriptionViaDatastore(final DatastoreType datastoreType, final String cmHandleId,
                                                 final String xpath, final String newSubscriptionId) {
-        final String parentXpathFormat = "/datastores/datastore[@name='%s']/cm-handles";
-        String parentXpath = "";
-        if (datastoreType == PASSTHROUGH_RUNNING) {
-            parentXpath = parentXpathFormat.formatted("ncmp-datastore:passthrough-running");
-        } else {
-            parentXpath = parentXpathFormat.formatted("ncmp-datastore:passthrough-operational");
-        }
-
+        final String parentXpath = "/datastores/datastore[@name='%s']/cm-handles"
+                .formatted(datastoreType.getDatastoreName());
         final String updatedJson = String.format("{\"cm-handle\":[{\"id\":\"%s\",\"filters\":{\"filter\":"
                 + "[{\"xpath\":\"%s\",\"subscriptionIds\":[\"%s\"]}]}}]}", cmHandleId, xpath, newSubscriptionId);
         cpsDataService.saveData(NCMP_DATASPACE_NAME, SUBSCRIPTION_ANCHOR_NAME, parentXpath, updatedJson,
index 2d7ad69..6cffb4d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  ============LICENSE_START=======================================================
- *  Copyright (C) 2022-2023 Nordix Foundation
+ *  Copyright (C) 2022-2024 Nordix Foundation
  *  Modifications Copyright (C) 2023 TechMahindra Ltd.
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
@@ -34,12 +34,14 @@ import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
 import lombok.RequiredArgsConstructor;
+import org.onap.cps.ncmp.api.impl.config.embeddedcache.TrustLevelCacheConfig;
 import org.onap.cps.ncmp.api.impl.inventory.enums.PropertyType;
 import org.onap.cps.ncmp.api.impl.trustlevel.TrustLevel;
 import org.onap.cps.spi.CpsDataPersistenceService;
 import org.onap.cps.spi.FetchDescendantsOption;
 import org.onap.cps.spi.model.DataNode;
 import org.onap.cps.spi.utils.CpsValidator;
+import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.stereotype.Component;
 
 @RequiredArgsConstructor
@@ -49,8 +51,13 @@ public class CmHandleQueriesImpl implements CmHandleQueries {
     private static final String DESCENDANT_PATH = "//";
     private static final String ANCESTOR_CM_HANDLES = "/ancestor::cm-handles";
     private final CpsDataPersistenceService cpsDataPersistenceService;
+
+    @Qualifier(TrustLevelCacheConfig.TRUST_LEVEL_PER_DMI_PLUGIN)
     private final Map<String, TrustLevel> trustLevelPerDmiPlugin;
+
+    @Qualifier(TrustLevelCacheConfig.TRUST_LEVEL_PER_CM_HANDLE)
     private final Map<String, TrustLevel> trustLevelPerCmHandle;
+
     private final CpsValidator cpsValidator;
 
     @Override
index f99fe86..3a281d7 100644 (file)
@@ -67,7 +67,8 @@ public class DmiModelOperations extends DmiOperations {
      * @return module references
      */
     public List<ModuleReference> getModuleReferences(final YangModelCmHandle yangModelCmHandle) {
-        final DmiRequestBody dmiRequestBody = DmiRequestBody.builder().build();
+        final DmiRequestBody dmiRequestBody = DmiRequestBody.builder()
+                .moduleSetTag(yangModelCmHandle.getModuleSetTag()).build();
         dmiRequestBody.asDmiProperties(yangModelCmHandle.getDmiProperties());
         final ResponseEntity<Object> dmiFetchModulesResponseEntity = getResourceFromDmiWithJsonData(
             yangModelCmHandle.resolveDmiServiceName(MODEL),
index 6613d3c..f1032f8 100644 (file)
@@ -33,7 +33,7 @@ import org.onap.cps.ncmp.api.impl.yangmodels.YangModelCmHandle;
 @JsonInclude(JsonInclude.Include.NON_NULL)
 @Getter
 @Builder
-@JsonPropertyOrder({"operation", "dataType", "data", "cmHandleProperties", "requestId"})
+@JsonPropertyOrder({"operation", "dataType", "data", "cmHandleProperties", "requestId", "moduleSetTag"})
 public class DmiRequestBody {
 
     @JsonProperty("operation")
@@ -43,6 +43,7 @@ public class DmiRequestBody {
     @JsonProperty("cmHandleProperties")
     private Map<String, String> dmiProperties;
     private String requestId;
+    private String moduleSetTag;
 
     /**
      * Set DMI Properties by converting a list of YangModelCmHandle.Property objects.
index 82c7204..9d65a66 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.
@@ -24,10 +24,12 @@ import java.util.Collection;
 import java.util.Map;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.onap.cps.ncmp.api.impl.config.embeddedcache.TrustLevelCacheConfig;
 import org.onap.cps.ncmp.api.impl.events.avc.ncmptoclient.AvcEventPublisher;
 import org.onap.cps.ncmp.api.impl.inventory.InventoryPersistence;
 import org.onap.cps.ncmp.api.impl.operations.RequiredDmiService;
 import org.onap.cps.ncmp.api.impl.yangmodels.YangModelCmHandle;
+import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.stereotype.Service;
 
 @Slf4j
@@ -35,8 +37,12 @@ import org.springframework.stereotype.Service;
 @RequiredArgsConstructor
 public class TrustLevelManager {
 
+    @Qualifier(TrustLevelCacheConfig.TRUST_LEVEL_PER_CM_HANDLE)
     private final Map<String, TrustLevel> trustLevelPerCmHandle;
+
+    @Qualifier(TrustLevelCacheConfig.TRUST_LEVEL_PER_DMI_PLUGIN)
     private final Map<String, TrustLevel> trustLevelPerDmiPlugin;
+
     private final InventoryPersistence inventoryPersistence;
     private final AvcEventPublisher avcEventPublisher;
     private static final String AVC_CHANGED_ATTRIBUTE_NAME = "trustLevel";
index 72dc295..d6d6fd6 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.
@@ -26,8 +26,10 @@ import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.onap.cps.ncmp.api.NetworkCmProxyDataService;
 import org.onap.cps.ncmp.api.impl.client.DmiRestClient;
+import org.onap.cps.ncmp.api.impl.config.embeddedcache.TrustLevelCacheConfig;
 import org.onap.cps.ncmp.api.impl.trustlevel.TrustLevel;
 import org.onap.cps.ncmp.api.impl.trustlevel.TrustLevelManager;
+import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Service;
 
@@ -39,6 +41,8 @@ public class DmiPluginWatchDog {
     private final DmiRestClient dmiRestClient;
     private final NetworkCmProxyDataService networkCmProxyDataService;
     private final TrustLevelManager trustLevelManager;
+
+    @Qualifier(TrustLevelCacheConfig.TRUST_LEVEL_PER_DMI_PLUGIN)
     private final Map<String, TrustLevel> trustLevelPerDmiPlugin;
 
     /**
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/models/datajob/DataJobMetadata.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/models/datajob/DataJobMetadata.java
new file mode 100644 (file)
index 0000000..dc8037b
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ *  ============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=========================================================
+ */
+
+package org.onap.cps.ncmp.api.models.datajob;
+
+/**
+ * Metadata of read/write data job request.
+ *
+ * @param destination     The destination of the data job results.
+ * @param dataAcceptType  Define the data response accept type.
+ *                        e.g. "application/vnd.3gpp.object-tree-hierarchical+json",
+ *                        "application/vnd.3gpp.object-tree-flat+json" etc.
+ * @param dataContentType Define the data request content type.
+ *                        e.g. "application/3gpp-json-patch+json" etc.
+ */
+public record DataJobMetadata(String destination, String dataAcceptType, String dataContentType) {}
\ No newline at end of file
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/models/datajob/DataJobReadRequest.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/models/datajob/DataJobReadRequest.java
new file mode 100644 (file)
index 0000000..f861c3d
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ *  ============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=========================================================
+ */
+
+package org.onap.cps.ncmp.api.models.datajob;
+
+import java.util.List;
+
+/**
+ * Describes the read data job operation to be forwarded to dmi.
+ *
+ * @param data List of read operations to be executed.
+ */
+public record DataJobReadRequest(List<ReadOperation> data) {}
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/models/datajob/DataJobWriteRequest.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/models/datajob/DataJobWriteRequest.java
new file mode 100644 (file)
index 0000000..254e198
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ *  ============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=========================================================
+ */
+
+package org.onap.cps.ncmp.api.models.datajob;
+
+import java.util.List;
+
+/**
+ * Describes the write data job operation to be forwarded to dmi.
+ *
+ * @param data List of write operations to be executed.
+ */
+public record DataJobWriteRequest(List<WriteOperation> data) {}
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/models/datajob/ReadOperation.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/models/datajob/ReadOperation.java
new file mode 100644 (file)
index 0000000..d2b0738
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ *  ============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=========================================================
+ */
+
+package org.onap.cps.ncmp.api.models.datajob;
+
+import java.util.List;
+
+/**
+ * Holds information of read data job operation.
+ * based on <a href="https://www.etsi.org/deliver/etsi_ts/128500_128599/128532/16.04.00_60/ts_128532v160400p.pdf">ETSI TS 128 532 V16.4.0 (2020-08)</a>
+ *
+ * @param path        Identifier of a managed object (MO) on a network element. Defines the resource on which operation
+ *                    is executed. Url Encoded Fully Distinguished Name (FDN).
+ * @param op          Describes the operation to execute. The value can only be "read".
+ * @param operationId Unique identifier of the operation within the request.
+ * @param attributes  Specifies the attributes of the resources that are returned.
+ * @param fields      Specifies the attribute fields of the resources that are returned. This should be used if an
+ *                    attribute is a struct and only a subset of its fields should be returned.
+ * @param filter      This filters the managed Objects.
+ * @param scopeType   This selects MOs depending on relationships with Base Managed Object.
+ *                    e.g. "BASE_ONLY", "BASE_ALL", "BASE_NTH_LEVEL" etc.
+ * @param scopeLevel  Defines the level for objects to be returned for certain scopeTypes. The base level is zero.
+ */
+public record ReadOperation(String path, String op, String operationId, List<String> attributes, List<String> fields,
+                            String filter, String scopeType, int scopeLevel) {
+}
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/models/datajob/WriteOperation.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/models/datajob/WriteOperation.java
new file mode 100644 (file)
index 0000000..c2f6504
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ *  ============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=========================================================
+ */
+
+package org.onap.cps.ncmp.api.models.datajob;
+
+/**
+ * Holds information of write data job operation.
+ * based on <a href="https://www.etsi.org/deliver/etsi_ts/128500_128599/128532/16.04.00_60/ts_128532v160400p.pdf">ETSI TS 128 532 V16.4.0 (2020-08)</a>
+ *
+ * @param path        Identifier of a managed object (MO) on a network element. Defines the resource on which operation
+ *                    is executed. Typically, is Fully Distinguished Name (FDN).
+ * @param op          Describes the operation to execute.  The value can be as below:
+ *                    e.g. "add", "replace", "remove", "action" etc.
+ * @param operationId Unique identifier of the operation within the request.
+ * @param value       The value to be written depends on the type of operation.
+ */
+public record WriteOperation(String path, String op, String operationId, Object value) {}
index a3ebec3..4cc8cda 100644 (file)
@@ -70,24 +70,6 @@ abstract class AbstractModelLoader implements ModelLoader {
         }
     }
 
-    void waitUntilDataspaceIsAvailable(final String dataspaceName) {
-        log.info("Model Loader start-up, waiting for database to be ready");
-        int attemptCount = 0;
-        while (cpsDataspaceService.getDataspace(dataspaceName) == null) {
-            if (attemptCount < maximumAttemptCount) {
-                try {
-                    Thread.sleep(attemptCount * retryTimeMs);
-                    log.info("Retrieving dataspace {} ... {} attempt(s) ", dataspaceName, ++attemptCount);
-                } catch (final InterruptedException e) {
-                    Thread.currentThread().interrupt();
-                }
-            } else {
-                throw new NcmpStartUpException("Retrieval of NCMP dataspace failed",
-                    dataspaceName + " not available (yet)");
-            }
-        }
-    }
-
     void createSchemaSet(final String dataspaceName, final String schemaSetName, final String... resourceNames) {
         try {
             final Map<String, String> yangResourcesContentMap = createYangResourcesToContentMap(resourceNames);
@@ -100,6 +82,17 @@ abstract class AbstractModelLoader implements ModelLoader {
         }
     }
 
+    void createDataspace(final String dataspaceName) {
+        try {
+            cpsDataspaceService.createDataspace(dataspaceName);
+        } catch (final AlreadyDefinedException alreadyDefinedException) {
+            log.debug("Dataspace already exists");
+        } catch (final Exception exception) {
+            log.error("Creating dataspace failed: {} ", exception.getMessage());
+            throw new NcmpStartUpException("Creating dataspace failed", exception.getMessage());
+        }
+    }
+
     void deleteUnusedSchemaSets(final String dataspaceName, final String... schemaSetNames) {
         for (final String schemaSetName : schemaSetNames) {
             try {
index 4c31719..a0b7bd5 100644 (file)
@@ -51,12 +51,12 @@ public class CmDataSubscriptionModelLoader extends AbstractModelLoader {
 
     @Override
     public void onboardOrUpgradeModel() {
-        waitUntilDataspaceIsAvailable(NCMP_DATASPACE_NAME);
         onboardSubscriptionModels();
         log.info("Subscription Models onboarded successfully");
     }
 
     private void onboardSubscriptionModels() {
+        createDataspace(NCMP_DATASPACE_NAME);
         createSchemaSet(NCMP_DATASPACE_NAME, SCHEMASET_NAME, MODEL_FILENAME);
         createAnchor(NCMP_DATASPACE_NAME, SCHEMASET_NAME, ANCHOR_NAME);
         createTopLevelDataNode(NCMP_DATASPACE_NAME, ANCHOR_NAME, REGISTRY_DATANODE_NAME);
index d0d63ab..7c25953 100644 (file)
@@ -22,6 +22,7 @@ package org.onap.cps.ncmp.init;
 
 import static org.onap.cps.ncmp.api.impl.ncmppersistence.NcmpPersistence.NCMP_DATASPACE_NAME;
 import static org.onap.cps.ncmp.api.impl.ncmppersistence.NcmpPersistence.NCMP_DMI_REGISTRY_ANCHOR;
+import static org.onap.cps.ncmp.api.impl.ncmppersistence.NcmpPersistence.NFP_OPERATIONAL_DATASTORE_DATASPACE_NAME;
 
 import lombok.extern.slf4j.Slf4j;
 import org.onap.cps.api.CpsAnchorService;
@@ -33,9 +34,9 @@ import org.springframework.stereotype.Service;
 @Slf4j
 @Service
 public class InventoryModelLoader extends AbstractModelLoader {
-
     private static final String NEW_MODEL_FILE_NAME = "dmi-registry@2024-02-23.yang";
     private static final String NEW_SCHEMA_SET_NAME = "dmi-registry-2024-02-23";
+    private static final String REGISTRY_DATANODE_NAME = "dmi-registry";
 
     public InventoryModelLoader(final CpsDataspaceService cpsDataspaceService,
                                 final CpsModuleService cpsModuleService,
@@ -46,20 +47,24 @@ public class InventoryModelLoader extends AbstractModelLoader {
 
     @Override
     public void onboardOrUpgradeModel() {
-        waitUntilDataspaceIsAvailable(NCMP_DATASPACE_NAME);
         updateInventoryModel();
         log.info("Inventory Model updated successfully");
     }
 
     private void updateInventoryModel() {
+        createDataspace(NCMP_DATASPACE_NAME);
+        createDataspace(NFP_OPERATIONAL_DATASTORE_DATASPACE_NAME);
         createSchemaSet(NCMP_DATASPACE_NAME, NEW_SCHEMA_SET_NAME, NEW_MODEL_FILE_NAME);
+        createAnchor(NCMP_DATASPACE_NAME, NEW_SCHEMA_SET_NAME, NCMP_DMI_REGISTRY_ANCHOR);
         updateAnchorSchemaSet(NCMP_DATASPACE_NAME, NCMP_DMI_REGISTRY_ANCHOR, NEW_SCHEMA_SET_NAME);
+        createTopLevelDataNode(NCMP_DATASPACE_NAME, NCMP_DMI_REGISTRY_ANCHOR, REGISTRY_DATANODE_NAME);
         deleteOldButNotThePreviousSchemaSets();
     }
 
     private void deleteOldButNotThePreviousSchemaSets() {
         //No schema sets passed in yet, but wil be required for future updates
         deleteUnusedSchemaSets(NCMP_DATASPACE_NAME);
+        deleteUnusedSchemaSets(NFP_OPERATIONAL_DATASTORE_DATASPACE_NAME);
     }
 
 }
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/DataJobServiceImplSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/DataJobServiceImplSpec.groovy
new file mode 100644 (file)
index 0000000..4378764
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ *  ============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=========================================================
+ */
+
+package org.onap.cps.ncmp.api.impl
+
+import ch.qos.logback.classic.Level
+import ch.qos.logback.classic.Logger
+import ch.qos.logback.classic.spi.ILoggingEvent
+import ch.qos.logback.core.read.ListAppender
+import org.slf4j.LoggerFactory
+import org.onap.cps.ncmp.api.models.datajob.DataJobReadRequest
+import org.onap.cps.ncmp.api.models.datajob.DataJobWriteRequest
+import org.onap.cps.ncmp.api.models.datajob.DataJobMetadata
+import org.onap.cps.ncmp.api.models.datajob.ReadOperation
+import org.onap.cps.ncmp.api.models.datajob.WriteOperation
+import spock.lang.Specification
+
+class DataJobServiceImplSpec extends Specification{
+
+    def objectUnderTest = new DataJobServiceImpl()
+
+    def logger = Spy(ListAppender<ILoggingEvent>)
+
+    def setup() {
+        setupLogger()
+    }
+
+    def cleanup() {
+        ((Logger) LoggerFactory.getLogger(DataJobServiceImpl.class)).detachAndStopAllAppenders()
+    }
+
+    def '#operation data job request.'() {
+        given: 'data job metadata'
+            def dataJobMetadata = new DataJobMetadata('client-topic', 'application/vnd.3gpp.object-tree-hierarchical+json', 'application/3gpp-json-patch+json')
+        when: 'read/write data job request is processed'
+            if (operation == 'read') {
+                objectUnderTest.readDataJob('some-job-id', dataJobMetadata, new DataJobReadRequest([getWriteOrReadOperationRequest(operation)]))
+            } else {
+                objectUnderTest.writeDataJob('some-job-id', dataJobMetadata, new DataJobWriteRequest([getWriteOrReadOperationRequest(operation)]))
+            }
+        then: 'the data job id is correctly logged'
+            def loggingEvent = logger.list[0]
+            assert loggingEvent.level == Level.INFO
+            assert loggingEvent.formattedMessage.contains('data job id for ' + operation + ' operation is: some-job-id')
+        where: 'the following data job operations are used'
+            operation << ['read', 'write']
+    }
+
+    def getWriteOrReadOperationRequest(operation) {
+        if (operation == 'write') {
+            return new WriteOperation('some/write/path', 'add', 'some-operation-id', 'some-value')
+        }
+        return new ReadOperation('some/read/path', 'read', 'some-operation-id', ['some-attrib-1'], ['some-field-1'], 'some-filter', 'some-scope-type', 1)
+    }
+
+    def setupLogger() {
+        def setupLogger = ((Logger) LoggerFactory.getLogger(DataJobServiceImpl.class))
+        setupLogger.setLevel(Level.DEBUG)
+        setupLogger.addAppender(logger)
+        logger.start()
+    }
+}
index d47be6c..4d0af6f 100644 (file)
@@ -23,9 +23,6 @@
 
 package org.onap.cps.ncmp.api.impl
 
-import org.onap.cps.ncmp.api.models.DmiPluginRegistrationResponse
-import org.onap.cps.ncmp.api.models.CmResourceAddress
-
 import static org.onap.cps.ncmp.api.impl.ncmppersistence.NcmpPersistence.NFP_OPERATIONAL_DATASTORE_DATASPACE_NAME
 import static org.onap.cps.ncmp.api.impl.ncmppersistence.NcmpPersistence.NCMP_DATASPACE_NAME
 import static org.onap.cps.ncmp.api.impl.ncmppersistence.NcmpPersistence.NCMP_DMI_REGISTRY_ANCHOR
@@ -35,6 +32,8 @@ import static org.onap.cps.ncmp.api.impl.operations.DatastoreType.PASSTHROUGH_RU
 import static org.onap.cps.ncmp.api.impl.operations.OperationType.CREATE
 import static org.onap.cps.ncmp.api.impl.operations.OperationType.UPDATE
 
+import org.onap.cps.ncmp.api.models.DmiPluginRegistrationResponse
+import org.onap.cps.ncmp.api.models.CmResourceAddress
 import org.onap.cps.ncmp.api.impl.utils.AlternateIdChecker
 import com.hazelcast.map.IMap
 import org.onap.cps.ncmp.api.NetworkCmProxyCmHandleQueryService
@@ -57,7 +56,6 @@ import org.onap.cps.ncmp.api.models.NcmpServiceCmHandle
 import org.onap.cps.ncmp.api.models.DataOperationRequest
 import org.onap.cps.spi.exceptions.CpsException
 import org.onap.cps.spi.model.ConditionProperties
-
 import java.util.stream.Collectors
 import org.onap.cps.utils.JsonObjectMapper
 import com.fasterxml.jackson.databind.ObjectMapper
index d5b0915..16f27d0 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.
index 7c1a148..970d7e6 100644 (file)
@@ -3,6 +3,8 @@ package org.onap.cps.ncmp.api.impl.events.cmsubscription
 import com.fasterxml.jackson.databind.ObjectMapper
 import io.cloudevents.CloudEvent
 import org.onap.cps.events.EventsPublisher
+import org.onap.cps.ncmp.api.impl.events.cmsubscription.mapper.CmNotificationSubscriptionNcmpOutEventMapper
+import org.onap.cps.ncmp.api.impl.events.cmsubscription.model.DmiCmNotificationSubscriptionDetails
 import org.onap.cps.ncmp.api.impl.events.mapper.CloudEventMapper
 import org.onap.cps.ncmp.events.cmsubscription_merge1_0_0.ncmp_to_client.CmNotificationSubscriptionNcmpOutEvent
 import org.onap.cps.ncmp.events.cmsubscription_merge1_0_0.ncmp_to_client.Data
@@ -13,18 +15,58 @@ class CmNotificationSubscriptionNcmpOutEventProducerSpec extends Specification {
 
     def mockEventsPublisher = Mock(EventsPublisher)
     def jsonObjectMapper = new JsonObjectMapper(new ObjectMapper())
+    def mockCmNotificationSubscriptionCache = Mock(Map<String, Map<String, DmiCmNotificationSubscriptionDetails>>)
+    def mockCmNotificationSubscriptionNcmpOutEventMapper = Mock(CmNotificationSubscriptionNcmpOutEventMapper)
 
-    def objectUnderTest = new CmNotificationSubscriptionNcmpOutEventProducer(mockEventsPublisher, jsonObjectMapper)
+    def objectUnderTest = new CmNotificationSubscriptionNcmpOutEventProducer(mockEventsPublisher, jsonObjectMapper, mockCmNotificationSubscriptionCache, mockCmNotificationSubscriptionNcmpOutEventMapper)
 
-    def 'Create and Publish Cm Notification Subscription DMI In Event'() {
+    def 'Create and #scenario Cm Notification Subscription NCMP out event'() {
         given: 'a cm subscription response for the client'
-            def subscriptionId = 'test-subscription-id'
+            def subscriptionId = 'test-subscription-id-2'
             def eventType = 'subscriptionCreateResponse'
-            def cmNotificationSubscriptionNcmpOutEvent = new CmNotificationSubscriptionNcmpOutEvent(data: new Data(subscriptionId: 'sub-1', acceptedTargets: ['ch-1', 'ch-2']))
+            def cmNotificationSubscriptionNcmpOutEvent = new CmNotificationSubscriptionNcmpOutEvent(data: new Data(subscriptionId: 'test-subscription-id-2', acceptedTargets: ['ch-1', 'ch-2']))
         and: 'also we have target topic for publishing to client'
             objectUnderTest.cmNotificationSubscriptionNcmpOutEventTopic = 'client-test-topic'
+        and: 'a deadline to an event'
+            objectUnderTest.cmNotificationSubscriptionDmiOutEventTimeoutInMs = 1000
         when: 'the event is published'
-            objectUnderTest.publishCmNotificationSubscriptionNcmpOutEvent(subscriptionId, eventType, cmNotificationSubscriptionNcmpOutEvent)
+            objectUnderTest.publishCmNotificationSubscriptionNcmpOutEvent(subscriptionId, eventType, cmNotificationSubscriptionNcmpOutEvent, eventPublishingTaskToBeScheduled)
+        then: 'we conditionally wait for a while'
+            Thread.sleep(delayInMs)
+        then: 'the event contains the required attributes'
+            1 * mockEventsPublisher.publishCloudEvent(_, _, _) >> {
+                args ->
+                    {
+                        assert args[0] == 'client-test-topic'
+                        assert args[1] == subscriptionId
+                        def cmNotificationSubscriptionNcmpOutEventAsCloudEvent = (args[2] as CloudEvent)
+                        assert cmNotificationSubscriptionNcmpOutEventAsCloudEvent.getExtension('correlationid') == subscriptionId
+                        assert cmNotificationSubscriptionNcmpOutEventAsCloudEvent.type == 'subscriptionCreateResponse'
+                        assert cmNotificationSubscriptionNcmpOutEventAsCloudEvent.source.toString() == 'NCMP'
+                        assert CloudEventMapper.toTargetEvent(cmNotificationSubscriptionNcmpOutEventAsCloudEvent, CmNotificationSubscriptionNcmpOutEvent) == cmNotificationSubscriptionNcmpOutEvent
+                    }
+            }
+        where: 'following scenarios are considered'
+            scenario                                          | delayInMs | eventPublishingTaskToBeScheduled
+            'publish event now'                               | 0         | false
+            'schedule and publish after the configured time ' | 1500      | true
+    }
+
+    def 'Schedule Cm Notification Subscription NCMP out event but later publish it on demand'() {
+        given: 'a cm subscription response for the client'
+            def subscriptionId = 'test-subscription-id-3'
+            def eventType = 'subscriptionCreateResponse'
+            def cmNotificationSubscriptionNcmpOutEvent = new CmNotificationSubscriptionNcmpOutEvent(data: new Data(subscriptionId: 'test-subscription-id-3', acceptedTargets: ['ch-2', 'ch-3']))
+        and: 'also we have target topic for publishing to client'
+            objectUnderTest.cmNotificationSubscriptionNcmpOutEventTopic = 'client-test-topic'
+        and: 'a deadline to an event'
+            objectUnderTest.cmNotificationSubscriptionDmiOutEventTimeoutInMs = 1000
+        when: 'the event is scheduled to be published'
+            objectUnderTest.publishCmNotificationSubscriptionNcmpOutEvent(subscriptionId, eventType, cmNotificationSubscriptionNcmpOutEvent, true)
+        then: 'we wait for 10ms and then we receive response from DMI'
+            Thread.sleep(10)
+        and: 'we receive response from DMI so we publish the message on demand'
+            objectUnderTest.publishCmNotificationSubscriptionNcmpOutEvent(subscriptionId, eventType, cmNotificationSubscriptionNcmpOutEvent, false)
         then: 'the event contains the required attributes'
             1 * mockEventsPublisher.publishCloudEvent(_, _, _) >> {
                 args ->
index 56485fb..e99e8a3 100644 (file)
@@ -58,7 +58,7 @@ class DmiModelOperationsSpec extends DmiOperationsBaseSpec {
             def moduleReferencesAsLisOfMaps = [[moduleName: 'mod1', revision: 'A'], [moduleName: 'mod2', revision: 'X']]
             def expectedUrl = "${dmiServiceName}/dmi/v1/ch/${cmHandleId}/modules"
             def responseFromDmi = new ResponseEntity([schemas: moduleReferencesAsLisOfMaps], HttpStatus.OK)
-            mockDmiRestClient.postOperationWithJsonData(expectedUrl, '{"cmHandleProperties":{}}', READ, NO_AUTH_HEADER)
+            mockDmiRestClient.postOperationWithJsonData(expectedUrl, '{"cmHandleProperties":{},"moduleSetTag":"tag1"}', READ, NO_AUTH_HEADER)
                     >> responseFromDmi
         when: 'get module references is called'
             def result = objectUnderTest.getModuleReferences(yangModelCmHandle)
@@ -91,7 +91,7 @@ class DmiModelOperationsSpec extends DmiOperationsBaseSpec {
         and: 'a positive response from DMI service when it is called with tha expected parameters'
             def responseFromDmi = new ResponseEntity<String>(HttpStatus.OK)
             mockDmiRestClient.postOperationWithJsonData("${dmiServiceName}/dmi/v1/ch/${cmHandleId}/modules",
-                    '{"cmHandleProperties":' + expectedAdditionalPropertiesInRequest + '}', READ, NO_AUTH_HEADER) >> responseFromDmi
+                    '{"cmHandleProperties":' + expectedAdditionalPropertiesInRequest + ',"moduleSetTag":"tag1"}', READ, NO_AUTH_HEADER) >> responseFromDmi
         when: 'a get module references is called'
             def result = objectUnderTest.getModuleReferences(yangModelCmHandle)
         then: 'the result is the response from DMI service'
index cc64255..b7af502 100644 (file)
@@ -74,5 +74,6 @@ abstract class DmiOperationsBaseSpec extends Specification {
         yangModelCmHandle.id = cmHandleId
         yangModelCmHandle.compositeState = new CompositeState()
         yangModelCmHandle.compositeState.cmHandleState = CmHandleState.READY
+        yangModelCmHandle.moduleSetTag = 'tag1'
     }
 }
index f122b57..b0be29d 100644 (file)
@@ -81,14 +81,6 @@ class AbstractModelLoaderSpec extends Specification {
             assert logs.contains('test message')
     }
 
-    def 'Wait for non-existing dataspace'() {
-        when: 'wait for the dataspace'
-            objectUnderTest.waitUntilDataspaceIsAvailable('some dataspace')
-        then: 'a startup exception is thrown'
-            def thrown = thrown(NcmpStartUpException)
-            assert thrown.message.contains('Retrieval of NCMP dataspace failed')
-    }
-
     def 'Create schema set.'() {
         when: 'creating a schema set'
             objectUnderTest.createSchemaSet('some dataspace','new name','cm-data-subscriptions@2024-02-12.yang')
index b6e12c0..ca466d7 100644 (file)
@@ -32,7 +32,7 @@
 
     <groupId>org.onap.cps</groupId>
     <artifactId>cps-parent</artifactId>
-    <version>3.4.7-SNAPSHOT</version>
+    <version>3.4.8-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <properties>
                 <plugin>
                     <groupId>org.springframework.boot</groupId>
                     <artifactId>spring-boot-maven-plugin</artifactId>
-                    <version>3.1.2</version>
+                    <version>3.2.4</version>
                     <executions>
                         <execution>
                             <goals>
index fb161c7..93166ec 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   ============LICENSE_START=======================================================
-  Copyright (c) 2021 Linux 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.
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.4.7-SNAPSHOT</version>
+        <version>3.4.8-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>
             <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.junit.vintage</groupId>
-                    <artifactId>junit-vintage-engine</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
     </dependencies>
 
index 9e484af..90422d7 100644 (file)
@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   ============LICENSE_START=======================================================
-  Copyright (c) 2020 Linux Foundation.
-  Modifications Copyright (C) 2020-2023 Nordix Foundation.
+  Modifications Copyright (C) 2020-2024 Nordix Foundation.
   Modifications Copyright (C) 2021 Bell Canada.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
@@ -28,7 +27,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.4.7-SNAPSHOT</version>
+        <version>3.4.8-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
@@ -81,7 +80,7 @@
         </dependency>
         <dependency>
             <groupId>org.springdoc</groupId>
-            <artifactId>springdoc-openapi-ui</artifactId>
+            <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.commons</groupId>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>
             <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.junit.vintage</groupId>
-                    <artifactId>junit-vintage-engine</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
     </dependencies>
 
index a6e1e10..583bad0 100644 (file)
@@ -3,7 +3,7 @@
   ============LICENSE_START=======================================================\r
   Copyright (C) 2020-2021 Pantheon.tech\r
   Modifications Copyright (C) 2020-2021 Bell Canada\r
-  Modifications Copyright (C) 2020-2023 Nordix Foundation\r
+  Modifications Copyright (C) 2020-2024 Nordix Foundation\r
   ================================================================================\r
   Licensed under the Apache License, Version 2.0 (the "License");\r
   you may not use this file except in compliance with the License.\r
@@ -26,7 +26,7 @@
     <parent>\r
         <groupId>org.onap.cps</groupId>\r
         <artifactId>cps-parent</artifactId>\r
-        <version>3.4.7-SNAPSHOT</version>\r
+        <version>3.4.8-SNAPSHOT</version>\r
         <relativePath>../cps-parent/pom.xml</relativePath>\r
     </parent>\r
 \r
@@ -71,7 +71,7 @@
         <!-- Add Hibernate support for Postgres datatype JSONB and Postgres arrays -->\r
         <dependency>\r
             <groupId>io.hypersistence</groupId>\r
-            <artifactId>hypersistence-utils-hibernate-60</artifactId>\r
+            <artifactId>hypersistence-utils-hibernate-63</artifactId>\r
         </dependency>\r
         <dependency>\r
             <groupId>org.projectlombok</groupId>\r
             <groupId>org.springframework.boot</groupId>\r
             <artifactId>spring-boot-starter-test</artifactId>\r
             <scope>test</scope>\r
-            <exclusions>\r
-                <exclusion>\r
-                    <groupId>org.junit.vintage</groupId>\r
-                    <artifactId>junit-vintage-engine</artifactId>\r
-                </exclusion>\r
-            </exclusions>\r
         </dependency>\r
     </dependencies>\r
 \r
index b0f9a2d..17f13b8 100755 (executable)
@@ -69,6 +69,7 @@ import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource;
 import org.opendaylight.yangtools.yang.parser.api.YangSyntaxErrorException;
 import org.opendaylight.yangtools.yang.parser.rfc7950.repo.YangModelDependencyInfo;
 import org.springframework.dao.DataIntegrityViolationException;
+import org.springframework.retry.RetryContext;
 import org.springframework.retry.annotation.Backoff;
 import org.springframework.retry.annotation.Retryable;
 import org.springframework.retry.support.RetrySynchronizationManager;
@@ -277,8 +278,8 @@ public class CpsModulePersistenceServiceImpl implements CpsModulePersistenceServ
                                 dataIntegrityViolationException, newYangResourceEntities);
                 convertedException.ifPresent(
                         e -> {
-                            int retryCount = RetrySynchronizationManager.getContext() == null ? 0
-                                                     : RetrySynchronizationManager.getContext().getRetryCount();
+                            final RetryContext retryContext = RetrySynchronizationManager.getContext();
+                            int retryCount = retryContext == null ? 0 : retryContext.getRetryCount();
                             log.warn("Cannot persist duplicated yang resource. System will attempt this method "
                                     + "up to 5 times. Current retry count : {}", ++retryCount, e);
                         });
index e10ce63..5909ef1 100644 (file)
 databaseChangeLog:
   - include:
       file: changelog/db/changes/01-createCPSTables.yaml
-  - include:
-      file: changelog/db/changes/02-loadData-dataspace.yaml
-  - include:
-      file: changelog/db/changes/03-loadData-schema-set.yaml
-  - include:
-      file: changelog/db/changes/04-loadData-anchor.yaml
-  - include:
-      file: changelog/db/changes/05-loadData-fragment.yaml
-  - include:
-      file: changelog/db/changes/06-delete-not-required-fragment-index.yaml
-  - include:
-      file: changelog/db/changes/07-update-yang-resource-checksums.yaml
-  - include:
-      file: changelog/db/changes/08-update-yang-resources.yaml
-  - include:
-      file: changelog/db/changes/09-loadData-dmi-registry-schema-set.yaml
-  - include:
-      file: changelog/db/changes/10-loadData-dmi-registry-fragment.yaml
-  - include:
-      file: changelog/db/changes/11-add-column-to-yang-resources-table.yaml
-  - include:
-      file: changelog/db/changes/12-delete-all-previous-dmi-registry-schema-set.yaml
-  - include:
-      file: changelog/db/changes/13-insert-dmi-registry-2022-02-10-schema-set.yaml
-  - include:
-      file: changelog/db/changes/14-loadData-dmi-registry-2022-05-10-schema-set.yaml
-  - include:
-      file: changelog/db/changes/15-rename-column-yang-resource-table.yaml
-  - include:
-      file: changelog/db/changes/16-insert-cm-handle-state.yaml
-  - include:
-      file: changelog/db/changes/17-add-index-to-schema-set-yang-resources.yaml
-  - include:
-      file: changelog/db/changes/18-cascade-delete-fragment-children.yaml
-  - include:
-      file: changelog/db/changes/19-delete-not-required-dataspace-id-from-fragment.yaml
-  - include:
-      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
index 07ffb93..c9fbf8f 100644 (file)
@@ -14,6 +14,7 @@
 # limitations under the License.
 # ============LICENSE_END=========================================================
 
+# For legacy reasons, previous files for changeset Ids: 6, 11, 15, 17-21 have been condensed into this file.
 databaseChangeLog:
   - changeSet:
       id: 1-1
@@ -573,4 +574,242 @@ databaseChangeLog:
             referencedColumnNames: id
             referencedTableName: schema_node
             validate: true
+  - changeSet:
+      logicalFilePath:  changelog/db/changes/06-delete-not-required-fragment-index.yaml
+      id: 6
+      author: cps
+      comment: Drop unique index for dataspace and xpath on fragment table
+      changes:
+        - dropIndex:
+            indexName: UQ_FRAGMENT_XPATH
+            tableName: fragment
+      rollback:
+        - createIndex:
+            columns:
+              - column:
+                  name: xpath
+              - column:
+                  name: dataspace_id
+            indexName: UQ_FRAGMENT_XPATH
+            tableName: fragment
+            unique: true
 
+  - changeSet:
+      logicalFilePath:  changelog/db/changes/11-add-column-to-yang-resources-table.yaml
+      id: 11
+      label: add-module-name-and-revision-column
+      author: cps
+      changes:
+        - addColumn:
+            tableName: yang_resource
+            columns:
+              - column:
+                  name: module_name
+                  type: TEXT
+              - column:
+                  name: revision
+                  type: TEXT
+  - changeSet:
+      logicalFilePath:  changelog/db/changes/11-add-column-to-yang-resources-table.yaml
+      id: 11.1
+      label: update-previous-data-module-name-and-revision
+      author: cps
+      changes:
+        - sql:
+            sql: update yang_resource set module_name = 'dummy_module_name', revision = '2021-08-04' where module_name is null and revision is null
+      rollback:
+        sql: update yang_resource set module_name = null, revision = null where module_name = 'dummy_module_name' and revision = '2021-08-04'
+  - changeSet:
+      logicalFilePath:  changelog/db/changes/15-rename-column-yang-resource-table.yaml
+      author: cps
+      label: yang-resource-rename-column
+      id: 15
+      changes:
+        - renameColumn:
+            tableName: yang_resource
+            columnDataType: TEXT
+            oldColumnName: name
+            newColumnName: file_name
+      rollback:
+        - sql:
+            sql: alter table yang_resource rename column file_name to name
+  - changeSet:
+      logicalFilePath:  changelog/db/changes/17-add-index-to-schema-set-yang-resources.yaml
+      author: cps
+      id: 17
+      changes:
+        - createIndex:
+            columns:
+              - column:
+                  name: schema_set_id
+            indexName: FKI_SCHEMA_SET_YANG_RESOURCES_SCHEMA_SET_ID_FK
+            tableName: schema_set_yang_resources
+      rollback:
+        - dropIndex:
+            indexName: FKI_SCHEMA_SET_YANG_RESOURCES_SCHEMA_SET_ID_FK
+            tableName: schema_set_yang_resources
+  - changeSet:
+      logicalFilePath:  changelog/db/changes/18-cascade-delete-fragment-children.yaml
+      author: cps
+      id: 18
+      changes:
+        - dropForeignKeyConstraint:
+            baseTableName: fragment
+            constraintName: fragment_parent_id_fkey
+        - addForeignKeyConstraint:
+            baseColumnNames: parent_id
+            baseTableName: fragment
+            constraintName: fragment_parent_id_fkey
+            deferrable: false
+            initiallyDeferred: false
+            onDelete: CASCADE
+            onUpdate: NO ACTION
+            referencedColumnNames: id
+            referencedTableName: fragment
+            validate: true
+      rollback:
+        - dropForeignKeyConstraint:
+            baseTableName: fragment
+            constraintName: fragment_parent_id_fkey
+        - addForeignKeyConstraint:
+            baseColumnNames: parent_id
+            baseTableName: fragment
+            constraintName: fragment_parent_id_fkey
+            deferrable: false
+            initiallyDeferred: false
+            onDelete: NO ACTION
+            onUpdate: NO ACTION
+            referencedColumnNames: id
+            referencedTableName: fragment
+            validate: true
+  - changeSet:
+      logicalFilePath:  changelog/db/changes/19-delete-not-required-dataspace-id-from-fragment.yaml
+      id: 19-1
+      author: cps
+      changes:
+        - dropIndex:
+            indexName: FKI_FRAGMENT_DATASPACE_ID_FK
+            tableName: fragment
+      rollback:
+        - createIndex:
+            columns:
+              - column:
+                  name: dataspace_id
+            indexName: FKI_FRAGMENT_DATASPACE_ID_FK
+            tableName: fragment
+  - changeSet:
+      logicalFilePath: changelog/db/changes/19-delete-not-required-dataspace-id-from-fragment.yaml
+      id: 19-2
+      author: cps
+      changes:
+        - dropUniqueConstraint:
+            constraintName: fragment_dataspace_id_anchor_id_xpath_key
+            tableName: fragment
+        - addUniqueConstraint:
+            columnNames: anchor_id, xpath
+            constraintName: fragment_anchor_id_xpath_key
+            tableName: fragment
+      rollback:
+        - dropUniqueConstraint:
+            constraintName: fragment_anchor_id_xpath_key
+            tableName: fragment
+        - addUniqueConstraint:
+            columnNames: dataspace_id, anchor_id, xpath
+            constraintName: fragment_dataspace_id_anchor_id_xpath_key
+            tableName: fragment
+  - changeSet:
+      logicalFilePath: changelog/db/changes/19-delete-not-required-dataspace-id-from-fragment.yaml
+      id: 19-3
+      author: cps
+      changes:
+        - dropForeignKeyConstraint:
+            baseTableName: fragment
+            constraintName: fragment_dataspace_id_fkey
+      rollback:
+        - addForeignKeyConstraint:
+            baseColumnNames: dataspace_id
+            baseTableName: fragment
+            constraintName: fragment_dataspace_id_fkey
+            deferrable: false
+            initiallyDeferred: false
+            onDelete: NO ACTION
+            onUpdate: NO ACTION
+            referencedColumnNames: id
+            referencedTableName: dataspace
+            validate: true
+  - changeSet:
+      logicalFilePath: changelog/db/changes/19-delete-not-required-dataspace-id-from-fragment.yaml
+      id: 19-4
+      author: cps
+      changes:
+        - dropColumn:
+            columnName: dataspace_id
+            tableName: fragment
+      rollback:
+        - addColumn:
+            tableName: fragment
+            columns:
+              - column:
+                  name: dataspace_id
+                  type: INTEGER
+        - sqlFile:
+            path: changelog/db/changes/19-repopulate-dataspace-id-for-rollback.sql
+        - addNotNullConstraint:
+            tableName: fragment
+            columnName: dataspace_id
+            columnDataType: INTEGER
+
+  - changeSet:
+      logicalFilePath: changelog/db/changes/19-delete-not-required-dataspace-id-from-fragment.yaml
+      id: 19-5
+      author: cps
+      changes:
+        - addNotNullConstraint:
+            tableName: fragment
+            columnName: anchor_id
+            columnDataType: BIGINT
+      rollback:
+        - dropNotNullConstraint:
+            tableName: fragment
+            columnName: anchor_id
+            columnDataType: BIGINT
+  - changeSet:
+      author: cps
+      logicalFilePath: changelog/db/changes/20-change-foreign-key-id-types-to-integer.yaml
+      id: 20
+      changes:
+        - modifyDataType:
+            columnName: dataspace_id
+            newDataType: INTEGER
+            tableName: schema_set
+        - modifyDataType:
+            columnName: schema_set_id
+            newDataType: INTEGER
+            tableName: schema_set_yang_resources
+        - modifyDataType:
+            columnName: yang_resource_id
+            newDataType: INTEGER
+            tableName: schema_set_yang_resources
+      rollback:
+        - modifyDataType:
+            columnName: dataspace_id
+            newDataType: BIGINT
+            tableName: schema_set
+        - modifyDataType:
+            columnName: schema_set_id
+            newDataType: BIGINT
+            tableName: schema_set_yang_resources
+        - modifyDataType:
+            columnName: yang_resource_id
+            newDataType: BIGINT
+            tableName: schema_set_yang_resources
+  - changeSet:
+      logicalFilePath:  changelog/db/changes/21-escape-quotes-in-xpath.yaml
+      id: 21
+      author: cps
+      changes:
+        - sqlFile:
+            path: changelog/db/changes/21-escape-quotes-in-xpath-forward.sql
+      rollback:
+        - sqlFile:
+            path: changelog/db/changes/21-escape-quotes-in-xpath-rollback.sql
\ No newline at end of file
diff --git a/cps-ri/src/main/resources/changelog/db/changes/02-loadData-dataspace.yaml b/cps-ri/src/main/resources/changelog/db/changes/02-loadData-dataspace.yaml
deleted file mode 100644 (file)
index b5ee253..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-# ============LICENSE_START=======================================================
-# Copyright (c) 2021 Bell Canada.
-# ================================================================================
-# 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.
-# ============LICENSE_END=========================================================
-
-databaseChangeLog:
-  - changeSet:
-      author: cps
-      label: xnf-data-preload
-      id: 2
-      loadUpdateData:
-        encoding: UTF-8
-        file: 'changelog/db/changes/data/dataspace.csv'
-        onlyUpdate: 'false'
-        primaryKey: 'id'
-        quotchar: '"'
-        separator: '|'
-        tableName: 'dataspace'
\ No newline at end of file
diff --git a/cps-ri/src/main/resources/changelog/db/changes/03-loadData-schema-set.yaml b/cps-ri/src/main/resources/changelog/db/changes/03-loadData-schema-set.yaml
deleted file mode 100644 (file)
index 6ed2825..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-# ============LICENSE_START=======================================================
-# Copyright (c) 2021 Bell Canada.
-# ================================================================================
-# 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.
-# ============LICENSE_END=========================================================
-
-databaseChangeLog:
-  - changeSet:
-      author: cps
-      label: xnf-data-preload
-      id: 3.1
-      loadUpdateData:
-        encoding: UTF-8
-        file: 'changelog/db/changes/data/schema_set.csv'
-        onlyUpdate: 'false'
-        primaryKey: 'id'
-        quotchar: '"'
-        separator: '|'
-        tableName: 'schema_set'
-
-  - changeSet:
-      author: cps
-      label: xnf-data-preload
-      id: 3.2
-      loadUpdateData:
-        encoding: UTF-8
-        file: 'changelog/db/changes/data/yang_resource.csv'
-        onlyUpdate: 'false'
-        primaryKey: 'id'
-        quotchar: '"'
-        separator: '|'
-        tableName: 'yang_resource'
-        columns:
-          - column:
-              header:  name
-              name:  name
-              type:  STRING
-          - column:
-              header:  content
-              name: content
-              type: STRING
-          - column:
-              header:  checkstyle
-              name: checkstyle
-              type: STRING
-
-  - changeSet:
-      author: cps
-      label: xnf-data-preload
-      id: 3.3
-      loadUpdateData:
-        encoding: UTF-8
-        file: 'changelog/db/changes/data/schema_set_yang_resources.csv'
-        quotchar: '"'
-        primaryKey: 'schema_set_id,yang_resource_id'
-        separator: '|'
-        tableName: 'schema_set_yang_resources'
-        usePreparedStatements:  true
-
diff --git a/cps-ri/src/main/resources/changelog/db/changes/04-loadData-anchor.yaml b/cps-ri/src/main/resources/changelog/db/changes/04-loadData-anchor.yaml
deleted file mode 100644 (file)
index 04955ce..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-# ============LICENSE_START=======================================================
-# Copyright (c) 2021 Bell Canada.
-# ================================================================================
-# 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.
-# ============LICENSE_END=========================================================
-
-databaseChangeLog:
-  - changeSet:
-      author: cps
-      label: xnf-data-preload
-      id: 4
-      loadUpdateData:
-        encoding: UTF-8
-        file: 'changelog/db/changes/data/anchor.csv'
-        onlyUpdate: 'false'
-        primaryKey: 'id'
-        quotchar: '"'
-        separator: '|'
-        tableName: 'anchor'
diff --git a/cps-ri/src/main/resources/changelog/db/changes/05-loadData-fragment.yaml b/cps-ri/src/main/resources/changelog/db/changes/05-loadData-fragment.yaml
deleted file mode 100644 (file)
index bd95a00..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-#  ============LICENSE_START=======================================================
-#  Copyright (C) 2021-2022 Nordix Foundation
-#  Modifications Copyright (C) 2021 Pantheon.tech
-#  ================================================================================
-#  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
-      label: xnf-data-preload
-      id: 5
-      loadUpdateData:
-        encoding: UTF-8
-        file: 'changelog/db/changes/data/fragment.csv'
-        onlyUpdate: 'false'
-        primaryKey: 'id'
-        quotchar: '"'
-        separator: '|'
-        tableName: 'fragment'
-        columns:
-          - column:
-              header:  id
-              name:  id
-              type:  NUMERIC
-          - column:
-              header:  xpath
-              name:  xpath
-              type:  STRING
-          - column:
-              header:  attributes
-              name: attributes
-              type: CLOB
-          - column:
-              header:  anchor_id
-              name: anchor_id
-              type: NUMERIC
-          - column:
-              header:  parent_id
-              name: parent_id
-              type: NUMERIC
-          - column:
-              header:  dataspace_id
-              name: dataspace_id
-              type: NUMERIC
-          - column:
-              header:  schema_node_id
-              name: schema_node_id
-              type: NUMERIC
-
-  - changeSet:
-      author: cps
-      label: xnf-data-preload
-      id: 5.1
-      changes:
-        - sql:
-            comment: Fixes the id sequence after data insert with predefined ids
-            dbms: postgresql
-            sql: ALTER SEQUENCE IF EXISTS fragment_id_seq RESTART WITH 200
-
-  - changeSet:
-      author: cps
-      label: dmi-registry-schema-preload
-      id: 5.2
-      changes:
-        - sql:
-            comment: Sets sequence value to current max value of the ID from the fragment table
-            dbms: postgresql
-            sql: SELECT setval('fragment_id_seq', (SELECT MAX(ID) FROM fragment))
-      rollback:
-        sql: SELECT setval('fragment_id_seq', 200)
-        comment: Rollback Sequence to restart with the sequence number in the last changeset
\ No newline at end of file
diff --git a/cps-ri/src/main/resources/changelog/db/changes/06-delete-not-required-fragment-index.yaml b/cps-ri/src/main/resources/changelog/db/changes/06-delete-not-required-fragment-index.yaml
deleted file mode 100644 (file)
index bfb0cf4..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-# ============LICENSE_START=======================================================
-# Copyright (c) 2021 Bell Canada.
-# ================================================================================
-# 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.
-# ============LICENSE_END=========================================================
-
-databaseChangeLog:
-  - changeSet:
-      id: 6
-      author: cps
-      comment: Drop unique index for dataspace and xpath on fragment table
-      changes:
-        - dropIndex:
-            indexName: UQ_FRAGMENT_XPATH
-            tableName: fragment
-      rollback:
-        - createIndex:
-            columns:
-              - column:
-                  name: xpath
-              - column:
-                  name: dataspace_id
-            indexName: UQ_FRAGMENT_XPATH
-            tableName: fragment
-            unique: true
diff --git a/cps-ri/src/main/resources/changelog/db/changes/07-update-yang-resource-checksums.yaml b/cps-ri/src/main/resources/changelog/db/changes/07-update-yang-resource-checksums.yaml
deleted file mode 100644 (file)
index 2ef1f16..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#  ============LICENSE_START=======================================================
-#  Copyright (C) 2021 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:
-      id:  7
-      author:  cps
-      comment: Change checsum on yang resource due to new hash algoritm
-      changes:
-        -  update:
-             columns:
-               -  column:
-                    name:  checksum
-                    value:  417a7b14944f6236ad0e2b1ef956158c050cff9b74e3561ca80af32d11be240b
-             tableName:  yang_resource
-             where:  checksum='fd06e465f26f1e7d0253bbf77e7e55e1'
-        -  update:
-             columns:
-               -  column:
-                    name:  checksum
-                    value:  436fef591eba7f38d1a0c5e3cbd3c122f01ab41dfab37cc5a9cbca1ed53b29fb
-             tableName:  yang_resource
-             where:  checksum='0337045143fa2e592243243f82699b93'
-        -  update:
-             columns:
-               -  column:
-                    name:  checksum
-                    value:  25516798613f862ad20831e59ba02b75ecdc9c6f5547ed5d90bda76143bf0112
-             tableName:  yang_resource
-             where:  checksum='57d603ee9ab0c49355ad0695c0709c93'
diff --git a/cps-ri/src/main/resources/changelog/db/changes/08-update-yang-resources-cps-ran-model-forward.sql b/cps-ri/src/main/resources/changelog/db/changes/08-update-yang-resources-cps-ran-model-forward.sql
deleted file mode 100644 (file)
index 6bbcd96..0000000
+++ /dev/null
@@ -1,1306 +0,0 @@
-update yang_resource set
-name = 'cps-ran-schema-model@2021-01-28.yang',
-checksum = 'a825c571c4a1d585a7f09a3716dedbfab1146abc4725b75a16f9ac89440bf46b',
-content = 'module cps-ran-schema-model {
-  yang-version 1.1;
-  namespace "org:onap:ccsdk:features:sdnr:northbound:cps-ran-schema-model";
-  prefix rn;
-
-  import ietf-inet-types {
-    prefix inet;
-  }
-  import ietf-yang-types {
-    prefix yang;
-  }
-
-  organization
-    "Open Network Automation Platform - ONAP
-     <https://www.onap.org>";
-  contact
-    "Editors:
-       Sandeep Shah
-       <mailto:sandeep.shah@ibm.com>
-
-       Swaminathan Seetharaman
-       <mailto:swaminathan.seetharaman@wipro.com>";
-  description
-    "This module contains a collection of YANG definitions for capturing
-     relationships among managed elements of the radio access Network
-     to be stored in ONAP CPS platform.
-
-     Copyright 2020-2021 IBM.
-
-     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.";
-
-  revision 2021-01-28 {
-    description
-      "CPS RAN Network YANG Model for ONAP/O-RAN POC";
-    reference
-      "https://wiki.onap.org/display/DW/E2E+Network+Slicing+Use+Case+in+R7+Guilin";
-  }
-
-  typedef usageState {
-    type enumeration {
-      enum IDLE {
-        description
-          "TODO";
-      }
-      enum ACTIVE {
-        description
-          "TODO";
-      }
-      enum BUSY {
-        description
-          "TODO";
-      }
-    }
-    description
-      "It describes whether or not the resource is actively in
-       use at a specific instant, and if so, whether or not it has spare
-       capacity for additional users at that instant. The value is READ-ONLY.";
-    reference
-      "ITU T Recommendation X.731";
-  }
-
-  typedef Mcc {
-    type string;
-    description
-      "The mobile country code consists of three decimal digits,
-       The first digit of the mobile country code identifies the geographic
-       region (the digits 1 and 8 are not used):";
-    reference
-      "3GPP TS 23.003 subclause 2.2 and 12.1";
-  }
-
-  typedef Mnc {
-    type string;
-    description
-      "The mobile network code consists of two or three
-       decimal digits (for example: MNC of 001 is not the same as MNC of 01)";
-    reference
-      "3GPP TS 23.003 subclause 2.2 and 12.1";
-  }
-
-  typedef Nci {
-    type string;
-    description
-      "NR Cell Identity. The NCI shall be of fixed length of 36 bits
-       and shall be coded using full hexadecimal representation.
-       The exact coding of the NCI is the responsibility of each PLMN operator";
-    reference
-      "TS 23.003";
-  }
-
-  typedef OperationalState {
-    type enumeration {
-      enum DISABLED {
-        value 0;
-        description
-          "The resource is totally inoperable.";
-      }
-      enum ENABLED {
-        value 1;
-        description
-          "The resource is partially or fully operable.";
-      }
-    }
-    description
-      "TODO";
-    reference
-      "3GPP TS 28.625 and ITU-T X.731";
-  }
-
-  typedef AvailabilityStatus {
-    type enumeration {
-      enum IN_TEST {
-        description
-          "TODO";
-      }
-      enum FAILED {
-        description
-          "TODO";
-      }
-      enum POWER_OFF {
-        description
-          "TODO";
-      }
-      enum OFF_LINE {
-        description
-          "TODO";
-      }
-      enum OFF_DUTY {
-        description
-          "TODO";
-      }
-      enum DEPENDENCY {
-        description
-          "TODO";
-      }
-      enum DEGRADED {
-        description
-          "TODO";
-      }
-      enum NOT_INSTALLED {
-        description
-          "TODO";
-      }
-      enum LOG_FULL {
-        description
-          "TODO";
-      }
-    }
-    description
-      "TODO";
-    reference
-      "TODO";
-  }
-
-  typedef CellState {
-    type enumeration {
-      enum IDLE {
-        description
-          "TODO";
-      }
-      enum INACTIVE {
-        description
-          "TODO";
-      }
-      enum ACTIVE {
-        description
-          "TODO";
-      }
-    }
-    description
-      "TODO";
-    reference
-      "TODO";
-  }
-
-  typedef SNssai {
-    type string;
-    description
-      "Single Network Slice Selection Assistance Information.";
-    reference
-      "TS 23.501 clause 5.15.2";
-  }
-
-  typedef Sst {
-    type uint8;
-    description
-      "TODO";
-    reference
-      "TODO";
-  }
-
-  typedef Nrpci {
-    type uint32;
-    description
-      "Physical Cell Identity (PCI) of the NR cell.";
-    reference
-      "TS 36.211 subclause 6.11";
-  }
-
-  typedef Tac {
-    type int32 {
-      range "0..16777215";
-    }
-    description
-      "Tracking Area Code";
-    reference
-      "TS 23.003 clause 19.4.2.3";
-  }
-
-  typedef AmfRegionId {
-    type string;
-    description
-      "";
-    reference
-      "clause 2.10.1 of 3GPP TS 23.003";
-  }
-
-  typedef AmfSetId {
-    type string;
-    description
-      "";
-    reference
-      "clause 2.10.1 of 3GPP TS 23.003";
-  }
-
-  typedef AmfPointer {
-    type string;
-    description
-      "";
-    reference
-      "clause 2.10.1 of 3GPP TS 23.003";
-  }
-
-  // type definitions especially for core NFs
-
-  typedef NfType {
-    type enumeration {
-      enum NRF {
-        description
-          "TODO";
-      }
-      enum UDM {
-        description
-          "TODO";
-      }
-      enum AMF {
-        description
-          "TODO";
-      }
-      enum SMF {
-        description
-          "TODO";
-      }
-      enum AUSF {
-        description
-          "TODO";
-      }
-      enum NEF {
-        description
-          "TODO";
-      }
-      enum PCF {
-        description
-          "TODO";
-      }
-      enum SMSF {
-        description
-          "TODO";
-      }
-      enum NSSF {
-        description
-          "TODO";
-      }
-      enum UDR {
-        description
-          "TODO";
-      }
-      enum LMF {
-        description
-          "TODO";
-      }
-      enum GMLC {
-        description
-          "TODO";
-      }
-      enum 5G_EIR {
-        description
-          "TODO";
-      }
-      enum SEPP {
-        description
-          "TODO";
-      }
-      enum UPF {
-        description
-          "TODO";
-      }
-      enum N3IWF {
-        description
-          "TODO";
-      }
-      enum AF {
-        description
-          "TODO";
-      }
-      enum UDSF {
-        description
-          "TODO";
-      }
-      enum BSF {
-        description
-          "TODO";
-      }
-      enum CHF {
-        description
-          "TODO";
-      }
-    }
-    description
-      "TODO";
-  }
-
-  typedef NotificationType {
-    type enumeration {
-      enum N1_MESSAGES {
-        description
-          "TODO";
-      }
-      enum N2_INFORMATION {
-        description
-          "TODO";
-      }
-      enum LOCATION_NOTIFICATION {
-        description
-          "TODO";
-      }
-    }
-    description
-      "TODO";
-  }
-
-  typedef Load {
-    type uint8 {
-      range "0..100";
-    }
-    description
-      "Latest known load information of the NF, percentage ";
-  }
-
-  typedef N1MessageClass {
-    type enumeration {
-      enum 5GMM {
-        description
-          "TODO";
-      }
-      enum SM {
-        description
-          "TODO";
-      }
-      enum LPP {
-        description
-          "TODO";
-      }
-      enum SMS {
-        description
-          "TODO";
-      }
-    }
-    description
-      "TODO";
-  }
-
-  typedef N2InformationClass {
-    type enumeration {
-      enum SM {
-        description
-          "TODO";
-      }
-      enum NRPPA {
-        description
-          "TODO";
-      }
-      enum PWS {
-        description
-          "TODO";
-      }
-      enum PWS_BCAL {
-        description
-          "TODO";
-      }
-      enum PWS_RF {
-        description
-          "TODO";
-      }
-    }
-    description
-      "TODO";
-    reference
-      "TODO";
-  }
-
-  typedef NsiId {
-    type string;
-    description
-      "TODO";
-  }
-
-  typedef UeMobilityLevel {
-    type enumeration {
-      enum STATIONARY {
-        description
-          "TODO";
-      }
-      enum NOMADIC {
-        description
-          "TODO";
-      }
-      enum RESTRICTED_MOBILITY {
-        description
-          "TODO";
-      }
-      enum FULLY_MOBILITY {
-        description
-          "TODO";
-      }
-    }
-    description
-      "TODO";
-    reference
-      "TODO";
-  }
-
-  typedef ResourceSharingLevel {
-    type enumeration {
-      enum SHARED {
-        description
-          "TODO";
-      }
-      enum NOT_SHARED {
-        description
-          "TODO";
-      }
-    }
-    description
-      "TODO";
-    reference
-      "TODO";
-  }
-
-  typedef TxDirection {
-    type enumeration {
-      enum DL {
-        description
-          "TODO";
-      }
-      enum UL {
-        description
-          "TODO";
-      }
-      enum DL_AND_UL {
-        description
-          "TODO";
-      }
-    }
-    description
-      "TODO";
-    reference
-      "TODO";
-  }
-
-  typedef DistinguishedName { // TODO is this equivalent to TS 32.300 ?
-    type string;
-    description
-      "Represents the international standard for the representation
-       of Distinguished Name (RFC 4512).
-       The format of the DistinguishedName REGEX is:
-       {AttributeType = AttributeValue}
-
-       AttributeType consists of alphanumeric and hyphen (OIDs not allowed).
-       All other characters are restricted.
-       The Attribute value cannot contain control characters or the
-       following characters :  > < ; \" + , (Comma) and White space
-       The Attribute value can contain the following characters if they
-       are excaped :  > < ; \" + , (Comma) and White space
-       The Attribute value can contain control characters if its an escaped
-       double digit hex number.
-       Examples could be
-       UID=nobody@example.com,DC=example,DC=com
-       CN=John Smith,OU=Sales,O=ACME Limited,L=Moab,ST=Utah,C=US";
-    reference
-      "RFC 4512 Lightweight Directory Access Protocol (LDAP):
-             Directory Information Models";
-  } // recheck regexp it doesn''t handle posix [:cntrl:]
-
-  typedef QOffsetRange {
-    type int8;
-    units "dB";
-    description
-      "TODO";
-    reference
-      "TODO";
-  }
-
-  typedef QuotaType {
-    type enumeration {
-      enum STRICT {
-        description
-          "TODO";
-      }
-      enum FLOAT {
-        description
-          "TODO";
-      }
-    }
-    description
-      "TODO";
-  }
-
-  typedef CyclicPrefix {
-    type enumeration {
-      enum NORMAL {
-        description
-          "TODO";
-      }
-      enum EXTENDED {
-        description
-          "TODO";
-      }
-    }
-    description
-      "TODO";
-  }
-
-  grouping PLMNInfo {
-    description
-      "The PLMNInfo data type define a S-NSSAI member in a specific PLMNId, and it have
-       two attributes PLMNId and S-NSSAI (PLMNId, S-NSSAI). The PLMNId represents a data type that
-       is comprised of mcc (mobile country code) and mnc (mobile network code), (See TS 23.003
-       subclause 2.2 and 12.1) and S-NSSAI represents an data type, that is comprised of an SST
-       (Slice/Service type) and an optional SD (Slice Differentiator) field, (See TS 23.003 [13]).";
-    uses PLMNId;
-    list sNSSAIList {
-      key "sNssai";
-      uses sNSSAIConfig;
-      description "List of sNSSAIs";
-    }
-  }
-
-  grouping ManagedNFProfile {
-    description
-      "Defines profile for managed NF";
-    reference
-      "3GPP TS 23.501";
-    leaf idx {
-      type uint32;
-      description
-        "TODO";
-      reference
-        "3GPP TS 23.501";
-    }
-    leaf nfInstanceID {
-      type yang:uuid;
-      config false;
-      mandatory false;
-      description
-        "This parameter defines profile for managed NF.
-         The format of the NF Instance ID shall be a
-         Universally Unique Identifier (UUID) version 4,
-         as described in IETF RFC 4122 ";
-    }
-    leaf-list nfType {
-      type NfType;
-      config false;
-      min-elements 1;
-      description
-        "Type of the Network Function";
-    }
-    leaf hostAddr {
-      type inet:host;
-      mandatory false;
-      description
-        "Host address of a NF";
-    }
-    leaf authzInfo {
-      type string;
-      description
-        "This parameter defines NF Specific Service authorization
-         information. It shall include the NF type (s) and NF realms/origins
-         allowed to consume NF Service(s) of NF Service Producer.";
-      reference
-        "See TS 23.501";
-    }
-    leaf location {
-      type string;
-      description
-        "Information about the location of the NF instance
-         (e.g. geographic location, data center) defined by operator";
-      reference
-        "TS 29.510";
-    }
-    leaf capacity {
-      type uint16;
-      mandatory false;
-      description
-        "This parameter defines static capacity information
-         in the range of 0-65535, expressed as a weight relative to other
-         NF instances of the same type; if capacity is also present in the
-         nfServiceList parameters, those will have precedence over this value.";
-      reference
-        "TS 29.510";
-    }
-    leaf nFSrvGroupId {
-      type string;
-      description
-        "This parameter defines identity of the group that is
-         served by the NF instance.
-         May be config false or true depending on the ManagedFunction.
-         Config=true for Udrinfo. Config=false for UdmInfo and AusfInfo.
-         Shall be present if ../nfType = UDM or AUSF or UDR. ";
-      reference
-        "TS 29.510";
-    }
-    leaf-list supportedDataSetIds {
-      type enumeration {
-        enum SUBSCRIPTION {
-          description
-            "TODO";
-        }
-        enum POLICY {
-          description
-            "TODO";
-        }
-        enum EXPOSURE {
-          description
-            "TODO";
-        }
-        enum APPLICATION {
-          description
-            "TODO";
-        }
-      }
-      description
-        "List of supported data sets in the UDR instance.
-         May be present if ../nfType = UDR";
-      reference
-        "TS 29.510";
-    }
-    leaf-list smfServingAreas {
-      type string;
-      description
-        "Defines the SMF service area(s) the UPF can serve.
-         Shall be present if ../nfType = UPF";
-      reference
-        "TS 29.510";
-    }
-    leaf priority {
-      type uint16;
-      description
-        "This parameter defines Priority (relative to other NFs
-         of the same type) in the range of 0-65535, to be used for NF selection;
-         lower values indicate a higher priority. If priority is also present
-         in the nfServiceList parameters, those will have precedence over
-         this value. Shall be present if ../nfType = AMF ";
-      reference
-        "TS 29.510";
-    }
-  }
-
-
-  grouping PLMNId {
-    description
-      "TODO";
-    reference
-      "TS 23.658";
-    leaf mcc {
-      type Mcc;
-      mandatory true;
-      description
-        "TODO";
-    }
-    leaf mnc {
-      type Mnc;
-      mandatory true;
-      description
-        "TODO";
-    }
-  }
-
-  grouping AmfIdentifier {
-    description
-      "The AMFI is constructed from an AMF Region ID,
-       an AMF Set ID and an AMF Pointer.
-       The AMF Region ID identifies the region,
-       the AMF Set ID uniquely identifies the AMF Set within the AMF Region, and
-       the AMF Pointer uniquely identifies the AMF within the AMF Set. ";
-    leaf amfRegionId {
-      type AmfRegionId;
-      description
-        "TODO";
-    }
-    leaf amfSetId {
-      type AmfSetId;
-      description
-        "TODO";
-    }
-    leaf amfPointer {
-      type AmfPointer;
-      description
-        "TODO";
-    }
-  }
-
-  grouping DefaultNotificationSubscription {
-    description
-      "TODO";
-    leaf notificationType {
-      type NotificationType;
-      description
-        "TODO";
-    }
-    leaf callbackUri {
-      type inet:uri;
-      description
-        "TODO";
-    }
-    leaf n1MessageClass {
-      type N1MessageClass;
-      description
-        "TODO";
-    }
-    leaf n2InformationClass {
-      type N2InformationClass;
-      description
-        "TODO";
-    }
-  }
-
-  grouping Ipv4AddressRange {
-    description
-      "TODO";
-    leaf start {
-      type inet:ipv4-address;
-      description
-        "TODO";
-    }
-    leaf end {
-      type inet:ipv4-address;
-      description
-        "TODO";
-    }
-  }
-
-  grouping Ipv6PrefixRange {
-    description
-      "TODO";
-    leaf start {
-      type inet:ipv6-prefix;
-      description
-        "TODO";
-    }
-    leaf end {
-      type inet:ipv6-prefix;
-      description
-        "TODO";
-    }
-  }
-
-  grouping AddressWithVlan {
-    description
-      "TODO";
-    leaf ipAddress {
-      type inet:ip-address;
-      description
-        "TODO";
-    }
-    leaf vlanId {
-      type uint16;
-      description
-        "TODO";
-    }
-  }
-
-  grouping ManagedElementGroup {
-    description
-      "Abstract class representing telecommunications resources.";
-    leaf dnPrefix {
-      type DistinguishedName;
-      description
-        "Provides naming context and splits the DN into a DN Prefix and Local DN";
-    }
-    leaf userLabel {
-      type string;
-      description
-        "A user-friendly name of this object.";
-    }
-    leaf locationName {
-      type string;
-      config false;
-      description
-        "The physical location (e.g. an address) of an entity";
-    }
-    leaf-list managedBy {
-      type DistinguishedName;
-      config false;
-      description
-        "Relates to the role played by ManagementSystem";
-    }
-    leaf-list managedElementTypeList {
-      type string;
-      config false;
-      min-elements 1;
-      description
-        "The type of functionality provided by the ManagedElement.
-         It may represent one ME functionality or a combination of
-         Two examples of allowed values are:
-         -  NodeB;
-         -  HLR, VLR.";
-    }
-  } // Managed Element grouping
-
-  grouping NearRTRICGroup {
-    description
-      "Abstract class representing Near RT RIC.";
-    leaf dnPrefix {
-      type DistinguishedName;
-      description
-        "Provides naming context and splits the DN into a DN Prefix and Local DN";
-    }
-    leaf userLabel {
-      type string;
-      description
-        "A user-friendly name of this object.";
-    }
-    leaf locationName {
-      type string;
-      config false;
-      description
-        "The physical location (e.g. an address) of an entity";
-    }
-    leaf gNBId {
-          type int64 { range "0..4294967295"; }
-          config false;
-          description "Identifies a gNB within a PLMN. The gNB Identifier (gNB ID)
-            is part of the NR Cell Identifier (NCI) of the gNB cells.";
-          reference "gNB ID in 3GPP TS 38.300, Global gNB ID in 3GPP TS 38.413";
-        }
-
-       list pLMNInfoList {
-          uses PLMNInfo;
-          key "mcc mnc";
-          description "The PLMNInfoList is a list of PLMNInfo data type. It defines which PLMNs that can be served by the nearRTRIC.";
-        }
-    list RRMPolicyRatio {
-      key id;
-      leaf id {
-        type string;
-        description
-          "Key leaf";
-      }
-      container attributes {
-        uses RRMPolicyRatioGroup;
-      }
-      description " The RRMPolicyRatio IOC is one realization of a RRMPolicy_ IOC, see the
-        inheritance in Figure 4.2.1.2-1. This RRM framework allows adding new policies, both
-        standardized (like RRMPolicyRatio) or as vendor specific, by inheriting from the
-        abstract RRMPolicy_ IOC. For details see subclause 4.3.36.";
-    }
-
-  } // Near RT RIC grouping
-
-
-
-       grouping Configuration{
-               leaf configParameter{
-                       type string;
-                       description "Type of the configuration parameter";
-        }
-               leaf configValue{
-                       type int64;
-                       description "Identifies the configuration to be done for the network elements under the NearRTRIC";
-
-               }
-       }
-
-
-  grouping GNBDUFunctionGroup {
-    description
-      "Represents the GNBDUFunction IOC.";
-    reference
-      "3GPP TS 28.541";
-
-    leaf gNBId {
-      type int64 {
-        range "0..4294967295";
-      }
-      config false;
-      mandatory false;
-      description
-        "Identifies a gNB within a PLMN. The gNB Identifier (gNB ID)
-         is part of the NR Cell Identifier (NCI) of the gNB cells.";
-      reference
-        "gNB ID in 3GPP TS 38.300, Global gNB ID in 3GPP TS 38.413";
-    }
-    leaf gNBIdLength {
-      type int32 {
-        range "22..32";
-      }
-      mandatory false;
-      description
-        "Indicates the number of bits for encoding the gNB ID.";
-      reference
-        "gNB ID in 3GPP TS 38.300, Global gNB ID in 3GPP TS 38.413";
-    }
-    leaf gNBDUId {
-      type int64 {
-        range "0..68719476735";
-      }
-      mandatory false;
-      description
-        "Uniquely identifies the DU at least within a gNB.";
-      reference
-        "3GPP TS 38.473";
-    }
-    leaf gNBDUName {
-      type string {
-        length "1..150";
-      }
-      description
-        "Identifies the Distributed Unit of an NR node";
-      reference
-        "3GPP TS 38.473";
-    }
-    list RRMPolicyRatio {
-      key id;
-      leaf id {
-        type string;
-        description
-          "Key leaf";
-      }
-      container attributes {
-        uses RRMPolicyRatioGroup;
-      }
-      description " The RRMPolicyRatio IOC is one realization of a RRMPolicy_ IOC, see the
-        inheritance in Figure 4.2.1.2-1. This RRM framework allows adding new policies, both
-        standardized (like RRMPolicyRatio) or as vendor specific, by inheriting from the
-        abstract RRMPolicy_ IOC. For details see subclause 4.3.36.";
-    }
-  }
-
-  grouping NRCellDUGroup {
-    description
-      "Represents the NRCellDU IOC.";
-    reference
-      "3GPP TS 28.541";
-    list RRMPolicyRatio {
-      key id;
-      leaf id {
-        type string;
-        description
-          "Key leaf";
-      }
-      container attributes {
-        uses RRMPolicyRatioGroup;
-      }
-      description " The RRMPolicyRatio IOC is one realization of a RRMPolicy_ IOC, see the
-        inheritance in Figure 4.2.1.2-1. This RRM framework allows adding new policies, both
-        standardized (like RRMPolicyRatio) or as vendor specific, by inheriting from the
-        abstract RRMPolicy_ IOC. For details see subclause 4.3.36.";
-    }
-    leaf cellLocalId {
-      type int32 {
-        range "0..16383";
-      }
-      mandatory false;
-      description
-        "Identifies an NR cell of a gNB. Together with the
-         corresponding gNB identifier in forms the NR Cell Identity (NCI).";
-      reference
-        "NCI in 3GPP TS 38.300";
-    }
-    list pLMNInfoList {
-      key "mcc mnc";
-      min-elements 1;
-      description
-        "The PLMNInfoList is a list of PLMNInfo data type. It defines which PLMNs that
-         can be served by the NR cell, and which S-NSSAIs that can be supported by the NR cell for
-         corresponding PLMN in case of network slicing feature is supported. The plMNId of the first
-         entry of the list is the PLMNId used to construct the nCGI for the NR cell.";
-      uses PLMNInfo;
-    }
-    leaf nRPCI {
-      type int32 {
-        range "0..1007";
-      }
-      mandatory false;
-      description
-        "The Physical Cell Identity (PCI) of the NR cell.";
-      reference
-        "3GPP TS 36.211";
-    }
-    leaf nRTAC {
-      type Tac;
-      description
-        "The common 5GS Tracking Area Code for the PLMNs.";
-      reference
-        "3GPP TS 23.003, 3GPP TS 38.473";
-    }
-  } // grouping
-
-  grouping rRMPolicyMemberGroup {
-    description
-      "TODO";
-    uses PLMNId;
-    leaf sNSSAI {
-      type SNssai;
-      description
-        "This data type represents an RRM Policy member that will be part of a
-         rRMPolicyMemberList. A RRMPolicyMember is defined by its pLMNId and sNSSAI (S-NSSAI).
-         The members in a rRMPolicyMemberList are assigned a specific amount of RRM resources
-         based on settings in RRMPolicy.";
-    }
-  }
-
-  grouping RRMPolicyRatioGroup {
-
-    uses RRMPolicy_Group;    // Inherits RRMPolicy_
-
-    leaf quotaType {
-      type QuotaType;
-      mandatory false;
-      description "The type of the quota which allows to allocate resources as
-        strictly usable for defined slice(s) (strict quota) or allows that
-        resources to be used by other slice(s) when defined slice(s) do not
-        need them (float quota).";
-    }
-
-    leaf rRMPolicyMaxRatio {
-      type uint8;
-      mandatory false;
-      units percent;
-      description "The RRM policy setting the maximum percentage of radio
-        resources to be allocated to the corresponding S-NSSAI list. This
-        quota can be strict or float quota. Strict quota means resources are
-        not allowed for other sNSSAIs even when they are not used by the
-        defined sNSSAIList. Float quota resources can be used by other sNSSAIs
-        when the defined sNSSAIList do not need them. Value 0 indicates that
-        there is no maximum limit.";
-    }
-
-    leaf rRMPolicyMinRatio {
-      type uint8;
-      mandatory false;
-      units percent;
-      description "The RRM policy setting the minimum percentage of radio
-        resources to be allocated to the corresponding S-NSSAI list. This
-        quota can be strict or float quota. Strict quota means resources are
-        not allowed for other sNSSAIs even when they are not used by the
-        defined sNSSAIList. Float quota resources can be used by other sNSSAIs
-        when the defined sNSSAIList do not need them. Value 0 indicates that
-        there is no minimum limit.";
-    }
-    leaf rRMPolicyDedicatedRatio {
-      type uint8;
-      units percent;
-      description "Dedicated Ration.";
-      }
-    description "Represents the RRMPolicyRatio concrete IOC.";
-    }
-
-
-  grouping sNSSAIConfig{
-       leaf sNssai {
-        type string;
-        description "s-NSSAI of a network slice.";
-          reference "3GPP TS 23.003";
-      }
-        leaf status {
-        type string;
-        description "status of s-NSSAI";
-      }
-       list configData{
-               uses Configuration;
-               key "configParameter";
-               description "List of configurations to be done at the network elements";
-       }
-       }
-
-  grouping RRMPolicy_Group {
-    description
-      "This IOC represents the properties of an abstract RRMPolicy. The RRMPolicy_ IOC
-       needs to be subclassed to be instantiated. It defines two attributes apart from those
-       inherited from Top IOC, the resourceType attribute defines type of resource (PRB, RRC
-       connected users, DRB usage etc.) and the rRMPolicyMemberList attribute defines the
-       RRMPolicyMember(s)that are subject to this policy. An RRM resource (defined in resourceType
-       attribute) is located in NRCellDU, NRCellCU, GNBDUFunction, GNBCUCPFunction or in
-       GNBCUUPFunction. The RRMPolicyRatio IOC is one realization of a RRMPolicy_ IOC, see the
-       inheritance in TS 28.541 Figure 4.2.1.2-1. This RRM framework allows adding new policies,
-       both standardized (like RRMPolicyRatio) or as vendor specific, by inheriting from the
-       abstract RRMPolicy_ IOC.";
-    leaf resourceType {
-      type string;
-      mandatory false;
-      description
-        "The resourceType attribute defines type of resource (PRB, RRC connected users,
-         DRB usage etc.) that is subject to policy. Valid values are ''PRB'', ''RRC'' or ''DRB''";
-    }
-    list rRMPolicyMemberList {
-      key "idx";
-      leaf idx {
-        type uint32;
-        description
-          "TODO";
-      }
-      description
-        "It represents the list of RRMPolicyMember (s) that the managed object
-         is supporting. A RRMPolicyMember <<dataType>> include the PLMNId <<dataType>>
-         and S-NSSAI <<dataType>>.";
-      uses rRMPolicyMemberGroup;
-    }
-  } // grouping
-
-  grouping GNBCUUPFunctionGroup {
-    description
-      "Represents the GNBCUUPFunction IOC.";
-    reference
-      "3GPP TS 28.541";
-
-    list RRMPolicyRatio {
-      key id;
-      leaf id {
-        type string;
-        description
-          "Key leaf";
-      }
-      container attributes {
-        uses RRMPolicyRatioGroup;
-      }
-      description " The RRMPolicyRatio IOC is one realization of a RRMPolicy_ IOC, see the
-        inheritance in Figure 4.2.1.2-1. This RRM framework allows adding new policies, both
-        standardized (like RRMPolicyRatio) or as vendor specific, by inheriting from the
-        abstract RRMPolicy_ IOC. For details see subclause 4.3.36.";
-    }
-    leaf gNBCUUPId {
-      type uint64 {
-        range "0..68719476735";
-      }
-      config false;
-      mandatory false;
-      description
-        "Identifies the gNB-CU-UP at least within a gNB-CU-CP";
-      reference
-        "''gNB-CU-UP ID'' in subclause 9.3.1.15 of 3GPP TS 38.463";
-    }
-    leaf gNBId {
-      type int64 {
-      range "0..4294967295";
-    }
-      mandatory false;
-      description
-        "Indicates the number of bits for encoding the gNB Id.";
-      reference
-        "gNB Id in 3GPP TS 38.300, Global gNB ID in 3GPP TS 38.413";
-    }
-    list pLMNInfoList {
-      key "mcc mnc";
-      description
-        "The PLMNInfoList is a list of PLMNInfo data type. It defines which PLMNs that
-         can be served by the GNBCUUPFunction and which S-NSSAIs can be supported by the
-         GNBCUUPFunction for corresponding PLMN in case of network slicing feature is supported";
-      uses PLMNInfo;
-    }
-  } // grouping
-
-  grouping GNBCUCPFunctionGroup {
-    description
-      "Represents the GNBCUCPFunction IOC.";
-    reference
-      "3GPP TS 28.541";
-    list RRMPolicyRatio {
-      key id;
-      leaf id {
-        type string;
-        description
-          "Key leaf";
-      }
-      container attributes {
-        uses RRMPolicyRatioGroup;
-      }
-      description " The RRMPolicyRatio IOC is one realization of a RRMPolicy_ IOC, see the
-        inheritance in Figure 4.2.1.2-1. This RRM framework allows adding new policies, both
-        standardized (like RRMPolicyRatio) or as vendor specific, by inheriting from the
-        abstract RRMPolicy_ IOC. For details see subclause 4.3.36.";
-    }
-    leaf gNBId {
-      type int64 {
-        range "0..4294967295";
-      }
-      mandatory false;
-      description
-        "Identifies a gNB within a PLMN. The gNB Identifier (gNB ID)
-         is part of the NR Cell Identifier (NCI) of the gNB cells.";
-      reference
-        "gNB ID in 3GPP TS 38.300, Global gNB ID in 3GPP TS 38.413";
-    }
-    leaf gNBIdLength {
-      type int32 {
-        range "22..32";
-      }
-      mandatory false;
-      description
-        "Indicates the number of bits for encoding the gNB ID.";
-      reference
-        "gNB ID in 3GPP TS 38.300, Global gNB ID in 3GPP TS 38.413";
-    }
-    leaf gNBCUName {
-      type string {
-        length "1..150";
-      }
-      mandatory false;
-      description
-        "Identifies the Central Unit of an gNB.";
-      reference
-        "3GPP TS 38.473";
-    }
-    list pLMNId {
-      key "mcc mnc";
-      min-elements 1;
-      max-elements 1;
-      description
-        "The PLMN identifier to be used as part of the global RAN
-         node identity.";
-      uses PLMNId;
-    }
-  } // grouping
-
-  grouping NRCellCUGroup {
-    description
-      "Represents the NRCellCU IOC.";
-    reference
-      "3GPP TS 28.541";
-    leaf cellLocalId {
-      type int32 {
-        range "0..16383";
-      }
-      mandatory false;
-      description
-        "Identifies an NR cell of a gNB. Together with corresponding
-         gNB ID it forms the NR Cell Identifier (NCI).";
-    }
-    list pLMNInfoList {
-      key "mcc mnc";
-      min-elements 1;
-      description
-        "The PLMNInfoList is a list of PLMNInfo data type. It defines which PLMNs
-         that can be served by the NR cell, and which S-NSSAIs that can be supported by the
-         NR cell for corresponding PLMN in case of network slicing feature is supported.";
-      uses PLMNInfo;
-      // Note: Whether the attribute pLMNId in the pLMNInfo can be writable depends on the implementation.
-    }
-    list RRMPolicyRatio {
-      key id;
-      leaf id {
-        type string;
-        description
-          "Key leaf";
-      }
-      container attributes {
-        uses RRMPolicyRatioGroup;
-      }
-      description " The RRMPolicyRatio IOC is one realization of a RRMPolicy_ IOC, see the
-        inheritance in Figure 4.2.1.2-1. This RRM framework allows adding new policies, both
-        standardized (like RRMPolicyRatio) or as vendor specific, by inheriting from the
-        abstract RRMPolicy_ IOC. For details see subclause 4.3.36.";
-    }
-  } // grouping NRCellCUGroup
-
-  grouping NRCellRelationGroup {
-    description
-      "Represents the NRCellRelation IOC.";
-    reference
-      "3GPP TS 28.541";
-    leaf nRTCI {
-      type uint64;
-      description
-        "Target NR Cell Identifier. It consists of NR Cell
-         Identifier (NCI) and Physical Cell Identifier of the target NR cell
-         (nRPCI).";
-    }
-  }
-}
-'
-where name = 'cps-ran-schema-model2021-01-28.yang'
-and checksum = '436fef591eba7f38d1a0c5e3cbd3c122f01ab41dfab37cc5a9cbca1ed53b29fb';
diff --git a/cps-ri/src/main/resources/changelog/db/changes/08-update-yang-resources-cps-ran-model-rollback.sql b/cps-ri/src/main/resources/changelog/db/changes/08-update-yang-resources-cps-ran-model-rollback.sql
deleted file mode 100644 (file)
index d8cfed2..0000000
+++ /dev/null
@@ -1,1303 +0,0 @@
-update yang_resource set
-name = 'cps-ran-schema-model2021-01-28.yang',
-checksum = '436fef591eba7f38d1a0c5e3cbd3c122f01ab41dfab37cc5a9cbca1ed53b29fb',
-content = 'module cps-ran-schema-model {
-  yang-version 1.1;
-  namespace "org:onap:ccsdk:features:sdnr:northbound:cps-ran-schema-model";
-  prefix rn;
-
-  import ietf-inet-types {
-    prefix inet;
-  }
-  import ietf-yang-types {
-    prefix yang;
-  }
-
-  organization
-    "Open Network Automation Platform - ONAP
-     <https://www.onap.org>";
-  contact
-    "Editors:
-       Sandeep Shah
-       <mailto:sandeep.shah@ibm.com>
-
-       Swaminathan Seetharaman
-       <mailto:swaminathan.seetharaman@wipro.com>";
-  description
-    "This module contains a collection of YANG definitions for capturing
-     relationships among managed elements of the radio access Network
-     to be stored in ONAP CPS platform.
-
-     Copyright 2020-2021 IBM.
-
-     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.";
-
-  revision 2021-01-28 {
-    description
-      "CPS RAN Network YANG Model for ONAP/O-RAN POC";
-    reference
-      "https://wiki.onap.org/display/DW/E2E+Network+Slicing+Use+Case+in+R7+Guilin";
-  }
-
-  typedef usageState {
-    type enumeration {
-      enum IDLE {
-        description
-          "TODO";
-      }
-      enum ACTIVE {
-        description
-          "TODO";
-      }
-      enum BUSY {
-        description
-          "TODO";
-      }
-    }
-    description
-      "It describes whether or not the resource is actively in
-       use at a specific instant, and if so, whether or not it has spare
-       capacity for additional users at that instant. The value is READ-ONLY.";
-    reference
-      "ITU T Recommendation X.731";
-  }
-
-  typedef Mcc {
-    type string;
-    description
-      "The mobile country code consists of three decimal digits,
-       The first digit of the mobile country code identifies the geographic
-       region (the digits 1 and 8 are not used):";
-    reference
-      "3GPP TS 23.003 subclause 2.2 and 12.1";
-  }
-
-  typedef Mnc {
-    type string;
-    description
-      "The mobile network code consists of two or three
-       decimal digits (for example: MNC of 001 is not the same as MNC of 01)";
-    reference
-      "3GPP TS 23.003 subclause 2.2 and 12.1";
-  }
-
-  typedef Nci {
-    type string;
-    description
-      "NR Cell Identity. The NCI shall be of fixed length of 36 bits
-       and shall be coded using full hexadecimal representation.
-       The exact coding of the NCI is the responsibility of each PLMN operator";
-    reference
-      "TS 23.003";
-  }
-
-  typedef OperationalState {
-    type enumeration {
-      enum DISABLED {
-        value 0;
-        description
-          "The resource is totally inoperable.";
-      }
-      enum ENABLED {
-        value 1;
-        description
-          "The resource is partially or fully operable.";
-      }
-    }
-    description
-      "TODO";
-    reference
-      "3GPP TS 28.625 and ITU-T X.731";
-  }
-
-  typedef AvailabilityStatus {
-    type enumeration {
-      enum IN_TEST {
-        description
-          "TODO";
-      }
-      enum FAILED {
-        description
-          "TODO";
-      }
-      enum POWER_OFF {
-        description
-          "TODO";
-      }
-      enum OFF_LINE {
-        description
-          "TODO";
-      }
-      enum OFF_DUTY {
-        description
-          "TODO";
-      }
-      enum DEPENDENCY {
-        description
-          "TODO";
-      }
-      enum DEGRADED {
-        description
-          "TODO";
-      }
-      enum NOT_INSTALLED {
-        description
-          "TODO";
-      }
-      enum LOG_FULL {
-        description
-          "TODO";
-      }
-    }
-    description
-      "TODO";
-    reference
-      "TODO";
-  }
-
-  typedef CellState {
-    type enumeration {
-      enum IDLE {
-        description
-          "TODO";
-      }
-      enum INACTIVE {
-        description
-          "TODO";
-      }
-      enum ACTIVE {
-        description
-          "TODO";
-      }
-    }
-    description
-      "TODO";
-    reference
-      "TODO";
-  }
-
-  typedef SNssai {
-    type string;
-    description
-      "Single Network Slice Selection Assistance Information.";
-    reference
-      "TS 23.501 clause 5.15.2";
-  }
-
-  typedef Sst {
-    type uint8;
-    description
-      "TODO";
-    reference
-      "TODO";
-  }
-
-  typedef Nrpci {
-    type uint32;
-    description
-      "Physical Cell Identity (PCI) of the NR cell.";
-    reference
-      "TS 36.211 subclause 6.11";
-  }
-
-  typedef Tac {
-    type int32 {
-      range "0..16777215";
-    }
-    description
-      "Tracking Area Code";
-    reference
-      "TS 23.003 clause 19.4.2.3";
-  }
-
-  typedef AmfRegionId {
-    type string;
-    description
-      "";
-    reference
-      "clause 2.10.1 of 3GPP TS 23.003";
-  }
-
-  typedef AmfSetId {
-    type string;
-    description
-      "";
-    reference
-      "clause 2.10.1 of 3GPP TS 23.003";
-  }
-
-  typedef AmfPointer {
-    type string;
-    description
-      "";
-    reference
-      "clause 2.10.1 of 3GPP TS 23.003";
-  }
-
-  // type definitions especially for core NFs
-
-  typedef NfType {
-    type enumeration {
-      enum NRF {
-        description
-          "TODO";
-      }
-      enum UDM {
-        description
-          "TODO";
-      }
-      enum AMF {
-        description
-          "TODO";
-      }
-      enum SMF {
-        description
-          "TODO";
-      }
-      enum AUSF {
-        description
-          "TODO";
-      }
-      enum NEF {
-        description
-          "TODO";
-      }
-      enum PCF {
-        description
-          "TODO";
-      }
-      enum SMSF {
-        description
-          "TODO";
-      }
-      enum NSSF {
-        description
-          "TODO";
-      }
-      enum UDR {
-        description
-          "TODO";
-      }
-      enum LMF {
-        description
-          "TODO";
-      }
-      enum GMLC {
-        description
-          "TODO";
-      }
-      enum 5G_EIR {
-        description
-          "TODO";
-      }
-      enum SEPP {
-        description
-          "TODO";
-      }
-      enum UPF {
-        description
-          "TODO";
-      }
-      enum N3IWF {
-        description
-          "TODO";
-      }
-      enum AF {
-        description
-          "TODO";
-      }
-      enum UDSF {
-        description
-          "TODO";
-      }
-      enum BSF {
-        description
-          "TODO";
-      }
-      enum CHF {
-        description
-          "TODO";
-      }
-    }
-    description
-      "TODO";
-  }
-
-  typedef NotificationType {
-    type enumeration {
-      enum N1_MESSAGES {
-        description
-          "TODO";
-      }
-      enum N2_INFORMATION {
-        description
-          "TODO";
-      }
-      enum LOCATION_NOTIFICATION {
-        description
-          "TODO";
-      }
-    }
-    description
-      "TODO";
-  }
-
-  typedef Load {
-    type uint8 {
-      range "0..100";
-    }
-    description
-      "Latest known load information of the NF, percentage ";
-  }
-
-  typedef N1MessageClass {
-    type enumeration {
-      enum 5GMM {
-        description
-          "TODO";
-      }
-      enum SM {
-        description
-          "TODO";
-      }
-      enum LPP {
-        description
-          "TODO";
-      }
-      enum SMS {
-        description
-          "TODO";
-      }
-    }
-    description
-      "TODO";
-  }
-
-  typedef N2InformationClass {
-    type enumeration {
-      enum SM {
-        description
-          "TODO";
-      }
-      enum NRPPA {
-        description
-          "TODO";
-      }
-      enum PWS {
-        description
-          "TODO";
-      }
-      enum PWS_BCAL {
-        description
-          "TODO";
-      }
-      enum PWS_RF {
-        description
-          "TODO";
-      }
-    }
-    description
-      "TODO";
-    reference
-      "TODO";
-  }
-
-  typedef NsiId {
-    type string;
-    description
-      "TODO";
-  }
-
-  typedef UeMobilityLevel {
-    type enumeration {
-      enum STATIONARY {
-        description
-          "TODO";
-      }
-      enum NOMADIC {
-        description
-          "TODO";
-      }
-      enum RESTRICTED_MOBILITY {
-        description
-          "TODO";
-      }
-      enum FULLY_MOBILITY {
-        description
-          "TODO";
-      }
-    }
-    description
-      "TODO";
-    reference
-      "TODO";
-  }
-
-  typedef ResourceSharingLevel {
-    type enumeration {
-      enum SHARED {
-        description
-          "TODO";
-      }
-      enum NOT_SHARED {
-        description
-          "TODO";
-      }
-    }
-    description
-      "TODO";
-    reference
-      "TODO";
-  }
-
-  typedef TxDirection {
-    type enumeration {
-      enum DL {
-        description
-          "TODO";
-      }
-      enum UL {
-        description
-          "TODO";
-      }
-      enum DL_AND_UL {
-        description
-          "TODO";
-      }
-    }
-    description
-      "TODO";
-    reference
-      "TODO";
-  }
-
-  typedef DistinguishedName { // TODO is this equivalent to TS 32.300 ?
-    type string;
-    description
-      "Represents the international standard for the representation
-       of Distinguished Name (RFC 4512).
-       The format of the DistinguishedName REGEX is:
-       {AttributeType = AttributeValue}
-
-       AttributeType consists of alphanumeric and hyphen (OIDs not allowed).
-       All other characters are restricted.
-       The Attribute value cannot contain control characters or the
-       following characters :  > < ; " + , (Comma) and White space
-       The Attribute value can contain the following characters if they
-       are excaped :  > < ; " + , (Comma) and White space
-       The Attribute value can contain control characters if its an escaped
-       double digit hex number.
-       Examples could be
-       UID=nobody@example.com,DC=example,DC=com
-       CN=John Smith,OU=Sales,O=ACME Limited,L=Moab,ST=Utah,C=US";
-    reference
-      "RFC 4512 Lightweight Directory Access Protocol (LDAP):
-             Directory Information Models";
-  } // recheck regexp it doesn''''t handle posix [:cntrl:]
-
-  typedef QOffsetRange {
-    type int8;
-    units "dB";
-    description
-      "TODO";
-    reference
-      "TODO";
-  }
-
-  typedef QuotaType {
-    type enumeration {
-      enum STRICT {
-        description
-          "TODO";
-      }
-      enum FLOAT {
-        description
-          "TODO";
-      }
-    }
-    description
-      "TODO";
-  }
-
-  typedef CyclicPrefix {
-    type enumeration {
-      enum NORMAL {
-        description
-          "TODO";
-      }
-      enum EXTENDED {
-        description
-          "TODO";
-      }
-    }
-    description
-      "TODO";
-  }
-
-  grouping PLMNInfo {
-    description
-      "The PLMNInfo data type define a S-NSSAI member in a specific PLMNId, and it have
-       two attributes PLMNId and S-NSSAI (PLMNId, S-NSSAI). The PLMNId represents a data type that
-       is comprised of mcc (mobile country code) and mnc (mobile network code), (See TS 23.003
-       subclause 2.2 and 12.1) and S-NSSAI represents an data type, that is comprised of an SST
-       (Slice/Service type) and an optional SD (Slice Differentiator) field, (See TS 23.003 [13]).";
-    uses PLMNId;
-    list sNSSAIList {
-      key "sNssai";
-      uses sNSSAIConfig;
-      description "List of sNSSAIs";
-    }
-  }
-
-  grouping ManagedNFProfile {
-    description
-      "Defines profile for managed NF";
-    reference
-      "3GPP TS 23.501";
-    leaf idx {
-      type uint32;
-      description
-        "TODO";
-      reference
-        "3GPP TS 23.501";
-    }
-    leaf nfInstanceID {
-      type yang:uuid;
-      config false;
-      mandatory false;
-      description
-        "This parameter defines profile for managed NF.
-         The format of the NF Instance ID shall be a
-         Universally Unique Identifier (UUID) version 4,
-         as described in IETF RFC 4122 ";
-    }
-    leaf-list nfType {
-      type NfType;
-      config false;
-      min-elements 1;
-      description
-        "Type of the Network Function";
-    }
-    leaf hostAddr {
-      type inet:host;
-      mandatory false;
-      description
-        "Host address of a NF";
-    }
-    leaf authzInfo {
-      type string;
-      description
-        "This parameter defines NF Specific Service authorization
-         information. It shall include the NF type (s) and NF realms/origins
-         allowed to consume NF Service(s) of NF Service Producer.";
-      reference
-        "See TS 23.501";
-    }
-    leaf location {
-      type string;
-      description
-        "Information about the location of the NF instance
-         (e.g. geographic location, data center) defined by operator";
-      reference
-        "TS 29.510";
-    }
-    leaf capacity {
-      type uint16;
-      mandatory false;
-      description
-        "This parameter defines static capacity information
-         in the range of 0-65535, expressed as a weight relative to other
-         NF instances of the same type; if capacity is also present in the
-         nfServiceList parameters, those will have precedence over this value.";
-      reference
-        "TS 29.510";
-    }
-    leaf nFSrvGroupId {
-      type string;
-      description
-        "This parameter defines identity of the group that is
-         served by the NF instance.
-         May be config false or true depending on the ManagedFunction.
-         Config=true for Udrinfo. Config=false for UdmInfo and AusfInfo.
-         Shall be present if ../nfType = UDM or AUSF or UDR. ";
-      reference
-        "TS 29.510";
-    }
-    leaf-list supportedDataSetIds {
-      type enumeration {
-        enum SUBSCRIPTION {
-          description
-            "TODO";
-        }
-        enum POLICY {
-          description
-            "TODO";
-        }
-        enum EXPOSURE {
-          description
-            "TODO";
-        }
-        enum APPLICATION {
-          description
-            "TODO";
-        }
-      }
-      description
-        "List of supported data sets in the UDR instance.
-         May be present if ../nfType = UDR";
-      reference
-        "TS 29.510";
-    }
-    leaf-list smfServingAreas {
-      type string;
-      description
-        "Defines the SMF service area(s) the UPF can serve.
-         Shall be present if ../nfType = UPF";
-      reference
-        "TS 29.510";
-    }
-    leaf priority {
-      type uint16;
-      description
-        "This parameter defines Priority (relative to other NFs
-         of the same type) in the range of 0-65535, to be used for NF selection;
-         lower values indicate a higher priority. If priority is also present
-         in the nfServiceList parameters, those will have precedence over
-         this value. Shall be present if ../nfType = AMF ";
-      reference
-        "TS 29.510";
-    }
-  }
-
-
-  grouping PLMNId {
-    description
-      "TODO";
-    reference
-      "TS 23.658";
-    leaf mcc {
-      type Mcc;
-      mandatory true;
-      description
-        "TODO";
-    }
-    leaf mnc {
-      type Mnc;
-      mandatory true;
-      description
-        "TODO";
-    }
-  }
-
-  grouping AmfIdentifier {
-    description
-      "The AMFI is constructed from an AMF Region ID,
-       an AMF Set ID and an AMF Pointer.
-       The AMF Region ID identifies the region,
-       the AMF Set ID uniquely identifies the AMF Set within the AMF Region, and
-       the AMF Pointer uniquely identifies the AMF within the AMF Set. ";
-    leaf amfRegionId {
-      type AmfRegionId;
-      description
-        "TODO";
-    }
-    leaf amfSetId {
-      type AmfSetId;
-      description
-        "TODO";
-    }
-    leaf amfPointer {
-      type AmfPointer;
-      description
-        "TODO";
-    }
-  }
-
-  grouping DefaultNotificationSubscription {
-    description
-      "TODO";
-    leaf notificationType {
-      type NotificationType;
-      description
-        "TODO";
-    }
-    leaf callbackUri {
-      type inet:uri;
-      description
-        "TODO";
-    }
-    leaf n1MessageClass {
-      type N1MessageClass;
-      description
-        "TODO";
-    }
-    leaf n2InformationClass {
-      type N2InformationClass;
-      description
-        "TODO";
-    }
-  }
-
-  grouping Ipv4AddressRange {
-    description
-      "TODO";
-    leaf start {
-      type inet:ipv4-address;
-      description
-        "TODO";
-    }
-    leaf end {
-      type inet:ipv4-address;
-      description
-        "TODO";
-    }
-  }
-
-  grouping Ipv6PrefixRange {
-    description
-      "TODO";
-    leaf start {
-      type inet:ipv6-prefix;
-      description
-        "TODO";
-    }
-    leaf end {
-      type inet:ipv6-prefix;
-      description
-        "TODO";
-    }
-  }
-
-  grouping AddressWithVlan {
-    description
-      "TODO";
-    leaf ipAddress {
-      type inet:ip-address;
-      description
-        "TODO";
-    }
-    leaf vlanId {
-      type uint16;
-      description
-        "TODO";
-    }
-  }
-
-  grouping ManagedElementGroup {
-    description
-      "Abstract class representing telecommunications resources.";
-    leaf dnPrefix {
-      type DistinguishedName;
-      description
-        "Provides naming context and splits the DN into a DN Prefix and Local DN";
-    }
-    leaf userLabel {
-      type string;
-      description
-        "A user-friendly name of this object.";
-    }
-    leaf locationName {
-      type string;
-      config false;
-      description
-        "The physical location (e.g. an address) of an entity";
-    }
-    leaf-list managedBy {
-      type DistinguishedName;
-      config false;
-      description
-        "Relates to the role played by ManagementSystem";
-    }
-    leaf-list managedElementTypeList {
-      type string;
-      config false;
-      min-elements 1;
-      description
-        "The type of functionality provided by the ManagedElement.
-         It may represent one ME functionality or a combination of
-         Two examples of allowed values are:
-         -  NodeB;
-         -  HLR, VLR.";
-    }
-  } // Managed Element grouping
-
-  grouping NearRTRICGroup {
-    description
-      "Abstract class representing Near RT RIC.";
-    leaf dnPrefix {
-      type DistinguishedName;
-      description
-        "Provides naming context and splits the DN into a DN Prefix and Local DN";
-    }
-    leaf userLabel {
-      type string;
-      description
-        "A user-friendly name of this object.";
-    }
-    leaf locationName {
-      type string;
-      config false;
-      description
-        "The physical location (e.g. an address) of an entity";
-    }
-    leaf gNBId {
-          type int64 { range "0..4294967295"; }
-          config false;
-          description "Identifies a gNB within a PLMN. The gNB Identifier (gNB ID)
-            is part of the NR Cell Identifier (NCI) of the gNB cells.";
-          reference "gNB ID in 3GPP TS 38.300, Global gNB ID in 3GPP TS 38.413";
-        }
-
-       list pLMNInfoList {
-          uses PLMNInfo;
-          key "mcc mnc";
-          description "The PLMNInfoList is a list of PLMNInfo data type. It defines which PLMNs that can be served by the nearRTRIC.";
-        }
-    list RRMPolicyRatio {
-      key id;
-      leaf id {
-        type string;
-        description
-          "Key leaf";
-      }
-      container attributes {
-        uses RRMPolicyRatioGroup;
-      }
-      description " The RRMPolicyRatio IOC is one realization of a RRMPolicy_ IOC, see the
-        inheritance in Figure 4.2.1.2-1. This RRM framework allows adding new policies, both
-        standardized (like RRMPolicyRatio) or as vendor specific, by inheriting from the
-        abstract RRMPolicy_ IOC. For details see subclause 4.3.36.";
-    }
-
-  } // Near RT RIC grouping
-
-
-
-       grouping Configuration{
-               leaf configParameter{
-                       type string;
-                       description "Type of the configuration parameter";
-        }
-               leaf configValue{
-                       type int64;
-                       description "Identifies the configuration to be done for the network elements under the NearRTRIC";
-
-               }
-       }
-
-
-  grouping GNBDUFunctionGroup {
-    description
-      "Represents the GNBDUFunction IOC.";
-    reference
-      "3GPP TS 28.541";
-
-    leaf gNBId {
-      type int64 {
-        range "0..4294967295";
-      }
-      config false;
-      mandatory false;
-      description
-        "Identifies a gNB within a PLMN. The gNB Identifier (gNB ID)
-         is part of the NR Cell Identifier (NCI) of the gNB cells.";
-      reference
-        "gNB ID in 3GPP TS 38.300, Global gNB ID in 3GPP TS 38.413";
-    }
-    leaf gNBIdLength {
-      type int32 {
-        range "22..32";
-      }
-      mandatory false;
-      description
-        "Indicates the number of bits for encoding the gNB ID.";
-      reference
-        "gNB ID in 3GPP TS 38.300, Global gNB ID in 3GPP TS 38.413";
-    }
-    leaf gNBDUId {
-      type int64 {
-        range "0..68719476735";
-      }
-      mandatory false;
-      description
-        "Uniquely identifies the DU at least within a gNB.";
-      reference
-        "3GPP TS 38.473";
-    }
-    leaf gNBDUName {
-      type string {
-        length "1..150";
-      }
-      description
-        "Identifies the Distributed Unit of an NR node";
-      reference
-        "3GPP TS 38.473";
-    }
-    list RRMPolicyRatio {
-      key id;
-      leaf id {
-        type string;
-        description
-          "Key leaf";
-      }
-      container attributes {
-        uses RRMPolicyRatioGroup;
-      }
-      description " The RRMPolicyRatio IOC is one realization of a RRMPolicy_ IOC, see the
-        inheritance in Figure 4.2.1.2-1. This RRM framework allows adding new policies, both
-        standardized (like RRMPolicyRatio) or as vendor specific, by inheriting from the
-        abstract RRMPolicy_ IOC. For details see subclause 4.3.36.";
-    }
-  }
-
-  grouping NRCellDUGroup {
-    description
-      "Represents the NRCellDU IOC.";
-    reference
-      "3GPP TS 28.541";
-    list RRMPolicyRatio {
-      key id;
-      leaf id {
-        type string;
-        description
-          "Key leaf";
-      }
-      container attributes {
-        uses RRMPolicyRatioGroup;
-      }
-      description " The RRMPolicyRatio IOC is one realization of a RRMPolicy_ IOC, see the
-        inheritance in Figure 4.2.1.2-1. This RRM framework allows adding new policies, both
-        standardized (like RRMPolicyRatio) or as vendor specific, by inheriting from the
-        abstract RRMPolicy_ IOC. For details see subclause 4.3.36.";
-    }
-    leaf cellLocalId {
-      type int32 {
-        range "0..16383";
-      }
-      mandatory false;
-      description
-        "Identifies an NR cell of a gNB. Together with the
-         corresponding gNB identifier in forms the NR Cell Identity (NCI).";
-      reference
-        "NCI in 3GPP TS 38.300";
-    }
-    list pLMNInfoList {
-      key "mcc mnc";
-      min-elements 1;
-      description
-        "The PLMNInfoList is a list of PLMNInfo data type. It defines which PLMNs that
-         can be served by the NR cell, and which S-NSSAIs that can be supported by the NR cell for
-         corresponding PLMN in case of network slicing feature is supported. The plMNId of the first
-         entry of the list is the PLMNId used to construct the nCGI for the NR cell.";
-      uses PLMNInfo;
-    }
-    leaf nRPCI {
-      type int32 {
-        range "0..1007";
-      }
-      mandatory false;
-      description
-        "The Physical Cell Identity (PCI) of the NR cell.";
-      reference
-        "3GPP TS 36.211";
-    }
-    leaf nRTAC {
-      type Tac;
-      description
-        "The common 5GS Tracking Area Code for the PLMNs.";
-      reference
-        "3GPP TS 23.003, 3GPP TS 38.473";
-    }
-  } // grouping
-
-  grouping rRMPolicyMemberGroup {
-    description
-      "TODO";
-    uses PLMNId;
-    leaf sNSSAI {
-      type SNssai;
-      description
-        "This data type represents an RRM Policy member that will be part of a
-         rRMPolicyMemberList. A RRMPolicyMember is defined by its pLMNId and sNSSAI (S-NSSAI).
-         The members in a rRMPolicyMemberList are assigned a specific amount of RRM resources
-         based on settings in RRMPolicy.";
-    }
-  }
-
-  grouping RRMPolicyRatioGroup {
-
-    uses RRMPolicy_Group;    // Inherits RRMPolicy_
-
-    leaf quotaType {
-      type QuotaType;
-      mandatory false;
-      description "The type of the quota which allows to allocate resources as
-        strictly usable for defined slice(s) (strict quota) or allows that
-        resources to be used by other slice(s) when defined slice(s) do not
-        need them (float quota).";
-    }
-
-    leaf rRMPolicyMaxRatio {
-      type uint8;
-      mandatory false;
-      units percent;
-      description "The RRM policy setting the maximum percentage of radio
-        resources to be allocated to the corresponding S-NSSAI list. This
-        quota can be strict or float quota. Strict quota means resources are
-        not allowed for other sNSSAIs even when they are not used by the
-        defined sNSSAIList. Float quota resources can be used by other sNSSAIs
-        when the defined sNSSAIList do not need them. Value 0 indicates that
-        there is no maximum limit.";
-    }
-
-    leaf rRMPolicyMinRatio {
-      type uint8;
-      mandatory false;
-      units percent;
-      description "The RRM policy setting the minimum percentage of radio
-        resources to be allocated to the corresponding S-NSSAI list. This
-        quota can be strict or float quota. Strict quota means resources are
-        not allowed for other sNSSAIs even when they are not used by the
-        defined sNSSAIList. Float quota resources can be used by other sNSSAIs
-        when the defined sNSSAIList do not need them. Value 0 indicates that
-        there is no minimum limit.";
-    }
-    leaf rRMPolicyDedicatedRatio {
-      type uint8;
-      units percent;
-      description "Dedicated Ration.";
-      }
-    description "Represents the RRMPolicyRatio concrete IOC.";
-    }
-
-
-  grouping sNSSAIConfig{
-       leaf sNssai {
-        type string;
-        description "s-NSSAI of a network slice.";
-          reference "3GPP TS 23.003";
-      }
-        leaf status {
-        type string;
-        description "status of s-NSSAI";
-      }
-       list configData{
-               uses Configuration;
-               key "configParameter";
-               description "List of configurations to be done at the network elements";
-       }
-       }
-
-  grouping RRMPolicy_Group {
-    description
-      "This IOC represents the properties of an abstract RRMPolicy. The RRMPolicy_ IOC
-       needs to be subclassed to be instantiated. It defines two attributes apart from those
-       inherited from Top IOC, the resourceType attribute defines type of resource (PRB, RRC
-       connected users, DRB usage etc.) and the rRMPolicyMemberList attribute defines the
-       RRMPolicyMember(s)that are subject to this policy. An RRM resource (defined in resourceType
-       attribute) is located in NRCellDU, NRCellCU, GNBDUFunction, GNBCUCPFunction or in
-       GNBCUUPFunction. The RRMPolicyRatio IOC is one realization of a RRMPolicy_ IOC, see the
-       inheritance in TS 28.541 Figure 4.2.1.2-1. This RRM framework allows adding new policies,
-       both standardized (like RRMPolicyRatio) or as vendor specific, by inheriting from the
-       abstract RRMPolicy_ IOC.";
-    leaf resourceType {
-      type string;
-      mandatory false;
-      description
-        "The resourceType attribute defines type of resource (PRB, RRC connected users,
-         DRB usage etc.) that is subject to policy. Valid values are ''''PRB'''', ''''RRC'''' or ''''DRB''''";
-    }
-    list rRMPolicyMemberList {
-      key "idx";
-      leaf idx {
-        type uint32;
-        description
-          "TODO";
-      }
-      description
-        "It represents the list of RRMPolicyMember (s) that the managed object
-         is supporting. A RRMPolicyMember <<dataType>> include the PLMNId <<dataType>>
-         and S-NSSAI <<dataType>>.";
-      uses rRMPolicyMemberGroup;
-    }
-  } // grouping
-
-  grouping GNBCUUPFunctionGroup {
-    description
-      "Represents the GNBCUUPFunction IOC.";
-    reference
-      "3GPP TS 28.541";
-
-    list RRMPolicyRatio {
-      key id;
-      leaf id {
-        type string;
-        description
-          "Key leaf";
-      }
-      container attributes {
-        uses RRMPolicyRatioGroup;
-      }
-      description " The RRMPolicyRatio IOC is one realization of a RRMPolicy_ IOC, see the
-        inheritance in Figure 4.2.1.2-1. This RRM framework allows adding new policies, both
-        standardized (like RRMPolicyRatio) or as vendor specific, by inheriting from the
-        abstract RRMPolicy_ IOC. For details see subclause 4.3.36.";
-    }
-    leaf gNBCUUPId {
-      type uint64 {
-        range "0..68719476735";
-      }
-      config false;
-      mandatory false;
-      description
-        "Identifies the gNB-CU-UP at least within a gNB-CU-CP";
-      reference
-        "''''gNB-CU-UP ID'''' in subclause 9.3.1.15 of 3GPP TS 38.463";
-    }
-    leaf gNBId {
-      type int64 {
-      range "0..4294967295";
-    }
-      mandatory false;
-      description
-        "Indicates the number of bits for encoding the gNB Id.";
-      reference
-        "gNB Id in 3GPP TS 38.300, Global gNB ID in 3GPP TS 38.413";
-    }
-    list pLMNInfoList {
-      key "mcc mnc";
-      description
-        "The PLMNInfoList is a list of PLMNInfo data type. It defines which PLMNs that
-         can be served by the GNBCUUPFunction and which S-NSSAIs can be supported by the
-         GNBCUUPFunction for corresponding PLMN in case of network slicing feature is supported";
-      uses PLMNInfo;
-    }
-  } // grouping
-
-  grouping GNBCUCPFunctionGroup {
-    description
-      "Represents the GNBCUCPFunction IOC.";
-    reference
-      "3GPP TS 28.541";
-    list RRMPolicyRatio {
-      key id;
-      leaf id {
-        type string;
-        description
-          "Key leaf";
-      }
-      container attributes {
-        uses RRMPolicyRatioGroup;
-      }
-      description " The RRMPolicyRatio IOC is one realization of a RRMPolicy_ IOC, see the
-        inheritance in Figure 4.2.1.2-1. This RRM framework allows adding new policies, both
-        standardized (like RRMPolicyRatio) or as vendor specific, by inheriting from the
-        abstract RRMPolicy_ IOC. For details see subclause 4.3.36.";
-    }
-    leaf gNBId {
-      type int64 {
-        range "0..4294967295";
-      }
-      mandatory false;
-      description
-        "Identifies a gNB within a PLMN. The gNB Identifier (gNB ID)
-         is part of the NR Cell Identifier (NCI) of the gNB cells.";
-      reference
-        "gNB ID in 3GPP TS 38.300, Global gNB ID in 3GPP TS 38.413";
-    }
-    leaf gNBIdLength {
-      type int32 {
-        range "22..32";
-      }
-      mandatory false;
-      description
-        "Indicates the number of bits for encoding the gNB ID.";
-      reference
-        "gNB ID in 3GPP TS 38.300, Global gNB ID in 3GPP TS 38.413";
-    }
-    leaf gNBCUName {
-      type string {
-        length "1..150";
-      }
-      mandatory false;
-      description
-        "Identifies the Central Unit of an gNB.";
-      reference
-        "3GPP TS 38.473";
-    }
-    list pLMNId {
-      key "mcc mnc";
-      min-elements 1;
-      max-elements 1;
-      description
-        "The PLMN identifier to be used as part of the global RAN
-         node identity.";
-      uses PLMNId;
-    }
-  } // grouping
-
-  grouping NRCellCUGroup {
-    description
-      "Represents the NRCellCU IOC.";
-    reference
-      "3GPP TS 28.541";
-    leaf cellLocalId {
-      type int32 {
-        range "0..16383";
-      }
-      mandatory false;
-      description
-        "Identifies an NR cell of a gNB. Together with corresponding
-         gNB ID it forms the NR Cell Identifier (NCI).";
-    }
-    list pLMNInfoList {
-      key "mcc mnc";
-      min-elements 1;
-      description
-        "The PLMNInfoList is a list of PLMNInfo data type. It defines which PLMNs
-         that can be served by the NR cell, and which S-NSSAIs that can be supported by the
-         NR cell for corresponding PLMN in case of network slicing feature is supported.";
-      uses PLMNInfo;
-      // Note: Whether the attribute pLMNId in the pLMNInfo can be writable depends on the implementation.
-    }
-    list RRMPolicyRatio {
-      key id;
-      leaf id {
-        type string;
-        description
-          "Key leaf";
-      }
-      container attributes {
-        uses RRMPolicyRatioGroup;
-      }
-      description " The RRMPolicyRatio IOC is one realization of a RRMPolicy_ IOC, see the
-        inheritance in Figure 4.2.1.2-1. This RRM framework allows adding new policies, both
-        standardized (like RRMPolicyRatio) or as vendor specific, by inheriting from the
-        abstract RRMPolicy_ IOC. For details see subclause 4.3.36.";
-    }
-  } // grouping NRCellCUGroup
-
-  grouping NRCellRelationGroup {
-    description
-      "Represents the NRCellRelation IOC.";
-    reference
-      "3GPP TS 28.541";
-    leaf nRTCI {
-      type uint64;
-      description
-        "Target NR Cell Identifier. It consists of NR Cell
-         Identifier (NCI) and Physical Cell Identifier of the target NR cell
-         (nRPCI).";
-    '
-where name = 'cps-ran-schema-model@2021-01-28.yang'
-and checksum = 'a825c571c4a1d585a7f09a3716dedbfab1146abc4725b75a16f9ac89440bf46b';
diff --git a/cps-ri/src/main/resources/changelog/db/changes/08-update-yang-resources-ietf-inet-types-forward.sql b/cps-ri/src/main/resources/changelog/db/changes/08-update-yang-resources-ietf-inet-types-forward.sql
deleted file mode 100644 (file)
index dfab942..0000000
+++ /dev/null
@@ -1,462 +0,0 @@
-update yang_resource set
-checksum = '64e7b04e6126acc3f598f68677aa487502c6e0682d2732c817669becdfb099ba',
-content = 'module ietf-inet-types {
-
-  namespace "urn:ietf:params:xml:ns:yang:ietf-inet-types";
-  prefix "inet";
-
-  organization
-   "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
-
-  contact
-   "WG Web:   <http://tools.ietf.org/wg/netmod/>
-    WG List:  <mailto:netmod@ietf.org>
-
-    WG Chair: David Kessens
-              <mailto:david.kessens@nsn.com>
-
-    WG Chair: Juergen Schoenwaelder
-              <mailto:j.schoenwaelder@jacobs-university.de>
-
-    Editor:   Juergen Schoenwaelder
-              <mailto:j.schoenwaelder@jacobs-university.de>";
-
-  description
-   "This module contains a collection of generally useful derived
-    YANG data types for Internet addresses and related things.
-
-    Copyright (c) 2013 IETF Trust and the persons identified as
-    authors of the code.  All rights reserved.
-
-    Redistribution and use in source and binary forms, with or
-    without modification, is permitted pursuant to, and subject
-    to the license terms contained in, the Simplified BSD License
-    set forth in Section 4.c of the IETF Trust''s Legal Provisions
-    Relating to IETF Documents
-    (http://trustee.ietf.org/license-info).
-
-    This version of this YANG module is part of RFC 6991; see
-    the RFC itself for full legal notices.";
-
-  revision 2013-07-15 {
-    description
-     "This revision adds the following new data types:
-      - ip-address-no-zone
-      - ipv4-address-no-zone
-      - ipv6-address-no-zone";
-    reference
-     "RFC 6991: Common YANG Data Types";
-  }
-
-  revision 2010-09-24 {
-    description
-     "Initial revision.";
-    reference
-     "RFC 6021: Common YANG Data Types";
-  }
-
-  /*** collection of types related to protocol fields ***/
-
-  typedef ip-version {
-    type enumeration {
-      enum unknown {
-        value "0";
-        description
-         "An unknown or unspecified version of the Internet
-          protocol.";
-      }
-      enum ipv4 {
-        value "1";
-        description
-         "The IPv4 protocol as defined in RFC 791.";
-      }
-      enum ipv6 {
-        value "2";
-        description
-         "The IPv6 protocol as defined in RFC 2460.";
-      }
-    }
-    description
-     "This value represents the version of the IP protocol.
-
-      In the value set and its semantics, this type is equivalent
-      to the InetVersion textual convention of the SMIv2.";
-    reference
-     "RFC  791: Internet Protocol
-      RFC 2460: Internet Protocol, Version 6 (IPv6) Specification
-      RFC 4001: Textual Conventions for Internet Network Addresses";
-  }
-
-  typedef dscp {
-    type uint8 {
-      range "0..63";
-    }
-    description
-     "The dscp type represents a Differentiated Services Code Point
-      that may be used for marking packets in a traffic stream.
-      In the value set and its semantics, this type is equivalent
-      to the Dscp textual convention of the SMIv2.";
-    reference
-     "RFC 3289: Management Information Base for the Differentiated
-                Services Architecture
-      RFC 2474: Definition of the Differentiated Services Field
-                (DS Field) in the IPv4 and IPv6 Headers
-      RFC 2780: IANA Allocation Guidelines For Values In
-                the Internet Protocol and Related Headers";
-  }
-
-  typedef ipv6-flow-label {
-    type uint32 {
-      range "0..1048575";
-    }
-    description
-     "The ipv6-flow-label type represents the flow identifier or Flow
-      Label in an IPv6 packet header that may be used to
-      discriminate traffic flows.
-
-      In the value set and its semantics, this type is equivalent
-      to the IPv6FlowLabel textual convention of the SMIv2.";
-    reference
-     "RFC 3595: Textual Conventions for IPv6 Flow Label
-      RFC 2460: Internet Protocol, Version 6 (IPv6) Specification";
-  }
-
-  typedef port-number {
-    type uint16 {
-      range "0..65535";
-    }
-    description
-     "The port-number type represents a 16-bit port number of an
-      Internet transport-layer protocol such as UDP, TCP, DCCP, or
-      SCTP.  Port numbers are assigned by IANA.  A current list of
-      all assignments is available from <http://www.iana.org/>.
-
-      Note that the port number value zero is reserved by IANA.  In
-      situations where the value zero does not make sense, it can
-      be excluded by subtyping the port-number type.
-      In the value set and its semantics, this type is equivalent
-      to the InetPortNumber textual convention of the SMIv2.";
-    reference
-     "RFC  768: User Datagram Protocol
-      RFC  793: Transmission Control Protocol
-      RFC 4960: Stream Control Transmission Protocol
-      RFC 4340: Datagram Congestion Control Protocol (DCCP)
-      RFC 4001: Textual Conventions for Internet Network Addresses";
-  }
-
-  /*** collection of types related to autonomous systems ***/
-
-  typedef as-number {
-    type uint32;
-    description
-     "The as-number type represents autonomous system numbers
-      which identify an Autonomous System (AS).  An AS is a set
-      of routers under a single technical administration, using
-      an interior gateway protocol and common metrics to route
-      packets within the AS, and using an exterior gateway
-      protocol to route packets to other ASes.  IANA maintains
-      the AS number space and has delegated large parts to the
-      regional registries.
-
-      Autonomous system numbers were originally limited to 16
-      bits.  BGP extensions have enlarged the autonomous system
-      number space to 32 bits.  This type therefore uses an uint32
-      base type without a range restriction in order to support
-      a larger autonomous system number space.
-
-      In the value set and its semantics, this type is equivalent
-      to the InetAutonomousSystemNumber textual convention of
-      the SMIv2.";
-    reference
-     "RFC 1930: Guidelines for creation, selection, and registration
-                of an Autonomous System (AS)
-      RFC 4271: A Border Gateway Protocol 4 (BGP-4)
-      RFC 4001: Textual Conventions for Internet Network Addresses
-      RFC 6793: BGP Support for Four-Octet Autonomous System (AS)
-                Number Space";
-  }
-
-  /*** collection of types related to IP addresses and hostnames ***/
-
-  typedef ip-address {
-    type union {
-      type inet:ipv4-address;
-      type inet:ipv6-address;
-    }
-    description
-     "The ip-address type represents an IP address and is IP
-      version neutral.  The format of the textual representation
-      implies the IP version.  This type supports scoped addresses
-      by allowing zone identifiers in the address format.";
-    reference
-     "RFC 4007: IPv6 Scoped Address Architecture";
-  }
-
-  typedef ipv4-address {
-    type string {
-      pattern
-        ''(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]).){3}''
-      +  ''([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])''
-      + ''(%[p{N}p{L}]+)?'';
-    }
-    description
-      "The ipv4-address type represents an IPv4 address in
-       dotted-quad notation.  The IPv4 address may include a zone
-       index, separated by a % sign.
-
-       The zone index is used to disambiguate identical address
-       values.  For link-local addresses, the zone index will
-       typically be the interface index number or the name of an
-       interface.  If the zone index is not present, the default
-       zone of the device will be used.
-
-       The canonical format for the zone index is the numerical
-       format";
-  }
-
-  typedef ipv6-address {
-    type string {
-      pattern ''((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}''
-            + ''((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|''
-            + ''(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9]).){3}''
-            + ''(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))''
-            + ''(%[p{N}p{L}]+)?'';
-      pattern ''(([^:]+:){6}(([^:]+:[^:]+)|(.*..*)))|''
-            + ''((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)''
-            + ''(%.+)?'';
-    }
-    description
-     "The ipv6-address type represents an IPv6 address in full,
-      mixed, shortened, and shortened-mixed notation.  The IPv6
-      address may include a zone index, separated by a % sign.
-
-      The zone index is used to disambiguate identical address
-      values.  For link-local addresses, the zone index will
-      typically be the interface index number or the name of an
-      interface.  If the zone index is not present, the default
-      zone of the device will be used.
-
-      The canonical format of IPv6 addresses uses the textual
-      representation defined in Section 4 of RFC 5952.  The
-      canonical format for the zone index is the numerical
-      format as described in Section 11.2 of RFC 4007.";
-    reference
-     "RFC 4291: IP Version 6 Addressing Architecture
-      RFC 4007: IPv6 Scoped Address Architecture
-      RFC 5952: A Recommendation for IPv6 Address Text
-                Representation";
-  }
-
-  typedef ip-address-no-zone {
-    type union {
-      type inet:ipv4-address-no-zone;
-      type inet:ipv6-address-no-zone;
-    }
-    description
-     "The ip-address-no-zone type represents an IP address and is
-      IP version neutral.  The format of the textual representation
-      implies the IP version.  This type does not support scoped
-      addresses since it does not allow zone identifiers in the
-      address format.";
-    reference
-     "RFC 4007: IPv6 Scoped Address Architecture";
-  }
-
-  typedef ipv4-address-no-zone {
-    type inet:ipv4-address {
-      pattern ''[0-9.]*'';
-    }
-    description
-      "An IPv4 address without a zone index.  This type, derived from
-       ipv4-address, may be used in situations where the zone is
-       known from the context and hence no zone index is needed.";
-  }
-
-  typedef ipv6-address-no-zone {
-    type inet:ipv6-address {
-      pattern ''[0-9a-fA-F:.]*'';
-    }
-    description
-      "An IPv6 address without a zone index.  This type, derived from
-       ipv6-address, may be used in situations where the zone is
-       known from the context and hence no zone index is needed.";
-    reference
-     "RFC 4291: IP Version 6 Addressing Architecture
-      RFC 4007: IPv6 Scoped Address Architecture
-      RFC 5952: A Recommendation for IPv6 Address Text
-                Representation";
-  }
-
-  typedef ip-prefix {
-    type union {
-      type inet:ipv4-prefix;
-      type inet:ipv6-prefix;
-    }
-    description
-     "The ip-prefix type represents an IP prefix and is IP
-      version neutral.  The format of the textual representations
-      implies the IP version.";
-  }
-
-  typedef ipv4-prefix {
-    type string {
-      pattern
-         ''(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]).){3}''
-       +  ''([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])''
-       + ''/(([0-9])|([1-2][0-9])|(3[0-2]))'';
-    }
-    description
-     "The ipv4-prefix type represents an IPv4 address prefix.
-      The prefix length is given by the number following the
-      slash character and must be less than or equal to 32.
-
-      A prefix length value of n corresponds to an IP address
-      mask that has n contiguous 1-bits from the most
-      significant bit (MSB) and all other bits set to 0.
-
-      The canonical format of an IPv4 prefix has all bits of
-      the IPv4 address set to zero that are not part of the
-      IPv4 prefix.";
-  }
-
-  typedef ipv6-prefix {
-    type string {
-      pattern ''((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}''
-            + ''((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|''
-            + ''(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9]).){3}''
-            + ''(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))''
-            + ''(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))'';
-      pattern ''(([^:]+:){6}(([^:]+:[^:]+)|(.*..*)))|''
-            + ''((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)''
-            + ''(/.+)'';
-    }
-    description
-     "The ipv6-prefix type represents an IPv6 address prefix.
-      The prefix length is given by the number following the
-      slash character and must be less than or equal to 128.
-
-      A prefix length value of n corresponds to an IP address
-      mask that has n contiguous 1-bits from the most
-      significant bit (MSB) and all other bits set to 0.
-
-      The IPv6 address should have all bits that do not belong
-      to the prefix set to zero.
-
-      The canonical format of an IPv6 prefix has all bits of
-      the IPv6 address set to zero that are not part of the
-      IPv6 prefix.  Furthermore, the IPv6 address is represented
-      as defined in Section 4 of RFC 5952.";
-    reference
-     "RFC 5952: A Recommendation for IPv6 Address Text
-                Representation";
-  }
-
-  /*** collection of domain name and URI types ***/
-
-  typedef domain-name {
-    type string {
-      length "1..253";
-      pattern
-        ''((([a-zA-Z0-9_]([a-zA-Z0-9-_]){0,61})?[a-zA-Z0-9].)*''
-      + ''([a-zA-Z0-9_]([a-zA-Z0-9-_]){0,61})?[a-zA-Z0-9].?)''
-      + ''|.'';
-    }
-    description
-     "The domain-name type represents a DNS domain name.  The
-      name SHOULD be fully qualified whenever possible.
-
-      Internet domain names are only loosely specified.  Section
-      3.5 of RFC 1034 recommends a syntax (modified in Section
-      2.1 of RFC 1123).  The pattern above is intended to allow
-      for current practice in domain name use, and some possible
-      future expansion.  It is designed to hold various types of
-      domain names, including names used for A or AAAA records
-      (host names) and other records, such as SRV records.  Note
-      that Internet host names have a stricter syntax (described
-      in RFC 952) than the DNS recommendations in RFCs 1034 and
-      1123, and that systems that want to store host names in
-      schema nodes using the domain-name type are recommended to
-      adhere to this stricter standard to ensure interoperability.
-
-      The encoding of DNS names in the DNS protocol is limited
-      to 255 characters.  Since the encoding consists of labels
-      prefixed by a length bytes and there is a trailing NULL
-      byte, only 253 characters can appear in the textual dotted
-      notation.
-
-      The description clause of schema nodes using the domain-name
-      type MUST describe when and how these names are resolved to
-      IP addresses.  Note that the resolution of a domain-name value
-      may require to query multiple DNS records (e.g., A for IPv4
-      and AAAA for IPv6).  The order of the resolution process and
-      which DNS record takes precedence can either be defined
-      explicitly or may depend on the configuration of the
-      resolver.
-
-      Domain-name values use the US-ASCII encoding.  Their canonical
-      format uses lowercase US-ASCII characters.  Internationalized
-      domain names MUST be A-labels as per RFC 5890.";
-    reference
-     "RFC  952: DoD Internet Host Table Specification
-      RFC 1034: Domain Names - Concepts and Facilities
-      RFC 1123: Requirements for Internet Hosts -- Application
-                and Support
-      RFC 2782: A DNS RR for specifying the location of services
-                (DNS SRV)
-      RFC 5890: Internationalized Domain Names in Applications
-                (IDNA): Definitions and Document Framework";
-  }
-
-  typedef host {
-    type union {
-      type inet:ip-address;
-      type inet:domain-name;
-    }
-    description
-     "The host type represents either an IP address or a DNS
-      domain name.";
-  }
-
-  typedef uri {
-    type string;
-    description
-     "The uri type represents a Uniform Resource Identifier
-      (URI) as defined by STD 66.
-
-      Objects using the uri type MUST be in US-ASCII encoding,
-      and MUST be normalized as described by RFC 3986 Sections
-      6.2.1, 6.2.2.1, and 6.2.2.2.  All unnecessary
-      percent-encoding is removed, and all case-insensitive
-      characters are set to lowercase except for hexadecimal
-      digits, which are normalized to uppercase as described in
-      Section 6.2.2.1.
-
-      The purpose of this normalization is to help provide
-      unique URIs.  Note that this normalization is not
-      sufficient to provide uniqueness.  Two URIs that are
-      textually distinct after this normalization may still be
-      equivalent.
-
-      Objects using the uri type may restrict the schemes that
-      they permit.  For example, ''data:'' and ''urn:'' schemes
-      might not be appropriate.
-
-      A zero-length URI is not a valid URI.  This can be used to
-      express ''URI absent'' where required.
-
-      In the value set and its semantics, this type is equivalent
-      to the Uri SMIv2 textual convention defined in RFC 5017.";
-    reference
-     "RFC 3986: Uniform Resource Identifier (URI): Generic Syntax
-      RFC 3305: Report from the Joint W3C/IETF URI Planning Interest
-                Group: Uniform Resource Identifiers (URIs), URLs,
-                and Uniform Resource Names (URNs): Clarifications
-                and Recommendations
-      RFC 5017: MIB Textual Conventions for Uniform Resource
-                Identifiers (URIs)";
-  }
-
-}
-'
-where name = 'ietf-inet-types.yang'
-and checksum = '417a7b14944f6236ad0e2b1ef956158c050cff9b74e3561ca80af32d11be240b';
diff --git a/cps-ri/src/main/resources/changelog/db/changes/08-update-yang-resources-ietf-inet-types-rollback.sql b/cps-ri/src/main/resources/changelog/db/changes/08-update-yang-resources-ietf-inet-types-rollback.sql
deleted file mode 100644 (file)
index d67610a..0000000
+++ /dev/null
@@ -1,461 +0,0 @@
-update yang_resource set
-checksum = '417a7b14944f6236ad0e2b1ef956158c050cff9b74e3561ca80af32d11be240b',
-content = 'module ietf-inet-types {
-
-  namespace "urn:ietf:params:xml:ns:yang:ietf-inet-types";
-  prefix "inet";
-
-  organization
-   "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
-
-  contact
-   "WG Web:   <http://tools.ietf.org/wg/netmod/>
-    WG List:  <mailto:netmod@ietf.org>
-
-    WG Chair: David Kessens
-              <mailto:david.kessens@nsn.com>
-
-    WG Chair: Juergen Schoenwaelder
-              <mailto:j.schoenwaelder@jacobs-university.de>
-
-    Editor:   Juergen Schoenwaelder
-              <mailto:j.schoenwaelder@jacobs-university.de>";
-
-  description
-   "This module contains a collection of generally useful derived
-    YANG data types for Internet addresses and related things.
-
-    Copyright (c) 2013 IETF Trust and the persons identified as
-    authors of the code.  All rights reserved.
-
-    Redistribution and use in source and binary forms, with or
-    without modification, is permitted pursuant to, and subject
-    to the license terms contained in, the Simplified BSD License
-    set forth in Section 4.c of the IETF Trust''''s Legal Provisions
-    Relating to IETF Documents
-    (http://trustee.ietf.org/license-info).
-
-    This version of this YANG module is part of RFC 6991; see
-    the RFC itself for full legal notices.";
-
-  revision 2013-07-15 {
-    description
-     "This revision adds the following new data types:
-      - ip-address-no-zone
-      - ipv4-address-no-zone
-      - ipv6-address-no-zone";
-    reference
-     "RFC 6991: Common YANG Data Types";
-  }
-
-  revision 2010-09-24 {
-    description
-     "Initial revision.";
-    reference
-     "RFC 6021: Common YANG Data Types";
-  }
-
-  /*** collection of types related to protocol fields ***/
-
-  typedef ip-version {
-    type enumeration {
-      enum unknown {
-        value "0";
-        description
-         "An unknown or unspecified version of the Internet
-          protocol.";
-      }
-      enum ipv4 {
-        value "1";
-        description
-         "The IPv4 protocol as defined in RFC 791.";
-      }
-      enum ipv6 {
-        value "2";
-        description
-         "The IPv6 protocol as defined in RFC 2460.";
-      }
-    }
-    description
-     "This value represents the version of the IP protocol.
-
-      In the value set and its semantics, this type is equivalent
-      to the InetVersion textual convention of the SMIv2.";
-    reference
-     "RFC  791: Internet Protocol
-      RFC 2460: Internet Protocol, Version 6 (IPv6) Specification
-      RFC 4001: Textual Conventions for Internet Network Addresses";
-  }
-
-  typedef dscp {
-    type uint8 {
-      range "0..63";
-    }
-    description
-     "The dscp type represents a Differentiated Services Code Point
-      that may be used for marking packets in a traffic stream.
-      In the value set and its semantics, this type is equivalent
-      to the Dscp textual convention of the SMIv2.";
-    reference
-     "RFC 3289: Management Information Base for the Differentiated
-                Services Architecture
-      RFC 2474: Definition of the Differentiated Services Field
-                (DS Field) in the IPv4 and IPv6 Headers
-      RFC 2780: IANA Allocation Guidelines For Values In
-                the Internet Protocol and Related Headers";
-  }
-
-  typedef ipv6-flow-label {
-    type uint32 {
-      range "0..1048575";
-    }
-    description
-     "The ipv6-flow-label type represents the flow identifier or Flow
-      Label in an IPv6 packet header that may be used to
-      discriminate traffic flows.
-
-      In the value set and its semantics, this type is equivalent
-      to the IPv6FlowLabel textual convention of the SMIv2.";
-    reference
-     "RFC 3595: Textual Conventions for IPv6 Flow Label
-      RFC 2460: Internet Protocol, Version 6 (IPv6) Specification";
-  }
-
-  typedef port-number {
-    type uint16 {
-      range "0..65535";
-    }
-    description
-     "The port-number type represents a 16-bit port number of an
-      Internet transport-layer protocol such as UDP, TCP, DCCP, or
-      SCTP.  Port numbers are assigned by IANA.  A current list of
-      all assignments is available from <http://www.iana.org/>.
-
-      Note that the port number value zero is reserved by IANA.  In
-      situations where the value zero does not make sense, it can
-      be excluded by subtyping the port-number type.
-      In the value set and its semantics, this type is equivalent
-      to the InetPortNumber textual convention of the SMIv2.";
-    reference
-     "RFC  768: User Datagram Protocol
-      RFC  793: Transmission Control Protocol
-      RFC 4960: Stream Control Transmission Protocol
-      RFC 4340: Datagram Congestion Control Protocol (DCCP)
-      RFC 4001: Textual Conventions for Internet Network Addresses";
-  }
-
-  /*** collection of types related to autonomous systems ***/
-
-  typedef as-number {
-    type uint32;
-    description
-     "The as-number type represents autonomous system numbers
-      which identify an Autonomous System (AS).  An AS is a set
-      of routers under a single technical administration, using
-      an interior gateway protocol and common metrics to route
-      packets within the AS, and using an exterior gateway
-      protocol to route packets to other ASes.  IANA maintains
-      the AS number space and has delegated large parts to the
-      regional registries.
-
-      Autonomous system numbers were originally limited to 16
-      bits.  BGP extensions have enlarged the autonomous system
-      number space to 32 bits.  This type therefore uses an uint32
-      base type without a range restriction in order to support
-      a larger autonomous system number space.
-
-      In the value set and its semantics, this type is equivalent
-      to the InetAutonomousSystemNumber textual convention of
-      the SMIv2.";
-    reference
-     "RFC 1930: Guidelines for creation, selection, and registration
-                of an Autonomous System (AS)
-      RFC 4271: A Border Gateway Protocol 4 (BGP-4)
-      RFC 4001: Textual Conventions for Internet Network Addresses
-      RFC 6793: BGP Support for Four-Octet Autonomous System (AS)
-                Number Space";
-  }
-
-  /*** collection of types related to IP addresses and hostnames ***/
-
-  typedef ip-address {
-    type union {
-      type inet:ipv4-address;
-      type inet:ipv6-address;
-    }
-    description
-     "The ip-address type represents an IP address and is IP
-      version neutral.  The format of the textual representation
-      implies the IP version.  This type supports scoped addresses
-      by allowing zone identifiers in the address format.";
-    reference
-     "RFC 4007: IPv6 Scoped Address Architecture";
-  }
-
-  typedef ipv4-address {
-    type string {
-      pattern
-        ''''(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]).){3}''''
-      +  ''''([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])''''
-      + ''''(%[p{N}p{L}]+)?'''';
-    }
-    description
-      "The ipv4-address type represents an IPv4 address in
-       dotted-quad notation.  The IPv4 address may include a zone
-       index, separated by a % sign.
-
-       The zone index is used to disambiguate identical address
-       values.  For link-local addresses, the zone index will
-       typically be the interface index number or the name of an
-       interface.  If the zone index is not present, the default
-       zone of the device will be used.
-
-       The canonical format for the zone index is the numerical
-       format";
-  }
-
-  typedef ipv6-address {
-    type string {
-      pattern ''''((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}''''
-            + ''''((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|''''
-            + ''''(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9]).){3}''''
-            + ''''(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))''''
-            + ''''(%[p{N}p{L}]+)?'''';
-      pattern ''''(([^:]+:){6}(([^:]+:[^:]+)|(.*..*)))|''''
-            + ''''((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)''''
-            + ''''(%.+)?'''';
-    }
-    description
-     "The ipv6-address type represents an IPv6 address in full,
-      mixed, shortened, and shortened-mixed notation.  The IPv6
-      address may include a zone index, separated by a % sign.
-
-      The zone index is used to disambiguate identical address
-      values.  For link-local addresses, the zone index will
-      typically be the interface index number or the name of an
-      interface.  If the zone index is not present, the default
-      zone of the device will be used.
-
-      The canonical format of IPv6 addresses uses the textual
-      representation defined in Section 4 of RFC 5952.  The
-      canonical format for the zone index is the numerical
-      format as described in Section 11.2 of RFC 4007.";
-    reference
-     "RFC 4291: IP Version 6 Addressing Architecture
-      RFC 4007: IPv6 Scoped Address Architecture
-      RFC 5952: A Recommendation for IPv6 Address Text
-                Representation";
-  }
-
-  typedef ip-address-no-zone {
-    type union {
-      type inet:ipv4-address-no-zone;
-      type inet:ipv6-address-no-zone;
-    }
-    description
-     "The ip-address-no-zone type represents an IP address and is
-      IP version neutral.  The format of the textual representation
-      implies the IP version.  This type does not support scoped
-      addresses since it does not allow zone identifiers in the
-      address format.";
-    reference
-     "RFC 4007: IPv6 Scoped Address Architecture";
-  }
-
-  typedef ipv4-address-no-zone {
-    type inet:ipv4-address {
-      pattern ''''[0-9.]*'''';
-    }
-    description
-      "An IPv4 address without a zone index.  This type, derived from
-       ipv4-address, may be used in situations where the zone is
-       known from the context and hence no zone index is needed.";
-  }
-
-  typedef ipv6-address-no-zone {
-    type inet:ipv6-address {
-      pattern ''''[0-9a-fA-F:.]*'''';
-    }
-    description
-      "An IPv6 address without a zone index.  This type, derived from
-       ipv6-address, may be used in situations where the zone is
-       known from the context and hence no zone index is needed.";
-    reference
-     "RFC 4291: IP Version 6 Addressing Architecture
-      RFC 4007: IPv6 Scoped Address Architecture
-      RFC 5952: A Recommendation for IPv6 Address Text
-                Representation";
-  }
-
-  typedef ip-prefix {
-    type union {
-      type inet:ipv4-prefix;
-      type inet:ipv6-prefix;
-    }
-    description
-     "The ip-prefix type represents an IP prefix and is IP
-      version neutral.  The format of the textual representations
-      implies the IP version.";
-  }
-
-  typedef ipv4-prefix {
-    type string {
-      pattern
-         ''''(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]).){3}''''
-       +  ''''([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])''''
-       + ''''/(([0-9])|([1-2][0-9])|(3[0-2]))'''';
-    }
-    description
-     "The ipv4-prefix type represents an IPv4 address prefix.
-      The prefix length is given by the number following the
-      slash character and must be less than or equal to 32.
-
-      A prefix length value of n corresponds to an IP address
-      mask that has n contiguous 1-bits from the most
-      significant bit (MSB) and all other bits set to 0.
-
-      The canonical format of an IPv4 prefix has all bits of
-      the IPv4 address set to zero that are not part of the
-      IPv4 prefix.";
-  }
-
-  typedef ipv6-prefix {
-    type string {
-      pattern ''''((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}''''
-            + ''''((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|''''
-            + ''''(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9]).){3}''''
-            + ''''(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))''''
-            + ''''(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))'''';
-      pattern ''''(([^:]+:){6}(([^:]+:[^:]+)|(.*..*)))|''''
-            + ''''((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)''''
-            + ''''(/.+)'''';
-    }
-    description
-     "The ipv6-prefix type represents an IPv6 address prefix.
-      The prefix length is given by the number following the
-      slash character and must be less than or equal to 128.
-
-      A prefix length value of n corresponds to an IP address
-      mask that has n contiguous 1-bits from the most
-      significant bit (MSB) and all other bits set to 0.
-
-      The IPv6 address should have all bits that do not belong
-      to the prefix set to zero.
-
-      The canonical format of an IPv6 prefix has all bits of
-      the IPv6 address set to zero that are not part of the
-      IPv6 prefix.  Furthermore, the IPv6 address is represented
-      as defined in Section 4 of RFC 5952.";
-    reference
-     "RFC 5952: A Recommendation for IPv6 Address Text
-                Representation";
-  }
-
-  /*** collection of domain name and URI types ***/
-
-  typedef domain-name {
-    type string {
-      length "1..253";
-      pattern
-        ''''((([a-zA-Z0-9_]([a-zA-Z0-9-_]){0,61})?[a-zA-Z0-9].)*''''
-      + ''''([a-zA-Z0-9_]([a-zA-Z0-9-_]){0,61})?[a-zA-Z0-9].?)''''
-      + ''''|.'''';
-    }
-    description
-     "The domain-name type represents a DNS domain name.  The
-      name SHOULD be fully qualified whenever possible.
-
-      Internet domain names are only loosely specified.  Section
-      3.5 of RFC 1034 recommends a syntax (modified in Section
-      2.1 of RFC 1123).  The pattern above is intended to allow
-      for current practice in domain name use, and some possible
-      future expansion.  It is designed to hold various types of
-      domain names, including names used for A or AAAA records
-      (host names) and other records, such as SRV records.  Note
-      that Internet host names have a stricter syntax (described
-      in RFC 952) than the DNS recommendations in RFCs 1034 and
-      1123, and that systems that want to store host names in
-      schema nodes using the domain-name type are recommended to
-      adhere to this stricter standard to ensure interoperability.
-
-      The encoding of DNS names in the DNS protocol is limited
-      to 255 characters.  Since the encoding consists of labels
-      prefixed by a length bytes and there is a trailing NULL
-      byte, only 253 characters can appear in the textual dotted
-      notation.
-
-      The description clause of schema nodes using the domain-name
-      type MUST describe when and how these names are resolved to
-      IP addresses.  Note that the resolution of a domain-name value
-      may require to query multiple DNS records (e.g., A for IPv4
-      and AAAA for IPv6).  The order of the resolution process and
-      which DNS record takes precedence can either be defined
-      explicitly or may depend on the configuration of the
-      resolver.
-
-      Domain-name values use the US-ASCII encoding.  Their canonical
-      format uses lowercase US-ASCII characters.  Internationalized
-      domain names MUST be A-labels as per RFC 5890.";
-    reference
-     "RFC  952: DoD Internet Host Table Specification
-      RFC 1034: Domain Names - Concepts and Facilities
-      RFC 1123: Requirements for Internet Hosts -- Application
-                and Support
-      RFC 2782: A DNS RR for specifying the location of services
-                (DNS SRV)
-      RFC 5890: Internationalized Domain Names in Applications
-                (IDNA): Definitions and Document Framework";
-  }
-
-  typedef host {
-    type union {
-      type inet:ip-address;
-      type inet:domain-name;
-    }
-    description
-     "The host type represents either an IP address or a DNS
-      domain name.";
-  }
-
-  typedef uri {
-    type string;
-    description
-     "The uri type represents a Uniform Resource Identifier
-      (URI) as defined by STD 66.
-
-      Objects using the uri type MUST be in US-ASCII encoding,
-      and MUST be normalized as described by RFC 3986 Sections
-      6.2.1, 6.2.2.1, and 6.2.2.2.  All unnecessary
-      percent-encoding is removed, and all case-insensitive
-      characters are set to lowercase except for hexadecimal
-      digits, which are normalized to uppercase as described in
-      Section 6.2.2.1.
-
-      The purpose of this normalization is to help provide
-      unique URIs.  Note that this normalization is not
-      sufficient to provide uniqueness.  Two URIs that are
-      textually distinct after this normalization may still be
-      equivalent.
-
-      Objects using the uri type may restrict the schemes that
-      they permit.  For example, ''''data:'''' and ''''urn:'''' schemes
-      might not be appropriate.
-
-      A zero-length URI is not a valid URI.  This can be used to
-      express ''''URI absent'''' where required.
-
-      In the value set and its semantics, this type is equivalent
-      to the Uri SMIv2 textual convention defined in RFC 5017.";
-    reference
-     "RFC 3986: Uniform Resource Identifier (URI): Generic Syntax
-      RFC 3305: Report from the Joint W3C/IETF URI Planning Interest
-                Group: Uniform Resource Identifiers (URIs), URLs,
-                and Uniform Resource Names (URNs): Clarifications
-                and Recommendations
-      RFC 5017: MIB Textual Conventions for Uniform Resource
-                Identifiers (URIs)";
-  }
-
-}'
-where name = 'ietf-inet-types.yang'
-and checksum = '64e7b04e6126acc3f598f68677aa487502c6e0682d2732c817669becdfb099ba';
diff --git a/cps-ri/src/main/resources/changelog/db/changes/08-update-yang-resources-ietf-yang-types-forward.sql b/cps-ri/src/main/resources/changelog/db/changes/08-update-yang-resources-ietf-yang-types-forward.sql
deleted file mode 100644 (file)
index 48282aa..0000000
+++ /dev/null
@@ -1,485 +0,0 @@
-update yang_resource set
-checksum = '0c68c544f846c01751c71317339d02a504519ab05e45f50653605562df64295f',
-content = 'module ietf-yang-types {
-
-  namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types";
-  prefix "yang";
-
-  organization
-   "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
-
-  contact
-   "WG Web:   <http://tools.ietf.org/wg/netmod/>
-    WG List:  <mailto:netmod@ietf.org>
-
-    WG Chair: David Kessens
-              <mailto:david.kessens@nsn.com>
-
-    WG Chair: Juergen Schoenwaelder
-              <mailto:j.schoenwaelder@jacobs-university.de>
-
-    Editor:   Juergen Schoenwaelder
-              <mailto:j.schoenwaelder@jacobs-university.de>";
-
-  description
-   "This module contains a collection of generally useful derived
-    YANG data types.
-
-    Copyright (c) 2013 IETF Trust and the persons identified as
-    authors of the code.  All rights reserved.
-
-    Redistribution and use in source and binary forms, with or
-    without modification, is permitted pursuant to, and subject
-    to the license terms contained in, the Simplified BSD License
-    set forth in Section 4.c of the IETF Trust''s Legal Provisions
-    Relating to IETF Documents
-    (http://trustee.ietf.org/license-info).
-
-    This version of this YANG module is part of RFC 6991; see
-    the RFC itself for full legal notices.";
-
-  revision 2013-07-15 {
-    description
-     "This revision adds the following new data types:
-      - yang-identifier
-      - hex-string
-      - uuid
-      - dotted-quad";
-    reference
-     "RFC 6991: Common YANG Data Types";
-  }
-
-  revision 2010-09-24 {
-    description
-     "Initial revision.";
-    reference
-     "RFC 6021: Common YANG Data Types";
-  }
-
-  /*** collection of counter and gauge types ***/
-
-  typedef counter32 {
-    type uint32;
-    description
-     "The counter32 type represents a non-negative integer
-      that monotonically increases until it reaches a
-      maximum value of 2^32-1 (4294967295 decimal), when it
-      wraps around and starts increasing again from zero.
-
-      Counters have no defined ''initial'' value, and thus, a
-      single value of a counter has (in general) no information
-      content.  Discontinuities in the monotonically increasing
-      value normally occur at re-initialization of the
-      management system, and at other times as specified in the
-      description of a schema node using this type.  If such
-      other times can occur, for example, the creation of
-      a schema node of type counter32 at times other than
-      re-initialization, then a corresponding schema node
-      should be defined, with an appropriate type, to indicate
-      the last discontinuity.
-
-      The counter32 type should not be used for configuration
-      schema nodes.  A default statement SHOULD NOT be used in
-      combination with the type counter32.
-
-      In the value set and its semantics, this type is equivalent
-      to the Counter32 type of the SMIv2.";
-    reference
-     "RFC 2578: Structure of Management Information Version 2
-                (SMIv2)";
-  }
-
-  typedef zero-based-counter32 {
-    type yang:counter32;
-    default "0";
-    description
-     "The zero-based-counter32 type represents a counter32
-      that has the defined ''initial'' value zero.
-
-      A schema node of this type will be set to zero (0) on creation
-      and will thereafter increase monotonically until it reaches
-      a maximum value of 2^32-1 (4294967295 decimal), when it
-      wraps around and starts increasing again from zero.
-
-      Provided that an application discovers a new schema node
-      of this type within the minimum time to wrap, it can use the
-      ''initial'' value as a delta.  It is important for a management
-      station to be aware of this minimum time and the actual time
-      between polls, and to discard data if the actual time is too
-      long or there is no defined minimum time.
-
-      In the value set and its semantics, this type is equivalent
-      to the ZeroBasedCounter32 textual convention of the SMIv2.";
-    reference
-      "RFC 4502: Remote Network Monitoring Management Information
-                 Base Version 2";
-  }
-
-  typedef counter64 {
-    type uint64;
-    description
-     "The counter64 type represents a non-negative integer
-      that monotonically increases until it reaches a
-      maximum value of 2^64-1 (18446744073709551615 decimal),
-      when it wraps around and starts increasing again from zero.
-
-      Counters have no defined ''initial'' value, and thus, a
-      single value of a counter has (in general) no information
-      content.  Discontinuities in the monotonically increasing
-      value normally occur at re-initialization of the
-      management system, and at other times as specified in the
-      description of a schema node using this type.  If such
-      other times can occur, for example, the creation of
-      a schema node of type counter64 at times other than
-      re-initialization, then a corresponding schema node
-      should be defined, with an appropriate type, to indicate
-      the last discontinuity.
-
-      The counter64 type should not be used for configuration
-      schema nodes.  A default statement SHOULD NOT be used in
-      combination with the type counter64.
-
-      In the value set and its semantics, this type is equivalent
-      to the Counter64 type of the SMIv2.";
-    reference
-     "RFC 2578: Structure of Management Information Version 2
-                (SMIv2)";
-  }
-
-  typedef zero-based-counter64 {
-    type yang:counter64;
-    default "0";
-    description
-     "The zero-based-counter64 type represents a counter64 that
-      has the defined ''initial'' value zero.
-
-
-
-
-      A schema node of this type will be set to zero (0) on creation
-      and will thereafter increase monotonically until it reaches
-      a maximum value of 2^64-1 (18446744073709551615 decimal),
-      when it wraps around and starts increasing again from zero.
-
-      Provided that an application discovers a new schema node
-      of this type within the minimum time to wrap, it can use the
-      ''initial'' value as a delta.  It is important for a management
-      station to be aware of this minimum time and the actual time
-      between polls, and to discard data if the actual time is too
-      long or there is no defined minimum time.
-
-      In the value set and its semantics, this type is equivalent
-      to the ZeroBasedCounter64 textual convention of the SMIv2.";
-    reference
-     "RFC 2856: Textual Conventions for Additional High Capacity
-                Data Types";
-  }
-
-  typedef gauge32 {
-    type uint32;
-    description
-     "The gauge32 type represents a non-negative integer, which
-      may increase or decrease, but shall never exceed a maximum
-      value, nor fall below a minimum value.  The maximum value
-      cannot be greater than 2^32-1 (4294967295 decimal), and
-      the minimum value cannot be smaller than 0.  The value of
-      a gauge32 has its maximum value whenever the information
-      being modeled is greater than or equal to its maximum
-      value, and has its minimum value whenever the information
-      being modeled is smaller than or equal to its minimum value.
-      If the information being modeled subsequently decreases
-      below (increases above) the maximum (minimum) value, the
-      gauge32 also decreases (increases).
-
-      In the value set and its semantics, this type is equivalent
-      to the Gauge32 type of the SMIv2.";
-    reference
-     "RFC 2578: Structure of Management Information Version 2
-                (SMIv2)";
-  }
-
-  typedef gauge64 {
-    type uint64;
-    description
-     "The gauge64 type represents a non-negative integer, which
-      may increase or decrease, but shall never exceed a maximum
-      value, nor fall below a minimum value.  The maximum value
-      cannot be greater than 2^64-1 (18446744073709551615), and
-      the minimum value cannot be smaller than 0.  The value of
-      a gauge64 has its maximum value whenever the information
-      being modeled is greater than or equal to its maximum
-      value, and has its minimum value whenever the information
-      being modeled is smaller than or equal to its minimum value.
-      If the information being modeled subsequently decreases
-      below (increases above) the maximum (minimum) value, the
-      gauge64 also decreases (increases).
-
-      In the value set and its semantics, this type is equivalent
-      to the CounterBasedGauge64 SMIv2 textual convention defined
-      in RFC 2856";
-    reference
-     "RFC 2856: Textual Conventions for Additional High Capacity
-                Data Types";
-  }
-
-  /*** collection of identifier-related types ***/
-
-  typedef object-identifier {
-    type string {
-      pattern ''(([0-1](.[1-3]?[0-9]))|(2.(0|([1-9]d*))))''
-            + ''(.(0|([1-9]d*)))*'';
-    }
-    description
-     "The object-identifier type represents administratively
-      assigned names in a registration-hierarchical-name tree.
-
-      Values of this type are denoted as a sequence of numerical
-      non-negative sub-identifier values.  Each sub-identifier
-      value MUST NOT exceed 2^32-1 (4294967295).  Sub-identifiers
-      are separated by single dots and without any intermediate
-      whitespace.
-
-      The ASN.1 standard restricts the value space of the first
-      sub-identifier to 0, 1, or 2.  Furthermore, the value space
-      of the second sub-identifier is restricted to the range
-      0 to 39 if the first sub-identifier is 0 or 1.  Finally,
-      the ASN.1 standard requires that an object identifier
-      has always at least two sub-identifiers.  The pattern
-      captures these restrictions.
-
-      Although the number of sub-identifiers is not limited,
-      module designers should realize that there may be
-      implementations that stick with the SMIv2 limit of 128
-      sub-identifiers.
-
-      This type is a superset of the SMIv2 OBJECT IDENTIFIER type
-      since it is not restricted to 128 sub-identifiers.  Hence,
-      this type SHOULD NOT be used to represent the SMIv2 OBJECT
-      IDENTIFIER type; the object-identifier-128 type SHOULD be
-      used instead.";
-    reference
-     "ISO9834-1: Information technology -- Open Systems
-      Interconnection -- Procedures for the operation of OSI
-      Registration Authorities: General procedures and top
-      arcs of the ASN.1 Object Identifier tree";
-  }
-
-  typedef object-identifier-128 {
-    type object-identifier {
-      pattern ''d*(.d*){1,127}'';
-    }
-    description
-     "This type represents object-identifiers restricted to 128
-      sub-identifiers.
-
-      In the value set and its semantics, this type is equivalent
-      to the OBJECT IDENTIFIER type of the SMIv2.";
-    reference
-     "RFC 2578: Structure of Management Information Version 2
-                (SMIv2)";
-  }
-
-  typedef yang-identifier {
-    type string {
-      length "1..max";
-      pattern ''[a-zA-Z_][a-zA-Z0-9-_.]*'';
-      pattern ''.|..|[^xX].*|.[^mM].*|..[^lL].*'';
-    }
-    description
-      "A YANG identifier string as defined by the ''identifier''
-       rule in Section 12 of RFC 6020.  An identifier must
-       start with an alphabetic character or an underscore
-       followed by an arbitrary sequence of alphabetic or
-       numeric characters, underscores, hyphens, or dots.
-
-       A YANG identifier MUST NOT start with any possible
-       combination of the lowercase or uppercase character
-       sequence ''xml''.";
-    reference
-      "RFC 6020: YANG - A Data Modeling Language for the Network
-                 Configuration Protocol (NETCONF)";
-  }
-
-  /*** collection of types related to date and time***/
-
-  typedef date-and-time {
-    type string {
-      pattern ''d{4}-d{2}-d{2}Td{2}:d{2}:d{2}(.d+)?''
-            + ''(Z|[+-]d{2}:d{2})'';
-    }
-    description
-     "The date-and-time type is a profile of the ISO 8601
-      standard for representation of dates and times using the
-      Gregorian calendar.  The profile is defined by the
-      date-time production in Section 5.6 of RFC 3339.
-
-      The date-and-time type is compatible with the dateTime XML
-      schema type with the following notable exceptions:
-
-      (a) The date-and-time type does not allow negative years.
-
-      (b) The date-and-time time-offset -00:00 indicates an unknown
-          time zone (see RFC 3339) while -00:00 and +00:00 and Z
-          all represent the same time zone in dateTime.
-
-      (c) The canonical format (see below) of data-and-time values
-          differs from the canonical format used by the dateTime XML
-          schema type, which requires all times to be in UTC using
-          the time-offset ''Z''.
-
-      This type is not equivalent to the DateAndTime textual
-      convention of the SMIv2 since RFC 3339 uses a different
-      separator between full-date and full-time and provides
-      higher resolution of time-secfrac.
-
-      The canonical format for date-and-time values with a known time
-      zone uses a numeric time zone offset that is calculated using
-      the device''s configured known offset to UTC time.  A change of
-      the device''s offset to UTC time will cause date-and-time values
-      to change accordingly.  Such changes might happen periodically
-      in case a server follows automatically daylight saving time
-      (DST) time zone offset changes.  The canonical format for
-      date-and-time values with an unknown time zone (usually
-      referring to the notion of local time) uses the time-offset
-      -00:00.";
-    reference
-     "RFC 3339: Date and Time on the Internet: Timestamps
-      RFC 2579: Textual Conventions for SMIv2
-      XSD-TYPES: XML Schema Part 2: Datatypes Second Edition";
-  }
-
-  typedef timeticks {
-    type uint32;
-    description
-     "The timeticks type represents a non-negative integer that
-      represents the time, modulo 2^32 (4294967296 decimal), in
-      hundredths of a second between two epochs.  When a schema
-      node is defined that uses this type, the description of
-      the schema node identifies both of the reference epochs.
-
-      In the value set and its semantics, this type is equivalent
-      to the TimeTicks type of the SMIv2.";
-    reference
-     "RFC 2578: Structure of Management Information Version 2
-                (SMIv2)";
-  }
-
-  typedef timestamp {
-    type yang:timeticks;
-    description
-     "The timestamp type represents the value of an associated
-      timeticks schema node at which a specific occurrence
-      happened.  The specific occurrence must be defined in the
-      description of any schema node defined using this type.  When
-      the specific occurrence occurred prior to the last time the
-      associated timeticks attribute was zero, then the timestamp
-      value is zero.  Note that this requires all timestamp values
-      to be reset to zero when the value of the associated timeticks
-      attribute reaches 497+ days and wraps around to zero.
-
-      The associated timeticks schema node must be specified
-      in the description of any schema node using this type.
-
-      In the value set and its semantics, this type is equivalent
-      to the TimeStamp textual convention of the SMIv2.";
-    reference
-     "RFC 2579: Textual Conventions for SMIv2";
-  }
-
-  /*** collection of generic address types ***/
-
-  typedef phys-address {
-    type string {
-      pattern ''([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'';
-    }
-
-
-
-
-    description
-     "Represents media- or physical-level addresses represented
-      as a sequence octets, each octet represented by two hexadecimal
-      numbers.  Octets are separated by colons.  The canonical
-      representation uses lowercase characters.
-
-      In the value set and its semantics, this type is equivalent
-      to the PhysAddress textual convention of the SMIv2.";
-    reference
-     "RFC 2579: Textual Conventions for SMIv2";
-  }
-
-  typedef mac-address {
-    type string {
-      pattern ''[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'';
-    }
-    description
-     "The mac-address type represents an IEEE 802 MAC address.
-      The canonical representation uses lowercase characters.
-
-      In the value set and its semantics, this type is equivalent
-      to the MacAddress textual convention of the SMIv2.";
-    reference
-     "IEEE 802: IEEE Standard for Local and Metropolitan Area
-                Networks: Overview and Architecture
-      RFC 2579: Textual Conventions for SMIv2";
-  }
-
-  /*** collection of XML-specific types ***/
-
-  typedef xpath1.0 {
-    type string;
-    description
-     "This type represents an XPATH 1.0 expression.
-
-      When a schema node is defined that uses this type, the
-      description of the schema node MUST specify the XPath
-      context in which the XPath expression is evaluated.";
-    reference
-     "XPATH: XML Path Language (XPath) Version 1.0";
-  }
-
-  /*** collection of string types ***/
-
-  typedef hex-string {
-    type string {
-      pattern ''([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'';
-    }
-    description
-     "A hexadecimal string with octets represented as hex digits
-      separated by colons.  The canonical representation uses
-      lowercase characters.";
-  }
-
-  typedef uuid {
-    type string {
-      pattern ''[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-''
-            + ''[0-9a-fA-F]{4}-[0-9a-fA-F]{12}'';
-    }
-    description
-     "A Universally Unique IDentifier in the string representation
-      defined in RFC 4122.  The canonical representation uses
-      lowercase characters.
-
-      The following is an example of a UUID in string representation:
-      f81d4fae-7dec-11d0-a765-00a0c91e6bf6
-      ";
-    reference
-     "RFC 4122: A Universally Unique IDentifier (UUID) URN
-                Namespace";
-  }
-
-  typedef dotted-quad {
-    type string {
-      pattern
-        ''(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]).){3}''
-      + ''([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'';
-    }
-    description
-      "An unsigned 32-bit number expressed in the dotted-quad
-       notation, i.e., four octets written as decimal numbers
-       and separated with the ''.'' (full stop) character.";
-  }
-}
-'
-where name = 'ietf-yang-types.yang'
-and checksum = '25516798613f862ad20831e59ba02b75ecdc9c6f5547ed5d90bda76143bf0112';
diff --git a/cps-ri/src/main/resources/changelog/db/changes/08-update-yang-resources-ietf-yang-types-rollback.sql b/cps-ri/src/main/resources/changelog/db/changes/08-update-yang-resources-ietf-yang-types-rollback.sql
deleted file mode 100644 (file)
index db79f0d..0000000
+++ /dev/null
@@ -1,484 +0,0 @@
-update yang_resource set
-checksum = '25516798613f862ad20831e59ba02b75ecdc9c6f5547ed5d90bda76143bf0112',
-content = 'module ietf-yang-types {
-
-  namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types";
-  prefix "yang";
-
-  organization
-   "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
-
-  contact
-   "WG Web:   <http://tools.ietf.org/wg/netmod/>
-    WG List:  <mailto:netmod@ietf.org>
-
-    WG Chair: David Kessens
-              <mailto:david.kessens@nsn.com>
-
-    WG Chair: Juergen Schoenwaelder
-              <mailto:j.schoenwaelder@jacobs-university.de>
-
-    Editor:   Juergen Schoenwaelder
-              <mailto:j.schoenwaelder@jacobs-university.de>";
-
-  description
-   "This module contains a collection of generally useful derived
-    YANG data types.
-
-    Copyright (c) 2013 IETF Trust and the persons identified as
-    authors of the code.  All rights reserved.
-
-    Redistribution and use in source and binary forms, with or
-    without modification, is permitted pursuant to, and subject
-    to the license terms contained in, the Simplified BSD License
-    set forth in Section 4.c of the IETF Trust''''s Legal Provisions
-    Relating to IETF Documents
-    (http://trustee.ietf.org/license-info).
-
-    This version of this YANG module is part of RFC 6991; see
-    the RFC itself for full legal notices.";
-
-  revision 2013-07-15 {
-    description
-     "This revision adds the following new data types:
-      - yang-identifier
-      - hex-string
-      - uuid
-      - dotted-quad";
-    reference
-     "RFC 6991: Common YANG Data Types";
-  }
-
-  revision 2010-09-24 {
-    description
-     "Initial revision.";
-    reference
-     "RFC 6021: Common YANG Data Types";
-  }
-
-  /*** collection of counter and gauge types ***/
-
-  typedef counter32 {
-    type uint32;
-    description
-     "The counter32 type represents a non-negative integer
-      that monotonically increases until it reaches a
-      maximum value of 2^32-1 (4294967295 decimal), when it
-      wraps around and starts increasing again from zero.
-
-      Counters have no defined ''''initial'''' value, and thus, a
-      single value of a counter has (in general) no information
-      content.  Discontinuities in the monotonically increasing
-      value normally occur at re-initialization of the
-      management system, and at other times as specified in the
-      description of a schema node using this type.  If such
-      other times can occur, for example, the creation of
-      a schema node of type counter32 at times other than
-      re-initialization, then a corresponding schema node
-      should be defined, with an appropriate type, to indicate
-      the last discontinuity.
-
-      The counter32 type should not be used for configuration
-      schema nodes.  A default statement SHOULD NOT be used in
-      combination with the type counter32.
-
-      In the value set and its semantics, this type is equivalent
-      to the Counter32 type of the SMIv2.";
-    reference
-     "RFC 2578: Structure of Management Information Version 2
-                (SMIv2)";
-  }
-
-  typedef zero-based-counter32 {
-    type yang:counter32;
-    default "0";
-    description
-     "The zero-based-counter32 type represents a counter32
-      that has the defined ''''initial'''' value zero.
-
-      A schema node of this type will be set to zero (0) on creation
-      and will thereafter increase monotonically until it reaches
-      a maximum value of 2^32-1 (4294967295 decimal), when it
-      wraps around and starts increasing again from zero.
-
-      Provided that an application discovers a new schema node
-      of this type within the minimum time to wrap, it can use the
-      ''''initial'''' value as a delta.  It is important for a management
-      station to be aware of this minimum time and the actual time
-      between polls, and to discard data if the actual time is too
-      long or there is no defined minimum time.
-
-      In the value set and its semantics, this type is equivalent
-      to the ZeroBasedCounter32 textual convention of the SMIv2.";
-    reference
-      "RFC 4502: Remote Network Monitoring Management Information
-                 Base Version 2";
-  }
-
-  typedef counter64 {
-    type uint64;
-    description
-     "The counter64 type represents a non-negative integer
-      that monotonically increases until it reaches a
-      maximum value of 2^64-1 (18446744073709551615 decimal),
-      when it wraps around and starts increasing again from zero.
-
-      Counters have no defined ''''initial'''' value, and thus, a
-      single value of a counter has (in general) no information
-      content.  Discontinuities in the monotonically increasing
-      value normally occur at re-initialization of the
-      management system, and at other times as specified in the
-      description of a schema node using this type.  If such
-      other times can occur, for example, the creation of
-      a schema node of type counter64 at times other than
-      re-initialization, then a corresponding schema node
-      should be defined, with an appropriate type, to indicate
-      the last discontinuity.
-
-      The counter64 type should not be used for configuration
-      schema nodes.  A default statement SHOULD NOT be used in
-      combination with the type counter64.
-
-      In the value set and its semantics, this type is equivalent
-      to the Counter64 type of the SMIv2.";
-    reference
-     "RFC 2578: Structure of Management Information Version 2
-                (SMIv2)";
-  }
-
-  typedef zero-based-counter64 {
-    type yang:counter64;
-    default "0";
-    description
-     "The zero-based-counter64 type represents a counter64 that
-      has the defined ''''initial'''' value zero.
-
-
-
-
-      A schema node of this type will be set to zero (0) on creation
-      and will thereafter increase monotonically until it reaches
-      a maximum value of 2^64-1 (18446744073709551615 decimal),
-      when it wraps around and starts increasing again from zero.
-
-      Provided that an application discovers a new schema node
-      of this type within the minimum time to wrap, it can use the
-      ''''initial'''' value as a delta.  It is important for a management
-      station to be aware of this minimum time and the actual time
-      between polls, and to discard data if the actual time is too
-      long or there is no defined minimum time.
-
-      In the value set and its semantics, this type is equivalent
-      to the ZeroBasedCounter64 textual convention of the SMIv2.";
-    reference
-     "RFC 2856: Textual Conventions for Additional High Capacity
-                Data Types";
-  }
-
-  typedef gauge32 {
-    type uint32;
-    description
-     "The gauge32 type represents a non-negative integer, which
-      may increase or decrease, but shall never exceed a maximum
-      value, nor fall below a minimum value.  The maximum value
-      cannot be greater than 2^32-1 (4294967295 decimal), and
-      the minimum value cannot be smaller than 0.  The value of
-      a gauge32 has its maximum value whenever the information
-      being modeled is greater than or equal to its maximum
-      value, and has its minimum value whenever the information
-      being modeled is smaller than or equal to its minimum value.
-      If the information being modeled subsequently decreases
-      below (increases above) the maximum (minimum) value, the
-      gauge32 also decreases (increases).
-
-      In the value set and its semantics, this type is equivalent
-      to the Gauge32 type of the SMIv2.";
-    reference
-     "RFC 2578: Structure of Management Information Version 2
-                (SMIv2)";
-  }
-
-  typedef gauge64 {
-    type uint64;
-    description
-     "The gauge64 type represents a non-negative integer, which
-      may increase or decrease, but shall never exceed a maximum
-      value, nor fall below a minimum value.  The maximum value
-      cannot be greater than 2^64-1 (18446744073709551615), and
-      the minimum value cannot be smaller than 0.  The value of
-      a gauge64 has its maximum value whenever the information
-      being modeled is greater than or equal to its maximum
-      value, and has its minimum value whenever the information
-      being modeled is smaller than or equal to its minimum value.
-      If the information being modeled subsequently decreases
-      below (increases above) the maximum (minimum) value, the
-      gauge64 also decreases (increases).
-
-      In the value set and its semantics, this type is equivalent
-      to the CounterBasedGauge64 SMIv2 textual convention defined
-      in RFC 2856";
-    reference
-     "RFC 2856: Textual Conventions for Additional High Capacity
-                Data Types";
-  }
-
-  /*** collection of identifier-related types ***/
-
-  typedef object-identifier {
-    type string {
-      pattern ''''(([0-1](.[1-3]?[0-9]))|(2.(0|([1-9]d*))))''''
-            + ''''(.(0|([1-9]d*)))*'''';
-    }
-    description
-     "The object-identifier type represents administratively
-      assigned names in a registration-hierarchical-name tree.
-
-      Values of this type are denoted as a sequence of numerical
-      non-negative sub-identifier values.  Each sub-identifier
-      value MUST NOT exceed 2^32-1 (4294967295).  Sub-identifiers
-      are separated by single dots and without any intermediate
-      whitespace.
-
-      The ASN.1 standard restricts the value space of the first
-      sub-identifier to 0, 1, or 2.  Furthermore, the value space
-      of the second sub-identifier is restricted to the range
-      0 to 39 if the first sub-identifier is 0 or 1.  Finally,
-      the ASN.1 standard requires that an object identifier
-      has always at least two sub-identifiers.  The pattern
-      captures these restrictions.
-
-      Although the number of sub-identifiers is not limited,
-      module designers should realize that there may be
-      implementations that stick with the SMIv2 limit of 128
-      sub-identifiers.
-
-      This type is a superset of the SMIv2 OBJECT IDENTIFIER type
-      since it is not restricted to 128 sub-identifiers.  Hence,
-      this type SHOULD NOT be used to represent the SMIv2 OBJECT
-      IDENTIFIER type; the object-identifier-128 type SHOULD be
-      used instead.";
-    reference
-     "ISO9834-1: Information technology -- Open Systems
-      Interconnection -- Procedures for the operation of OSI
-      Registration Authorities: General procedures and top
-      arcs of the ASN.1 Object Identifier tree";
-  }
-
-  typedef object-identifier-128 {
-    type object-identifier {
-      pattern ''''d*(.d*){1,127}'''';
-    }
-    description
-     "This type represents object-identifiers restricted to 128
-      sub-identifiers.
-
-      In the value set and its semantics, this type is equivalent
-      to the OBJECT IDENTIFIER type of the SMIv2.";
-    reference
-     "RFC 2578: Structure of Management Information Version 2
-                (SMIv2)";
-  }
-
-  typedef yang-identifier {
-    type string {
-      length "1..max";
-      pattern ''''[a-zA-Z_][a-zA-Z0-9-_.]*'''';
-      pattern ''''.|..|[^xX].*|.[^mM].*|..[^lL].*'''';
-    }
-    description
-      "A YANG identifier string as defined by the ''''identifier''''
-       rule in Section 12 of RFC 6020.  An identifier must
-       start with an alphabetic character or an underscore
-       followed by an arbitrary sequence of alphabetic or
-       numeric characters, underscores, hyphens, or dots.
-
-       A YANG identifier MUST NOT start with any possible
-       combination of the lowercase or uppercase character
-       sequence ''''xml''''.";
-    reference
-      "RFC 6020: YANG - A Data Modeling Language for the Network
-                 Configuration Protocol (NETCONF)";
-  }
-
-  /*** collection of types related to date and time***/
-
-  typedef date-and-time {
-    type string {
-      pattern ''''d{4}-d{2}-d{2}Td{2}:d{2}:d{2}(.d+)?''''
-            + ''''(Z|[+-]d{2}:d{2})'''';
-    }
-    description
-     "The date-and-time type is a profile of the ISO 8601
-      standard for representation of dates and times using the
-      Gregorian calendar.  The profile is defined by the
-      date-time production in Section 5.6 of RFC 3339.
-
-      The date-and-time type is compatible with the dateTime XML
-      schema type with the following notable exceptions:
-
-      (a) The date-and-time type does not allow negative years.
-
-      (b) The date-and-time time-offset -00:00 indicates an unknown
-          time zone (see RFC 3339) while -00:00 and +00:00 and Z
-          all represent the same time zone in dateTime.
-
-      (c) The canonical format (see below) of data-and-time values
-          differs from the canonical format used by the dateTime XML
-          schema type, which requires all times to be in UTC using
-          the time-offset ''''Z''''.
-
-      This type is not equivalent to the DateAndTime textual
-      convention of the SMIv2 since RFC 3339 uses a different
-      separator between full-date and full-time and provides
-      higher resolution of time-secfrac.
-
-      The canonical format for date-and-time values with a known time
-      zone uses a numeric time zone offset that is calculated using
-      the device''''s configured known offset to UTC time.  A change of
-      the device''''s offset to UTC time will cause date-and-time values
-      to change accordingly.  Such changes might happen periodically
-      in case a server follows automatically daylight saving time
-      (DST) time zone offset changes.  The canonical format for
-      date-and-time values with an unknown time zone (usually
-      referring to the notion of local time) uses the time-offset
-      -00:00.";
-    reference
-     "RFC 3339: Date and Time on the Internet: Timestamps
-      RFC 2579: Textual Conventions for SMIv2
-      XSD-TYPES: XML Schema Part 2: Datatypes Second Edition";
-  }
-
-  typedef timeticks {
-    type uint32;
-    description
-     "The timeticks type represents a non-negative integer that
-      represents the time, modulo 2^32 (4294967296 decimal), in
-      hundredths of a second between two epochs.  When a schema
-      node is defined that uses this type, the description of
-      the schema node identifies both of the reference epochs.
-
-      In the value set and its semantics, this type is equivalent
-      to the TimeTicks type of the SMIv2.";
-    reference
-     "RFC 2578: Structure of Management Information Version 2
-                (SMIv2)";
-  }
-
-  typedef timestamp {
-    type yang:timeticks;
-    description
-     "The timestamp type represents the value of an associated
-      timeticks schema node at which a specific occurrence
-      happened.  The specific occurrence must be defined in the
-      description of any schema node defined using this type.  When
-      the specific occurrence occurred prior to the last time the
-      associated timeticks attribute was zero, then the timestamp
-      value is zero.  Note that this requires all timestamp values
-      to be reset to zero when the value of the associated timeticks
-      attribute reaches 497+ days and wraps around to zero.
-
-      The associated timeticks schema node must be specified
-      in the description of any schema node using this type.
-
-      In the value set and its semantics, this type is equivalent
-      to the TimeStamp textual convention of the SMIv2.";
-    reference
-     "RFC 2579: Textual Conventions for SMIv2";
-  }
-
-  /*** collection of generic address types ***/
-
-  typedef phys-address {
-    type string {
-      pattern ''''([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'''';
-    }
-
-
-
-
-    description
-     "Represents media- or physical-level addresses represented
-      as a sequence octets, each octet represented by two hexadecimal
-      numbers.  Octets are separated by colons.  The canonical
-      representation uses lowercase characters.
-
-      In the value set and its semantics, this type is equivalent
-      to the PhysAddress textual convention of the SMIv2.";
-    reference
-     "RFC 2579: Textual Conventions for SMIv2";
-  }
-
-  typedef mac-address {
-    type string {
-      pattern ''''[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'''';
-    }
-    description
-     "The mac-address type represents an IEEE 802 MAC address.
-      The canonical representation uses lowercase characters.
-
-      In the value set and its semantics, this type is equivalent
-      to the MacAddress textual convention of the SMIv2.";
-    reference
-     "IEEE 802: IEEE Standard for Local and Metropolitan Area
-                Networks: Overview and Architecture
-      RFC 2579: Textual Conventions for SMIv2";
-  }
-
-  /*** collection of XML-specific types ***/
-
-  typedef xpath1.0 {
-    type string;
-    description
-     "This type represents an XPATH 1.0 expression.
-
-      When a schema node is defined that uses this type, the
-      description of the schema node MUST specify the XPath
-      context in which the XPath expression is evaluated.";
-    reference
-     "XPATH: XML Path Language (XPath) Version 1.0";
-  }
-
-  /*** collection of string types ***/
-
-  typedef hex-string {
-    type string {
-      pattern ''''([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'''';
-    }
-    description
-     "A hexadecimal string with octets represented as hex digits
-      separated by colons.  The canonical representation uses
-      lowercase characters.";
-  }
-
-  typedef uuid {
-    type string {
-      pattern ''''[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-''''
-            + ''''[0-9a-fA-F]{4}-[0-9a-fA-F]{12}'''';
-    }
-    description
-     "A Universally Unique IDentifier in the string representation
-      defined in RFC 4122.  The canonical representation uses
-      lowercase characters.
-
-      The following is an example of a UUID in string representation:
-      f81d4fae-7dec-11d0-a765-00a0c91e6bf6
-      ";
-    reference
-     "RFC 4122: A Universally Unique IDentifier (UUID) URN
-                Namespace";
-  }
-
-  typedef dotted-quad {
-    type string {
-      pattern
-        ''''(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]).){3}''''
-      + ''''([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'''';
-    }
-    description
-      "An unsigned 32-bit number expressed in the dotted-quad
-       notation, i.e., four octets written as decimal numbers
-       and separated with the ''''.'''' (full stop) character.";
-  }
-}'
-where name = 'ietf-yang-types.yang'
-and checksum = '0c68c544f846c01751c71317339d02a504519ab05e45f50653605562df64295f';
diff --git a/cps-ri/src/main/resources/changelog/db/changes/08-update-yang-resources.yaml b/cps-ri/src/main/resources/changelog/db/changes/08-update-yang-resources.yaml
deleted file mode 100644 (file)
index a71b59a..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# ============LICENSE_START=======================================================
-# Copyright (c) 2021 Bell Canada.
-# ================================================================================
-# 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.
-# ============LICENSE_END=========================================================
-
-databaseChangeLog:
-  - changeSet:
-      id: 8
-      author: cps
-      label: xnf-data-preload
-      comment: Fix Yang model for cps ran
-      changes:
-        - sqlFile:
-            path: changelog/db/changes/08-update-yang-resources-cps-ran-model-forward.sql
-        - sqlFile:
-            path: changelog/db/changes/08-update-yang-resources-ietf-yang-types-forward.sql
-        - sqlFile:
-            path: changelog/db/changes/08-update-yang-resources-ietf-inet-types-forward.sql
-      rollback:
-        - sqlFile:
-            path: changelog/db/changes/08-update-yang-resources-cps-ran-model-rollback.sql
-        - sqlFile:
-            path: changelog/db/changes/08-update-yang-resources-ietf-yang-types-rollback.sql
-        - sqlFile:
-            path: changelog/db/changes/08-update-yang-resources-ietf-inet-types-rollback.sql
diff --git a/cps-ri/src/main/resources/changelog/db/changes/09-loadData-dmi-registry-schema-set.yaml b/cps-ri/src/main/resources/changelog/db/changes/09-loadData-dmi-registry-schema-set.yaml
deleted file mode 100644 (file)
index 723c2b9..0000000
+++ /dev/null
@@ -1,210 +0,0 @@
-# ============LICENSE_START=======================================================
-# Copyright (C) 2021-2022 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
-      label: dmi-registry-schema-preload
-      id: 9
-      loadUpdateData:
-        encoding: UTF-8
-        file: 'changelog/db/changes/data/dmi/dataspace.csv'
-        onlyUpdate: 'false'
-        primaryKey: 'id'
-        quotchar: '"'
-        separator: '|'
-        tableName: 'dataspace'
-      rollback:
-        - sql:
-            sql: delete from dataspace where name = 'NCMP-Admin'
-
-  - changeSet:
-      author: cps
-      label: dmi-registry-schema-preload
-      id: 9.1
-      loadUpdateData:
-        encoding: UTF-8
-        file: 'changelog/db/changes/data/dmi/schema_set.csv'
-        onlyUpdate: 'false'
-        primaryKey: 'id'
-        quotchar: '"'
-        separator: '|'
-        tableName: 'schema_set'
-      rollback:
-        - sql:
-            sql: delete from schema_set where name = 'ncmp-dmi-registry-model'
-
-  - changeSet:
-      author: cps
-      label: dmi-registry-schema-preload
-      id: 9.2
-      loadUpdateData:
-        encoding: UTF-8
-        file: 'changelog/db/changes/data/dmi/yang_resource.csv'
-        onlyUpdate: 'false'
-        primaryKey: 'id'
-        quotchar: '"'
-        separator: '|'
-        tableName: 'yang_resource'
-        columns:
-          - column:
-              header:  name
-              name:  name
-              type:  STRING
-          - column:
-              header:  content
-              name: content
-              type: STRING
-          - column:
-              header:  checksum
-              name: checksum
-              type: STRING
-      rollback:
-        - sql:
-            sql: delete from yang_resource where name = 'dmi-registry@2021-05-20.yang'
-
-  - changeSet:
-      author: cps
-      label: dmi-registry-schema-preload
-      id: 9.3
-      loadUpdateData:
-        encoding: UTF-8
-        file: 'changelog/db/changes/data/dmi/schema_set_yang_resources.csv'
-        quotchar: '"'
-        primaryKey: 'schema_set_id,yang_resource_id'
-        separator: '|'
-        tableName: 'schema_set_yang_resources'
-        usePreparedStatements:  true
-      rollback:
-        - sql:
-            sql: >
-              delete from schema_set_yang_resources
-              where schema_set_id = (select id from schema_set where name = 'ncmp-dmi-registry-model')
-              and yang_resource_id = (select id from yang_resource where name = 'dmi-registry@2021-05-20.yang')
-
-  - changeSet:
-      author: cps
-      label: dmi-registry-schema-preload
-      id: 9.4
-      loadUpdateData:
-        encoding: UTF-8
-        file: 'changelog/db/changes/data/dmi/anchor.csv'
-        onlyUpdate: 'false'
-        primaryKey: 'id'
-        quotchar: '"'
-        separator: '|'
-        tableName: 'anchor'
-      rollback:
-        - sql:
-            sql: delete from anchor where name = 'ncmp-dmi-registry'
-
-  - changeSet:
-      author: cps
-      label: dmi-registry-schema-preload
-      id: 9.5
-      loadUpdateData:
-        encoding: UTF-8
-        file: 'changelog/db/changes/data/dmi/yang_resource@2021-10-20.csv'
-        onlyUpdate: 'false'
-        primaryKey: 'id'
-        quotchar: '"'
-        separator: '|'
-        tableName: 'yang_resource'
-        columns:
-          - column:
-              header:  name
-              name:  name
-              type:  STRING
-          - column:
-              header:  content
-              name: content
-              type: STRING
-          - column:
-              header:  checksum
-              name: checksum
-              type: STRING
-      rollback:
-        - sql:
-            sql: delete from yang_resource where name = 'dmi-registry@2021-10-20.yang'
-
-  - changeSet:
-      author: cps
-      label: dmi-registry-schema-preload
-      id: 9.6
-      loadUpdateData:
-        encoding: UTF-8
-        file: 'changelog/db/changes/data/dmi/schema_set_yang_resources@2021-10-20.csv'
-        quotchar: '"'
-        primaryKey: 'schema_set_id,yang_resource_id'
-        separator: '|'
-        tableName: 'schema_set_yang_resources'
-        usePreparedStatements:  true
-      rollback:
-        - sql:
-            sql: >
-              delete from schema_set_yang_resources
-              where schema_set_id = (select id from schema_set where name = 'ncmp-dmi-registry-model')
-              and yang_resource_id = (select id from yang_resource where name = 'dmi-registry@2021-10-20.yang')
-
-  - changeSet:
-      author: cps
-      label: dmi-registry-schema-preload
-      id: 9.7
-      loadUpdateData:
-        encoding: UTF-8
-        file: 'changelog/db/changes/data/dmi//generated-csv/generated_yang_resource_dmi-registry@2021-12-13.csv'
-        onlyUpdate: 'false'
-        primaryKey: 'id'
-        quotchar: '"'
-        separator: '|'
-        tableName: 'yang_resource'
-        columns:
-          - column:
-              header:  name
-              name:  name
-              type:  STRING
-          - column:
-              header:  content
-              name: content
-              type: STRING
-          - column:
-              header:  checksum
-              name: checksum
-              type: STRING
-      rollback:
-        - sql:
-            sql: delete from yang_resource where name = 'dmi-registry@2021-12-13.yang'
-
-  - changeSet:
-      author: cps
-      label: dmi-registry-schema-preload
-      id: 9.8
-      loadUpdateData:
-        encoding: UTF-8
-        file: 'changelog/db/changes/data/dmi/schema_set_yang_resources@2021-12-13.csv'
-        quotchar: '"'
-        primaryKey: 'schema_set_id,yang_resource_id'
-        separator: '|'
-        tableName: 'schema_set_yang_resources'
-        usePreparedStatements:  true
-      rollback:
-        - sql:
-            sql: >
-              delete from schema_set_yang_resources
-              where schema_set_id = (select id from schema_set where name = 'ncmp-dmi-registry-model')
-              and yang_resource_id = (select id from yang_resource where name = 'dmi-registry@2021-12-13.yang')
\ No newline at end of file
diff --git a/cps-ri/src/main/resources/changelog/db/changes/10-loadData-dmi-registry-fragment.yaml b/cps-ri/src/main/resources/changelog/db/changes/10-loadData-dmi-registry-fragment.yaml
deleted file mode 100644 (file)
index b78c920..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-# ============LICENSE_START=======================================================
-# Copyright (C) 2021-2022 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
-      label: dmi-registry-schema-preload
-      id: 10
-      loadUpdateData:
-        encoding: UTF-8
-        file: 'changelog/db/changes/data/dmi/fragment.csv'
-        onlyUpdate: 'false'
-        primaryKey: 'id'
-        quotchar: '"'
-        separator: '|'
-        tableName: 'fragment'
-        columns:
-          - column:
-              header: id
-              name: id
-              type: NUMERIC
-          - column:
-              header: xpath
-              name: xpath
-              type: STRING
-          - column:
-              header: attributes
-              name: attributes
-              type: CLOB
-          - column:
-              header: anchor_id
-              name: anchor_id
-              type: NUMERIC
-          - column:
-              header: parent_id
-              name: parent_id
-              type: NUMERIC
-          - column:
-              header: dataspace_id
-              name: dataspace_id
-              type: NUMERIC
-          - column:
-              header: schema_node_id
-              name: schema_node_id
-              type: NUMERIC
-      rollback:
-        sql: DELETE FROM fragment WHERE xpath = '/dmi-registry' AND anchor_id = (select id from anchor where name='ncmp-dmi-registry') AND dataspace_id = (select id from dataspace where name='NCMP-Admin')
-        comment: Removes the fragment added by fragment.csv file
-
-  - changeSet:
-      author: cps
-      label: dmi-registry-schema-preload
-      id: 10.1
-      changes:
-        - sql:
-            comment: Fixes the id sequence after data insert with predefined ids
-            dbms: postgresql
-            sql: ALTER SEQUENCE IF EXISTS fragment_id_seq RESTART WITH 200
-      rollback:
-        comment: Rollback for 10.1 is not supported. Please rollback change set 10 to undo change set 10.1. Cannot revert sequence altering.
-
-  - changeSet:
-      author: cps
-      label: dmi-registry-schema-preload
-      id: 10.2
-      changes:
-        - sql:
-            comment: Sets sequence value to current max value of the ID from the fragment table
-            dbms: postgresql
-            sql: SELECT setval('fragment_id_seq', (SELECT MAX(ID) FROM fragment))
-      rollback:
-        sql: SELECT setval('fragment_id_seq', 200)
-        comment: Rollback Sequence to restart with the sequence number in the last changeset
\ No newline at end of file
diff --git a/cps-ri/src/main/resources/changelog/db/changes/11-add-column-to-yang-resources-table.yaml b/cps-ri/src/main/resources/changelog/db/changes/11-add-column-to-yang-resources-table.yaml
deleted file mode 100644 (file)
index 8643a05..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-# ============LICENSE_START=======================================================
-# Copyright (C) 2021-2022 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:
-      id: 11
-      label: add-module-name-and-revision-column
-      author: cps
-      changes:
-        - addColumn:
-            tableName: yang_resource
-            columns:
-              - column:
-                  name: module_name
-                  type: TEXT
-              - column:
-                  name: revision
-                  type: TEXT
-
-  - changeSet:
-      id: 11.1
-      label: update-previous-data-module-name-and-revision
-      author: cps
-      changes:
-        - sql:
-            sql: update yang_resource set module_name = 'dummy_module_name', revision = '2021-08-04' where module_name is null and revision is null
-      rollback:
-        sql: update yang_resource set module_name = null, revision = null where module_name = 'dummy_module_name' and revision = '2021-08-04'
\ No newline at end of file
diff --git a/cps-ri/src/main/resources/changelog/db/changes/12-delete-all-previous-dmi-registry-schema-set.yaml b/cps-ri/src/main/resources/changelog/db/changes/12-delete-all-previous-dmi-registry-schema-set.yaml
deleted file mode 100644 (file)
index 9eda029..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-# ============LICENSE_START=======================================================
-# Copyright (C) 2022 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
-      label: dmi-registry-schema-delete
-      id: 12
-      sql: delete from schema_set_yang_resources
-        where schema_set_id = (select id from schema_set where name = 'ncmp-dmi-registry-model')
-        and yang_resource_id = (select id from yang_resource where name = 'dmi-registry@2021-05-20.yang')
-      rollback:
-        loadUpdateData:
-          encoding: UTF-8
-          file: 'changelog/db/changes/data/dmi/schema_set_yang_resources.csv'
-          quotchar: '"'
-          primaryKey: 'schema_set_id,yang_resource_id'
-          separator: '|'
-          tableName: 'schema_set_yang_resources'
-          usePreparedStatements: true
-
-  - changeSet:
-      author: cps
-      label: dmi-registry-schema-delete
-      id: 12.1
-      sql: delete from yang_resource where name = 'dmi-registry@2021-05-20.yang'
-      rollback:
-        loadUpdateData:
-          encoding: UTF-8
-          file: 'changelog/db/changes/data/dmi/yang_resource.csv'
-          onlyUpdate: 'false'
-          primaryKey: 'id'
-          quotchar: '"'
-          separator: '|'
-          tableName: 'yang_resource'
-          columns:
-            - column:
-                header: name
-                name: name
-                type: STRING
-            - column:
-                header: content
-                name: content
-                type: STRING
-            - column:
-                header: checksum
-                name: checksum
-                type: STRING
-        sql: update yang_resource set module_name = 'dummy_module_name', revision = '2021-08-04' where module_name is null and revision is null
-
-  - changeSet:
-      author: cps
-      label: dmi-registry-schema-delete
-      id: 12.2
-      sql: delete from schema_set_yang_resources
-        where schema_set_id = (select id from schema_set where name = 'ncmp-dmi-registry-model')
-        and yang_resource_id = (select id from yang_resource where name = 'dmi-registry@2021-10-20.yang')
-      rollback:
-        loadUpdateData:
-          encoding: UTF-8
-          file: 'changelog/db/changes/data/dmi/schema_set_yang_resources@2021-10-20.csv'
-          quotchar: '"'
-          primaryKey: 'schema_set_id,yang_resource_id'
-          separator: '|'
-          tableName: 'schema_set_yang_resources'
-          usePreparedStatements: true
-
-  - changeSet:
-      author: cps
-      label: dmi-registry-schema-delete
-      id: 12.3
-      sql: delete from yang_resource where name = 'dmi-registry@2021-10-20.yang'
-      rollback:
-        loadUpdateData:
-          encoding: UTF-8
-          file: 'changelog/db/changes/data/dmi/yang_resource@2021-10-20.csv'
-          onlyUpdate: 'false'
-          primaryKey: 'id'
-          quotchar: '"'
-          separator: '|'
-          tableName: 'yang_resource'
-          columns:
-            - column:
-                header: name
-                name: name
-                type: STRING
-            - column:
-                header: content
-                name: content
-                type: STRING
-            - column:
-                header: checksum
-                name: checksum
-                type: STRING
-        sql: update yang_resource set module_name = 'dummy_module_name', revision = '2021-08-04' where module_name is null and revision is null
-
-  - changeSet:
-      author: cps
-      label: dmi-registry-schema-delete
-      id: 12.4
-      sql: delete from schema_set_yang_resources
-        where schema_set_id = (select id from schema_set where name = 'ncmp-dmi-registry-model')
-        and yang_resource_id = (select id from yang_resource where name = 'dmi-registry@2021-12-13.yang')
-      rollback:
-        loadUpdateData:
-          encoding: UTF-8
-          file: 'changelog/db/changes/data/dmi/schema_set_yang_resources@2021-12-13.csv'
-          quotchar: '"'
-          primaryKey: 'schema_set_id,yang_resource_id'
-          separator: '|'
-          tableName: 'schema_set_yang_resources'
-          usePreparedStatements: true
-
-  - changeSet:
-      author: cps
-      label: dmi-registry-schema-delete
-      id: 12.5
-      sql: delete from yang_resource where name = 'dmi-registry@2021-12-13.yang'
-      rollback:
-        loadUpdateData:
-          encoding: UTF-8
-          file: 'changelog/db/changes/data/dmi//generated-csv/generated_yang_resource_dmi-registry@2021-12-13.csv'
-          onlyUpdate: 'false'
-          primaryKey: 'id'
-          quotchar: '"'
-          separator: '|'
-          tableName: 'yang_resource'
-          columns:
-            - column:
-                header: name
-                name: name
-                type: STRING
-            - column:
-                header: content
-                name: content
-                type: STRING
-            - column:
-                header: checksum
-                name: checksum
-                type: STRING
-        sql: update yang_resource set module_name = 'dummy_module_name', revision = '2021-08-04' where module_name is null and revision is null
-
diff --git a/cps-ri/src/main/resources/changelog/db/changes/13-insert-dmi-registry-2022-02-10-schema-set.yaml b/cps-ri/src/main/resources/changelog/db/changes/13-insert-dmi-registry-2022-02-10-schema-set.yaml
deleted file mode 100644 (file)
index 3351b54..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-# ============LICENSE_START=======================================================
-# Copyright (C) 2022 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
-      label: dmi-registry-schema-load-revision-2022-02-10
-      id: 13
-      loadUpdateData:
-        encoding: UTF-8
-        file: 'changelog/db/changes/data/dmi/generated-csv/generated_yang_resource_dmi-registry@2022-02-10.csv'
-        onlyUpdate: 'false'
-        primaryKey: 'id'
-        quotchar: '"'
-        separator: '|'
-        tableName: 'yang_resource'
-        columns:
-          - column:
-              header: name
-              name: name
-              type: STRING
-          - column:
-              header: content
-              name: content
-              type: STRING
-          - column:
-              header: checksum
-              name: checksum
-              type: STRING
-          - column:
-              header: module_name
-              name: module_name
-              type: STRING
-          - column:
-              header: revision
-              name: revision
-              type: STRING
-      rollback:
-        - sql:
-            sql: delete from yang_resource where name = 'dmi-registry@2022-02-10.yang'
-
-  - changeSet:
-      author: cps
-      label: dmi-registry-schema-load-revision-2022-02-10
-      id: 13.1
-      sql: INSERT INTO schema_set_yang_resources (schema_set_id, yang_resource_id)
-        VALUES ((select id from schema_set where name = 'ncmp-dmi-registry-model'), (select id from yang_resource where name = 'dmi-registry@2022-02-10.yang'));
-      rollback:
-        sql: delete from schema_set_yang_resources
-          where schema_set_id = (select id from schema_set where name = 'ncmp-dmi-registry-model')
-          and yang_resource_id = (select id from yang_resource where name = 'dmi-registry@2022-02-10.yang')
\ No newline at end of file
diff --git a/cps-ri/src/main/resources/changelog/db/changes/14-loadData-dmi-registry-2022-05-10-schema-set.yaml b/cps-ri/src/main/resources/changelog/db/changes/14-loadData-dmi-registry-2022-05-10-schema-set.yaml
deleted file mode 100644 (file)
index da39d22..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-# ============LICENSE_START=======================================================
-# Copyright (C) 2022 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
-      label: dmi-registry-schema-delete
-      id: 14
-      sql: DELETE FROM schema_set_yang_resources
-        where schema_set_id = (select id from schema_set where name = 'ncmp-dmi-registry-model')
-        and yang_resource_id = (select id from yang_resource where name = 'dmi-registry@2022-02-10.yang')
-      rollback:
-        sql: INSERT INTO schema_set_yang_resources (schema_set_id, yang_resource_id)
-          VALUES ((select id from schema_set where name = 'ncmp-dmi-registry-model'), (select id from yang_resource where name = 'dmi-registry@2022-02-10.yang'));
-
-  - changeSet:
-      author: cps
-      label: dmi-registry-schema-delete
-      id: 14.1
-      sql: DELETE FROM yang_resource where name = 'dmi-registry@2022-02-10.yang'
-      rollback:
-        loadUpdateData:
-          encoding: UTF-8
-          file: 'changelog/db/changes/data/dmi//generated-csv/generated_yang_resource_dmi-registry@2022-02-10.csv'
-          onlyUpdate: 'false'
-          primaryKey: 'id'
-          quotchar: '"'
-          separator: '|'
-          tableName: 'yang_resource'
-          columns:
-            - column:
-                header: name
-                name: name
-                type: STRING
-            - column:
-                header: content
-                name: content
-                type: STRING
-            - column:
-                header: checksum
-                name: checksum
-                type: STRING
-            - column:
-                header: module_name
-                name: module_name
-                type: STRING
-            - column:
-                header: revision
-                name: revision
-                type: STRING
-
-  - changeSet:
-      author: cps
-      label: dmi-registry-schema-load-revision-2022-05-10
-      id: 14.2
-      loadUpdateData:
-        encoding: UTF-8
-        file: 'changelog/db/changes/data/dmi/generated-csv/generated_yang_resource_dmi-registry@2022-05-10.csv'
-        onlyUpdate: 'false'
-        primaryKey: 'id'
-        quotchar: '"'
-        separator: '|'
-        tableName: 'yang_resource'
-        columns:
-          - column:
-              header: name
-              name: name
-              type: STRING
-          - column:
-              header: content
-              name: content
-              type: STRING
-          - column:
-              header: checksum
-              name: checksum
-              type: STRING
-          - column:
-              header: module_name
-              name: module_name
-              type: STRING
-          - column:
-              header: revision
-              name: revision
-              type: STRING
-      rollback:
-        - sql:
-            sql: DELETE FROM yang_resource where name = 'dmi-registry@2022-05-10.yang'
-
-  - changeSet:
-      author: cps
-      label: dmi-registry-schema-load-revision-2022-05-10
-      id: 14.3
-      sql: INSERT INTO schema_set_yang_resources (schema_set_id, yang_resource_id)
-        VALUES ((select id from schema_set where name = 'ncmp-dmi-registry-model'), (select id from yang_resource where name = 'dmi-registry@2022-05-10.yang'));
-      rollback:
-        sql: DELETE FROM schema_set_yang_resources
-          where schema_set_id = (select id from schema_set where name = 'ncmp-dmi-registry-model')
-          and yang_resource_id = (select id from yang_resource where name = 'dmi-registry@2022-05-10.yang')
\ No newline at end of file
diff --git a/cps-ri/src/main/resources/changelog/db/changes/15-rename-column-yang-resource-table.yaml b/cps-ri/src/main/resources/changelog/db/changes/15-rename-column-yang-resource-table.yaml
deleted file mode 100644 (file)
index 71f11a5..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-databaseChangeLog:
-  - changeSet:
-      author: cps
-      label: yang-resource-rename-column
-      id: 15
-      changes:
-        - renameColumn:
-            tableName: yang_resource
-            columnDataType: TEXT
-            oldColumnName: name
-            newColumnName: file_name
-      rollback:
-        - sql:
-            sql: alter table yang_resource rename column file_name to name
\ No newline at end of file
diff --git a/cps-ri/src/main/resources/changelog/db/changes/16-insert-cm-handle-state-forward.sql b/cps-ri/src/main/resources/changelog/db/changes/16-insert-cm-handle-state-forward.sql
deleted file mode 100644 (file)
index 01d441f..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-INSERT INTO
-       fragment(
-               xpath,
-               attributes,
-               anchor_id,
-               parent_id,
-               dataspace_id,
-               schema_node_id
-       )
-SELECT
-       concat(cmHandles.xpath, '/state') AS xpath,
-       to_jsonb(
-               concat(
-                       '{"cm-handle-state": "READY", "last-update-time": "',
-                       to_char(
-                               now(),
-                               'YYYY-MM-DD"T"HH24:MI:SS.MSTZHTZM'
-                       ),
-                       '", "data-sync-enabled": false}'
-               ) :: json
-       ) AS attributes,
-       cmHandles.anchor_id,
-       cmHandles.id,
-       cmHandles.dataspace_id,
-       cmHandles.schema_node_id
-FROM
-       (
-               SELECT
-                       id,
-                       xpath,
-                       anchor_id,
-                       dataspace_id,
-                       schema_node_id
-               FROM
-                       fragment
-               WHERE
-                       xpath ~* '^/dmi-registry/cm-handles\[@id=''[\w\-]+''\]$'
-                       AND xpath NOT IN (
-                               SELECT
-                                       SUBSTRING(
-                                               xpath
-                                               FROM
-                                                       '^/dmi-registry/cm-handles\[@id=''[\w\-]+''\]'
-                                       )
-                               FROM
-                                       fragment
-                               WHERE
-                                       xpath ~* '^/dmi-registry/cm-handles\[@id=''[\w\-]+''\]/state$'
-                       )
-       ) AS cmHandles;
-INSERT INTO
-       fragment(
-               xpath,
-               attributes,
-               anchor_id,
-               parent_id,
-               dataspace_id,
-               schema_node_id
-       )
-SELECT
-       concat(cmHandlesStates.xpath, '/datastores'),
-       to_jsonb('{}' :: json),
-       cmHandlesStates.anchor_id,
-       cmHandlesStates.id,
-       cmHandlesStates.dataspace_id,
-       cmHandlesStates.schema_node_id
-FROM
-       (
-               SELECT
-                       id,
-                       xpath,
-                       anchor_id,
-                       dataspace_id,
-                       schema_node_id
-               FROM
-                       fragment
-               WHERE
-                       xpath ~* '^/dmi-registry/cm-handles\[@id=''[\w\-]+''\]/state$'
-                       AND xpath NOT IN (
-                               SELECT
-                                       SUBSTRING(
-                                               xpath
-                                               FROM
-                                                       '^/dmi-registry/cm-handles\[@id=''[\w\-]+''\]/state'
-                                       )
-                               FROM
-                                       fragment
-                               WHERE
-                                       xpath ~* '^/dmi-registry/cm-handles\[@id=''[\w\-]+''\]/state/datastores$'
-                       )
-       ) AS cmHandlesStates;
-INSERT INTO
-       fragment(
-               xpath,
-               attributes,
-               anchor_id,
-               parent_id,
-               dataspace_id,
-               schema_node_id
-       )
-SELECT
-       concat(
-               cmHandlesDatastores.xpath,
-               '/operational'
-       ),
-       to_jsonb(
-               concat('{"sync-state": "NONE_REQUESTED"}') :: json
-       ),
-       cmHandlesDatastores.anchor_id,
-       cmHandlesDatastores.id,
-       cmHandlesDatastores.dataspace_id,
-       cmHandlesDatastores.schema_node_id
-FROM
-       (
-               SELECT
-                       id,
-                       xpath,
-                       anchor_id,
-                       dataspace_id,
-                       schema_node_id
-               FROM
-                       fragment
-               WHERE
-                       xpath ~* '^/dmi-registry/cm-handles\[@id=''[\w\-]+''\]/state/datastores$'
-                       AND xpath NOT IN (
-                               SELECT
-                                       SUBSTRING(
-                                               xpath
-                                               FROM
-                                                       '^/dmi-registry/cm-handles\[@id=''[\w\-]+''\]/state/datastores'
-                                       )
-                               FROM
-                                       fragment
-                               WHERE
-                                       xpath ~* '^/dmi-registry/cm-handles\[@id=''[\w\-]+''\]/state/datastores/operational$'
-                       )
-       ) AS cmHandlesDatastores;
\ No newline at end of file
diff --git a/cps-ri/src/main/resources/changelog/db/changes/16-insert-cm-handle-state-rollback.sql b/cps-ri/src/main/resources/changelog/db/changes/16-insert-cm-handle-state-rollback.sql
deleted file mode 100644 (file)
index 4b006ef..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-DELETE FROM fragment WHERE xpath ~* '^/dmi-registry/cm-handles\[@id=''[\w\-]+''\]/state/lock-reason$';
-DELETE FROM fragment WHERE xpath ~* '^/dmi-registry/cm-handles\[@id=''[\w\-]+''\]/state/datastores/operational$';
-DELETE FROM fragment WHERE xpath ~* '^/dmi-registry/cm-handles\[@id=''[\w\-]+''\]/state/datastores$';
-DELETE FROM fragment WHERE xpath ~* '^/dmi-registry/cm-handles\[@id=''[\w\-]+''\]/state$';
\ No newline at end of file
diff --git a/cps-ri/src/main/resources/changelog/db/changes/16-insert-cm-handle-state.yaml b/cps-ri/src/main/resources/changelog/db/changes/16-insert-cm-handle-state.yaml
deleted file mode 100644 (file)
index 0f8c429..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-databaseChangeLog:
-  - changeSet:
-      author: cps
-      label: insert-cm-handle-state
-      id: 16
-      changes:
-        - sqlFile:
-            path: changelog/db/changes/16-insert-cm-handle-state-forward.sql
-      rollback:
-        - sqlFile:
-            path: changelog/db/changes/16-insert-cm-handle-state-rollback.sql
\ No newline at end of file
diff --git a/cps-ri/src/main/resources/changelog/db/changes/17-add-index-to-schema-set-yang-resources.yaml b/cps-ri/src/main/resources/changelog/db/changes/17-add-index-to-schema-set-yang-resources.yaml
deleted file mode 100644 (file)
index bc16725..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-databaseChangeLog:
-  - changeSet:
-      author: cps
-      id: 17
-      changes:
-        - createIndex:
-            columns:
-              - column:
-                  name: schema_set_id
-            indexName: FKI_SCHEMA_SET_YANG_RESOURCES_SCHEMA_SET_ID_FK
-            tableName: schema_set_yang_resources
-      rollback:
-        - dropIndex:
-            indexName: FKI_SCHEMA_SET_YANG_RESOURCES_SCHEMA_SET_ID_FK
-            tableName: schema_set_yang_resources
diff --git a/cps-ri/src/main/resources/changelog/db/changes/18-cascade-delete-fragment-children.yaml b/cps-ri/src/main/resources/changelog/db/changes/18-cascade-delete-fragment-children.yaml
deleted file mode 100644 (file)
index 62a9e2f..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-databaseChangeLog:
-  - changeSet:
-      author: cps
-      id: 18
-      changes:
-        - dropForeignKeyConstraint:
-            baseTableName: fragment
-            constraintName: fragment_parent_id_fkey
-        - addForeignKeyConstraint:
-            baseColumnNames: parent_id
-            baseTableName: fragment
-            constraintName: fragment_parent_id_fkey
-            deferrable: false
-            initiallyDeferred: false
-            onDelete: CASCADE
-            onUpdate: NO ACTION
-            referencedColumnNames: id
-            referencedTableName: fragment
-            validate: true
-      rollback:
-        - dropForeignKeyConstraint:
-            baseTableName: fragment
-            constraintName: fragment_parent_id_fkey
-        - addForeignKeyConstraint:
-            baseColumnNames: parent_id
-            baseTableName: fragment
-            constraintName: fragment_parent_id_fkey
-            deferrable: false
-            initiallyDeferred: false
-            onDelete: NO ACTION
-            onUpdate: NO ACTION
-            referencedColumnNames: id
-            referencedTableName: fragment
-            validate: true
diff --git a/cps-ri/src/main/resources/changelog/db/changes/19-delete-not-required-dataspace-id-from-fragment.yaml b/cps-ri/src/main/resources/changelog/db/changes/19-delete-not-required-dataspace-id-from-fragment.yaml
deleted file mode 100644 (file)
index 7b91bd5..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-# ============LICENSE_START=======================================================
-# Copyright (C) 2023 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:
-      id: 19-1
-      author: cps
-      changes:
-        - dropIndex:
-            indexName: FKI_FRAGMENT_DATASPACE_ID_FK
-            tableName: fragment
-      rollback:
-        - createIndex:
-            columns:
-              - column:
-                  name: dataspace_id
-            indexName: FKI_FRAGMENT_DATASPACE_ID_FK
-            tableName: fragment
-
-  - changeSet:
-      id: 19-2
-      author: cps
-      changes:
-        - dropUniqueConstraint:
-            constraintName: fragment_dataspace_id_anchor_id_xpath_key
-            tableName: fragment
-        - addUniqueConstraint:
-            columnNames: anchor_id, xpath
-            constraintName: fragment_anchor_id_xpath_key
-            tableName: fragment
-      rollback:
-        - dropUniqueConstraint:
-            constraintName: fragment_anchor_id_xpath_key
-            tableName: fragment
-        - addUniqueConstraint:
-            columnNames: dataspace_id, anchor_id, xpath
-            constraintName: fragment_dataspace_id_anchor_id_xpath_key
-            tableName: fragment
-
-  - changeSet:
-      id: 19-3
-      author: cps
-      changes:
-        - dropForeignKeyConstraint:
-            baseTableName: fragment
-            constraintName: fragment_dataspace_id_fkey
-      rollback:
-        - addForeignKeyConstraint:
-            baseColumnNames: dataspace_id
-            baseTableName: fragment
-            constraintName: fragment_dataspace_id_fkey
-            deferrable: false
-            initiallyDeferred: false
-            onDelete: NO ACTION
-            onUpdate: NO ACTION
-            referencedColumnNames: id
-            referencedTableName: dataspace
-            validate: true
-
-  - changeSet:
-      id: 19-4
-      author: cps
-      changes:
-        - dropColumn:
-            columnName: dataspace_id
-            tableName: fragment
-      rollback:
-        - addColumn:
-            tableName: fragment
-            columns:
-              - column:
-                  name: dataspace_id
-                  type: INTEGER
-        - sqlFile:
-            path: changelog/db/changes/19-repopulate-dataspace-id-for-rollback.sql
-        - addNotNullConstraint:
-            tableName: fragment
-            columnName: dataspace_id
-            columnDataType: INTEGER
-
-  - changeSet:
-      id: 19-5
-      author: cps
-      changes:
-        - addNotNullConstraint:
-            tableName: fragment
-            columnName: anchor_id
-            columnDataType: BIGINT
-      rollback:
-        - dropNotNullConstraint:
-            tableName: fragment
-            columnName: anchor_id
-            columnDataType: BIGINT
diff --git a/cps-ri/src/main/resources/changelog/db/changes/20-change-foreign-key-id-types-to-integer.yaml b/cps-ri/src/main/resources/changelog/db/changes/20-change-foreign-key-id-types-to-integer.yaml
deleted file mode 100644 (file)
index 4c0cd9f..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# ============LICENSE_START=======================================================
-# Copyright (C) 2023 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: 20
-      changes:
-        - modifyDataType:
-            columnName: dataspace_id
-            newDataType: INTEGER
-            tableName: schema_set
-        - modifyDataType:
-            columnName: schema_set_id
-            newDataType: INTEGER
-            tableName: schema_set_yang_resources
-        - modifyDataType:
-            columnName: yang_resource_id
-            newDataType: INTEGER
-            tableName: schema_set_yang_resources
-      rollback:
-        - modifyDataType:
-            columnName: dataspace_id
-            newDataType: BIGINT
-            tableName: schema_set
-        - modifyDataType:
-            columnName: schema_set_id
-            newDataType: BIGINT
-            tableName: schema_set_yang_resources
-        - modifyDataType:
-            columnName: yang_resource_id
-            newDataType: BIGINT
-            tableName: schema_set_yang_resources
diff --git a/cps-ri/src/main/resources/changelog/db/changes/21-escape-quotes-in-xpath.yaml b/cps-ri/src/main/resources/changelog/db/changes/21-escape-quotes-in-xpath.yaml
deleted file mode 100644 (file)
index 7b5b1db..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-# ============LICENSE_START=======================================================
-# Copyright (C) 2023 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:
-      id: 21
-      author: cps
-      changes:
-        - sqlFile:
-            path: changelog/db/changes/21-escape-quotes-in-xpath-forward.sql
-      rollback:
-        - sqlFile:
-            path: changelog/db/changes/21-escape-quotes-in-xpath-rollback.sql
diff --git a/cps-ri/src/main/resources/changelog/db/changes/data/anchor.csv b/cps-ri/src/main/resources/changelog/db/changes/data/anchor.csv
deleted file mode 100644 (file)
index 78dd914..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-name|schema_set_id|dataspace_id
-ran-network-simulation|(select id from schema_set where name='cps-ran-schema-model')|(select id from dataspace where name='NFP-Operational')
diff --git a/cps-ri/src/main/resources/changelog/db/changes/data/dataspace.csv b/cps-ri/src/main/resources/changelog/db/changes/data/dataspace.csv
deleted file mode 100644 (file)
index 70b4af6..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-name
-NFP-Operational
diff --git a/cps-ri/src/main/resources/changelog/db/changes/data/dmi/anchor.csv b/cps-ri/src/main/resources/changelog/db/changes/data/dmi/anchor.csv
deleted file mode 100644 (file)
index 7a0df21..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-name|schema_set_id|dataspace_id
-ncmp-dmi-registry|(select id from schema_set where name='ncmp-dmi-registry-model')|(select id from dataspace where name='NCMP-Admin')
diff --git a/cps-ri/src/main/resources/changelog/db/changes/data/dmi/dataspace.csv b/cps-ri/src/main/resources/changelog/db/changes/data/dmi/dataspace.csv
deleted file mode 100644 (file)
index 4fb2eec..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-name
-NCMP-Admin
diff --git a/cps-ri/src/main/resources/changelog/db/changes/data/dmi/fragment.csv b/cps-ri/src/main/resources/changelog/db/changes/data/dmi/fragment.csv
deleted file mode 100644 (file)
index 52aef0e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-id|xpath|attributes|anchor_id|parent_id|dataspace_id|schema_node_id
-144|/dmi-registry|{}|(select id from anchor where name='ncmp-dmi-registry')|null|(select id from dataspace where name='NCMP-Admin')|null
\ No newline at end of file
diff --git a/cps-ri/src/main/resources/changelog/db/changes/data/dmi/schema_set.csv b/cps-ri/src/main/resources/changelog/db/changes/data/dmi/schema_set.csv
deleted file mode 100644 (file)
index 936239b..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-name|dataspace_id
-ncmp-dmi-registry-model|(select id from dataspace where name='NCMP-Admin')
diff --git a/cps-ri/src/main/resources/changelog/db/changes/data/dmi/schema_set_yang_resources.csv b/cps-ri/src/main/resources/changelog/db/changes/data/dmi/schema_set_yang_resources.csv
deleted file mode 100644 (file)
index 9183d38..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-schema_set_id|yang_resource_id
-(select id from schema_set where name='ncmp-dmi-registry-model')|(select id from yang_resource where name='dmi-registry@2021-05-20.yang')
-
diff --git a/cps-ri/src/main/resources/changelog/db/changes/data/dmi/schema_set_yang_resources@2021-10-20.csv b/cps-ri/src/main/resources/changelog/db/changes/data/dmi/schema_set_yang_resources@2021-10-20.csv
deleted file mode 100644 (file)
index d419fc9..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-schema_set_id|yang_resource_id
-(select id from schema_set where name='ncmp-dmi-registry-model')|(select id from yang_resource where name='dmi-registry@2021-10-20.yang')
-
diff --git a/cps-ri/src/main/resources/changelog/db/changes/data/dmi/schema_set_yang_resources@2021-12-13.csv b/cps-ri/src/main/resources/changelog/db/changes/data/dmi/schema_set_yang_resources@2021-12-13.csv
deleted file mode 100644 (file)
index 3e8afdd..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-schema_set_id|yang_resource_id
-(select id from schema_set where name='ncmp-dmi-registry-model')|(select id from yang_resource where name='dmi-registry@2021-12-13.yang')
-
diff --git a/cps-ri/src/main/resources/changelog/db/changes/data/dmi/yang_resource.csv b/cps-ri/src/main/resources/changelog/db/changes/data/dmi/yang_resource.csv
deleted file mode 100644 (file)
index 35e2bcd..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-name|content|checksum
-dmi-registry@2021-05-20.yang|"module dmi-registry {
-
-  yang-version 1.1;
-
-  namespace \"org:onap:cps:ncmp\";
-
-  prefix dmi-reg;
-
-  organization \"Nordix Foundation\";
-
-  contact \"rahul.tyagi@est.tech\";
-
-  revision \"2021-05-20\" {
-    description
-    \"Initial Version\";
-  }
-
-  container dmi-registry {
-
-    list cm-handles {
-
-      key \"id\";
-
-      leaf id {
-        type string;
-      }
-
-      leaf dmi-service-name {
-        type string;
-      }
-
-      list additional-properties {
-
-        key \"name\";
-
-        leaf name {
-          type string;
-        }
-
-        leaf value {
-          type string;
-        }
-      }
-    }
-  }
-}
-"|257b264cd091436f74f9c92512b507459615391f7006fc40b74b6866dbe1b379
\ No newline at end of file
diff --git a/cps-ri/src/main/resources/changelog/db/changes/data/dmi/yang_resource@2021-10-20.csv b/cps-ri/src/main/resources/changelog/db/changes/data/dmi/yang_resource@2021-10-20.csv
deleted file mode 100644 (file)
index 80caea2..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-name|content|checksum
-dmi-registry@2021-10-20.yang|"module dmi-registry {
-
-  yang-version 1.1;
-
-  namespace \"org:onap:cps:ncmp\";
-
-  prefix dmi-reg;
-
-  organization \"Nordix Foundation\";
-
-  contact \"rahul.tyagi@est.tech\";
-
-  revision \"2021-10-20\" {
-   description
-   \"Added dmi-data-service-name & dmi-model-service-name to allow separate DMI instances for each responsibility\";
-  }
-
-  container dmi-registry {
-
-    list cm-handles {
-
-      key \"id\";
-
-      leaf id {
-        type string;
-      }
-
-      leaf dmi-service-name {
-        type string;
-      }
-
-      leaf dmi-data-service-name {
-        type string;
-      }
-
-      leaf dmi-model-service-name {
-        type string;
-      }
-
-      list additional-properties {
-        key \"name\";
-        leaf name {
-          type string;
-        }
-        leaf value {
-          type string;
-        }
-      }
-    }
-  }
-}
-"|f9145662dfc97363297dc1c06b8bde3a8621c658abefd56946faaab240714181
diff --git a/cps-ri/src/main/resources/changelog/db/changes/data/fragment.csv b/cps-ri/src/main/resources/changelog/db/changes/data/fragment.csv
deleted file mode 100644 (file)
index 81c379d..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-id|xpath|attributes|anchor_id|parent_id|dataspace_id|schema_node_id
-1|/cps-ran-schema|{}|(select id from anchor where name='ran-network-simulation')|null|(select id from dataspace where name='NFP-Operational')|null
-2|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]|"{"idNearRTRIC": "11"}"|(select id from anchor where name='ran-network-simulation')|1|(select id from dataspace where name='NFP-Operational')|null
-73|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]|"{"idNearRTRIC": "22"}"|(select id from anchor where name='ran-network-simulation')|1|(select id from dataspace where name='NFP-Operational')|null
-3|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]|"{"idGNBCUCPFunction": "cucpserver1"}"|(select id from anchor where name='ran-network-simulation')|2|(select id from dataspace where name='NFP-Operational')|null
-35|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="1"]|"{"idGNBDUFunction": "1"}"|(select id from anchor where name='ran-network-simulation')|2|(select id from dataspace where name='NFP-Operational')|null
-47|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="2"]|"{"idGNBDUFunction": "2"}"|(select id from anchor where name='ran-network-simulation')|2|(select id from dataspace where name='NFP-Operational')|null
-59|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="3"]|"{"idGNBDUFunction": "3"}"|(select id from anchor where name='ran-network-simulation')|2|(select id from dataspace where name='NFP-Operational')|null
-71|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUUPFunction[@idGNBCUUPFunction="1111"]|"{"idGNBCUUPFunction": "1111"}"|(select id from anchor where name='ran-network-simulation')|2|(select id from dataspace where name='NFP-Operational')|null
-4|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/attributes|"{"gNBId": 98763, "gNBCUName": "cucpserver1", "gNBIdLength": 32}"|(select id from anchor where name='ran-network-simulation')|3|(select id from dataspace where name='NFP-Operational')|null
-5|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15290"]|"{"idNRCellCU": "15290"}"|(select id from anchor where name='ran-network-simulation')|3|(select id from dataspace where name='NFP-Operational')|null
-7|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15175"]|"{"idNRCellCU": "15175"}"|(select id from anchor where name='ran-network-simulation')|3|(select id from dataspace where name='NFP-Operational')|null
-9|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15296"]|"{"idNRCellCU": "15296"}"|(select id from anchor where name='ran-network-simulation')|3|(select id from dataspace where name='NFP-Operational')|null
-11|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15176"]|"{"idNRCellCU": "15176"}"|(select id from anchor where name='ran-network-simulation')|3|(select id from dataspace where name='NFP-Operational')|null
-13|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15174"]|"{"idNRCellCU": "15174"}"|(select id from anchor where name='ran-network-simulation')|3|(select id from dataspace where name='NFP-Operational')|null
-15|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15289"]|"{"idNRCellCU": "15289"}"|(select id from anchor where name='ran-network-simulation')|3|(select id from dataspace where name='NFP-Operational')|null
-17|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="14000"]|"{"idNRCellCU": "14000"}"|(select id from anchor where name='ran-network-simulation')|3|(select id from dataspace where name='NFP-Operational')|null
-19|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15155"]|"{"idNRCellCU": "15155"}"|(select id from anchor where name='ran-network-simulation')|3|(select id from dataspace where name='NFP-Operational')|null
-21|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15425"]|"{"idNRCellCU": "15425"}"|(select id from anchor where name='ran-network-simulation')|3|(select id from dataspace where name='NFP-Operational')|null
-23|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15689"]|"{"idNRCellCU": "15689"}"|(select id from anchor where name='ran-network-simulation')|3|(select id from dataspace where name='NFP-Operational')|null
-25|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15426"]|"{"idNRCellCU": "15426"}"|(select id from anchor where name='ran-network-simulation')|3|(select id from dataspace where name='NFP-Operational')|null
-27|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15687"]|"{"idNRCellCU": "15687"}"|(select id from anchor where name='ran-network-simulation')|3|(select id from dataspace where name='NFP-Operational')|null
-29|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15825"]|"{"idNRCellCU": "15825"}"|(select id from anchor where name='ran-network-simulation')|3|(select id from dataspace where name='NFP-Operational')|null
-31|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15826"]|"{"idNRCellCU": "15826"}"|(select id from anchor where name='ran-network-simulation')|3|(select id from dataspace where name='NFP-Operational')|null
-33|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="13999"]|"{"idNRCellCU": "13999"}"|(select id from anchor where name='ran-network-simulation')|3|(select id from dataspace where name='NFP-Operational')|null
-6|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15290"]/attributes|"{"cellLocalId": 15290}"|(select id from anchor where name='ran-network-simulation')|5|(select id from dataspace where name='NFP-Operational')|null
-8|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15175"]/attributes|"{"cellLocalId": 15175}"|(select id from anchor where name='ran-network-simulation')|7|(select id from dataspace where name='NFP-Operational')|null
-10|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15296"]/attributes|"{"cellLocalId": 15296}"|(select id from anchor where name='ran-network-simulation')|9|(select id from dataspace where name='NFP-Operational')|null
-12|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15176"]/attributes|"{"cellLocalId": 15176}"|(select id from anchor where name='ran-network-simulation')|11|(select id from dataspace where name='NFP-Operational')|null
-14|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15174"]/attributes|"{"cellLocalId": 15174}"|(select id from anchor where name='ran-network-simulation')|13|(select id from dataspace where name='NFP-Operational')|null
-16|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15289"]/attributes|"{"cellLocalId": 15289}"|(select id from anchor where name='ran-network-simulation')|15|(select id from dataspace where name='NFP-Operational')|null
-18|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="14000"]/attributes|"{"cellLocalId": 14000}"|(select id from anchor where name='ran-network-simulation')|17|(select id from dataspace where name='NFP-Operational')|null
-20|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15155"]/attributes|"{"cellLocalId": 15155}"|(select id from anchor where name='ran-network-simulation')|19|(select id from dataspace where name='NFP-Operational')|null
-22|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15425"]/attributes|"{"cellLocalId": 15425}"|(select id from anchor where name='ran-network-simulation')|21|(select id from dataspace where name='NFP-Operational')|null
-24|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15689"]/attributes|"{"cellLocalId": 15689}"|(select id from anchor where name='ran-network-simulation')|23|(select id from dataspace where name='NFP-Operational')|null
-26|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15426"]/attributes|"{"cellLocalId": 15426}"|(select id from anchor where name='ran-network-simulation')|25|(select id from dataspace where name='NFP-Operational')|null
-28|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15687"]/attributes|"{"cellLocalId": 15687}"|(select id from anchor where name='ran-network-simulation')|27|(select id from dataspace where name='NFP-Operational')|null
-30|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15825"]/attributes|"{"cellLocalId": 15825}"|(select id from anchor where name='ran-network-simulation')|29|(select id from dataspace where name='NFP-Operational')|null
-32|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="15826"]/attributes|"{"cellLocalId": 15826}"|(select id from anchor where name='ran-network-simulation')|31|(select id from dataspace where name='NFP-Operational')|null
-34|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver1"]/NRCellCU[@idNRCellCU="13999"]/attributes|"{"cellLocalId": 13999}"|(select id from anchor where name='ran-network-simulation')|33|(select id from dataspace where name='NFP-Operational')|null
-36|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="1"]/attributes|"{"gNBDUId": 1, "gNBDUName": "gnduserver1", "gNBIdLength": 32}"|(select id from anchor where name='ran-network-simulation')|35|(select id from dataspace where name='NFP-Operational')|null
-37|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="1"]/NRCellDU[@idNRCellDU="15289"]|"{"idNRCellDU": "15289"}"|(select id from anchor where name='ran-network-simulation')|35|(select id from dataspace where name='NFP-Operational')|null
-39|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="1"]/NRCellDU[@idNRCellDU="15290"]|"{"idNRCellDU": "15290"}"|(select id from anchor where name='ran-network-simulation')|35|(select id from dataspace where name='NFP-Operational')|null
-41|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="1"]/NRCellDU[@idNRCellDU="15296"]|"{"idNRCellDU": "15296"}"|(select id from anchor where name='ran-network-simulation')|35|(select id from dataspace where name='NFP-Operational')|null
-43|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="1"]/NRCellDU[@idNRCellDU="15689"]|"{"idNRCellDU": "15689"}"|(select id from anchor where name='ran-network-simulation')|35|(select id from dataspace where name='NFP-Operational')|null
-45|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="1"]/NRCellDU[@idNRCellDU="15687"]|"{"idNRCellDU": "15687"}"|(select id from anchor where name='ran-network-simulation')|35|(select id from dataspace where name='NFP-Operational')|null
-38|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="1"]/NRCellDU[@idNRCellDU="15289"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 15289}"|(select id from anchor where name='ran-network-simulation')|37|(select id from dataspace where name='NFP-Operational')|null
-40|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="1"]/NRCellDU[@idNRCellDU="15290"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 15290}"|(select id from anchor where name='ran-network-simulation')|39|(select id from dataspace where name='NFP-Operational')|null
-42|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="1"]/NRCellDU[@idNRCellDU="15296"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 15296}"|(select id from anchor where name='ran-network-simulation')|41|(select id from dataspace where name='NFP-Operational')|null
-44|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="1"]/NRCellDU[@idNRCellDU="15689"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 15689}"|(select id from anchor where name='ran-network-simulation')|43|(select id from dataspace where name='NFP-Operational')|null
-46|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="1"]/NRCellDU[@idNRCellDU="15687"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 15687}"|(select id from anchor where name='ran-network-simulation')|45|(select id from dataspace where name='NFP-Operational')|null
-48|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="2"]/attributes|"{"gNBDUId": 2, "gNBDUName": "gnduserver2", "gNBIdLength": 32}"|(select id from anchor where name='ran-network-simulation')|47|(select id from dataspace where name='NFP-Operational')|null
-49|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="2"]/NRCellDU[@idNRCellDU="15825"]|"{"idNRCellDU": "15825"}"|(select id from anchor where name='ran-network-simulation')|47|(select id from dataspace where name='NFP-Operational')|null
-51|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="2"]/NRCellDU[@idNRCellDU="15155"]|"{"idNRCellDU": "15155"}"|(select id from anchor where name='ran-network-simulation')|47|(select id from dataspace where name='NFP-Operational')|null
-53|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="2"]/NRCellDU[@idNRCellDU="15175"]|"{"idNRCellDU": "15175"}"|(select id from anchor where name='ran-network-simulation')|47|(select id from dataspace where name='NFP-Operational')|null
-55|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="2"]/NRCellDU[@idNRCellDU="15176"]|"{"idNRCellDU": "15176"}"|(select id from anchor where name='ran-network-simulation')|47|(select id from dataspace where name='NFP-Operational')|null
-57|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="2"]/NRCellDU[@idNRCellDU="15174"]|"{"idNRCellDU": "15174"}"|(select id from anchor where name='ran-network-simulation')|47|(select id from dataspace where name='NFP-Operational')|null
-50|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="2"]/NRCellDU[@idNRCellDU="15825"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 15825}"|(select id from anchor where name='ran-network-simulation')|49|(select id from dataspace where name='NFP-Operational')|null
-52|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="2"]/NRCellDU[@idNRCellDU="15155"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 15155}"|(select id from anchor where name='ran-network-simulation')|51|(select id from dataspace where name='NFP-Operational')|null
-54|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="2"]/NRCellDU[@idNRCellDU="15175"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 15175}"|(select id from anchor where name='ran-network-simulation')|53|(select id from dataspace where name='NFP-Operational')|null
-56|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="2"]/NRCellDU[@idNRCellDU="15176"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 15176}"|(select id from anchor where name='ran-network-simulation')|55|(select id from dataspace where name='NFP-Operational')|null
-58|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="2"]/NRCellDU[@idNRCellDU="15174"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 15174}"|(select id from anchor where name='ran-network-simulation')|57|(select id from dataspace where name='NFP-Operational')|null
-60|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="3"]/attributes|"{"gNBDUId": 3, "gNBDUName": "gnduserver3", "gNBIdLength": 32}"|(select id from anchor where name='ran-network-simulation')|59|(select id from dataspace where name='NFP-Operational')|null
-61|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="3"]/NRCellDU[@idNRCellDU="15826"]|"{"idNRCellDU": "15826"}"|(select id from anchor where name='ran-network-simulation')|59|(select id from dataspace where name='NFP-Operational')|null
-63|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="3"]/NRCellDU[@idNRCellDU="14000"]|"{"idNRCellDU": "14000"}"|(select id from anchor where name='ran-network-simulation')|59|(select id from dataspace where name='NFP-Operational')|null
-65|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="3"]/NRCellDU[@idNRCellDU="13999"]|"{"idNRCellDU": "13999"}"|(select id from anchor where name='ran-network-simulation')|59|(select id from dataspace where name='NFP-Operational')|null
-67|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="3"]/NRCellDU[@idNRCellDU="15425"]|"{"idNRCellDU": "15425"}"|(select id from anchor where name='ran-network-simulation')|59|(select id from dataspace where name='NFP-Operational')|null
-69|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="3"]/NRCellDU[@idNRCellDU="15426"]|"{"idNRCellDU": "15426"}"|(select id from anchor where name='ran-network-simulation')|59|(select id from dataspace where name='NFP-Operational')|null
-62|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="3"]/NRCellDU[@idNRCellDU="15826"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 15826}"|(select id from anchor where name='ran-network-simulation')|61|(select id from dataspace where name='NFP-Operational')|null
-64|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="3"]/NRCellDU[@idNRCellDU="14000"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 14000}"|(select id from anchor where name='ran-network-simulation')|63|(select id from dataspace where name='NFP-Operational')|null
-66|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="3"]/NRCellDU[@idNRCellDU="13999"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 13999}"|(select id from anchor where name='ran-network-simulation')|65|(select id from dataspace where name='NFP-Operational')|null
-68|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="3"]/NRCellDU[@idNRCellDU="15425"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 15425}"|(select id from anchor where name='ran-network-simulation')|67|(select id from dataspace where name='NFP-Operational')|null
-70|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBDUFunction[@idGNBDUFunction="3"]/NRCellDU[@idNRCellDU="15426"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 15426}"|(select id from anchor where name='ran-network-simulation')|69|(select id from dataspace where name='NFP-Operational')|null
-72|/cps-ran-schema/NearRTRIC[@idNearRTRIC="11"]/GNBCUUPFunction[@idGNBCUUPFunction="1111"]/attributes|"{"gNBId": 98763}"|(select id from anchor where name='ran-network-simulation')|71|(select id from dataspace where name='NFP-Operational')|null
-74|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]|"{"idGNBCUCPFunction": "cucpserver2"}"|(select id from anchor where name='ran-network-simulation')|73|(select id from dataspace where name='NFP-Operational')|null
-106|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="4"]|"{"idGNBDUFunction": "4"}"|(select id from anchor where name='ran-network-simulation')|73|(select id from dataspace where name='NFP-Operational')|null
-118|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="5"]|"{"idGNBDUFunction": "5"}"|(select id from anchor where name='ran-network-simulation')|73|(select id from dataspace where name='NFP-Operational')|null
-130|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="6"]|"{"idGNBDUFunction": "6"}"|(select id from anchor where name='ran-network-simulation')|73|(select id from dataspace where name='NFP-Operational')|null
-142|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUUPFunction[@idGNBCUUPFunction="2222"]|"{"idGNBCUUPFunction": "2222"}"|(select id from anchor where name='ran-network-simulation')|73|(select id from dataspace where name='NFP-Operational')|null
-75|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/attributes|"{"gNBId": 98763, "gNBCUName": "cucpserver2", "gNBIdLength": 32}"|(select id from anchor where name='ran-network-simulation')|74|(select id from dataspace where name='NFP-Operational')|null
-76|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="15360"]|"{"idNRCellCU": "15360"}"|(select id from anchor where name='ran-network-simulation')|74|(select id from dataspace where name='NFP-Operational')|null
-78|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="15361"]|"{"idNRCellCU": "15361"}"|(select id from anchor where name='ran-network-simulation')|74|(select id from dataspace where name='NFP-Operational')|null
-80|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="11561"]|"{"idNRCellCU": "11561"}"|(select id from anchor where name='ran-network-simulation')|74|(select id from dataspace where name='NFP-Operational')|null
-82|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="11562"]|"{"idNRCellCU": "11562"}"|(select id from anchor where name='ran-network-simulation')|74|(select id from dataspace where name='NFP-Operational')|null
-84|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="14655"]|"{"idNRCellCU": "14655"}"|(select id from anchor where name='ran-network-simulation')|74|(select id from dataspace where name='NFP-Operational')|null
-86|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="14656"]|"{"idNRCellCU": "14656"}"|(select id from anchor where name='ran-network-simulation')|74|(select id from dataspace where name='NFP-Operational')|null
-88|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="13910"]|"{"idNRCellCU": "13910"}"|(select id from anchor where name='ran-network-simulation')|74|(select id from dataspace where name='NFP-Operational')|null
-90|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="10896"]|"{"idNRCellCU": "10896"}"|(select id from anchor where name='ran-network-simulation')|74|(select id from dataspace where name='NFP-Operational')|null
-92|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="10897"]|"{"idNRCellCU": "10897"}"|(select id from anchor where name='ran-network-simulation')|74|(select id from dataspace where name='NFP-Operational')|null
-94|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="11568"]|"{"idNRCellCU": "11568"}"|(select id from anchor where name='ran-network-simulation')|74|(select id from dataspace where name='NFP-Operational')|null
-96|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="15548"]|"{"idNRCellCU": "15548"}"|(select id from anchor where name='ran-network-simulation')|74|(select id from dataspace where name='NFP-Operational')|null
-98|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="11569"]|"{"idNRCellCU": "11569"}"|(select id from anchor where name='ran-network-simulation')|74|(select id from dataspace where name='NFP-Operational')|null
-100|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="14427"]|"{"idNRCellCU": "14427"}"|(select id from anchor where name='ran-network-simulation')|74|(select id from dataspace where name='NFP-Operational')|null
-102|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="15549"]|"{"idNRCellCU": "15549"}"|(select id from anchor where name='ran-network-simulation')|74|(select id from dataspace where name='NFP-Operational')|null
-104|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="13905"]|"{"idNRCellCU": "13905"}"|(select id from anchor where name='ran-network-simulation')|74|(select id from dataspace where name='NFP-Operational')|null
-77|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="15360"]/attributes|"{"cellLocalId": 15360}"|(select id from anchor where name='ran-network-simulation')|76|(select id from dataspace where name='NFP-Operational')|null
-79|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="15361"]/attributes|"{"cellLocalId": 15361}"|(select id from anchor where name='ran-network-simulation')|78|(select id from dataspace where name='NFP-Operational')|null
-81|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="11561"]/attributes|"{"cellLocalId": 11561}"|(select id from anchor where name='ran-network-simulation')|80|(select id from dataspace where name='NFP-Operational')|null
-83|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="11562"]/attributes|"{"cellLocalId": 11562}"|(select id from anchor where name='ran-network-simulation')|82|(select id from dataspace where name='NFP-Operational')|null
-85|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="14655"]/attributes|"{"cellLocalId": 14655}"|(select id from anchor where name='ran-network-simulation')|84|(select id from dataspace where name='NFP-Operational')|null
-87|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="14656"]/attributes|"{"cellLocalId": 14656}"|(select id from anchor where name='ran-network-simulation')|86|(select id from dataspace where name='NFP-Operational')|null
-89|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="13910"]/attributes|"{"cellLocalId": 13910}"|(select id from anchor where name='ran-network-simulation')|88|(select id from dataspace where name='NFP-Operational')|null
-91|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="10896"]/attributes|"{"cellLocalId": 10896}"|(select id from anchor where name='ran-network-simulation')|90|(select id from dataspace where name='NFP-Operational')|null
-93|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="10897"]/attributes|"{"cellLocalId": 10897}"|(select id from anchor where name='ran-network-simulation')|92|(select id from dataspace where name='NFP-Operational')|null
-95|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="11568"]/attributes|"{"cellLocalId": 11568}"|(select id from anchor where name='ran-network-simulation')|94|(select id from dataspace where name='NFP-Operational')|null
-97|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="15548"]/attributes|"{"cellLocalId": 15548}"|(select id from anchor where name='ran-network-simulation')|96|(select id from dataspace where name='NFP-Operational')|null
-99|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="11569"]/attributes|"{"cellLocalId": 11569}"|(select id from anchor where name='ran-network-simulation')|98|(select id from dataspace where name='NFP-Operational')|null
-101|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="14427"]/attributes|"{"cellLocalId": 14427}"|(select id from anchor where name='ran-network-simulation')|100|(select id from dataspace where name='NFP-Operational')|null
-103|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="15549"]/attributes|"{"cellLocalId": 15549}"|(select id from anchor where name='ran-network-simulation')|102|(select id from dataspace where name='NFP-Operational')|null
-105|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUCPFunction[@idGNBCUCPFunction="cucpserver2"]/NRCellCU[@idNRCellCU="13905"]/attributes|"{"cellLocalId": 13905}"|(select id from anchor where name='ran-network-simulation')|104|(select id from dataspace where name='NFP-Operational')|null
-107|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="4"]/attributes|"{"gNBDUId": 4, "gNBDUName": "gnduserver4", "gNBIdLength": 32}"|(select id from anchor where name='ran-network-simulation')|106|(select id from dataspace where name='NFP-Operational')|null
-108|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="4"]/NRCellDU[@idNRCellDU="10896"]|"{"idNRCellDU": "10896"}"|(select id from anchor where name='ran-network-simulation')|106|(select id from dataspace where name='NFP-Operational')|null
-110|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="4"]/NRCellDU[@idNRCellDU="11568"]|"{"idNRCellDU": "11568"}"|(select id from anchor where name='ran-network-simulation')|106|(select id from dataspace where name='NFP-Operational')|null
-112|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="4"]/NRCellDU[@idNRCellDU="11561"]|"{"idNRCellDU": "11561"}"|(select id from anchor where name='ran-network-simulation')|106|(select id from dataspace where name='NFP-Operational')|null
-114|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="4"]/NRCellDU[@idNRCellDU="11569"]|"{"idNRCellDU": "11569"}"|(select id from anchor where name='ran-network-simulation')|106|(select id from dataspace where name='NFP-Operational')|null
-116|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="4"]/NRCellDU[@idNRCellDU="11562"]|"{"idNRCellDU": "11562"}"|(select id from anchor where name='ran-network-simulation')|106|(select id from dataspace where name='NFP-Operational')|null
-109|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="4"]/NRCellDU[@idNRCellDU="10896"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 10896}"|(select id from anchor where name='ran-network-simulation')|108|(select id from dataspace where name='NFP-Operational')|null
-111|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="4"]/NRCellDU[@idNRCellDU="11568"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 11568}"|(select id from anchor where name='ran-network-simulation')|110|(select id from dataspace where name='NFP-Operational')|null
-113|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="4"]/NRCellDU[@idNRCellDU="11561"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 11561}"|(select id from anchor where name='ran-network-simulation')|112|(select id from dataspace where name='NFP-Operational')|null
-115|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="4"]/NRCellDU[@idNRCellDU="11569"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 11569}"|(select id from anchor where name='ran-network-simulation')|114|(select id from dataspace where name='NFP-Operational')|null
-117|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="4"]/NRCellDU[@idNRCellDU="11562"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 11562}"|(select id from anchor where name='ran-network-simulation')|116|(select id from dataspace where name='NFP-Operational')|null
-119|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="5"]/attributes|"{"gNBDUId": 5, "gNBDUName": "gnduserver5", "gNBIdLength": 32}"|(select id from anchor where name='ran-network-simulation')|118|(select id from dataspace where name='NFP-Operational')|null
-120|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="5"]/NRCellDU[@idNRCellDU="13910"]|"{"idNRCellDU": "13910"}"|(select id from anchor where name='ran-network-simulation')|118|(select id from dataspace where name='NFP-Operational')|null
-122|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="5"]/NRCellDU[@idNRCellDU="10897"]|"{"idNRCellDU": "10897"}"|(select id from anchor where name='ran-network-simulation')|118|(select id from dataspace where name='NFP-Operational')|null
-124|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="5"]/NRCellDU[@idNRCellDU="14655"]|"{"idNRCellDU": "14655"}"|(select id from anchor where name='ran-network-simulation')|118|(select id from dataspace where name='NFP-Operational')|null
-126|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="5"]/NRCellDU[@idNRCellDU="14656"]|"{"idNRCellDU": "14656"}"|(select id from anchor where name='ran-network-simulation')|118|(select id from dataspace where name='NFP-Operational')|null
-128|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="5"]/NRCellDU[@idNRCellDU="13905"]|"{"idNRCellDU": "13905"}"|(select id from anchor where name='ran-network-simulation')|118|(select id from dataspace where name='NFP-Operational')|null
-121|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="5"]/NRCellDU[@idNRCellDU="13910"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 13910}"|(select id from anchor where name='ran-network-simulation')|120|(select id from dataspace where name='NFP-Operational')|null
-123|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="5"]/NRCellDU[@idNRCellDU="10897"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 10897}"|(select id from anchor where name='ran-network-simulation')|122|(select id from dataspace where name='NFP-Operational')|null
-125|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="5"]/NRCellDU[@idNRCellDU="14655"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 14655}"|(select id from anchor where name='ran-network-simulation')|124|(select id from dataspace where name='NFP-Operational')|null
-127|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="5"]/NRCellDU[@idNRCellDU="14656"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 14656}"|(select id from anchor where name='ran-network-simulation')|126|(select id from dataspace where name='NFP-Operational')|null
-129|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="5"]/NRCellDU[@idNRCellDU="13905"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 13905}"|(select id from anchor where name='ran-network-simulation')|128|(select id from dataspace where name='NFP-Operational')|null
-131|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="6"]/attributes|"{"gNBDUId": 6, "gNBDUName": "gnduserver6", "gNBIdLength": 32}"|(select id from anchor where name='ran-network-simulation')|130|(select id from dataspace where name='NFP-Operational')|null
-132|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="6"]/NRCellDU[@idNRCellDU="15548"]|"{"idNRCellDU": "15548"}"|(select id from anchor where name='ran-network-simulation')|130|(select id from dataspace where name='NFP-Operational')|null
-134|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="6"]/NRCellDU[@idNRCellDU="14427"]|"{"idNRCellDU": "14427"}"|(select id from anchor where name='ran-network-simulation')|130|(select id from dataspace where name='NFP-Operational')|null
-136|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="6"]/NRCellDU[@idNRCellDU="15549"]|"{"idNRCellDU": "15549"}"|(select id from anchor where name='ran-network-simulation')|130|(select id from dataspace where name='NFP-Operational')|null
-138|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="6"]/NRCellDU[@idNRCellDU="15360"]|"{"idNRCellDU": "15360"}"|(select id from anchor where name='ran-network-simulation')|130|(select id from dataspace where name='NFP-Operational')|null
-140|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="6"]/NRCellDU[@idNRCellDU="15361"]|"{"idNRCellDU": "15361"}"|(select id from anchor where name='ran-network-simulation')|130|(select id from dataspace where name='NFP-Operational')|null
-133|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="6"]/NRCellDU[@idNRCellDU="15548"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 15548}"|(select id from anchor where name='ran-network-simulation')|132|(select id from dataspace where name='NFP-Operational')|null
-135|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="6"]/NRCellDU[@idNRCellDU="14427"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 14427}"|(select id from anchor where name='ran-network-simulation')|134|(select id from dataspace where name='NFP-Operational')|null
-137|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="6"]/NRCellDU[@idNRCellDU="15549"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 15549}"|(select id from anchor where name='ran-network-simulation')|136|(select id from dataspace where name='NFP-Operational')|null
-139|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="6"]/NRCellDU[@idNRCellDU="15360"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 15360}"|(select id from anchor where name='ran-network-simulation')|138|(select id from dataspace where name='NFP-Operational')|null
-141|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBDUFunction[@idGNBDUFunction="6"]/NRCellDU[@idNRCellDU="15361"]/attributes|"{"nRPCI": 12, "nRTAC": 310, "cellLocalId": 15361}"|(select id from anchor where name='ran-network-simulation')|140|(select id from dataspace where name='NFP-Operational')|null
-143|/cps-ran-schema/NearRTRIC[@idNearRTRIC="22"]/GNBCUUPFunction[@idGNBCUUPFunction="2222"]/attributes|"{"gNBId": 98763}"|(select id from anchor where name='ran-network-simulation')|142|(select id from dataspace where name='NFP-Operational')|null
diff --git a/cps-ri/src/main/resources/changelog/db/changes/data/schema_set.csv b/cps-ri/src/main/resources/changelog/db/changes/data/schema_set.csv
deleted file mode 100644 (file)
index 39de8a4..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-name|dataspace_id
-cps-ran-schema-model|(select id from dataspace where name='NFP-Operational')
diff --git a/cps-ri/src/main/resources/changelog/db/changes/data/schema_set_yang_resources.csv b/cps-ri/src/main/resources/changelog/db/changes/data/schema_set_yang_resources.csv
deleted file mode 100644 (file)
index 9a258c2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-schema_set_id|yang_resource_id
-(select id from schema_set where name='cps-ran-schema-model')|"(select id from yang_resource where name='ietf-inet-types.yang')"
-(select id from schema_set where name='cps-ran-schema-model')|(select id from yang_resource where name='cps-ran-schema-model2021-01-28.yang')
-(select id from schema_set where name='cps-ran-schema-model')|(select id from yang_resource where name='ietf-yang-types.yang')
diff --git a/cps-ri/src/main/resources/changelog/db/changes/data/yang_resource.csv b/cps-ri/src/main/resources/changelog/db/changes/data/yang_resource.csv
deleted file mode 100644 (file)
index 4dd3127..0000000
+++ /dev/null
@@ -1,2236 +0,0 @@
-name|content|checksum
-ietf-inet-types.yang|"module ietf-inet-types {
-
-  namespace \"urn:ietf:params:xml:ns:yang:ietf-inet-types\";
-  prefix \"inet\";
-
-  organization
-   \"IETF NETMOD (NETCONF Data Modeling Language) Working Group\";
-
-  contact
-   \"WG Web:   <http://tools.ietf.org/wg/netmod/>
-    WG List:  <mailto:netmod@ietf.org>
-
-    WG Chair: David Kessens
-              <mailto:david.kessens@nsn.com>
-
-    WG Chair: Juergen Schoenwaelder
-              <mailto:j.schoenwaelder@jacobs-university.de>
-
-    Editor:   Juergen Schoenwaelder
-              <mailto:j.schoenwaelder@jacobs-university.de>\";
-
-  description
-   \"This module contains a collection of generally useful derived
-    YANG data types for Internet addresses and related things.
-
-    Copyright (c) 2013 IETF Trust and the persons identified as
-    authors of the code.  All rights reserved.
-
-    Redistribution and use in source and binary forms, with or
-    without modification, is permitted pursuant to, and subject
-    to the license terms contained in, the Simplified BSD License
-    set forth in Section 4.c of the IETF Trust''s Legal Provisions
-    Relating to IETF Documents
-    (http://trustee.ietf.org/license-info).
-
-    This version of this YANG module is part of RFC 6991; see
-    the RFC itself for full legal notices.\";
-
-  revision 2013-07-15 {
-    description
-     \"This revision adds the following new data types:
-      - ip-address-no-zone
-      - ipv4-address-no-zone
-      - ipv6-address-no-zone\";
-    reference
-     \"RFC 6991: Common YANG Data Types\";
-  }
-
-  revision 2010-09-24 {
-    description
-     \"Initial revision.\";
-    reference
-     \"RFC 6021: Common YANG Data Types\";
-  }
-
-  /*** collection of types related to protocol fields ***/
-
-  typedef ip-version {
-    type enumeration {
-      enum unknown {
-        value \"0\";
-        description
-         \"An unknown or unspecified version of the Internet
-          protocol.\";
-      }
-      enum ipv4 {
-        value \"1\";
-        description
-         \"The IPv4 protocol as defined in RFC 791.\";
-      }
-      enum ipv6 {
-        value \"2\";
-        description
-         \"The IPv6 protocol as defined in RFC 2460.\";
-      }
-    }
-    description
-     \"This value represents the version of the IP protocol.
-
-      In the value set and its semantics, this type is equivalent
-      to the InetVersion textual convention of the SMIv2.\";
-    reference
-     \"RFC  791: Internet Protocol
-      RFC 2460: Internet Protocol, Version 6 (IPv6) Specification
-      RFC 4001: Textual Conventions for Internet Network Addresses\";
-  }
-
-  typedef dscp {
-    type uint8 {
-      range \"0..63\";
-    }
-    description
-     \"The dscp type represents a Differentiated Services Code Point
-      that may be used for marking packets in a traffic stream.
-      In the value set and its semantics, this type is equivalent
-      to the Dscp textual convention of the SMIv2.\";
-    reference
-     \"RFC 3289: Management Information Base for the Differentiated
-                Services Architecture
-      RFC 2474: Definition of the Differentiated Services Field
-                (DS Field) in the IPv4 and IPv6 Headers
-      RFC 2780: IANA Allocation Guidelines For Values In
-                the Internet Protocol and Related Headers\";
-  }
-
-  typedef ipv6-flow-label {
-    type uint32 {
-      range \"0..1048575\";
-    }
-    description
-     \"The ipv6-flow-label type represents the flow identifier or Flow
-      Label in an IPv6 packet header that may be used to
-      discriminate traffic flows.
-
-      In the value set and its semantics, this type is equivalent
-      to the IPv6FlowLabel textual convention of the SMIv2.\";
-    reference
-     \"RFC 3595: Textual Conventions for IPv6 Flow Label
-      RFC 2460: Internet Protocol, Version 6 (IPv6) Specification\";
-  }
-
-  typedef port-number {
-    type uint16 {
-      range \"0..65535\";
-    }
-    description
-     \"The port-number type represents a 16-bit port number of an
-      Internet transport-layer protocol such as UDP, TCP, DCCP, or
-      SCTP.  Port numbers are assigned by IANA.  A current list of
-      all assignments is available from <http://www.iana.org/>.
-
-      Note that the port number value zero is reserved by IANA.  In
-      situations where the value zero does not make sense, it can
-      be excluded by subtyping the port-number type.
-      In the value set and its semantics, this type is equivalent
-      to the InetPortNumber textual convention of the SMIv2.\";
-    reference
-     \"RFC  768: User Datagram Protocol
-      RFC  793: Transmission Control Protocol
-      RFC 4960: Stream Control Transmission Protocol
-      RFC 4340: Datagram Congestion Control Protocol (DCCP)
-      RFC 4001: Textual Conventions for Internet Network Addresses\";
-  }
-
-  /*** collection of types related to autonomous systems ***/
-
-  typedef as-number {
-    type uint32;
-    description
-     \"The as-number type represents autonomous system numbers
-      which identify an Autonomous System (AS).  An AS is a set
-      of routers under a single technical administration, using
-      an interior gateway protocol and common metrics to route
-      packets within the AS, and using an exterior gateway
-      protocol to route packets to other ASes.  IANA maintains
-      the AS number space and has delegated large parts to the
-      regional registries.
-
-      Autonomous system numbers were originally limited to 16
-      bits.  BGP extensions have enlarged the autonomous system
-      number space to 32 bits.  This type therefore uses an uint32
-      base type without a range restriction in order to support
-      a larger autonomous system number space.
-
-      In the value set and its semantics, this type is equivalent
-      to the InetAutonomousSystemNumber textual convention of
-      the SMIv2.\";
-    reference
-     \"RFC 1930: Guidelines for creation, selection, and registration
-                of an Autonomous System (AS)
-      RFC 4271: A Border Gateway Protocol 4 (BGP-4)
-      RFC 4001: Textual Conventions for Internet Network Addresses
-      RFC 6793: BGP Support for Four-Octet Autonomous System (AS)
-                Number Space\";
-  }
-
-  /*** collection of types related to IP addresses and hostnames ***/
-
-  typedef ip-address {
-    type union {
-      type inet:ipv4-address;
-      type inet:ipv6-address;
-    }
-    description
-     \"The ip-address type represents an IP address and is IP
-      version neutral.  The format of the textual representation
-      implies the IP version.  This type supports scoped addresses
-      by allowing zone identifiers in the address format.\";
-    reference
-     \"RFC 4007: IPv6 Scoped Address Architecture\";
-  }
-
-  typedef ipv4-address {
-    type string {
-      pattern
-        ''(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]).){3}''
-      +  ''([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])''
-      + ''(%[p{N}p{L}]+)?'';
-    }
-    description
-      \"The ipv4-address type represents an IPv4 address in
-       dotted-quad notation.  The IPv4 address may include a zone
-       index, separated by a % sign.
-
-       The zone index is used to disambiguate identical address
-       values.  For link-local addresses, the zone index will
-       typically be the interface index number or the name of an
-       interface.  If the zone index is not present, the default
-       zone of the device will be used.
-
-       The canonical format for the zone index is the numerical
-       format\";
-  }
-
-  typedef ipv6-address {
-    type string {
-      pattern ''((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}''
-            + ''((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|''
-            + ''(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9]).){3}''
-            + ''(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))''
-            + ''(%[p{N}p{L}]+)?'';
-      pattern ''(([^:]+:){6}(([^:]+:[^:]+)|(.*..*)))|''
-            + ''((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)''
-            + ''(%.+)?'';
-    }
-    description
-     \"The ipv6-address type represents an IPv6 address in full,
-      mixed, shortened, and shortened-mixed notation.  The IPv6
-      address may include a zone index, separated by a % sign.
-
-      The zone index is used to disambiguate identical address
-      values.  For link-local addresses, the zone index will
-      typically be the interface index number or the name of an
-      interface.  If the zone index is not present, the default
-      zone of the device will be used.
-
-      The canonical format of IPv6 addresses uses the textual
-      representation defined in Section 4 of RFC 5952.  The
-      canonical format for the zone index is the numerical
-      format as described in Section 11.2 of RFC 4007.\";
-    reference
-     \"RFC 4291: IP Version 6 Addressing Architecture
-      RFC 4007: IPv6 Scoped Address Architecture
-      RFC 5952: A Recommendation for IPv6 Address Text
-                Representation\";
-  }
-
-  typedef ip-address-no-zone {
-    type union {
-      type inet:ipv4-address-no-zone;
-      type inet:ipv6-address-no-zone;
-    }
-    description
-     \"The ip-address-no-zone type represents an IP address and is
-      IP version neutral.  The format of the textual representation
-      implies the IP version.  This type does not support scoped
-      addresses since it does not allow zone identifiers in the
-      address format.\";
-    reference
-     \"RFC 4007: IPv6 Scoped Address Architecture\";
-  }
-
-  typedef ipv4-address-no-zone {
-    type inet:ipv4-address {
-      pattern ''[0-9.]*'';
-    }
-    description
-      \"An IPv4 address without a zone index.  This type, derived from
-       ipv4-address, may be used in situations where the zone is
-       known from the context and hence no zone index is needed.\";
-  }
-
-  typedef ipv6-address-no-zone {
-    type inet:ipv6-address {
-      pattern ''[0-9a-fA-F:.]*'';
-    }
-    description
-      \"An IPv6 address without a zone index.  This type, derived from
-       ipv6-address, may be used in situations where the zone is
-       known from the context and hence no zone index is needed.\";
-    reference
-     \"RFC 4291: IP Version 6 Addressing Architecture
-      RFC 4007: IPv6 Scoped Address Architecture
-      RFC 5952: A Recommendation for IPv6 Address Text
-                Representation\";
-  }
-
-  typedef ip-prefix {
-    type union {
-      type inet:ipv4-prefix;
-      type inet:ipv6-prefix;
-    }
-    description
-     \"The ip-prefix type represents an IP prefix and is IP
-      version neutral.  The format of the textual representations
-      implies the IP version.\";
-  }
-
-  typedef ipv4-prefix {
-    type string {
-      pattern
-         ''(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]).){3}''
-       +  ''([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])''
-       + ''/(([0-9])|([1-2][0-9])|(3[0-2]))'';
-    }
-    description
-     \"The ipv4-prefix type represents an IPv4 address prefix.
-      The prefix length is given by the number following the
-      slash character and must be less than or equal to 32.
-
-      A prefix length value of n corresponds to an IP address
-      mask that has n contiguous 1-bits from the most
-      significant bit (MSB) and all other bits set to 0.
-
-      The canonical format of an IPv4 prefix has all bits of
-      the IPv4 address set to zero that are not part of the
-      IPv4 prefix.\";
-  }
-
-  typedef ipv6-prefix {
-    type string {
-      pattern ''((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}''
-            + ''((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|''
-            + ''(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9]).){3}''
-            + ''(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))''
-            + ''(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))'';
-      pattern ''(([^:]+:){6}(([^:]+:[^:]+)|(.*..*)))|''
-            + ''((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)''
-            + ''(/.+)'';
-    }
-    description
-     \"The ipv6-prefix type represents an IPv6 address prefix.
-      The prefix length is given by the number following the
-      slash character and must be less than or equal to 128.
-
-      A prefix length value of n corresponds to an IP address
-      mask that has n contiguous 1-bits from the most
-      significant bit (MSB) and all other bits set to 0.
-
-      The IPv6 address should have all bits that do not belong
-      to the prefix set to zero.
-
-      The canonical format of an IPv6 prefix has all bits of
-      the IPv6 address set to zero that are not part of the
-      IPv6 prefix.  Furthermore, the IPv6 address is represented
-      as defined in Section 4 of RFC 5952.\";
-    reference
-     \"RFC 5952: A Recommendation for IPv6 Address Text
-                Representation\";
-  }
-
-  /*** collection of domain name and URI types ***/
-
-  typedef domain-name {
-    type string {
-      length \"1..253\";
-      pattern
-        ''((([a-zA-Z0-9_]([a-zA-Z0-9-_]){0,61})?[a-zA-Z0-9].)*''
-      + ''([a-zA-Z0-9_]([a-zA-Z0-9-_]){0,61})?[a-zA-Z0-9].?)''
-      + ''|.'';
-    }
-    description
-     \"The domain-name type represents a DNS domain name.  The
-      name SHOULD be fully qualified whenever possible.
-
-      Internet domain names are only loosely specified.  Section
-      3.5 of RFC 1034 recommends a syntax (modified in Section
-      2.1 of RFC 1123).  The pattern above is intended to allow
-      for current practice in domain name use, and some possible
-      future expansion.  It is designed to hold various types of
-      domain names, including names used for A or AAAA records
-      (host names) and other records, such as SRV records.  Note
-      that Internet host names have a stricter syntax (described
-      in RFC 952) than the DNS recommendations in RFCs 1034 and
-      1123, and that systems that want to store host names in
-      schema nodes using the domain-name type are recommended to
-      adhere to this stricter standard to ensure interoperability.
-
-      The encoding of DNS names in the DNS protocol is limited
-      to 255 characters.  Since the encoding consists of labels
-      prefixed by a length bytes and there is a trailing NULL
-      byte, only 253 characters can appear in the textual dotted
-      notation.
-
-      The description clause of schema nodes using the domain-name
-      type MUST describe when and how these names are resolved to
-      IP addresses.  Note that the resolution of a domain-name value
-      may require to query multiple DNS records (e.g., A for IPv4
-      and AAAA for IPv6).  The order of the resolution process and
-      which DNS record takes precedence can either be defined
-      explicitly or may depend on the configuration of the
-      resolver.
-
-      Domain-name values use the US-ASCII encoding.  Their canonical
-      format uses lowercase US-ASCII characters.  Internationalized
-      domain names MUST be A-labels as per RFC 5890.\";
-    reference
-     \"RFC  952: DoD Internet Host Table Specification
-      RFC 1034: Domain Names - Concepts and Facilities
-      RFC 1123: Requirements for Internet Hosts -- Application
-                and Support
-      RFC 2782: A DNS RR for specifying the location of services
-                (DNS SRV)
-      RFC 5890: Internationalized Domain Names in Applications
-                (IDNA): Definitions and Document Framework\";
-  }
-
-  typedef host {
-    type union {
-      type inet:ip-address;
-      type inet:domain-name;
-    }
-    description
-     \"The host type represents either an IP address or a DNS
-      domain name.\";
-  }
-
-  typedef uri {
-    type string;
-    description
-     \"The uri type represents a Uniform Resource Identifier
-      (URI) as defined by STD 66.
-
-      Objects using the uri type MUST be in US-ASCII encoding,
-      and MUST be normalized as described by RFC 3986 Sections
-      6.2.1, 6.2.2.1, and 6.2.2.2.  All unnecessary
-      percent-encoding is removed, and all case-insensitive
-      characters are set to lowercase except for hexadecimal
-      digits, which are normalized to uppercase as described in
-      Section 6.2.2.1.
-
-      The purpose of this normalization is to help provide
-      unique URIs.  Note that this normalization is not
-      sufficient to provide uniqueness.  Two URIs that are
-      textually distinct after this normalization may still be
-      equivalent.
-
-      Objects using the uri type may restrict the schemes that
-      they permit.  For example, ''data:'' and ''urn:'' schemes
-      might not be appropriate.
-
-      A zero-length URI is not a valid URI.  This can be used to
-      express ''URI absent'' where required.
-
-      In the value set and its semantics, this type is equivalent
-      to the Uri SMIv2 textual convention defined in RFC 5017.\";
-    reference
-     \"RFC 3986: Uniform Resource Identifier (URI): Generic Syntax
-      RFC 3305: Report from the Joint W3C/IETF URI Planning Interest
-                Group: Uniform Resource Identifiers (URIs), URLs,
-                and Uniform Resource Names (URNs): Clarifications
-                and Recommendations
-      RFC 5017: MIB Textual Conventions for Uniform Resource
-                Identifiers (URIs)\";
-  }
-
-}"|fd06e465f26f1e7d0253bbf77e7e55e1
-cps-ran-schema-model2021-01-28.yang|"module cps-ran-schema-model {
-  yang-version 1.1;
-  namespace \"org:onap:ccsdk:features:sdnr:northbound:cps-ran-schema-model\";
-  prefix rn;
-
-  import ietf-inet-types {
-    prefix inet;
-  }
-  import ietf-yang-types {
-    prefix yang;
-  }
-
-  organization
-    \"Open Network Automation Platform - ONAP
-     <https://www.onap.org>\";
-  contact
-    \"Editors:
-       Sandeep Shah
-       <mailto:sandeep.shah@ibm.com>
-
-       Swaminathan Seetharaman
-       <mailto:swaminathan.seetharaman@wipro.com>\";
-  description
-    \"This module contains a collection of YANG definitions for capturing
-     relationships among managed elements of the radio access Network
-     to be stored in ONAP CPS platform.
-
-     Copyright 2020-2021 IBM.
-
-     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.\";
-
-  revision 2021-01-28 {
-    description
-      \"CPS RAN Network YANG Model for ONAP/O-RAN POC\";
-    reference
-      \"https://wiki.onap.org/display/DW/E2E+Network+Slicing+Use+Case+in+R7+Guilin\";
-  }
-
-  typedef usageState {
-    type enumeration {
-      enum IDLE {
-        description
-          \"TODO\";
-      }
-      enum ACTIVE {
-        description
-          \"TODO\";
-      }
-      enum BUSY {
-        description
-          \"TODO\";
-      }
-    }
-    description
-      \"It describes whether or not the resource is actively in
-       use at a specific instant, and if so, whether or not it has spare
-       capacity for additional users at that instant. The value is READ-ONLY.\";
-    reference
-      \"ITU T Recommendation X.731\";
-  }
-
-  typedef Mcc {
-    type string;
-    description
-      \"The mobile country code consists of three decimal digits,
-       The first digit of the mobile country code identifies the geographic
-       region (the digits 1 and 8 are not used):\";
-    reference
-      \"3GPP TS 23.003 subclause 2.2 and 12.1\";
-  }
-
-  typedef Mnc {
-    type string;
-    description
-      \"The mobile network code consists of two or three
-       decimal digits (for example: MNC of 001 is not the same as MNC of 01)\";
-    reference
-      \"3GPP TS 23.003 subclause 2.2 and 12.1\";
-  }
-
-  typedef Nci {
-    type string;
-    description
-      \"NR Cell Identity. The NCI shall be of fixed length of 36 bits
-       and shall be coded using full hexadecimal representation.
-       The exact coding of the NCI is the responsibility of each PLMN operator\";
-    reference
-      \"TS 23.003\";
-  }
-
-  typedef OperationalState {
-    type enumeration {
-      enum DISABLED {
-        value 0;
-        description
-          \"The resource is totally inoperable.\";
-      }
-      enum ENABLED {
-        value 1;
-        description
-          \"The resource is partially or fully operable.\";
-      }
-    }
-    description
-      \"TODO\";
-    reference
-      \"3GPP TS 28.625 and ITU-T X.731\";
-  }
-
-  typedef AvailabilityStatus {
-    type enumeration {
-      enum IN_TEST {
-        description
-          \"TODO\";
-      }
-      enum FAILED {
-        description
-          \"TODO\";
-      }
-      enum POWER_OFF {
-        description
-          \"TODO\";
-      }
-      enum OFF_LINE {
-        description
-          \"TODO\";
-      }
-      enum OFF_DUTY {
-        description
-          \"TODO\";
-      }
-      enum DEPENDENCY {
-        description
-          \"TODO\";
-      }
-      enum DEGRADED {
-        description
-          \"TODO\";
-      }
-      enum NOT_INSTALLED {
-        description
-          \"TODO\";
-      }
-      enum LOG_FULL {
-        description
-          \"TODO\";
-      }
-    }
-    description
-      \"TODO\";
-    reference
-      \"TODO\";
-  }
-
-  typedef CellState {
-    type enumeration {
-      enum IDLE {
-        description
-          \"TODO\";
-      }
-      enum INACTIVE {
-        description
-          \"TODO\";
-      }
-      enum ACTIVE {
-        description
-          \"TODO\";
-      }
-    }
-    description
-      \"TODO\";
-    reference
-      \"TODO\";
-  }
-
-  typedef SNssai {
-    type string;
-    description
-      \"Single Network Slice Selection Assistance Information.\";
-    reference
-      \"TS 23.501 clause 5.15.2\";
-  }
-
-  typedef Sst {
-    type uint8;
-    description
-      \"TODO\";
-    reference
-      \"TODO\";
-  }
-
-  typedef Nrpci {
-    type uint32;
-    description
-      \"Physical Cell Identity (PCI) of the NR cell.\";
-    reference
-      \"TS 36.211 subclause 6.11\";
-  }
-
-  typedef Tac {
-    type int32 {
-      range \"0..16777215\";
-    }
-    description
-      \"Tracking Area Code\";
-    reference
-      \"TS 23.003 clause 19.4.2.3\";
-  }
-
-  typedef AmfRegionId {
-    type string;
-    description
-      \"\";
-    reference
-      \"clause 2.10.1 of 3GPP TS 23.003\";
-  }
-
-  typedef AmfSetId {
-    type string;
-    description
-      \"\";
-    reference
-      \"clause 2.10.1 of 3GPP TS 23.003\";
-  }
-
-  typedef AmfPointer {
-    type string;
-    description
-      \"\";
-    reference
-      \"clause 2.10.1 of 3GPP TS 23.003\";
-  }
-
-  // type definitions especially for core NFs
-
-  typedef NfType {
-    type enumeration {
-      enum NRF {
-        description
-          \"TODO\";
-      }
-      enum UDM {
-        description
-          \"TODO\";
-      }
-      enum AMF {
-        description
-          \"TODO\";
-      }
-      enum SMF {
-        description
-          \"TODO\";
-      }
-      enum AUSF {
-        description
-          \"TODO\";
-      }
-      enum NEF {
-        description
-          \"TODO\";
-      }
-      enum PCF {
-        description
-          \"TODO\";
-      }
-      enum SMSF {
-        description
-          \"TODO\";
-      }
-      enum NSSF {
-        description
-          \"TODO\";
-      }
-      enum UDR {
-        description
-          \"TODO\";
-      }
-      enum LMF {
-        description
-          \"TODO\";
-      }
-      enum GMLC {
-        description
-          \"TODO\";
-      }
-      enum 5G_EIR {
-        description
-          \"TODO\";
-      }
-      enum SEPP {
-        description
-          \"TODO\";
-      }
-      enum UPF {
-        description
-          \"TODO\";
-      }
-      enum N3IWF {
-        description
-          \"TODO\";
-      }
-      enum AF {
-        description
-          \"TODO\";
-      }
-      enum UDSF {
-        description
-          \"TODO\";
-      }
-      enum BSF {
-        description
-          \"TODO\";
-      }
-      enum CHF {
-        description
-          \"TODO\";
-      }
-    }
-    description
-      \"TODO\";
-  }
-
-  typedef NotificationType {
-    type enumeration {
-      enum N1_MESSAGES {
-        description
-          \"TODO\";
-      }
-      enum N2_INFORMATION {
-        description
-          \"TODO\";
-      }
-      enum LOCATION_NOTIFICATION {
-        description
-          \"TODO\";
-      }
-    }
-    description
-      \"TODO\";
-  }
-
-  typedef Load {
-    type uint8 {
-      range \"0..100\";
-    }
-    description
-      \"Latest known load information of the NF, percentage \";
-  }
-
-  typedef N1MessageClass {
-    type enumeration {
-      enum 5GMM {
-        description
-          \"TODO\";
-      }
-      enum SM {
-        description
-          \"TODO\";
-      }
-      enum LPP {
-        description
-          \"TODO\";
-      }
-      enum SMS {
-        description
-          \"TODO\";
-      }
-    }
-    description
-      \"TODO\";
-  }
-
-  typedef N2InformationClass {
-    type enumeration {
-      enum SM {
-        description
-          \"TODO\";
-      }
-      enum NRPPA {
-        description
-          \"TODO\";
-      }
-      enum PWS {
-        description
-          \"TODO\";
-      }
-      enum PWS_BCAL {
-        description
-          \"TODO\";
-      }
-      enum PWS_RF {
-        description
-          \"TODO\";
-      }
-    }
-    description
-      \"TODO\";
-    reference
-      \"TODO\";
-  }
-
-  typedef NsiId {
-    type string;
-    description
-      \"TODO\";
-  }
-
-  typedef UeMobilityLevel {
-    type enumeration {
-      enum STATIONARY {
-        description
-          \"TODO\";
-      }
-      enum NOMADIC {
-        description
-          \"TODO\";
-      }
-      enum RESTRICTED_MOBILITY {
-        description
-          \"TODO\";
-      }
-      enum FULLY_MOBILITY {
-        description
-          \"TODO\";
-      }
-    }
-    description
-      \"TODO\";
-    reference
-      \"TODO\";
-  }
-
-  typedef ResourceSharingLevel {
-    type enumeration {
-      enum SHARED {
-        description
-          \"TODO\";
-      }
-      enum NOT_SHARED {
-        description
-          \"TODO\";
-      }
-    }
-    description
-      \"TODO\";
-    reference
-      \"TODO\";
-  }
-
-  typedef TxDirection {
-    type enumeration {
-      enum DL {
-        description
-          \"TODO\";
-      }
-      enum UL {
-        description
-          \"TODO\";
-      }
-      enum DL_AND_UL {
-        description
-          \"TODO\";
-      }
-    }
-    description
-      \"TODO\";
-    reference
-      \"TODO\";
-  }
-
-  typedef DistinguishedName { // TODO is this equivalent to TS 32.300 ?
-    type string;
-    description
-      \"Represents the international standard for the representation
-       of Distinguished Name (RFC 4512).
-       The format of the DistinguishedName REGEX is:
-       {AttributeType = AttributeValue}
-
-       AttributeType consists of alphanumeric and hyphen (OIDs not allowed).
-       All other characters are restricted.
-       The Attribute value cannot contain control characters or the
-       following characters : \ > < ; \" + , (Comma) and White space
-       The Attribute value can contain the following characters if they
-       are excaped : \ > < ; \" + , (Comma) and White space
-       The Attribute value can contain control characters if its an escaped
-       double digit hex number.
-       Examples could be
-       UID=nobody@example.com,DC=example,DC=com
-       CN=John Smith,OU=Sales,O=ACME Limited,L=Moab,ST=Utah,C=US\";
-    reference
-      \"RFC 4512 Lightweight Directory Access Protocol (LDAP):
-             Directory Information Models\";
-  } // recheck regexp it doesn''t handle posix [:cntrl:]
-
-  typedef QOffsetRange {
-    type int8;
-    units \"dB\";
-    description
-      \"TODO\";
-    reference
-      \"TODO\";
-  }
-
-  typedef QuotaType {
-    type enumeration {
-      enum STRICT {
-        description
-          \"TODO\";
-      }
-      enum FLOAT {
-        description
-          \"TODO\";
-      }
-    }
-    description
-      \"TODO\";
-  }
-
-  typedef CyclicPrefix {
-    type enumeration {
-      enum NORMAL {
-        description
-          \"TODO\";
-      }
-      enum EXTENDED {
-        description
-          \"TODO\";
-      }
-    }
-    description
-      \"TODO\";
-  }
-
-  grouping PLMNInfo {
-    description
-      \"The PLMNInfo data type define a S-NSSAI member in a specific PLMNId, and it have
-       two attributes PLMNId and S-NSSAI (PLMNId, S-NSSAI). The PLMNId represents a data type that
-       is comprised of mcc (mobile country code) and mnc (mobile network code), (See TS 23.003
-       subclause 2.2 and 12.1) and S-NSSAI represents an data type, that is comprised of an SST
-       (Slice/Service type) and an optional SD (Slice Differentiator) field, (See TS 23.003 [13]).\";
-    uses PLMNId;
-    list sNSSAIList {
-      key \"sNssai\";
-      uses sNSSAIConfig;
-      description \"List of sNSSAIs\";
-    }
-  }
-
-  grouping ManagedNFProfile {
-    description
-      \"Defines profile for managed NF\";
-    reference
-      \"3GPP TS 23.501\";
-    leaf idx {
-      type uint32;
-      description
-        \"TODO\";
-      reference
-        \"3GPP TS 23.501\";
-    }
-    leaf nfInstanceID {
-      type yang:uuid;
-      config false;
-      mandatory false;
-      description
-        \"This parameter defines profile for managed NF.
-         The format of the NF Instance ID shall be a
-         Universally Unique Identifier (UUID) version 4,
-         as described in IETF RFC 4122 \";
-    }
-    leaf-list nfType {
-      type NfType;
-      config false;
-      min-elements 1;
-      description
-        \"Type of the Network Function\";
-    }
-    leaf hostAddr {
-      type inet:host;
-      mandatory false;
-      description
-        \"Host address of a NF\";
-    }
-    leaf authzInfo {
-      type string;
-      description
-        \"This parameter defines NF Specific Service authorization
-         information. It shall include the NF type (s) and NF realms/origins
-         allowed to consume NF Service(s) of NF Service Producer.\";
-      reference
-        \"See TS 23.501\";
-    }
-    leaf location {
-      type string;
-      description
-        \"Information about the location of the NF instance
-         (e.g. geographic location, data center) defined by operator\";
-      reference
-        \"TS 29.510\";
-    }
-    leaf capacity {
-      type uint16;
-      mandatory false;
-      description
-        \"This parameter defines static capacity information
-         in the range of 0-65535, expressed as a weight relative to other
-         NF instances of the same type; if capacity is also present in the
-         nfServiceList parameters, those will have precedence over this value.\";
-      reference
-        \"TS 29.510\";
-    }
-    leaf nFSrvGroupId {
-      type string;
-      description
-        \"This parameter defines identity of the group that is
-         served by the NF instance.
-         May be config false or true depending on the ManagedFunction.
-         Config=true for Udrinfo. Config=false for UdmInfo and AusfInfo.
-         Shall be present if ../nfType = UDM or AUSF or UDR. \";
-      reference
-        \"TS 29.510\";
-    }
-    leaf-list supportedDataSetIds {
-      type enumeration {
-        enum SUBSCRIPTION {
-          description
-            \"TODO\";
-        }
-        enum POLICY {
-          description
-            \"TODO\";
-        }
-        enum EXPOSURE {
-          description
-            \"TODO\";
-        }
-        enum APPLICATION {
-          description
-            \"TODO\";
-        }
-      }
-      description
-        \"List of supported data sets in the UDR instance.
-         May be present if ../nfType = UDR\";
-      reference
-        \"TS 29.510\";
-    }
-    leaf-list smfServingAreas {
-      type string;
-      description
-        \"Defines the SMF service area(s) the UPF can serve.
-         Shall be present if ../nfType = UPF\";
-      reference
-        \"TS 29.510\";
-    }
-    leaf priority {
-      type uint16;
-      description
-        \"This parameter defines Priority (relative to other NFs
-         of the same type) in the range of 0-65535, to be used for NF selection;
-         lower values indicate a higher priority. If priority is also present
-         in the nfServiceList parameters, those will have precedence over
-         this value. Shall be present if ../nfType = AMF \";
-      reference
-        \"TS 29.510\";
-    }
-  }
-
-
-  grouping PLMNId {
-    description
-      \"TODO\";
-    reference
-      \"TS 23.658\";
-    leaf mcc {
-      type Mcc;
-      mandatory true;
-      description
-        \"TODO\";
-    }
-    leaf mnc {
-      type Mnc;
-      mandatory true;
-      description
-        \"TODO\";
-    }
-  }
-
-  grouping AmfIdentifier {
-    description
-      \"The AMFI is constructed from an AMF Region ID,
-       an AMF Set ID and an AMF Pointer.
-       The AMF Region ID identifies the region,
-       the AMF Set ID uniquely identifies the AMF Set within the AMF Region, and
-       the AMF Pointer uniquely identifies the AMF within the AMF Set. \";
-    leaf amfRegionId {
-      type AmfRegionId;
-      description
-        \"TODO\";
-    }
-    leaf amfSetId {
-      type AmfSetId;
-      description
-        \"TODO\";
-    }
-    leaf amfPointer {
-      type AmfPointer;
-      description
-        \"TODO\";
-    }
-  }
-
-  grouping DefaultNotificationSubscription {
-    description
-      \"TODO\";
-    leaf notificationType {
-      type NotificationType;
-      description
-        \"TODO\";
-    }
-    leaf callbackUri {
-      type inet:uri;
-      description
-        \"TODO\";
-    }
-    leaf n1MessageClass {
-      type N1MessageClass;
-      description
-        \"TODO\";
-    }
-    leaf n2InformationClass {
-      type N2InformationClass;
-      description
-        \"TODO\";
-    }
-  }
-
-  grouping Ipv4AddressRange {
-    description
-      \"TODO\";
-    leaf start {
-      type inet:ipv4-address;
-      description
-        \"TODO\";
-    }
-    leaf end {
-      type inet:ipv4-address;
-      description
-        \"TODO\";
-    }
-  }
-
-  grouping Ipv6PrefixRange {
-    description
-      \"TODO\";
-    leaf start {
-      type inet:ipv6-prefix;
-      description
-        \"TODO\";
-    }
-    leaf end {
-      type inet:ipv6-prefix;
-      description
-        \"TODO\";
-    }
-  }
-
-  grouping AddressWithVlan {
-    description
-      \"TODO\";
-    leaf ipAddress {
-      type inet:ip-address;
-      description
-        \"TODO\";
-    }
-    leaf vlanId {
-      type uint16;
-      description
-        \"TODO\";
-    }
-  }
-
-  grouping ManagedElementGroup {
-    description
-      \"Abstract class representing telecommunications resources.\";
-    leaf dnPrefix {
-      type DistinguishedName;
-      description
-        \"Provides naming context and splits the DN into a DN Prefix and Local DN\";
-    }
-    leaf userLabel {
-      type string;
-      description
-        \"A user-friendly name of this object.\";
-    }
-    leaf locationName {
-      type string;
-      config false;
-      description
-        \"The physical location (e.g. an address) of an entity\";
-    }
-    leaf-list managedBy {
-      type DistinguishedName;
-      config false;
-      description
-        \"Relates to the role played by ManagementSystem\";
-    }
-    leaf-list managedElementTypeList {
-      type string;
-      config false;
-      min-elements 1;
-      description
-        \"The type of functionality provided by the ManagedElement.
-         It may represent one ME functionality or a combination of
-         Two examples of allowed values are:
-         -  NodeB;
-         -  HLR, VLR.\";
-    }
-  } // Managed Element grouping
-
-  grouping NearRTRICGroup {
-    description
-      \"Abstract class representing Near RT RIC.\";
-    leaf dnPrefix {
-      type DistinguishedName;
-      description
-        \"Provides naming context and splits the DN into a DN Prefix and Local DN\";
-    }
-    leaf userLabel {
-      type string;
-      description
-        \"A user-friendly name of this object.\";
-    }
-    leaf locationName {
-      type string;
-      config false;
-      description
-        \"The physical location (e.g. an address) of an entity\";
-    }
-    leaf gNBId {
-          type int64 { range \"0..4294967295\"; }
-          config false;
-          description \"Identifies a gNB within a PLMN. The gNB Identifier (gNB ID)
-            is part of the NR Cell Identifier (NCI) of the gNB cells.\";
-          reference \"gNB ID in 3GPP TS 38.300, Global gNB ID in 3GPP TS 38.413\";
-        }
-
-       list pLMNInfoList {
-          uses PLMNInfo;
-          key \"mcc mnc\";
-          description \"The PLMNInfoList is a list of PLMNInfo data type. It defines which PLMNs that can be served by the nearRTRIC.\";
-        }
-    list RRMPolicyRatio {
-      key id;
-      leaf id {
-        type string;
-        description
-          \"Key leaf\";
-      }
-      container attributes {
-        uses RRMPolicyRatioGroup;
-      }
-      description \" The RRMPolicyRatio IOC is one realization of a RRMPolicy_ IOC, see the
-        inheritance in Figure 4.2.1.2-1. This RRM framework allows adding new policies, both
-        standardized (like RRMPolicyRatio) or as vendor specific, by inheriting from the
-        abstract RRMPolicy_ IOC. For details see subclause 4.3.36.\";
-    }
-
-  } // Near RT RIC grouping
-
-
-
-       grouping Configuration{
-               leaf configParameter{
-                       type string;
-                       description \"Type of the configuration parameter\";
-        }
-               leaf configValue{
-                       type int64;
-                       description \"Identifies the configuration to be done for the network elements under the NearRTRIC\";
-
-               }
-       }
-
-
-  grouping GNBDUFunctionGroup {
-    description
-      \"Represents the GNBDUFunction IOC.\";
-    reference
-      \"3GPP TS 28.541\";
-
-    leaf gNBId {
-      type int64 {
-        range \"0..4294967295\";
-      }
-      config false;
-      mandatory false;
-      description
-        \"Identifies a gNB within a PLMN. The gNB Identifier (gNB ID)
-         is part of the NR Cell Identifier (NCI) of the gNB cells.\";
-      reference
-        \"gNB ID in 3GPP TS 38.300, Global gNB ID in 3GPP TS 38.413\";
-    }
-    leaf gNBIdLength {
-      type int32 {
-        range \"22..32\";
-      }
-      mandatory false;
-      description
-        \"Indicates the number of bits for encoding the gNB ID.\";
-      reference
-        \"gNB ID in 3GPP TS 38.300, Global gNB ID in 3GPP TS 38.413\";
-    }
-    leaf gNBDUId {
-      type int64 {
-        range \"0..68719476735\";
-      }
-      mandatory false;
-      description
-        \"Uniquely identifies the DU at least within a gNB.\";
-      reference
-        \"3GPP TS 38.473\";
-    }
-    leaf gNBDUName {
-      type string {
-        length \"1..150\";
-      }
-      description
-        \"Identifies the Distributed Unit of an NR node\";
-      reference
-        \"3GPP TS 38.473\";
-    }
-    list RRMPolicyRatio {
-      key id;
-      leaf id {
-        type string;
-        description
-          \"Key leaf\";
-      }
-      container attributes {
-        uses RRMPolicyRatioGroup;
-      }
-      description \" The RRMPolicyRatio IOC is one realization of a RRMPolicy_ IOC, see the
-        inheritance in Figure 4.2.1.2-1. This RRM framework allows adding new policies, both
-        standardized (like RRMPolicyRatio) or as vendor specific, by inheriting from the
-        abstract RRMPolicy_ IOC. For details see subclause 4.3.36.\";
-    }
-  }
-
-  grouping NRCellDUGroup {
-    description
-      \"Represents the NRCellDU IOC.\";
-    reference
-      \"3GPP TS 28.541\";
-    list RRMPolicyRatio {
-      key id;
-      leaf id {
-        type string;
-        description
-          \"Key leaf\";
-      }
-      container attributes {
-        uses RRMPolicyRatioGroup;
-      }
-      description \" The RRMPolicyRatio IOC is one realization of a RRMPolicy_ IOC, see the
-        inheritance in Figure 4.2.1.2-1. This RRM framework allows adding new policies, both
-        standardized (like RRMPolicyRatio) or as vendor specific, by inheriting from the
-        abstract RRMPolicy_ IOC. For details see subclause 4.3.36.\";
-    }
-    leaf cellLocalId {
-      type int32 {
-        range \"0..16383\";
-      }
-      mandatory false;
-      description
-        \"Identifies an NR cell of a gNB. Together with the
-         corresponding gNB identifier in forms the NR Cell Identity (NCI).\";
-      reference
-        \"NCI in 3GPP TS 38.300\";
-    }
-    list pLMNInfoList {
-      key \"mcc mnc\";
-      min-elements 1;
-      description
-        \"The PLMNInfoList is a list of PLMNInfo data type. It defines which PLMNs that
-         can be served by the NR cell, and which S-NSSAIs that can be supported by the NR cell for
-         corresponding PLMN in case of network slicing feature is supported. The plMNId of the first
-         entry of the list is the PLMNId used to construct the nCGI for the NR cell.\";
-      uses PLMNInfo;
-    }
-    leaf nRPCI {
-      type int32 {
-        range \"0..1007\";
-      }
-      mandatory false;
-      description
-        \"The Physical Cell Identity (PCI) of the NR cell.\";
-      reference
-        \"3GPP TS 36.211\";
-    }
-    leaf nRTAC {
-      type Tac;
-      description
-        \"The common 5GS Tracking Area Code for the PLMNs.\";
-      reference
-        \"3GPP TS 23.003, 3GPP TS 38.473\";
-    }
-  } // grouping
-
-  grouping rRMPolicyMemberGroup {
-    description
-      \"TODO\";
-    uses PLMNId;
-    leaf sNSSAI {
-      type SNssai;
-      description
-        \"This data type represents an RRM Policy member that will be part of a
-         rRMPolicyMemberList. A RRMPolicyMember is defined by its pLMNId and sNSSAI (S-NSSAI).
-         The members in a rRMPolicyMemberList are assigned a specific amount of RRM resources
-         based on settings in RRMPolicy.\";
-    }
-  }
-
-  grouping RRMPolicyRatioGroup {
-
-    uses RRMPolicy_Group;    // Inherits RRMPolicy_
-
-    leaf quotaType {
-      type QuotaType;
-      mandatory false;
-      description \"The type of the quota which allows to allocate resources as
-        strictly usable for defined slice(s) (strict quota) or allows that
-        resources to be used by other slice(s) when defined slice(s) do not
-        need them (float quota).\";
-    }
-
-    leaf rRMPolicyMaxRatio {
-      type uint8;
-      mandatory false;
-      units percent;
-      description \"The RRM policy setting the maximum percentage of radio
-        resources to be allocated to the corresponding S-NSSAI list. This
-        quota can be strict or float quota. Strict quota means resources are
-        not allowed for other sNSSAIs even when they are not used by the
-        defined sNSSAIList. Float quota resources can be used by other sNSSAIs
-        when the defined sNSSAIList do not need them. Value 0 indicates that
-        there is no maximum limit.\";
-    }
-
-    leaf rRMPolicyMinRatio {
-      type uint8;
-      mandatory false;
-      units percent;
-      description \"The RRM policy setting the minimum percentage of radio
-        resources to be allocated to the corresponding S-NSSAI list. This
-        quota can be strict or float quota. Strict quota means resources are
-        not allowed for other sNSSAIs even when they are not used by the
-        defined sNSSAIList. Float quota resources can be used by other sNSSAIs
-        when the defined sNSSAIList do not need them. Value 0 indicates that
-        there is no minimum limit.\";
-    }
-    leaf rRMPolicyDedicatedRatio {
-      type uint8;
-      units percent;
-      description \"Dedicated Ration.\";
-      }
-    description \"Represents the RRMPolicyRatio concrete IOC.\";
-    }
-
-
-  grouping sNSSAIConfig{
-       leaf sNssai {
-        type string;
-        description \"s-NSSAI of a network slice.\";
-          reference \"3GPP TS 23.003\";
-      }
-        leaf status {
-        type string;
-        description \"status of s-NSSAI\";
-      }
-       list configData{
-               uses Configuration;
-               key \"configParameter\";
-               description \"List of configurations to be done at the network elements\";
-       }
-       }
-
-  grouping RRMPolicy_Group {
-    description
-      \"This IOC represents the properties of an abstract RRMPolicy. The RRMPolicy_ IOC
-       needs to be subclassed to be instantiated. It defines two attributes apart from those
-       inherited from Top IOC, the resourceType attribute defines type of resource (PRB, RRC
-       connected users, DRB usage etc.) and the rRMPolicyMemberList attribute defines the
-       RRMPolicyMember(s)that are subject to this policy. An RRM resource (defined in resourceType
-       attribute) is located in NRCellDU, NRCellCU, GNBDUFunction, GNBCUCPFunction or in
-       GNBCUUPFunction. The RRMPolicyRatio IOC is one realization of a RRMPolicy_ IOC, see the
-       inheritance in TS 28.541 Figure 4.2.1.2-1. This RRM framework allows adding new policies,
-       both standardized (like RRMPolicyRatio) or as vendor specific, by inheriting from the
-       abstract RRMPolicy_ IOC.\";
-    leaf resourceType {
-      type string;
-      mandatory false;
-      description
-        \"The resourceType attribute defines type of resource (PRB, RRC connected users,
-         DRB usage etc.) that is subject to policy. Valid values are ''PRB'', ''RRC'' or ''DRB''\";
-    }
-    list rRMPolicyMemberList {
-      key \"idx\";
-      leaf idx {
-        type uint32;
-        description
-          \"TODO\";
-      }
-      description
-        \"It represents the list of RRMPolicyMember (s) that the managed object
-         is supporting. A RRMPolicyMember <<dataType>> include the PLMNId <<dataType>>
-         and S-NSSAI <<dataType>>.\";
-      uses rRMPolicyMemberGroup;
-    }
-  } // grouping
-
-  grouping GNBCUUPFunctionGroup {
-    description
-      \"Represents the GNBCUUPFunction IOC.\";
-    reference
-      \"3GPP TS 28.541\";
-
-    list RRMPolicyRatio {
-      key id;
-      leaf id {
-        type string;
-        description
-          \"Key leaf\";
-      }
-      container attributes {
-        uses RRMPolicyRatioGroup;
-      }
-      description \" The RRMPolicyRatio IOC is one realization of a RRMPolicy_ IOC, see the
-        inheritance in Figure 4.2.1.2-1. This RRM framework allows adding new policies, both
-        standardized (like RRMPolicyRatio) or as vendor specific, by inheriting from the
-        abstract RRMPolicy_ IOC. For details see subclause 4.3.36.\";
-    }
-    leaf gNBCUUPId {
-      type uint64 {
-        range \"0..68719476735\";
-      }
-      config false;
-      mandatory false;
-      description
-        \"Identifies the gNB-CU-UP at least within a gNB-CU-CP\";
-      reference
-        \"''gNB-CU-UP ID'' in subclause 9.3.1.15 of 3GPP TS 38.463\";
-    }
-    leaf gNBId {
-      type int64 {
-      range \"0..4294967295\";
-    }
-      mandatory false;
-      description
-        \"Indicates the number of bits for encoding the gNB Id.\";
-      reference
-        \"gNB Id in 3GPP TS 38.300, Global gNB ID in 3GPP TS 38.413\";
-    }
-    list pLMNInfoList {
-      key \"mcc mnc\";
-      description
-        \"The PLMNInfoList is a list of PLMNInfo data type. It defines which PLMNs that
-         can be served by the GNBCUUPFunction and which S-NSSAIs can be supported by the
-         GNBCUUPFunction for corresponding PLMN in case of network slicing feature is supported\";
-      uses PLMNInfo;
-    }
-  } // grouping
-
-  grouping GNBCUCPFunctionGroup {
-    description
-      \"Represents the GNBCUCPFunction IOC.\";
-    reference
-      \"3GPP TS 28.541\";
-    list RRMPolicyRatio {
-      key id;
-      leaf id {
-        type string;
-        description
-          \"Key leaf\";
-      }
-      container attributes {
-        uses RRMPolicyRatioGroup;
-      }
-      description \" The RRMPolicyRatio IOC is one realization of a RRMPolicy_ IOC, see the
-        inheritance in Figure 4.2.1.2-1. This RRM framework allows adding new policies, both
-        standardized (like RRMPolicyRatio) or as vendor specific, by inheriting from the
-        abstract RRMPolicy_ IOC. For details see subclause 4.3.36.\";
-    }
-    leaf gNBId {
-      type int64 {
-        range \"0..4294967295\";
-      }
-      mandatory false;
-      description
-        \"Identifies a gNB within a PLMN. The gNB Identifier (gNB ID)
-         is part of the NR Cell Identifier (NCI) of the gNB cells.\";
-      reference
-        \"gNB ID in 3GPP TS 38.300, Global gNB ID in 3GPP TS 38.413\";
-    }
-    leaf gNBIdLength {
-      type int32 {
-        range \"22..32\";
-      }
-      mandatory false;
-      description
-        \"Indicates the number of bits for encoding the gNB ID.\";
-      reference
-        \"gNB ID in 3GPP TS 38.300, Global gNB ID in 3GPP TS 38.413\";
-    }
-    leaf gNBCUName {
-      type string {
-        length \"1..150\";
-      }
-      mandatory false;
-      description
-        \"Identifies the Central Unit of an gNB.\";
-      reference
-        \"3GPP TS 38.473\";
-    }
-    list pLMNId {
-      key \"mcc mnc\";
-      min-elements 1;
-      max-elements 1;
-      description
-        \"The PLMN identifier to be used as part of the global RAN
-         node identity.\";
-      uses PLMNId;
-    }
-  } // grouping
-
-  grouping NRCellCUGroup {
-    description
-      \"Represents the NRCellCU IOC.\";
-    reference
-      \"3GPP TS 28.541\";
-    leaf cellLocalId {
-      type int32 {
-        range \"0..16383\";
-      }
-      mandatory false;
-      description
-        \"Identifies an NR cell of a gNB. Together with corresponding
-         gNB ID it forms the NR Cell Identifier (NCI).\";
-    }
-    list pLMNInfoList {
-      key \"mcc mnc\";
-      min-elements 1;
-      description
-        \"The PLMNInfoList is a list of PLMNInfo data type. It defines which PLMNs
-         that can be served by the NR cell, and which S-NSSAIs that can be supported by the
-         NR cell for corresponding PLMN in case of network slicing feature is supported.\";
-      uses PLMNInfo;
-      // Note: Whether the attribute pLMNId in the pLMNInfo can be writable depends on the implementation.
-    }
-    list RRMPolicyRatio {
-      key id;
-      leaf id {
-        type string;
-        description
-          \"Key leaf\";
-      }
-      container attributes {
-        uses RRMPolicyRatioGroup;
-      }
-      description \" The RRMPolicyRatio IOC is one realization of a RRMPolicy_ IOC, see the
-        inheritance in Figure 4.2.1.2-1. This RRM framework allows adding new policies, both
-        standardized (like RRMPolicyRatio) or as vendor specific, by inheriting from the
-        abstract RRMPolicy_ IOC. For details see subclause 4.3.36.\";
-    }
-  } // grouping NRCellCUGroup
-
-  grouping NRCellRelationGroup {
-    description
-      \"Represents the NRCellRelation IOC.\";
-    reference
-      \"3GPP TS 28.541\";
-    leaf nRTCI {
-      type uint64;
-      description
-        \"Target NR Cell Identifier. It consists of NR Cell
-         Identifier (NCI) and Physical Cell Identifier of the target NR cell
-         (nRPCI).\";
-    "|0337045143fa2e592243243f82699b93
-ietf-yang-types.yang|"module ietf-yang-types {
-
-  namespace \"urn:ietf:params:xml:ns:yang:ietf-yang-types\";
-  prefix \"yang\";
-
-  organization
-   \"IETF NETMOD (NETCONF Data Modeling Language) Working Group\";
-
-  contact
-   \"WG Web:   <http://tools.ietf.org/wg/netmod/>
-    WG List:  <mailto:netmod@ietf.org>
-
-    WG Chair: David Kessens
-              <mailto:david.kessens@nsn.com>
-
-    WG Chair: Juergen Schoenwaelder
-              <mailto:j.schoenwaelder@jacobs-university.de>
-
-    Editor:   Juergen Schoenwaelder
-              <mailto:j.schoenwaelder@jacobs-university.de>\";
-
-  description
-   \"This module contains a collection of generally useful derived
-    YANG data types.
-
-    Copyright (c) 2013 IETF Trust and the persons identified as
-    authors of the code.  All rights reserved.
-
-    Redistribution and use in source and binary forms, with or
-    without modification, is permitted pursuant to, and subject
-    to the license terms contained in, the Simplified BSD License
-    set forth in Section 4.c of the IETF Trust''s Legal Provisions
-    Relating to IETF Documents
-    (http://trustee.ietf.org/license-info).
-
-    This version of this YANG module is part of RFC 6991; see
-    the RFC itself for full legal notices.\";
-
-  revision 2013-07-15 {
-    description
-     \"This revision adds the following new data types:
-      - yang-identifier
-      - hex-string
-      - uuid
-      - dotted-quad\";
-    reference
-     \"RFC 6991: Common YANG Data Types\";
-  }
-
-  revision 2010-09-24 {
-    description
-     \"Initial revision.\";
-    reference
-     \"RFC 6021: Common YANG Data Types\";
-  }
-
-  /*** collection of counter and gauge types ***/
-
-  typedef counter32 {
-    type uint32;
-    description
-     \"The counter32 type represents a non-negative integer
-      that monotonically increases until it reaches a
-      maximum value of 2^32-1 (4294967295 decimal), when it
-      wraps around and starts increasing again from zero.
-
-      Counters have no defined ''initial'' value, and thus, a
-      single value of a counter has (in general) no information
-      content.  Discontinuities in the monotonically increasing
-      value normally occur at re-initialization of the
-      management system, and at other times as specified in the
-      description of a schema node using this type.  If such
-      other times can occur, for example, the creation of
-      a schema node of type counter32 at times other than
-      re-initialization, then a corresponding schema node
-      should be defined, with an appropriate type, to indicate
-      the last discontinuity.
-
-      The counter32 type should not be used for configuration
-      schema nodes.  A default statement SHOULD NOT be used in
-      combination with the type counter32.
-
-      In the value set and its semantics, this type is equivalent
-      to the Counter32 type of the SMIv2.\";
-    reference
-     \"RFC 2578: Structure of Management Information Version 2
-                (SMIv2)\";
-  }
-
-  typedef zero-based-counter32 {
-    type yang:counter32;
-    default \"0\";
-    description
-     \"The zero-based-counter32 type represents a counter32
-      that has the defined ''initial'' value zero.
-
-      A schema node of this type will be set to zero (0) on creation
-      and will thereafter increase monotonically until it reaches
-      a maximum value of 2^32-1 (4294967295 decimal), when it
-      wraps around and starts increasing again from zero.
-
-      Provided that an application discovers a new schema node
-      of this type within the minimum time to wrap, it can use the
-      ''initial'' value as a delta.  It is important for a management
-      station to be aware of this minimum time and the actual time
-      between polls, and to discard data if the actual time is too
-      long or there is no defined minimum time.
-
-      In the value set and its semantics, this type is equivalent
-      to the ZeroBasedCounter32 textual convention of the SMIv2.\";
-    reference
-      \"RFC 4502: Remote Network Monitoring Management Information
-                 Base Version 2\";
-  }
-
-  typedef counter64 {
-    type uint64;
-    description
-     \"The counter64 type represents a non-negative integer
-      that monotonically increases until it reaches a
-      maximum value of 2^64-1 (18446744073709551615 decimal),
-      when it wraps around and starts increasing again from zero.
-
-      Counters have no defined ''initial'' value, and thus, a
-      single value of a counter has (in general) no information
-      content.  Discontinuities in the monotonically increasing
-      value normally occur at re-initialization of the
-      management system, and at other times as specified in the
-      description of a schema node using this type.  If such
-      other times can occur, for example, the creation of
-      a schema node of type counter64 at times other than
-      re-initialization, then a corresponding schema node
-      should be defined, with an appropriate type, to indicate
-      the last discontinuity.
-
-      The counter64 type should not be used for configuration
-      schema nodes.  A default statement SHOULD NOT be used in
-      combination with the type counter64.
-
-      In the value set and its semantics, this type is equivalent
-      to the Counter64 type of the SMIv2.\";
-    reference
-     \"RFC 2578: Structure of Management Information Version 2
-                (SMIv2)\";
-  }
-
-  typedef zero-based-counter64 {
-    type yang:counter64;
-    default \"0\";
-    description
-     \"The zero-based-counter64 type represents a counter64 that
-      has the defined ''initial'' value zero.
-
-
-
-
-      A schema node of this type will be set to zero (0) on creation
-      and will thereafter increase monotonically until it reaches
-      a maximum value of 2^64-1 (18446744073709551615 decimal),
-      when it wraps around and starts increasing again from zero.
-
-      Provided that an application discovers a new schema node
-      of this type within the minimum time to wrap, it can use the
-      ''initial'' value as a delta.  It is important for a management
-      station to be aware of this minimum time and the actual time
-      between polls, and to discard data if the actual time is too
-      long or there is no defined minimum time.
-
-      In the value set and its semantics, this type is equivalent
-      to the ZeroBasedCounter64 textual convention of the SMIv2.\";
-    reference
-     \"RFC 2856: Textual Conventions for Additional High Capacity
-                Data Types\";
-  }
-
-  typedef gauge32 {
-    type uint32;
-    description
-     \"The gauge32 type represents a non-negative integer, which
-      may increase or decrease, but shall never exceed a maximum
-      value, nor fall below a minimum value.  The maximum value
-      cannot be greater than 2^32-1 (4294967295 decimal), and
-      the minimum value cannot be smaller than 0.  The value of
-      a gauge32 has its maximum value whenever the information
-      being modeled is greater than or equal to its maximum
-      value, and has its minimum value whenever the information
-      being modeled is smaller than or equal to its minimum value.
-      If the information being modeled subsequently decreases
-      below (increases above) the maximum (minimum) value, the
-      gauge32 also decreases (increases).
-
-      In the value set and its semantics, this type is equivalent
-      to the Gauge32 type of the SMIv2.\";
-    reference
-     \"RFC 2578: Structure of Management Information Version 2
-                (SMIv2)\";
-  }
-
-  typedef gauge64 {
-    type uint64;
-    description
-     \"The gauge64 type represents a non-negative integer, which
-      may increase or decrease, but shall never exceed a maximum
-      value, nor fall below a minimum value.  The maximum value
-      cannot be greater than 2^64-1 (18446744073709551615), and
-      the minimum value cannot be smaller than 0.  The value of
-      a gauge64 has its maximum value whenever the information
-      being modeled is greater than or equal to its maximum
-      value, and has its minimum value whenever the information
-      being modeled is smaller than or equal to its minimum value.
-      If the information being modeled subsequently decreases
-      below (increases above) the maximum (minimum) value, the
-      gauge64 also decreases (increases).
-
-      In the value set and its semantics, this type is equivalent
-      to the CounterBasedGauge64 SMIv2 textual convention defined
-      in RFC 2856\";
-    reference
-     \"RFC 2856: Textual Conventions for Additional High Capacity
-                Data Types\";
-  }
-
-  /*** collection of identifier-related types ***/
-
-  typedef object-identifier {
-    type string {
-      pattern ''(([0-1](.[1-3]?[0-9]))|(2.(0|([1-9]d*))))''
-            + ''(.(0|([1-9]d*)))*'';
-    }
-    description
-     \"The object-identifier type represents administratively
-      assigned names in a registration-hierarchical-name tree.
-
-      Values of this type are denoted as a sequence of numerical
-      non-negative sub-identifier values.  Each sub-identifier
-      value MUST NOT exceed 2^32-1 (4294967295).  Sub-identifiers
-      are separated by single dots and without any intermediate
-      whitespace.
-
-      The ASN.1 standard restricts the value space of the first
-      sub-identifier to 0, 1, or 2.  Furthermore, the value space
-      of the second sub-identifier is restricted to the range
-      0 to 39 if the first sub-identifier is 0 or 1.  Finally,
-      the ASN.1 standard requires that an object identifier
-      has always at least two sub-identifiers.  The pattern
-      captures these restrictions.
-
-      Although the number of sub-identifiers is not limited,
-      module designers should realize that there may be
-      implementations that stick with the SMIv2 limit of 128
-      sub-identifiers.
-
-      This type is a superset of the SMIv2 OBJECT IDENTIFIER type
-      since it is not restricted to 128 sub-identifiers.  Hence,
-      this type SHOULD NOT be used to represent the SMIv2 OBJECT
-      IDENTIFIER type; the object-identifier-128 type SHOULD be
-      used instead.\";
-    reference
-     \"ISO9834-1: Information technology -- Open Systems
-      Interconnection -- Procedures for the operation of OSI
-      Registration Authorities: General procedures and top
-      arcs of the ASN.1 Object Identifier tree\";
-  }
-
-  typedef object-identifier-128 {
-    type object-identifier {
-      pattern ''d*(.d*){1,127}'';
-    }
-    description
-     \"This type represents object-identifiers restricted to 128
-      sub-identifiers.
-
-      In the value set and its semantics, this type is equivalent
-      to the OBJECT IDENTIFIER type of the SMIv2.\";
-    reference
-     \"RFC 2578: Structure of Management Information Version 2
-                (SMIv2)\";
-  }
-
-  typedef yang-identifier {
-    type string {
-      length \"1..max\";
-      pattern ''[a-zA-Z_][a-zA-Z0-9-_.]*'';
-      pattern ''.|..|[^xX].*|.[^mM].*|..[^lL].*'';
-    }
-    description
-      \"A YANG identifier string as defined by the ''identifier''
-       rule in Section 12 of RFC 6020.  An identifier must
-       start with an alphabetic character or an underscore
-       followed by an arbitrary sequence of alphabetic or
-       numeric characters, underscores, hyphens, or dots.
-
-       A YANG identifier MUST NOT start with any possible
-       combination of the lowercase or uppercase character
-       sequence ''xml''.\";
-    reference
-      \"RFC 6020: YANG - A Data Modeling Language for the Network
-                 Configuration Protocol (NETCONF)\";
-  }
-
-  /*** collection of types related to date and time***/
-
-  typedef date-and-time {
-    type string {
-      pattern ''d{4}-d{2}-d{2}Td{2}:d{2}:d{2}(.d+)?''
-            + ''(Z|[+-]d{2}:d{2})'';
-    }
-    description
-     \"The date-and-time type is a profile of the ISO 8601
-      standard for representation of dates and times using the
-      Gregorian calendar.  The profile is defined by the
-      date-time production in Section 5.6 of RFC 3339.
-
-      The date-and-time type is compatible with the dateTime XML
-      schema type with the following notable exceptions:
-
-      (a) The date-and-time type does not allow negative years.
-
-      (b) The date-and-time time-offset -00:00 indicates an unknown
-          time zone (see RFC 3339) while -00:00 and +00:00 and Z
-          all represent the same time zone in dateTime.
-
-      (c) The canonical format (see below) of data-and-time values
-          differs from the canonical format used by the dateTime XML
-          schema type, which requires all times to be in UTC using
-          the time-offset ''Z''.
-
-      This type is not equivalent to the DateAndTime textual
-      convention of the SMIv2 since RFC 3339 uses a different
-      separator between full-date and full-time and provides
-      higher resolution of time-secfrac.
-
-      The canonical format for date-and-time values with a known time
-      zone uses a numeric time zone offset that is calculated using
-      the device''s configured known offset to UTC time.  A change of
-      the device''s offset to UTC time will cause date-and-time values
-      to change accordingly.  Such changes might happen periodically
-      in case a server follows automatically daylight saving time
-      (DST) time zone offset changes.  The canonical format for
-      date-and-time values with an unknown time zone (usually
-      referring to the notion of local time) uses the time-offset
-      -00:00.\";
-    reference
-     \"RFC 3339: Date and Time on the Internet: Timestamps
-      RFC 2579: Textual Conventions for SMIv2
-      XSD-TYPES: XML Schema Part 2: Datatypes Second Edition\";
-  }
-
-  typedef timeticks {
-    type uint32;
-    description
-     \"The timeticks type represents a non-negative integer that
-      represents the time, modulo 2^32 (4294967296 decimal), in
-      hundredths of a second between two epochs.  When a schema
-      node is defined that uses this type, the description of
-      the schema node identifies both of the reference epochs.
-
-      In the value set and its semantics, this type is equivalent
-      to the TimeTicks type of the SMIv2.\";
-    reference
-     \"RFC 2578: Structure of Management Information Version 2
-                (SMIv2)\";
-  }
-
-  typedef timestamp {
-    type yang:timeticks;
-    description
-     \"The timestamp type represents the value of an associated
-      timeticks schema node at which a specific occurrence
-      happened.  The specific occurrence must be defined in the
-      description of any schema node defined using this type.  When
-      the specific occurrence occurred prior to the last time the
-      associated timeticks attribute was zero, then the timestamp
-      value is zero.  Note that this requires all timestamp values
-      to be reset to zero when the value of the associated timeticks
-      attribute reaches 497+ days and wraps around to zero.
-
-      The associated timeticks schema node must be specified
-      in the description of any schema node using this type.
-
-      In the value set and its semantics, this type is equivalent
-      to the TimeStamp textual convention of the SMIv2.\";
-    reference
-     \"RFC 2579: Textual Conventions for SMIv2\";
-  }
-
-  /*** collection of generic address types ***/
-
-  typedef phys-address {
-    type string {
-      pattern ''([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'';
-    }
-
-
-
-
-    description
-     \"Represents media- or physical-level addresses represented
-      as a sequence octets, each octet represented by two hexadecimal
-      numbers.  Octets are separated by colons.  The canonical
-      representation uses lowercase characters.
-
-      In the value set and its semantics, this type is equivalent
-      to the PhysAddress textual convention of the SMIv2.\";
-    reference
-     \"RFC 2579: Textual Conventions for SMIv2\";
-  }
-
-  typedef mac-address {
-    type string {
-      pattern ''[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'';
-    }
-    description
-     \"The mac-address type represents an IEEE 802 MAC address.
-      The canonical representation uses lowercase characters.
-
-      In the value set and its semantics, this type is equivalent
-      to the MacAddress textual convention of the SMIv2.\";
-    reference
-     \"IEEE 802: IEEE Standard for Local and Metropolitan Area
-                Networks: Overview and Architecture
-      RFC 2579: Textual Conventions for SMIv2\";
-  }
-
-  /*** collection of XML-specific types ***/
-
-  typedef xpath1.0 {
-    type string;
-    description
-     \"This type represents an XPATH 1.0 expression.
-
-      When a schema node is defined that uses this type, the
-      description of the schema node MUST specify the XPath
-      context in which the XPath expression is evaluated.\";
-    reference
-     \"XPATH: XML Path Language (XPath) Version 1.0\";
-  }
-
-  /*** collection of string types ***/
-
-  typedef hex-string {
-    type string {
-      pattern ''([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'';
-    }
-    description
-     \"A hexadecimal string with octets represented as hex digits
-      separated by colons.  The canonical representation uses
-      lowercase characters.\";
-  }
-
-  typedef uuid {
-    type string {
-      pattern ''[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-''
-            + ''[0-9a-fA-F]{4}-[0-9a-fA-F]{12}'';
-    }
-    description
-     \"A Universally Unique IDentifier in the string representation
-      defined in RFC 4122.  The canonical representation uses
-      lowercase characters.
-
-      The following is an example of a UUID in string representation:
-      f81d4fae-7dec-11d0-a765-00a0c91e6bf6
-      \";
-    reference
-     \"RFC 4122: A Universally Unique IDentifier (UUID) URN
-                Namespace\";
-  }
-
-  typedef dotted-quad {
-    type string {
-      pattern
-        ''(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]).){3}''
-      + ''([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'';
-    }
-    description
-      \"An unsigned 32-bit number expressed in the dotted-quad
-       notation, i.e., four octets written as decimal numbers
-       and separated with the ''.'' (full stop) character.\";
-  }
-}"|57d603ee9ab0c49355ad0695c0709c93
index 58716f3..adca617 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   ============LICENSE_START=======================================================
-  Copyright (C) 2021-2023 Nordix Foundation
+  Copyright (C) 2021-2024 Nordix Foundation
   Modifications Copyright (C) 2021 Bell Canada.
   Modifications Copyright (C) 2021 Pantheon.tech
   Modifications Copyright (C) 2022 Deutsche Telekom AG
@@ -29,7 +29,7 @@
   <parent>
     <groupId>org.onap.cps</groupId>
     <artifactId>cps-parent</artifactId>
-    <version>3.4.7-SNAPSHOT</version>
+    <version>3.4.8-SNAPSHOT</version>
     <relativePath>../cps-parent/pom.xml</relativePath>
   </parent>
 
       <artifactId>cloudevents-spring</artifactId>
     </dependency>
     <!-- T E S T   D E P E N D E N C I E S -->
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-test</artifactId>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>org.codehaus.groovy</groupId>
       <artifactId>groovy</artifactId>
       <groupId>org.testcontainers</groupId>
       <artifactId>kafka</artifactId>
       <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>junit</groupId>
+          <artifactId>junit</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.springframework.kafka</groupId>
       <artifactId>spring-kafka-test</artifactId>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.aspectj</groupId>
-      <artifactId>aspectjrt</artifactId>
-      <scope>test</scope>
-    </dependency>
   </dependencies>
 </project>
index cf7a90c..0df67b6 100644 (file)
@@ -33,7 +33,6 @@ ${dataspaceName}        CSIT-Dataspace
 ${schemaSetName}        CSIT-SchemaSet
 ${anchorName}           CSIT-Anchor
 ${ranDataspaceName}     NFP-Operational
-${ranSchemaSetName}     cps-ran-schema-model
 
 *** Test Cases ***
 Create Dataspace
@@ -77,11 +76,3 @@ Create Anchor
     ${headers}=         Create Dictionary   Authorization=${auth}
     ${response}=        POST On Session     CPS_URL   ${uri}   params=${params}   headers=${headers}
     Should Be Equal As Strings              ${response.status_code}   201
-
-Get CPS RAN Schema Set info
-    ${uri}=              Set Variable       ${basePath}/v1/dataspaces/${ranDataspaceName}/schema-sets/${ranSchemaSetName}
-    ${headers}=          Create Dictionary  Authorization=${auth}
-    ${response}=         Get On Session     CPS_URL   ${uri}   headers=${headers}   expected_status=200
-    ${responseJson}=     Set Variable       ${response.json()}
-    Should Be Equal As Strings              ${responseJson['name']}   ${ranSchemaSetName}
-    Should Be Equal As Strings              ${responseJson['dataspaceName']}   ${ranDataspaceName}
index 9b424a5..bb7d3e5 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   ============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.
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>dmi-plugin-demo-and-csit-stub</artifactId>
-        <version>3.4.7-SNAPSHOT</version>
+        <version>3.4.8-SNAPSHOT</version>
     </parent>
 
     <artifactId>dmi-plugin-demo-and-csit-stub-app</artifactId>
             <groupId>org.onap.cps</groupId>
             <artifactId>dmi-plugin-demo-and-csit-stub-service</artifactId>
             <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.eclipse.jetty</groupId>
-            <artifactId>jetty-server</artifactId>
-            <version>11.0.16</version>
-        </dependency>
-        <dependency>
-            <groupId>jakarta.servlet</groupId>
-            <artifactId>jakarta.servlet-api</artifactId>
-            <version>6.0.0</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>junit</groupId>
+                    <artifactId>junit</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
     </dependencies>
 </project>
\ No newline at end of file
index ac9eead..288159c 100644 (file)
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>dmi-plugin-demo-and-csit-stub</artifactId>
-        <version>3.4.7-SNAPSHOT</version>
+        <version>3.4.8-SNAPSHOT</version>
     </parent>
     <artifactId>dmi-plugin-demo-and-csit-stub-service</artifactId>
 
             <groupId>com.googlecode.json-simple</groupId>
             <artifactId>json-simple</artifactId>
             <version>1.1.1</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>junit</groupId>
+                    <artifactId>junit</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
 
         <dependency>
index c57cf0e..f154be6 100644 (file)
@@ -153,9 +153,15 @@ public class DmiRestStubController {
      * @return ResponseEntity response entity having module response as json string.
      */
     @PostMapping("/v1/ch/{cmHandleId}/modules")
-    public ResponseEntity<String> getModuleReferences(@PathVariable final String cmHandleId,
+    public ResponseEntity<String> getModuleReferences(@PathVariable("cmHandleId") final String cmHandleId,
                                                       @RequestBody final Object moduleReferencesRequest) {
         delay(moduleReferencesDelayMs);
+        try {
+            log.info("Incoming DMI request body: {}",
+                    objectMapper.writeValueAsString(moduleReferencesRequest));
+        } catch (final JsonProcessingException jsonProcessingException) {
+            log.info("Unable to parse dmi data operation request to json string");
+        }
         final String moduleResponseContent = getModuleResourceResponse(cmHandleId,
                 "ModuleResponse.json");
         log.info("cm handle: {} requested for modules", cmHandleId);
@@ -172,7 +178,7 @@ public class DmiRestStubController {
      */
     @PostMapping("/v1/ch/{cmHandleId}/moduleResources")
     public ResponseEntity<String> retrieveModuleResources(
-            @PathVariable final String cmHandleId,
+            @PathVariable("cmHandleId") final String cmHandleId,
             @RequestBody final Object moduleResourcesReadRequest) {
         delay(moduleResourcesDelayMs);
         final String moduleResourcesResponseContent = getModuleResourceResponse(cmHandleId,
index 4cec8e6..d857645 100644 (file)
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.4.7-SNAPSHOT</version>
+        <version>3.4.8-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
 
index 90590a2..018cf4a 100644 (file)
@@ -40,6 +40,8 @@ CPS-NCMP Message Status Codes
     +-----------------+------------------------------------------------------+-----------------------------------+
     | 111             | alternate id already associated                      | Inventory                         |
     +-----------------+------------------------------------------------------+-----------------------------------+
+    | 112             | message too large                                    | Data Operation                    |
+    +-----------------+------------------------------------------------------+-----------------------------------+
 
 .. note::
 
index 2202d11..d35ed99 100644 (file)
@@ -16,6 +16,29 @@ CPS Release Notes
 ..      * * *   NEW DELHI   * * *
 ..      =========================
 
+Version: 3.4.8
+==============
+
+Release Data
+------------
+
++--------------------------------------+--------------------------------------------------------+
+| **CPS Project**                      |                                                        |
+|                                      |                                                        |
++--------------------------------------+--------------------------------------------------------+
+| **Docker images**                    | onap/cps-and-ncmp:3.4.8                                |
+|                                      |                                                        |
++--------------------------------------+--------------------------------------------------------+
+| **Release designation**              | 3.4.8 New Delhi                                        |
+|                                      |                                                        |
++--------------------------------------+--------------------------------------------------------+
+| **Release date**                     | Not yet released                                       |
+|                                      |                                                        |
++--------------------------------------+--------------------------------------------------------+
+
+Features
+--------
+
 Version: 3.4.7
 ==============
 
@@ -32,7 +55,7 @@ Release Data
 | **Release designation**              | 3.4.7 New Delhi                                        |
 |                                      |                                                        |
 +--------------------------------------+--------------------------------------------------------+
-| **Release date**                     | Not yet released                                       |
+| **Release date**                     | 2024 March 29                                          |
 |                                      |                                                        |
 +--------------------------------------+--------------------------------------------------------+
 
@@ -43,6 +66,9 @@ Bug Fixes
 
 Features
 --------
+3.4.7
+    - `CPS-2061 <https://jira.onap.org/browse/CPS-2061>`_ Liquibase Steps Condensing and Cleanup.
+    - `CPS-2101 <https://jira.onap.org/browse/CPS-2101>`_ Uplift Spring Boot to 3.2.4 version.
 
 Version: 3.4.6
 ==============
index c845132..d4ee0cc 100644 (file)
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.4.7-SNAPSHOT</version>
+        <version>3.4.8-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
             <artifactId>groovy</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
+        </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>cps-rest</artifactId>
             <artifactId>spock-core</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+            <scope>test</scope>
+        </dependency>
         <dependency>
             <groupId>org.spockframework</groupId>
             <artifactId>spock-spring</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.testcontainers</groupId>
-            <artifactId>postgresql</artifactId>
+            <groupId>org.springframework.kafka</groupId>
+            <artifactId>spring-kafka-test</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.testcontainers</groupId>
-            <artifactId>spock</artifactId>
+            <artifactId>postgresql</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.springframework.kafka</groupId>
-            <artifactId>spring-kafka-test</artifactId>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>spock</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
             <artifactId>kafka</artifactId>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-web</artifactId>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 
     <profiles>
index 5020dce..51b0238 100644 (file)
@@ -21,6 +21,7 @@
 package org.onap.cps.integration.base
 
 import java.time.OffsetDateTime
+import java.time.format.DateTimeFormatter
 import org.onap.cps.api.CpsAnchorService
 import org.onap.cps.api.CpsDataService
 import org.onap.cps.api.CpsDataspaceService
@@ -39,6 +40,7 @@ import org.onap.cps.spi.exceptions.DataspaceNotFoundException
 import org.onap.cps.spi.model.DataNode
 import org.onap.cps.spi.repository.DataspaceRepository
 import org.onap.cps.spi.utils.SessionManager
+import org.onap.cps.utils.JsonObjectMapper
 import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration
 import org.springframework.boot.autoconfigure.domain.EntityScan
@@ -48,6 +50,7 @@ import org.springframework.context.annotation.ComponentScan
 import org.springframework.data.jpa.repository.config.EnableJpaRepositories
 import org.springframework.http.HttpStatus
 import org.springframework.http.MediaType
+import org.springframework.test.web.client.ExpectedCount
 import org.springframework.test.web.client.MockRestServiceServer
 import org.springframework.test.web.servlet.MockMvc
 import org.springframework.web.client.RestTemplate
@@ -56,13 +59,11 @@ import spock.lang.Shared
 import spock.lang.Specification
 import spock.util.concurrent.PollingConditions
 
-import java.time.format.DateTimeFormatter
-
-import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo
-import static org.springframework.test.web.client.response.MockRestResponseCreators.withStatus
 import static org.onap.cps.ncmp.api.impl.ncmppersistence.NcmpPersistence.NCMP_DATASPACE_NAME
 import static org.onap.cps.ncmp.api.impl.ncmppersistence.NcmpPersistence.NCMP_DMI_REGISTRY_ANCHOR
 import static org.onap.cps.ncmp.api.impl.ncmppersistence.NcmpPersistence.NCMP_DMI_REGISTRY_PARENT
+import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo
+import static org.springframework.test.web.client.response.MockRestResponseCreators.withStatus
 
 @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.MOCK, classes = [CpsDataspaceService])
 @Testcontainers
@@ -77,10 +78,10 @@ abstract class CpsIntegrationSpecBase extends Specification {
     DatabaseTestContainer databaseTestContainer = DatabaseTestContainer.getInstance()
 
     @Shared
-    KafkaTestContainer kafkaTestContainer = KafkaTestContainer.getInstance();
+    KafkaTestContainer kafkaTestContainer = KafkaTestContainer.getInstance()
 
     @Autowired
-    MockMvc mvc;
+    MockMvc mvc
 
     @Autowired
     CpsDataspaceService cpsDataspaceService
@@ -115,12 +116,15 @@ abstract class CpsIntegrationSpecBase extends Specification {
     @Autowired
     ModuleSyncWatchdog moduleSyncWatchdog
 
-    MockRestServiceServer mockDmiServer = null
+    @Autowired
+    JsonObjectMapper jsonObjectMapper
 
-    static final DMI_URL = 'http://mock-dmi-server'
+    MockRestServiceServer mockDmiServer = null
 
-    def static GENERAL_TEST_DATASPACE = 'generalTestDataspace'
-    def static BOOKSTORE_SCHEMA_SET = 'bookstoreSchemaSet'
+    static DMI_URL = 'http://mock-dmi-server'
+    static NO_MODULE_SET_TAG = ''
+    static GENERAL_TEST_DATASPACE = 'generalTestDataspace'
+    static BOOKSTORE_SCHEMA_SET = 'bookstoreSchemaSet'
 
     def static initialized = false
     def now = OffsetDateTime.now()
@@ -134,10 +138,6 @@ abstract class CpsIntegrationSpecBase extends Specification {
         mockDmiServer = MockRestServiceServer.bindTo(restTemplate).ignoreExpectOrder(true).build()
     }
 
-    def cleanup() {
-        mockDmiServer.reset()
-    }
-
     def static readResourceDataFile(filename) {
         return new File('src/test/resources/data/' + filename).text
     }
@@ -200,15 +200,13 @@ abstract class CpsIntegrationSpecBase extends Specification {
 
     // *** NCMP Integration Test Utilities ***
 
-    def registerCmHandle(dmiPlugin, cmHandleId, moduleSetTag, dmiModuleReferencesResponse, dmiModuleResourcesResponse) {
+    def registerCmHandle(dmiPlugin, cmHandleId, moduleSetTag) {
         def cmHandleToCreate = new NcmpServiceCmHandle(cmHandleId: cmHandleId, moduleSetTag: moduleSetTag)
         networkCmProxyDataService.updateDmiRegistrationAndSyncModule(new DmiPluginRegistration(dmiPlugin: dmiPlugin, createdCmHandles: [cmHandleToCreate]))
-        mockDmiResponsesForModuleSync(dmiPlugin, cmHandleId, dmiModuleReferencesResponse, dmiModuleResourcesResponse)
         moduleSyncWatchdog.moduleSyncAdvisedCmHandles()
         new PollingConditions().within(3, () -> {
             CmHandleState.READY == networkCmProxyDataService.getCmHandleCompositeState(cmHandleId).cmHandleState
         })
-        mockDmiServer.reset()
     }
 
     def deregisterCmHandle(dmiPlugin, cmHandleId) {
@@ -231,6 +229,11 @@ abstract class CpsIntegrationSpecBase extends Specification {
                 .andRespond(withStatus(HttpStatus.SERVICE_UNAVAILABLE))
     }
 
+    def mockDmiWillRespondToHealthChecks(dmiPlugin) {
+        mockDmiServer.expect(ExpectedCount.between(0, Integer.MAX_VALUE), requestTo("${dmiPlugin}/actuator/health"))
+                .andRespond(withStatus(HttpStatus.OK).contentType(MediaType.APPLICATION_JSON).body('{"status":"UP"}'))
+    }
+
     def overrideCmHandleLastUpdateTime(cmHandleId, newUpdateTime) {
         String ISO_TIMESTAMP_PATTERN = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
         DateTimeFormatter ISO_TIMESTAMP_FORMATTER = DateTimeFormatter.ofPattern(ISO_TIMESTAMP_PATTERN);
index 0dabbf3..28c4280 100644 (file)
@@ -40,12 +40,15 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
 
 class NcmpBearerTokenPassthroughSpec extends CpsIntegrationSpecBase {
 
-    static final NO_MODULE_SET_TAG = ''
     static final MODULE_REFERENCES_RESPONSE = readResourceDataFile('mock-dmi-responses/bookStoreAWithModules_M1_M2_Response.json')
     static final MODULE_RESOURCES_RESPONSE = readResourceDataFile('mock-dmi-responses/bookStoreAWithModules_M1_M2_ResourcesResponse.json')
 
     def setup() {
-        registerCmHandle(DMI_URL, 'ch-1', NO_MODULE_SET_TAG, MODULE_REFERENCES_RESPONSE, MODULE_RESOURCES_RESPONSE)
+        mockDmiWillRespondToHealthChecks(DMI_URL)
+        mockDmiResponsesForModuleSync(DMI_URL, 'ch-1', MODULE_REFERENCES_RESPONSE, MODULE_RESOURCES_RESPONSE)
+        registerCmHandle(DMI_URL, 'ch-1', NO_MODULE_SET_TAG)
+        mockDmiServer.reset()
+        mockDmiWillRespondToHealthChecks(DMI_URL)
     }
 
     def cleanup() {
index d20ac33..a6b516c 100644 (file)
@@ -20,7 +20,8 @@
 
 package org.onap.cps.integration.functional
 
-
+import java.time.Duration
+import java.time.OffsetDateTime
 import org.apache.kafka.common.TopicPartition
 import org.apache.kafka.common.serialization.StringDeserializer
 import org.onap.cps.integration.KafkaTestContainer
@@ -31,16 +32,14 @@ import org.onap.cps.ncmp.api.impl.inventory.LockReasonCategory
 import org.onap.cps.ncmp.api.models.CmHandleRegistrationResponse
 import org.onap.cps.ncmp.api.models.DmiPluginRegistration
 import org.onap.cps.ncmp.api.models.NcmpServiceCmHandle
+import org.onap.cps.ncmp.events.lcm.v1.LcmEvent
 import spock.util.concurrent.PollingConditions
 
-import java.time.Duration
-import java.time.OffsetDateTime
-
 class NcmpCmHandleCreateSpec extends CpsIntegrationSpecBase {
 
     NetworkCmProxyDataService objectUnderTest
 
-    def kafkaConsumer = KafkaTestContainer.getConsumer("ncmp-group", StringDeserializer.class);
+    def kafkaConsumer = KafkaTestContainer.getConsumer('ncmp-group', StringDeserializer.class)
 
     static final MODULE_REFERENCES_RESPONSE_A = readResourceDataFile('mock-dmi-responses/bookStoreAWithModules_M1_M2_Response.json')
     static final MODULE_RESOURCES_RESPONSE_A = readResourceDataFile('mock-dmi-responses/bookStoreAWithModules_M1_M2_ResourcesResponse.json')
@@ -49,6 +48,7 @@ class NcmpCmHandleCreateSpec extends CpsIntegrationSpecBase {
 
     def setup() {
         objectUnderTest = networkCmProxyDataService
+        mockDmiWillRespondToHealthChecks(DMI_URL)
     }
 
     def 'CM Handle registration is successful.'() {
@@ -82,7 +82,8 @@ class NcmpCmHandleCreateSpec extends CpsIntegrationSpecBase {
             def records = message.records(new TopicPartition('ncmp-events', 0))
 
         and: 'the newest lcm event notification is received with READY state'
-            assert records.last().value().toString().contains('"cmHandleState":"READY"')
+            def notificationMessage = jsonObjectMapper.convertJsonString(records.last().value().toString(), LcmEvent)
+            assert notificationMessage.event.newValues.cmHandleState.value() == 'READY'
 
         and: 'the CM-handle has expected modules'
             assert ['M1', 'M2'] == objectUnderTest.getYangResourcesModuleReferences('ch-1').moduleName.sort()
@@ -122,8 +123,10 @@ class NcmpCmHandleCreateSpec extends CpsIntegrationSpecBase {
 
     def 'Create a CM-handle with existing moduleSetTag.'() {
         given: 'existing CM-handles cm-1 with moduleSetTag "A", and cm-2 with moduleSetTag "B"'
-            registerCmHandle(DMI_URL, 'ch-1', 'A', MODULE_REFERENCES_RESPONSE_A, MODULE_RESOURCES_RESPONSE_A)
-            registerCmHandle(DMI_URL, 'ch-2', 'B', MODULE_REFERENCES_RESPONSE_B, MODULE_RESOURCES_RESPONSE_B)
+            mockDmiResponsesForModuleSync(DMI_URL, 'ch-1', MODULE_REFERENCES_RESPONSE_A, MODULE_RESOURCES_RESPONSE_A)
+            mockDmiResponsesForModuleSync(DMI_URL, 'ch-2', MODULE_REFERENCES_RESPONSE_B, MODULE_RESOURCES_RESPONSE_B)
+            registerCmHandle(DMI_URL, 'ch-1', 'A')
+            registerCmHandle(DMI_URL, 'ch-2', 'B')
             assert ['M1', 'M2'] == objectUnderTest.getYangResourcesModuleReferences('ch-1').moduleName.sort()
             assert ['M1', 'M3'] == objectUnderTest.getYangResourcesModuleReferences('ch-2').moduleName.sort()
 
index c5c59e0..5421ad3 100644 (file)
@@ -41,23 +41,24 @@ class NcmpCmHandleUpgradeSpec extends CpsIntegrationSpecBase {
     static final INITIAL_MODULE_RESOURCES_RESPONSE = readResourceDataFile('mock-dmi-responses/bookStoreAWithModules_M1_M2_ResourcesResponse.json')
     static final UPDATED_MODULE_REFERENCES_RESPONSE = readResourceDataFile('mock-dmi-responses/bookStoreBWithModules_M1_M3_Response.json')
     static final UPDATED_MODULE_RESOURCES_RESPONSE = readResourceDataFile('mock-dmi-responses/bookStoreBWithModules_M1_M3_ResourcesResponse.json')
-    static final NO_MODULE_SET_TAG = ''
     static final CM_HANDLE_ID = 'ch-1'
     static final CM_HANDLE_ID_WITH_EXISTING_MODULE_SET_TAG = 'ch-2'
 
     def setup() {
         objectUnderTest = networkCmProxyDataService
+        mockDmiWillRespondToHealthChecks(DMI_URL)
     }
 
     def 'Upgrade CM-handle with new moduleSetTag or no moduleSetTag.'() {
-        given: 'an existing CM-handle with expected initial modules: M1 and M2'
-            registerCmHandle(DMI_URL, CM_HANDLE_ID, initialModuleSetTag, INITIAL_MODULE_REFERENCES_RESPONSE, INITIAL_MODULE_RESOURCES_RESPONSE)
-            assert ['M1', 'M2'] == objectUnderTest.getYangResourcesModuleReferences(CM_HANDLE_ID).moduleName.sort()
-
+        given: 'DMI will return modules for initial registration'
+            mockDmiResponsesForModuleSync(DMI_URL, CM_HANDLE_ID, INITIAL_MODULE_REFERENCES_RESPONSE, INITIAL_MODULE_RESOURCES_RESPONSE)
         and: 'DMI returns different modules for upgrade'
             mockDmiResponsesForModuleSync(DMI_URL, CM_HANDLE_ID, UPDATED_MODULE_REFERENCES_RESPONSE, UPDATED_MODULE_RESOURCES_RESPONSE)
 
-        when: "CM-handle is upgraded with given moduleSetTag '${updatedModuleSetTag}'"
+        when: 'a CM-handle is created with expected initial modules: M1 and M2'
+            registerCmHandle(DMI_URL, CM_HANDLE_ID, initialModuleSetTag)
+            assert ['M1', 'M2'] == objectUnderTest.getYangResourcesModuleReferences(CM_HANDLE_ID).moduleName.sort()
+        and: "the CM-handle is upgraded with given moduleSetTag '${updatedModuleSetTag}'"
             def cmHandlesToUpgrade = new UpgradedCmHandles(cmHandles: [CM_HANDLE_ID], moduleSetTag: updatedModuleSetTag)
             def dmiPluginRegistrationResponse = networkCmProxyDataService.updateDmiRegistrationAndSyncModule(
                     new DmiPluginRegistration(dmiPlugin: DMI_URL, upgradedCmHandles: cmHandlesToUpgrade))
@@ -101,11 +102,14 @@ class NcmpCmHandleUpgradeSpec extends CpsIntegrationSpecBase {
     }
 
     def 'Upgrade CM-handle with existing moduleSetTag.'() {
-        given: "an existing CM-handle handle with moduleSetTag '${updatedModuleSetTag}'"
-            registerCmHandle(DMI_URL, CM_HANDLE_ID_WITH_EXISTING_MODULE_SET_TAG, updatedModuleSetTag, UPDATED_MODULE_REFERENCES_RESPONSE, UPDATED_MODULE_RESOURCES_RESPONSE)
+        given: 'DMI will return modules for registration'
+            mockDmiResponsesForModuleSync(DMI_URL, CM_HANDLE_ID, INITIAL_MODULE_REFERENCES_RESPONSE, INITIAL_MODULE_RESOURCES_RESPONSE)
+            mockDmiResponsesForModuleSync(DMI_URL, CM_HANDLE_ID_WITH_EXISTING_MODULE_SET_TAG, UPDATED_MODULE_REFERENCES_RESPONSE, UPDATED_MODULE_RESOURCES_RESPONSE)
+        and: "an existing CM-handle handle with moduleSetTag '${updatedModuleSetTag}'"
+            registerCmHandle(DMI_URL, CM_HANDLE_ID_WITH_EXISTING_MODULE_SET_TAG, updatedModuleSetTag)
             assert ['M1', 'M3'] == objectUnderTest.getYangResourcesModuleReferences(CM_HANDLE_ID_WITH_EXISTING_MODULE_SET_TAG).moduleName.sort()
         and: "a CM-handle with moduleSetTag '${initialModuleSetTag}' which will be upgraded"
-            registerCmHandle(DMI_URL, CM_HANDLE_ID, initialModuleSetTag, INITIAL_MODULE_REFERENCES_RESPONSE, INITIAL_MODULE_RESOURCES_RESPONSE)
+            registerCmHandle(DMI_URL, CM_HANDLE_ID, initialModuleSetTag)
             assert ['M1', 'M2'] == objectUnderTest.getYangResourcesModuleReferences(CM_HANDLE_ID).moduleName.sort()
 
         when: "CM-handle is upgraded to moduleSetTag '${updatedModuleSetTag}'"
@@ -142,7 +146,8 @@ class NcmpCmHandleUpgradeSpec extends CpsIntegrationSpecBase {
 
     def 'Skip upgrade of CM-handle with same moduleSetTag as before.'() {
         given: 'an existing CM-handle with expected initial modules: M1 and M2'
-            registerCmHandle(DMI_URL, CM_HANDLE_ID, 'same', INITIAL_MODULE_REFERENCES_RESPONSE, INITIAL_MODULE_RESOURCES_RESPONSE)
+            mockDmiResponsesForModuleSync(DMI_URL, CM_HANDLE_ID, INITIAL_MODULE_REFERENCES_RESPONSE, INITIAL_MODULE_RESOURCES_RESPONSE)
+            registerCmHandle(DMI_URL, CM_HANDLE_ID, 'same')
             assert ['M1', 'M2'] == objectUnderTest.getYangResourcesModuleReferences(CM_HANDLE_ID).moduleName.sort()
 
         when: 'CM-handle is upgraded with the same moduleSetTag'
@@ -164,13 +169,14 @@ class NcmpCmHandleUpgradeSpec extends CpsIntegrationSpecBase {
     }
 
     def 'Upgrade of CM-handle fails due to DMI error.'() {
-        given: 'an existing CM-handle'
-            registerCmHandle(DMI_URL, CM_HANDLE_ID, 'oldTag', INITIAL_MODULE_REFERENCES_RESPONSE, INITIAL_MODULE_RESOURCES_RESPONSE)
-
-        and: 'DMI returns error code'
+        given: 'DMI will return modules for initial registration'
+            mockDmiResponsesForModuleSync(DMI_URL, CM_HANDLE_ID, INITIAL_MODULE_REFERENCES_RESPONSE, INITIAL_MODULE_RESOURCES_RESPONSE)
+        and: 'DMI returns error code for upgrade'
             mockDmiServer.expect(anything()).andRespond(withStatus(HttpStatus.SERVICE_UNAVAILABLE))
 
-        when: "CM-handle is upgraded"
+        when: 'a CM-handle is created'
+            registerCmHandle(DMI_URL, CM_HANDLE_ID, 'oldTag')
+        and: 'the CM-handle is upgraded'
             def cmHandlesToUpgrade = new UpgradedCmHandles(cmHandles: [CM_HANDLE_ID], moduleSetTag: 'newTag')
             networkCmProxyDataService.updateDmiRegistrationAndSyncModule(
                     new DmiPluginRegistration(dmiPlugin: DMI_URL, upgradedCmHandles: cmHandlesToUpgrade))
diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/functional/NcmpRestApiSpec.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/functional/NcmpRestApiSpec.groovy
new file mode 100644 (file)
index 0000000..d7f8771
--- /dev/null
@@ -0,0 +1,95 @@
+/*
+ *  ============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=========================================================
+ */
+
+package org.onap.cps.integration.functional
+
+import org.onap.cps.integration.base.CpsIntegrationSpecBase
+import org.springframework.http.MediaType
+import spock.util.concurrent.PollingConditions
+import static org.hamcrest.Matchers.containsInAnyOrder
+import static org.hamcrest.Matchers.hasSize
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status
+
+class NcmpRestApiSpec extends CpsIntegrationSpecBase {
+
+    static final MODULE_REFERENCES_RESPONSE_A = readResourceDataFile('mock-dmi-responses/bookStoreAWithModules_M1_M2_Response.json')
+    static final MODULE_RESOURCES_RESPONSE_A = readResourceDataFile('mock-dmi-responses/bookStoreAWithModules_M1_M2_ResourcesResponse.json')
+    static final MODULE_REFERENCES_RESPONSE_B = readResourceDataFile('mock-dmi-responses/bookStoreBWithModules_M1_M3_Response.json')
+    static final MODULE_RESOURCES_RESPONSE_B = readResourceDataFile('mock-dmi-responses/bookStoreBWithModules_M1_M3_ResourcesResponse.json')
+
+    def setup() {
+        mockDmiWillRespondToHealthChecks(DMI_URL)
+    }
+
+    def 'Register CM Handles using REST API.'() {
+        given: 'DMI will return modules'
+            mockDmiResponsesForModuleSync(DMI_URL, 'ch-1', MODULE_REFERENCES_RESPONSE_A, MODULE_RESOURCES_RESPONSE_A)
+            mockDmiResponsesForModuleSync(DMI_URL, 'ch-2', MODULE_REFERENCES_RESPONSE_A, MODULE_RESOURCES_RESPONSE_A)
+            mockDmiResponsesForModuleSync(DMI_URL, 'ch-3', MODULE_REFERENCES_RESPONSE_B, MODULE_RESOURCES_RESPONSE_B)
+        and: 'a POST request is made to register the CM Handles'
+            def requestBody = '{"dmiPlugin":"'+DMI_URL+'","createdCmHandles":[{"cmHandle":"ch-1"},{"cmHandle":"ch-2"},{"cmHandle":"ch-3"}]}'
+            mvc.perform(post('/ncmpInventory/v1/ch').contentType(MediaType.APPLICATION_JSON).content(requestBody))
+                    .andExpect(status().is2xxSuccessful())
+        when: 'module sync runs'
+            moduleSyncWatchdog.moduleSyncAdvisedCmHandles()
+        then: 'CM-handles go to READY state'
+            new PollingConditions(timeout: 3, delay: 0.5).eventually {
+                mvc.perform(get('/ncmp/v1/ch/ch-1'))
+                        .andExpect(status().isOk())
+                        .andExpect(jsonPath('$.state.cmHandleState').value('READY'))
+            }
+    }
+
+    def 'Search for CM Handles by module using REST API.'() {
+        given: 'a JSON request body containing search parameter'
+            def requestBodyWithModuleCondition = """{
+                    "cmHandleQueryParameters": [
+                            {
+                                "conditionName": "hasAllModules",
+                                "conditionParameters": [ {"moduleName": "%s"} ]
+                            }
+                    ]
+                }""".formatted(moduleName)
+        expect: "a search for module ${moduleName} returns expected CM handles"
+            mvc.perform(post(DMI_URL+'/ncmp/v1/ch/id-searches').contentType(MediaType.APPLICATION_JSON).content(requestBodyWithModuleCondition))
+                    .andExpect(status().is2xxSuccessful())
+                    .andExpect(jsonPath('$[*]', containsInAnyOrder(expectedCmHandles.toArray())))
+                    .andExpect(jsonPath('$', hasSize(expectedCmHandles.size())));
+        where:
+            moduleName || expectedCmHandles
+            'M1'       || ['ch-1', 'ch-2', 'ch-3']
+            'M2'       || ['ch-1', 'ch-2']
+            'M3'       || ['ch-3']
+    }
+
+    def 'De-register CM handles using REST API.'() {
+        when: 'a POST request is made to deregister the CM Handle'
+            def requestBody = '{"dmiPlugin":"'+DMI_URL+'", "removedCmHandles": ["ch-1", "ch-2", "ch-3"]}'
+            mvc.perform(post('/ncmpInventory/v1/ch').contentType(MediaType.APPLICATION_JSON).content(requestBody))
+                    .andExpect(status().is2xxSuccessful())
+        then: 'the CM handles are not found using GET'
+            (1..3).each {
+                mvc.perform(get('/ncmp/v1/ch/ch-'+it)).andExpect(status().is4xxClientError())
+            }
+    }
+}
index 9e2f8b4..9919e8c 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.cps</groupId>
         <artifactId>cps-parent</artifactId>
-        <version>3.4.7-SNAPSHOT</version>
+        <version>3.4.8-SNAPSHOT</version>
         <relativePath>../cps-parent/pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
diff --git a/pom.xml b/pom.xml
index 2a02945..df89d96 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.7-SNAPSHOT</version>\r
+    <version>3.4.8-SNAPSHOT</version>\r
     <packaging>pom</packaging>\r
 \r
     <name>cps</name>\r
diff --git a/releases/3.4.7-container.yaml b/releases/3.4.7-container.yaml
new file mode 100644 (file)
index 0000000..7eb475b
--- /dev/null
@@ -0,0 +1,8 @@
+distribution_type: container
+container_release_tag: 3.4.7
+project: cps
+log_dir: cps-maven-docker-stage-master/939/
+ref: b4f8b794c9bcb6342f038d8a3bd49751860d2220
+containers:
+  - name: 'cps-and-ncmp'
+    version: '3.4.7-20240329T112056Z'
diff --git a/releases/3.4.7.yaml b/releases/3.4.7.yaml
new file mode 100644 (file)
index 0000000..b7e3092
--- /dev/null
@@ -0,0 +1,4 @@
+distribution_type: maven
+log_dir: cps-maven-stage-master/947/
+project: cps
+version: 3.4.7
\ No newline at end of file
index bbaf5fe..02c6079 100644 (file)
@@ -25,7 +25,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.onap.cps</groupId>
     <artifactId>spotbugs</artifactId>
-    <version>3.4.7-SNAPSHOT</version>
+    <version>3.4.8-SNAPSHOT</version>
 
     <properties>
         <nexusproxy>https://nexus.onap.org</nexusproxy>
index b3ec570..767a534 100644 (file)
@@ -22,7 +22,7 @@
 
 major=3
 minor=4
-patch=7
+patch=8
 
 base_version=${major}.${minor}.${patch}